SARP_current.pwn 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007
  1. /*
  2. __________ __ __ __________ .__ .__
  3. \______ \_______ ____ |__| ____ _____/ |_ \______ \ ____ | | ____ ______ | | _____ ___.__.
  4. | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\ | _// _ \| | _/ __ \\____ \| | \__ \< | |
  5. | | | | \( <_> ) | \ ___/\ \___| | | | ( <_> ) |_\ ___/| |_> > |__/ __ \\___ |
  6. |____| |__| \____/\__| |\___ >\___ >__| |____|_ /\____/|____/\___ > __/|____(____ / ____|
  7. \______| \/ \/ \/ \/|__| \/\/
  8. _ ____ _ _____ ____ _ ____ _ __
  9. / \__/|/ _ \/ \ |\/ __// __\/ \/ _\/ |/ /
  10. | |\/||| / \|| | //| \ | \/|| || / | /
  11. | | ||| |-||| \// | /_ | /| || \_ | \
  12. \_/ \|\_/ \|\__/ \____\\_/\_\\_/\____/\_|\_
  13. _ ____ ___ _ ____ ____ _ _ ____ ___ _
  14. / \__/|/ _ \\ \// / _\/ _ \/ \ /|/ \ /|/ _ \\ \//
  15. | |\/||| / \| \ / | / | / \|| |\ ||| | ||| / \| \ /
  16. | | ||| |-|| / \ | \__| \_/|| | \||| |/\||| |-|| / /
  17. \_/ \|\_/ \|/__/\\ \____/\____/\_/ \|\_/ \|\_/ \|/_/
  18. */
  19. #pragma option -d3
  20. #include <a_samp>
  21. #include <a_npc>
  22. #include <streamer>
  23. #include <a_http>
  24. #include <crashdetect>
  25. #define FIXES_ServerVarMsg 0
  26. #include <fixes>
  27. #include <log>
  28. #include <YSI_Coding\y_hooks>
  29. #include <YSI_Coding\y_inline>
  30. #include <YSI\y_dialog>
  31. #include <sscanf2>
  32. #include <zcmd>
  33. #include <mSelection>
  34. //#define UseDiscordBot 1
  35. #include <socket>
  36. #include <colors>
  37. #include <SKY> // Alias Custom Damage
  38. #include <weapon-config> // Custom Damage
  39. /*#if UseDiscordBot 1
  40. #include <a_json>
  41. #include <discord>
  42. #endif*/
  43. // Factions
  44. #define MAX_FACTIONS 15
  45. #define FACTION_NONE 0
  46. #define FACTION_SAPD 1
  47. #define FACTION_FBI 2
  48. #define FACTION_SASD 3
  49. #define FACTION_FMD 4
  50. #define FACTION_ARMY 5
  51. #define FACTION_GOV 6
  52. #define FACTION_JD 7
  53. #define FACTION_NEWS 9
  54. #define FACTION_TAXI 10
  55. #define FACTION_S9 11
  56. #define FACTION_DEA 12
  57. #define FACTION_ATF 13
  58. #define FACTION_SANG 14
  59. #define FACTION_SAS 15
  60. #define MAX_SAPD_RANKS 9
  61. #define MAX_FBI_RANKS 7
  62. #define MAX_SAST_RANKS 7
  63. #define MAX_SAFMD_RANKS 6
  64. #define MAX_DOC_RANKS 6
  65. #define MAX_GOV_RANKS 5
  66. #define MAX_SCOTUS_RANKS 1
  67. #define MAX_HITMEN_RANKS 6
  68. #define MAX_NEWS_RANKS 7
  69. #define MAX_TAXI_RANKS 6
  70. #define MAX_S9_RANKS 4
  71. #define MAX_SAS_RANKS 8
  72. #define MAX_SANG_RANKS 6
  73. #define MAX_SPLIT_LENGTH 85
  74. // If the line below is uncommented, the S9 faction will be disabled
  75. // #define S9_DISABLED
  76. // HQ coordinates
  77. #define HQ_SYNDICATE 420.61, 2522.76, 9.99
  78. #define HQ_CJNG 421.53, 2521.25, 9.99
  79. #define HQ_SECTOR9 255.3861, 76.6493, 1003.6406
  80. #define HQ_HITMAN 312.7244, -166.1414, 999.6010
  81. // Dialogs
  82. #define DIALOG_BANNED 63336
  83. #define DIALOG_LOGIN 1
  84. #define DIALOG_REGISTER 2
  85. #define DIALOG_BUSSINESS_BUY 3
  86. #define DIALOG_BUSINESS_DRINK 4
  87. #define DIALOG_TRAIN 5
  88. #define DIALOG_BUYMEAL 6
  89. #define DIALOG_PG_MAIN 7
  90. #define DIALOG_PG_WEAPONRY 8
  91. #define DIALOG_LEO_MAIN 9
  92. #define DIALOG_SAPD_WEAPONRY 10
  93. #define DIALOG_SAPD_SWAT 11
  94. #define DIALOG_SAPD_SWAT_WEAPONS 12
  95. #define DIALOG_SAPD_SWAT_ACCESSORIES 14
  96. #define DIALOG_ADMIN_COLORCHANGER 15
  97. #define DIALOG_JOBHELP 16
  98. #define DIALOG_JOBHELP_DETECTIVE 17
  99. #define DIALOG_JOBHELP_LAWYER 18
  100. #define DIALOG_JOBHELP_DDEALER 19
  101. #define DIALOG_JOBHELP_MECHANIC 20
  102. #define DIALOG_JOBHELP_BODYGUARD 21
  103. #define DIALOG_JOBHELP_ADEALER 22
  104. #define DIALOG_JOBHELP_BOXER 23
  105. #define DIALOG_JOBHELP_TAXIDR 24
  106. #define DIALOG_JOBHELP_DRUGSM 25
  107. #define DIALOG_JOB_BOTS 35000
  108. #define DIALOG_SAS_MAIN 26
  109. #define DIALOG_S9_MAIN 27
  110. #define DIALOG_S9_ARMORY 28
  111. #define DIALOG_S9_RESTRICTED 29
  112. #define DIALOG_S9_BADGES 30
  113. #define DIALOG_NAMECHANGES 31
  114. #define DIALOG_NAMECHANGES_OLD 32
  115. #define DIALOG_NAMECHANGES_NEW 33
  116. #define DIALOG_NAMECHANGES_ADMIN 34
  117. #define DIALOG_NAMECHANGES_ID 35
  118. #define DIALOG_S9_RANKS 37
  119. #define DIALOG_LSFMD_MAIN 67
  120. #define DIALOG_LSFMD_GEAR 68
  121. #define DIALOG_SENATE_MAIN 91
  122. #define DIALOG_SENATE_ARMORY 92
  123. #define DIALOGID_GUIDE_MAIN 179
  124. #define DIALOGID_GUIDE_MONEY 180
  125. #define DIALOGID_GUIDE_GUNS 181
  126. #define DIALOGID_GUIDE_FACTION 182
  127. #define DIALOGID_GUIDE_ROLEPLAY 183
  128. #define DIALOGID_GUIDE_LEVEL 184
  129. #define DIALOG_HC_MAIN 193
  130. #define DIALOG_HC_ARMORY 194
  131. #define CLUB_DOOR_ID 243
  132. #define DIALOG_JOBHELP_PDEALER 276
  133. #define DIALOG_JOBHELP_WASTECOLLECTOR 277
  134. #define DIALOG_VERSION 999
  135. #define DIALOG_MAP_LOCATIONS 998
  136. #define DIALOG_CALC_1 1400
  137. #define DIALOG_CALC_2 1401
  138. #define DIALOG_CALC_3 1402
  139. #define DIALOG_STATS 1403
  140. #define DIALOG_STATS1 14022
  141. #define DIALOG_SKILLS 1404
  142. #define DIALOG_WANTED 1405
  143. #define DIALOG_MC_WEAPONS 2008
  144. #define DIALOG_DONORCLUB_DRINK 2595
  145. #define DIALOG_JOBHELP_MINER 2755
  146. #define DIALOG_APPEARANCE_MAIN 3941
  147. #define DIALOG_APPEARANCE_HEIGHT 3942
  148. #define DIALOG_APPEARANCE_AGE 3943
  149. #define DIALOG_APPEARANCE_BUILD 3944
  150. #define DIALOG_APPEARANCE_ETHNICITY 3945
  151. #define DIALOG_APPEARANCE_EYE 3946
  152. #define DIALOG_APPEARANCE_GENDER 3947
  153. #define DIALOG_APPEARANCE_UNIQUE 3948
  154. #define DIALOG_APPEARANCE_DISPLAY 3949
  155. #define DIALOG_APPEARANCE_DISPLAYMDC 3950
  156. #define DIALOG_S9_EDIT_BADGE 3951
  157. #define DIALOG_S9_EDIT_BADGE_NAME 3952
  158. #define DIALOG_S9_EDIT_BADGE_FACTION 3953
  159. #define DIALOG_S9_EDIT_BADGE_WEAPONS 3954
  160. #define DIALOG_ARMORY 21521
  161. #define DIALOG_GAMBLE_1 1784
  162. #define DIALOG_GAMBLE_2 1785
  163. #define DIALOG_ADMINS 10000
  164. #define DIALOG_SECURITY_CODE 10001
  165. #define DIALOG_TIJUANA_ARMORY 21691 // used in groups.inc, check the file for the response as well
  166. #define DIALOG_GREYWOLF_ARMORY 3216
  167. #define TRUNKDIALOG 6279
  168. #define TRUNKPUTGUN 6278
  169. #define TRUNKTAKEGUN 6277
  170. #define TRUNKPUTVEST 6276
  171. #define TRUNKTAKEVEST 6275
  172. #define TRUNKPUTMAN 6274
  173. #define TRUNKTAKEMAN 6273
  174. /* Bots Dialog */
  175. #define DIALOG_BUYGUN 2555 //emmet
  176. #define DIALOG_EDITDOOR_CREATEPRIVATE 2556 //private doors
  177. #define DIALOG_EDITDOOR_EIPOS 2557 //private doors
  178. /*
  179. Trunk dialogs
  180. */
  181. stock logswrite(file[] , text[])
  182. {
  183. new File:pp=fopen(file,io_append);
  184. fwrite(pp,text);
  185. fwrite(pp,"\r\n");
  186. fclose(pp);
  187. return 1;
  188. }
  189. #define TRUNK_TAKE_CANNABIS 6266
  190. #define TRUNK_PUT_CANNABIS 6267
  191. #define TRUNK_TAKE_STUFF 6268
  192. #define TRUNK_PUT_STUFF 6269
  193. #define TRUNK_TAKE_COCAINE 6270
  194. #define TRUNK_PUT_COCAINE 6271
  195. #define TRUNK_CHECK 6272
  196. #define TRUNK_PUT_METH 6273
  197. #define TRUNK_TAKE_METH 6274
  198. #define TRUNK_PUT_XANAX 6275
  199. #define TRUNK_TAKE_XANAX 6276
  200. #define BUYCARDIALOG 6264
  201. #define CARDIALOG 6265
  202. #define OWNCARUPGRADE 6263
  203. #define OWNCARUPGRADE2 6262
  204. #define CARTRACK 6261
  205. #define DEALERSHIPDIALOG 6250
  206. #define BUYLP 6249
  207. #define BUYLP2 6248
  208. #define TOWCAR 6247
  209. #define VEHINFO 6246
  210. #define GIVEKEYS 6245
  211. #define DIALOG_HITMAN 6494
  212. #define AMSGS 7000
  213. #define FAMILY_DIALOG 7001
  214. #define FAMILY_INFO 7002
  215. #define DIALOG_HOUSEUPGRADE 8241
  216. #define DIALOG_MOD_EDIT 12131
  217. #define DIALOG_FREE_NAMECHANGE 12136
  218. #define DIALOG_FREE_NAMECHANGE1 DIALOG_FREE_NAMECHANGE + 1
  219. #define DIALOG_SYNDICATE_NAMECHANGE 12150
  220. #define DIALOG_PAINTBALL_WEAPONS1 12221
  221. #define DIALOG_PAINTBALL_WEAPONS2 12222
  222. #define DIALOG_PAINTBALL_WEAPONS3 12223
  223. #define DIALOG_PAINTBALL_WEAPONS4 12224
  224. #define DIALOG_PAINTBALL_WEAPONS5 12225
  225. #define DIALOG_PAINTBALL_WEAPONS6 12226
  226. #define DIALOG_TUTORIAL 13849
  227. #define DIALOG_TUTORIAL_FACTIONS 13850
  228. #define DIALOG_TUTORIAL_FINISH 13851
  229. #define DIALOG_GEAR_DELETE 13899
  230. #define DIALOG_UNUSED 14121
  231. #define DIALOG_MDC_WANTED 14023
  232. #define DIALOG_BUYCLOTHES_CONFIRM 14065
  233. #define DIALOG_TAXI 15824
  234. #define DIALOG_TAXI_UNIFORMS DIALOG_TAXI+1
  235. #define DIALOG_TAXI_WEAPONS DIALOG_TAXI+2
  236. #define DIALOG_EDITDOOR_MAIN 17400
  237. #define DIALOG_EDITDOOR_CREATE 17500
  238. #define DIALOG_EDITDOOR_NAME1 17600
  239. #define DIALOG_EDITDOOR_NAME2 17601
  240. #define DIALOG_EDITDOOR_EPOS 17700
  241. #define DIALOG_EDITDOOR_IPOS 17800
  242. #define DIALOG_EDITDOOR_ICON1 17900
  243. #define DIALOG_EDITDOOR_ICON2 17901
  244. #define DIALOG_EDITDOOR_REM1 17910
  245. #define DIALOG_EDITDOOR_REM2 17911
  246. #define DIALOG_EDITDOOR_PASS1 17920
  247. #define DIALOG_EDITDOOR_PASS2 17921
  248. #define DIALOG_LASTGUNS 17923
  249. #define DIALOG_EDITDOOR_FREEZE 17931
  250. #define DIALOG_EDITDOOR_OWNER1 17932
  251. #define SANEWSLOCKER 17933
  252. #define SANEWSGUNS 17934
  253. #define DIALOG_EDITDOOR_OWNER2 17935
  254. #define DIALOG_CHARGES_REMOVE 17959
  255. #define DIALOG_ID_PLAYER_PASS 18100
  256. #define DIALOG_CRIME 21522
  257. #define DIALOG_MAP 21742
  258. #define DIALOG_BUYACCESSOR 24213
  259. #define DIALOG_BUYACCESSOR_MAIN 24214
  260. #define DIALOG_JOBHELP_PIZZADELIVER 27392
  261. #define DIALOG_JOBHELP_FARMER 27395
  262. #define DIALOG_JOBHELP_GRASS 27396
  263. #define DIALOG_MDC_MAIN 31667
  264. #define DIALOG_BAR_DYN 32762
  265. #define DIALOG_CLEARMOD 25322
  266. #define AdmErrorMsg SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You're not authorized to use that command.")
  267. #define MDC_MAIN ShowPlayerDialog(playerid, DIALOG_MDC_MAIN, DIALOG_STYLE_LIST, "{2641FE}Mobile Data Computer", "Run a check\nBe On Look Out\nWeapons License Log\nWanted\n{FF6347}Sign Out{FFFFFF}", "Select", "{FF6347}Sign out")
  268. // a_samp redefines
  269. #undef MAX_PLAYERS
  270. #define MAX_PLAYERS 300
  271. #undef MAX_VEHICLES
  272. #define MAX_VEHICLES 2000
  273. #define MAX_PLAYERVEHICLES 3
  274. //new UnlockServer;
  275. #define HOUSE_UNOWNED 19523
  276. #define HOUSE_ONLINE 1273
  277. #define HOUSE_OFFLINE 19522
  278. #define HELMET_SLOT 8
  279. #define FLASHLIGHT_SLOT1 8
  280. #define FLASHLIGHT_SLOT2 9
  281. #define MAX_HOSP_POINTS 3
  282. #define MAX_FAMILY_STRIKE 3 // Families will be disbanded when they reach this amount
  283. #define pauseUpdateTimer1 6
  284. #define pauseUpdateTimer2 (pauseUpdateTimer1 * 1000)
  285. #define DEVMODE 0
  286. // DoC related
  287. #define DOC_WORLD 50
  288. #define DOC_INT 50
  289. #define DIALOG_PG_UNIFORM 32763
  290. // SANG lockers
  291. #define DIALOG_SANG_MAIN 31431
  292. #define DIALOG_SANG_WEAPONRY 31432
  293. #define DIALOG_SANG_UNIFORM 31433
  294. // Is the RRK disabled?
  295. new FMD_RRK_DISABLED = false;
  296. new DOUBLE_EXP_MODE = 0;
  297. new ADMIN_ENABLED_DOUBLE_EXP_MODE = 0;
  298. new gamemodeLoaded = 0;
  299. #include <progress2>
  300. new PlayerBar:workingProgress[MAX_PLAYERS], PlayerBar:breakcuffs[MAX_PLAYERS];
  301. #define MYSQL_USE_YINLINE
  302. #include <a_mysql>
  303. #include <foreach>
  304. #include <DiniSarp>
  305. //#include <a_http>
  306. #if !defined STREAMER_OBJECT_SD
  307. #define STREAMER_OBJECT_SD 350.0 //try balance the server side stuff v client side
  308. #endif //intention: do server stuff first, then draw for client
  309. #if !defined STREAMER_OBJECT_DD
  310. #define STREAMER_OBJECT_DD 250.0
  311. #endif
  312. #include <zones>
  313. #include <regex>
  314. //#include <formatex>
  315. // Full vest on spawn exploit fix
  316. new FVestProtected[MAX_PLAYERS];
  317. Timer:FVestProtection(playerid)
  318. {
  319. FVestProtected[playerid] = 0;
  320. return 1;
  321. }
  322. //is a valid name by Jacob
  323. //valid names: Jacob_Alex_Malcom, Jacob_McAlex_McMalcom, Jacob_Alex_McMalcom, Jacob_Malcom
  324. //invalid names: Jacob_, Jacob__Malcom, Jacob_Malcom_, jacob_malcom, JACOB_MALCOM, Jacob_MALcom
  325. #define IsValidName(%1) \
  326. regex_match(%1, "^[A-Z]{1}[a-z]+\
  327. _{1}[A-Z]{1,2}([a-z]{1}[A-Z]{1})?[a-z]+\
  328. (_{1}[A-Z]{1,2}([a-z]{1}[A-Z]{1})?[a-z]+)?$")
  329. new IsPlayerAlreadyConnected[MAX_PLAYERS] = 0;
  330. split(const strsrc[], strdest[][], delimiter)
  331. {
  332. new i, li;
  333. new aNum;
  334. new len;
  335. while(i <= strlen(strsrc))
  336. {
  337. if(strsrc[i] ==delimiter || i ==strlen(strsrc))
  338. {
  339. len = strmid(strdest[aNum], strsrc, li, i, 128);
  340. strdest[aNum][len] = 0;
  341. li = i +1;
  342. aNum++;
  343. }
  344. i++;
  345. }
  346. return 1;
  347. }
  348. // Neon variables
  349. new Neon[MAX_VEHICLES],
  350. Neon2[MAX_VEHICLES],
  351. Neon3[MAX_VEHICLES],
  352. Neon4[MAX_VEHICLES];
  353. #include "../gamemodes/inc/custom_skins/array.inc"
  354. #include "../gamemodes/inc/amessages.inc"
  355. #include "../gamemodes/inc/intcoords.inc"
  356. #include "../gamemodes/inc/vip.inc"
  357. #include "../gamemodes/inc/vehicleSpawns.inc"
  358. #include "../gamemodes/inc/welcomemsg.inc"
  359. #include "../gamemodes/inc/cuffs.inc"
  360. #include "../gamemodes/inc/radios.inc"
  361. #include "../gamemodes/inc/map.inc"
  362. //#include "../gamemodes/inc/core/useful.inc"
  363. #include "../config/mysql.inc" //mysql server config details
  364. //#include "../gamemodes/inc/donorvehicles.inc" //donorcars
  365. //Core includes
  366. #include "../gamemodes/inc/core/useful.inc" //USEFUL ~FUNCTIONS~ ONLY
  367. #define MAX_ADVERTS 5
  368. enum adInfo {
  369. AD_AUTHOR[MAX_PLAYER_NAME],
  370. AD_STRING[128],
  371. AD_PHONE,
  372. bool:AD_ACTIVE
  373. }
  374. new advertInfo[MAX_ADVERTS][adInfo];
  375. new LastAd, adCount;
  376. enum _blockedNumbers
  377. {
  378. Number1,
  379. Number2,
  380. Number3,
  381. Number4,
  382. Number5
  383. }
  384. new bool:BlockedPM[MAX_PLAYERS][MAX_PLAYERS] = {false, ...};
  385. new
  386. bool: cameraTaken,
  387. cameraPlacedByID,
  388. cameraObject,
  389. Text3D: cameraText,
  390. bool: cameraLive,
  391. Float: cameraPos[4],
  392. cameraVirtualWorld,
  393. cameraInterior;
  394. new bool:beingDragged[MAX_PLAYERS], dragTimer[MAX_PLAYERS], bool:isDragging[MAX_PLAYERS], bool:OOCRadioOff[20];
  395. new Float:pbHealth[MAX_PLAYERS], Float:pbArmor[MAX_PLAYERS], inBarracksID[MAX_PLAYERS], helperVeh[MAX_PLAYERS], bool:slipOff[MAX_PLAYERS], bool:inHouse[MAX_PLAYERS], bool:MethEffect[MAX_PLAYERS];
  396. new BeforeStatBoost[MAX_PLAYERS];
  397. new bool:hitmanUndercover[MAX_PLAYERS];
  398. //==============================[UPDATE THESE]==================================
  399. // Please keep these updated with every commit, not every commit has to be on
  400. // /version but please keep the gamemode version updated with every commit.
  401. #define GAMEMODE_VERSION "PRP v1.6"
  402. #define BETAMODE_VERSION "PRP v1.6 (Dev)"
  403. #define MOTD_COLOR COLOR_YELLOW2
  404. #define MOTD_MESSAGE1 "{FFFFFF}Use {7DAEFF}(/newb)ie{FFFFFF} to speak in the {7DAEFF}newbie chat channel{FFFFFF} if you have any server related questions."
  405. #define MOTD_MESSAGE2 "{FFFFFF}You can use {FFFF91}/help{FFFFFF} to see a list of commands or to display {FFFF91}job information{FFFFFF}."
  406. #define MOTD_MESSAGE4 "{FFFFFF}Have fun and enjoy your stay."
  407. #define displayHudTime 5
  408. #define MAX_VEHICLE_DISTANCE_TO_TRAILER 15
  409. #define MAX_VEHICLE_DISTANCE_CHANGE 50
  410. #define MAX_CCTV_DYNAMIC 50
  411. #define CCTV_OBJID 1886
  412. #define MAX_BARS 100
  413. #define MAX_CCTVS 100
  414. //================================[Enumerators]=================================
  415. stock IsAnAircraft(vehicleid)
  416. {
  417. switch(GetVehicleModel(vehicleid))
  418. {
  419. case 417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593: return 1;
  420. }
  421. return 0;
  422. }
  423. new inAndromadaID[MAX_PLAYERS] = INVALID_VEHICLE_ID;
  424. new hasTruckCheckpoint[MAX_PLAYERS]; //index of garbage truck array (slot), set on /gettrash
  425. new unloadingTrashTimer[MAX_PLAYERS];
  426. // Faction leader chat toggled
  427. new toggedflchat[MAX_PLAYERS];
  428. enum trashlocInfo
  429. {
  430. Float:posX,
  431. Float:posY,
  432. Float:posZ,
  433. tAmount,
  434. tLimit,
  435. Text3D:trashLabelID
  436. }
  437. new trashInfo[36][trashlocInfo] = {
  438. {656.0162, -440.2989, 16.3359, 5, 5},
  439. {668.2491, -623.4116, 16.3359, 5, 5},
  440. {1174.2064, -1356.3368, 13.9530, 10, 10},
  441. {607.7927, -1490.3461, 14.8632, 10, 10},
  442. {846.2512, -1800.1854, 13.8432, 10, 10},
  443. {1580.5636, -1715.1965, 13.5546, 10, 10},
  444. {2106.9880, -1789.3810, 13.5608, 10, 10},
  445. {2046.4647, -1898.4299, 13.5538, 10, 10},
  446. {1629.5443, -1899.7109, 13.5548, 10, 10},
  447. {2309.5945, -1758.1171, 13.6367, 10, 10},
  448. {2764.1753, -2006.2146, 13.5620, 10, 10},
  449. {2718.7241, -2386.2786, 13.6328, 10, 10},
  450. {1945.2909, -2175.3149, 13.5542, 10, 10},
  451. {1860.5347, -1369.7974, 13.5616, 10, 10},
  452. {2084.3003, -1229.5402, 23.9766, 10, 10},
  453. {2011.2698, -1452.1449, 13.5547, 10, 10},
  454. {2357.3074, -1478.3748, 23.9520, 10, 10},
  455. {2426.7498, -1679.7200, 13.7737, 10, 10},
  456. {2210.0242, -1142.7646, 25.8089, 10, 10},
  457. {2185.7751, -1000.4038, 62.8628, 10, 10},
  458. {2866.2373, -1398.2673, 10.9723, 10, 10},
  459. {2104.1113, -1940.9707, 13.5469, 10, 10},
  460. {1850.4943, -1861.1707, 13.5851, 10, 10},
  461. {1157.9663, -1202.8258, 19.7720, 10, 10},
  462. {1337.5367,-1773.9077,13.5469, 10, 10},
  463. {2129.2188,-1739.2914,13.5629, 10, 10},
  464. {2148.6326,-1609.5536,14.2428, 10, 10},
  465. {2382.0149,-1940.1724,13.5469, 10, 10},
  466. {1521.1866,-1018.5400,23.9112, 15, 15},
  467. {1788.8053,-1112.6873,24.0859, 5, 5},
  468. {1829.5405,-1084.2778,23.8812, 5, 5},
  469. {1786.1578,-1147.2633,23.8729, 5, 5},
  470. {1904.4880,-1604.6500,13.5469, 5, 5},
  471. {1439.8439,-1324.7329,13.5450, 8, 8},
  472. {1461.4233,-1488.4702,13.5469, 5, 5},
  473. {1936.6740,-2079.8098,13.5594, 10, 10}
  474. };
  475. new isBOLO[MAX_PLAYERS], boloBy[MAX_PLAYERS][24];
  476. // Player checkpoint positions
  477. enum cpInfo
  478. {
  479. Float:cpX,
  480. Float:cpY,
  481. Float:cpZ,
  482. Float:cpSize
  483. }
  484. enum _noClipEnum
  485. {
  486. ncCameraMode,
  487. ncFlyObject,
  488. ncMode,
  489. ncLRold,
  490. ncUDold,
  491. ncLastMove,
  492. Float:ncAccelMul
  493. }
  494. enum _facMOTD
  495. {
  496. motdOne[128],
  497. motdTwo[128],
  498. motdThree[128],
  499. motdFour[128],
  500. motdFive[128],
  501. motdSix[128],
  502. motdSeven[128],
  503. motdEight[128],
  504. motdNine[128],
  505. motdTen[128],
  506. motdEleven[128],
  507. motdTwelve[128],
  508. motdThirteen[128],
  509. motdFourteen[128],
  510. motdFifteen[128]
  511. }
  512. enum _CCTVEnum
  513. {
  514. CCTVName[50],
  515. CCTVOwner[24],
  516. Float:CCTVX,
  517. Float:CCTVY,
  518. Float:CCTVZ,
  519. Float:CCTVRX,
  520. Float:CCTVRY,
  521. Float:CCTVRZ,
  522. CCTVVW,
  523. CCTVINT,
  524. Float:CCTVLookAtX,
  525. Float:CCTVLookAtY,
  526. Float:CCTVLookAtZ,
  527. CCTVObject
  528. }
  529. enum _wNamesPB
  530. {
  531. pbWeaponName1[32],
  532. pbWeaponName2[32],
  533. pbWeaponName3[32],
  534. pbWeaponName4[32],
  535. pbWeaponName5[32]
  536. }
  537. /*
  538. Adding variables here will get you instantly fired.
  539. */
  540. //new bool:IsDead[MAX_PLAYERS];
  541. new mdcstr[300],
  542. AFK_Timer[MAX_PLAYERS],
  543. blackblindfoldzone,
  544. PlayerCalledPD[MAX_PLAYERS],
  545. CCTV[MAX_CCTV_DYNAMIC][_CCTVEnum],
  546. CCTVCount,
  547. bool:EditingCamera[MAX_PLAYERS],
  548. CameraID[MAX_PLAYERS],
  549. OnCCTV[MAX_PLAYERS] = {-1, ...},
  550. Float:CameraX[MAX_PLAYERS],
  551. Float:CameraY[MAX_PLAYERS],
  552. Float:CameraZ[MAX_PLAYERS],
  553. CameraInt[MAX_PLAYERS],
  554. CameraWorld[MAX_PLAYERS],
  555. Text:CCTV_Arrows[2],
  556. bool:isPlayerFlying[MAX_PLAYERS],
  557. flyingTimer[MAX_PLAYERS],
  558. Float:pFlyHealth[MAX_PLAYERS],
  559. Float:pFlyArmour[MAX_PLAYERS],
  560. hasTempRRK[MAX_PLAYERS],
  561. bool:famMuted[MAX_PLAYERS],
  562. famMutedTime[MAX_PLAYERS],
  563. muteTimer[MAX_PLAYERS],
  564. bool:ToggedWarns[MAX_PLAYERS],
  565. bool:customRankName[MAX_PLAYERS],
  566. customRank[MAX_PLAYERS][24],
  567. bool:pMutedA[MAX_PLAYERS],
  568. antiLoseWeapon[MAX_PLAYERS][14],
  569. newbiePrice[MAX_PLAYERS],
  570. bool:newbieRequest[MAX_PLAYERS],
  571. bool:adRequest[MAX_PLAYERS],
  572. adPrice[MAX_PLAYERS],
  573. // Reported[MAX_PLAYERS],
  574. // bool:areported[MAX_PLAYERS],
  575. reportText[MAX_PLAYERS][80];
  576. new bool: hasListening[MAX_PLAYERS];
  577. new bool:hasPassed[MAX_PLAYERS], bool:pCommandUsed[MAX_PLAYERS], bool:canReportAgain[MAX_PLAYERS], dPosGet[MAX_PLAYERS], pInHospital[MAX_PLAYERS];
  578. new bool:towingCar[MAX_PLAYERS], towTimer[MAX_PLAYERS];
  579. new bool:famTog[MAX_PLAYERS], bool:isRepairing[MAX_PLAYERS], repairVeh[MAX_PLAYERS], adminMOTD[128], bool:onCellPhone[MAX_PLAYERS];
  580. new bool:HelpingNewbie[MAX_PLAYERS], bool:HelperVeh2[MAX_PLAYERS], bool:ToggedOR[MAX_PLAYERS], bool:goingJob[MAX_PLAYERS], csCount[MAX_PLAYERS];
  581. new bool:boxToggled[MAX_PLAYERS], bool:callerID[MAX_PLAYERS], bool:usingFakeBadge[MAX_PLAYERS];
  582. new bool:CanRepair[MAX_PLAYERS], canRepairTimer[MAX_PLAYERS];
  583. new saveWeapon[MAX_PLAYERS][12], Blocked[MAX_PLAYERS][_blockedNumbers];
  584. new checkpointInfo[MAX_PLAYERS][cpInfo], dialogPage[MAX_PLAYERS];
  585. new autoMessages[6][128], messagePos = 1, bool:adminDuty[MAX_PLAYERS];
  586. new PaintBall[MAX_PLAYERS][_wNamesPB], inPaintball[MAX_PLAYERS], pbKills[MAX_PLAYERS], pPaintGuns[MAX_PLAYERS][6], Text:PaintballLeaderTD, Text:PaintballLeaderTD2;
  587. new backupType[MAX_PLAYERS];
  588. new bool:toggedDept[MAX_PLAYERS], bool:toggedRadio[MAX_PLAYERS], bool:cellMuted[MAX_PLAYERS], playerDMVCar[MAX_PLAYERS];
  589. new dmvSlot[MAX_PLAYERS], bool:autoFailed[MAX_PLAYERS], bool:hotlineState =true;
  590. new plNCData[MAX_PLAYERS][_noClipEnum], Float:playerMoveSpeed[MAX_PLAYERS], bool:flyingUsed[MAX_PLAYERS], facMOTD[17][_facMOTD];
  591. new bool:toggledHotlined[MAX_PLAYERS], bool:hasFlashlight[MAX_PLAYERS], oldWeapon[MAX_PLAYERS];
  592. new Float:Fly_X[MAX_PLAYERS], Float:Fly_Y[MAX_PLAYERS], Float:Fly_Z[MAX_PLAYERS], Float:Fly_A[MAX_PLAYERS];
  593. new g_WeatherID;
  594. new checkedAccount[MAX_PLAYERS];
  595. new MaskNumber[MAX_PLAYERS];
  596. new playerserial[64];
  597. new LastPM[MAX_PLAYERS], bool:TogPM[MAX_PLAYERS], bool:TogPMGlobal;
  598. new AdrenalineSteal[MAX_PLAYERS];
  599. new bool:ADuty[MAX_PLAYERS], bool:ADutyTimer[MAX_PLAYERS], bool:RegWarn, bool:HDuty[MAX_PLAYERS];
  600. new minutesOnline[MAX_PLAYERS];
  601. new lastShotByWeaponID[MAX_PLAYERS];
  602. new lastShotByPlayerID[MAX_PLAYERS];
  603. new lastShotBodyPart[MAX_PLAYERS];
  604. new NextBan;//bans
  605. new Ban1Name[MAX_PLAYER_NAME], Ban2Name[MAX_PLAYER_NAME], Ban3Name[MAX_PLAYER_NAME], Ban4Name[MAX_PLAYER_NAME], Ban5Name[MAX_PLAYER_NAME];
  606. new Ban1gpci[128], Ban2gpci[128], Ban3gpci[128], Ban4gpci[128], Ban5gpci[128];
  607. new Ban1ip[128], Ban2ip[128], Ban3ip[128], Ban4ip[128], Ban5ip[128];
  608. new FakeFaction[MAX_PLAYERS]; // Needs to be removed from script entirely.
  609. new FakeRank[MAX_PLAYERS]; // Needs to be removed from script entirely.
  610. new LoopasafeWeapon[10];
  611. new LoopasafeCash;
  612. new LoopasafePot;
  613. new LoopasafeCrack;
  614. new LoopasafeMats;
  615. // For S9 badges
  616. new S9BadgeFaction[128];
  617. new S9BadgeWeapons[128];
  618. new RadioFrequency[MAX_PLAYERS];
  619. // For S9 faction selection
  620. new ChosenFaction[MAX_PLAYERS];
  621. new ChosenRank[MAX_PLAYERS];
  622. // For /nos command //
  623. new nosVehicle[MAX_PLAYERS],
  624. bool:isAddingNos[MAX_PLAYERS];
  625. // For pubic background check
  626. new checkingBackground[MAX_PLAYERS],
  627. checkingID[MAX_PLAYERS],
  628. checkingName[MAX_PLAYERS][30];
  629. // For players
  630. new togsandonate[MAX_PLAYERS];
  631. // for charge removing
  632. new searchingsqlid[MAX_PLAYERS];
  633. // For the /fall(ing) command
  634. new fallingSeconds[MAX_PLAYERS];
  635. // For /rpm command
  636. new lastPMedID[MAX_PLAYERS];
  637. #define INVALID_WEAPON_ID 0
  638. new Float:paintBallArena[7][3] =
  639. {
  640. { -1136.5530, 1078.7391, 1345.8062},
  641. { -1097.9240, 1039.3434, 1343.1390},
  642. { -1026.2610, 1051.7496, 1342.3792},
  643. { -1044.7739, 1096.0839, 1346.1598},
  644. { -1008.6546, 1022.7844, 1341.0078},
  645. { -975.2208, 1089.7521, 1348.4375},
  646. { -978.1649, 1035.5266, 1345.0063}
  647. };
  648. stock OOCRadioStatus(){
  649. for(new i = 1; i < 16; i++){
  650. OOCRadioOff[i] = false;
  651. }
  652. return 1;
  653. }
  654. new bool:beingCalled[MAX_PLAYERS];
  655. // Checkpoints.
  656. #include "../gamemodes/inc/core/checkpoints.inc"
  657. // Tray Types
  658. enum
  659. {
  660. TYPE_EMPTY = 0,
  661. TRAY_TYPE_PIZZA,
  662. TRAY_TYPE_CHICKEN,
  663. TRAY_TYPE_BURGER,
  664. TRAY_TYPE_DONUT
  665. };
  666. // Developer Ranks
  667. enum
  668. {
  669. DEVRANK_NONE = 0,
  670. DEVRANK_JUNIOR,
  671. DEVRANK_SENIOR,
  672. DEVRANK_MANAGER,
  673. DEVRANK_LEAD,
  674. TESTERRANK_NONE = 0,
  675. TESTERRANK_REGULAR,
  676. TESTERRANK_SENIOR,
  677. TESTERRANK_MANAGER
  678. };
  679. // Mapper Ranks
  680. enum
  681. {
  682. MAPPERRANK_NONE = 0,
  683. MAPPERRANK_REGULAR,
  684. MAPPERRANK_SENIOR,
  685. MAPPERRANK_MANAGER
  686. }
  687. // Newbie/Global Tags
  688. enum
  689. {
  690. //Newbie
  691. NTAG_NEWBIE = 1,
  692. NTAG_PLAYER,
  693. NTAG_BVIP,
  694. NTAG_SVIP,
  695. NTAG_GVIP,
  696. NTAG_DVIP,
  697. NTAG_HELPER,
  698. NTAG_THELPER,
  699. NTAG_SHELPER,
  700. NTAG_ADMIN,
  701. NTAG_JUNIORDEV,
  702. NTAG_HHELPER,
  703. NTAG_DOPR,
  704. NTAG_SENIORDEV,
  705. NTAG_MANAGERDEV,
  706. NTAG_LEADDEV,
  707. NTAG_FAMED,
  708. NTAG_MANAGERFAMED,
  709. NTAG_ECONO,
  710. NTAG_TESTER,
  711. NTAG_STESTER,
  712. NTAG_MANAGERTESTER,
  713. NTAG_CUSTOM,
  714. NTAG_MAPPER,
  715. NTAG_SENIORMAPPER,
  716. NTAG_MANAGERMAPPER,
  717. NTAG_OLDSCHOOL,
  718. NTAG_MODOLDSCHOOL,
  719. //Global
  720. GTAG_NEWBIE = 1,
  721. GTAG_PLAYER,
  722. GTAG_BVIP,
  723. GTAG_SVIP,
  724. GTAG_GVIP,
  725. GTAG_DVIP,
  726. GTAG_HELPER,
  727. GTAG_THELPER,
  728. GTAG_SHELPER,
  729. GTAG_ADMIN,
  730. GTAG_JUNIORDEV,
  731. GTAG_HHELPER,
  732. GTAG_DOPR,
  733. GTAG_SENIORDEV,
  734. GTAG_MANAGERDEV,
  735. GTAG_LEADDEV,
  736. GTAG_FAMED,
  737. GTAG_MANAGERFAMED,
  738. GTAG_ECONO,
  739. GTAG_TESTER,
  740. GTAG_STESTER,
  741. GTAG_MANAGERTESTER,
  742. GTAG_CUSTOM,
  743. GTAG_MAPPER,
  744. GTAG_SENIORMAPPER,
  745. GTAG_MANAGERMAPPER,
  746. GTAG_OLDSCHOOL,
  747. GTAG_MODOLDSCHOOL,
  748. };
  749. new CustomTag[MAX_PLAYERS][50];
  750. //==================================[Defines]===================================
  751. // Limits
  752. #define MAX_SPIKESTRIPS 8
  753. #define MAX_TIKIS 50
  754. #define MAX_WEED 200
  755. #define MAX_MAPICONS 100
  756. #define MAX_TRAYS 50
  757. #define MAX_DEALERS 64
  758. #define MAX_HOUSES 2000
  759. #define MAX_SURNAMES 250
  760. #define MAX_DOORS 1200
  761. #define MAX_BIZ 100
  762. #define MAX_GATES 1200
  763. #define MAX_CARS 15000
  764. #define MAX_NEWBIE_TIPS 21
  765. #define MAX_ROADBLOCKS 5
  766. #define ELCORONABAR 1
  767. #define COMMERCE247 2
  768. #define BANKLOTBIN 3
  769. #define MULINTERSEC 4
  770. //Animations
  771. #define PED_IDLE_STANCE 1189
  772. #define FROZEN (0)
  773. #define UNFROZEN (1)
  774. #define ADMIN_SPEC_TYPE_NONE (0)
  775. #define ADMIN_SPEC_TYPE_PLAYER (1)
  776. #define ADMIN_SPEC_TYPE_VEHICLE (2)
  777. #define equal(%0,%1) !strcmp(%0,%1,false)
  778. #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  779. #define HOLDING(%0) ((newkeys & (%0)) == (%0))
  780. #define RELEASED(%0) \
  781. (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  782. #define KEY_BRAKE (32)
  783. // Food Stuff
  784. #define TRAY_RESPAWN_TIME 5
  785. #define TRAY_NO_RESPAWN 0
  786. #define TRAY_NO_POISONED 0
  787. #define TRAY_POISONED 1
  788. // Object ID?
  789. #define SLOT_EMPTY 0 //empty array
  790. // Food Amounts
  791. #define PIZZA_AMOUNT 5 //5 slices
  792. #define CHICKEN_AMOUNT 3 //5 chicken
  793. #define BURGER_AMOUNT 3 //3 burgers
  794. #define DONUT_AMOUNT 8 //5 donuts
  795. #define TRAY_EMPTY 0 //0 slices
  796. // Sounds
  797. #define CELLPHONE_RING 20600
  798. #define SMS_RECIEVED 21000
  799. #define SMS_SENT 21001
  800. #define TAZER_SHOCK 6003
  801. #define CELLPHONE_DIAL 3600
  802. #define CELLPHONE_AWAITING 16003
  803. #define PISS_SOUND 14200
  804. // Gate Editor
  805. #define EDITING_GATE_NONE 0
  806. #define EDITING_GATE_POSITION 1
  807. #define EDITING_GATE_OPOSITION 2
  808. // Enter Freezing
  809. #define FREEZE 1
  810. #define UNFREEZE 2
  811. #define ENTER_FREEZE 1
  812. #define HELPNEWBIE_FREEZE 2
  813. #define TESTER_FREEZE 3
  814. #define GMX_FREEZE 4
  815. //#define Dialog_NameChange 20030 //ethans
  816. // Player attached objects defines
  817. #define INDEX_0 (0)
  818. #define INDEX_1 (1)
  819. #define INDEX_2 (2)
  820. #define INDEX_3 (3)
  821. #define INDEX_4 (4)
  822. #define INDEX_5 (5)
  823. #define INDEX_6 (6)
  824. #define INDEX_7 (7)
  825. #define INDEX_8 (8)
  826. #define INDEX_9 (9)
  827. #define MAX_PER_PLAYER 11
  828. new roadblockObjects[MAX_PLAYERS][MAX_PER_PLAYER], roadblockTotal[MAX_PLAYERS];
  829. //===========================[Firework]=========================================
  830. #define RocketHeight 50
  831. #define TYPE_COUNTDOWN 2000
  832. #define TYPE_LAUNCH 2001
  833. #define TYPE_EXPLODE 2002
  834. #define MAX_FIREWORKS 100
  835. #define FireworkSpread 30
  836. new callCPFix[MAX_PLAYERS], callCPSpot[MAX_PLAYERS], fixGPSTimer[MAX_PLAYERS];
  837. #define checkcinc if(!IsPlayerConnected(playerid)) return; if(CINC[playerid] != ccinc) { printf("error: query collision, result for playerid (%d) is not for this player. (got: %d should be: %d)", playerid, ccinc, CINC[playerid]); return; }
  838. #define mysql_counted_query queryballance++;mysql_function_query
  839. new Rocket[MAX_PLAYERS];
  840. new RocketLight[MAX_PLAYERS];
  841. new RocketSmoke[MAX_PLAYERS];
  842. new RocketExplosions[MAX_PLAYERS];
  843. new CINC[MAX_PLAYERS], queryballance; // counts number of queries in the queue.
  844. // Textdraw Global Variables
  845. new Text:centerHUDInfo[MAX_PLAYERS], Text:FishingBackground, Text:FishingOutline, Text:FishingBar, Text:DieText, Text:InjuredText, Text:EnteranceStuff[7];
  846. // Backup Timer
  847. new cpTimerFix[MAX_PLAYERS];
  848. //==================================[Forwards]==================================
  849. // Player Related
  850. forward SaveChars();
  851. forward SetPlayerSpawn(playerid);
  852. forward DisplayDialogForPlayer(playerid, dialogid);
  853. forward UpdatePreviewModel(playerid);
  854. forward boughtFood(playerid);
  855. forward GiveMoney(playerid, money);
  856. forward GetMoney(playerid);
  857. forward PickUpPickup(playerid, pickupid);
  858. forward CanDropStuff(playerid);
  859. forward IPCheckResponse(playerid, response_code, data[]);
  860. forward Unfreeze(playerid);
  861. forward ShowAccessDialog(playerid, type);
  862. // Check Hacks
  863. forward CheckHacks2(playerid);
  864. // Weapons
  865. forward OnPlayerChangeWeapon(playerid, oldweapon, newweapon);
  866. // Log
  867. forward PayLog(string2[]);
  868. forward StatLog(string2[]);
  869. forward KickLog(string2[]);
  870. forward BanLog(string2[]);
  871. // Vehicles
  872. forward StoppedVehicle();
  873. forward SellCar(playerid);
  874. forward TowVehicle(playerid, carid, towtype);
  875. // Load/save
  876. forward SaveHouses();
  877. forward HideHouseInfo(playerid);
  878. forward LoadSurnames();
  879. forward SaveSurnames();
  880. forward LoadGarages();
  881. forward LoadTrash();
  882. forward SaveGarages();
  883. // Drops
  884. forward DeleteGun(objectid, f);
  885. forward DeleteKevlar(objectid, f);
  886. forward DeletePot(objectid, f);
  887. forward DeleteCrack(objectid, f);
  888. forward DeleteMats(objectid, f);
  889. // Misc.
  890. forward Lotto(number);
  891. forward AddsOn();
  892. forward eventCheck();
  893. /*=======================mSelection public callbacks==================*/
  894. public OnPlayerModelSelection(playerid, response, listid, modelid)
  895. {
  896. return 1;
  897. }
  898. public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
  899. {
  900. skins_OnPlayerModelSelectionEx(playerid, response, extraid, modelid);
  901. return 1;
  902. }
  903. // ID OF MODEL SELECTIONS
  904. #define Jonas_Blue_Clothes_ID 1
  905. /* ===========================Exploit fix for /drop kevlar ====================*/
  906. new KevlarDropped[MAX_PLAYERS];
  907. forward DropKevlarTimer(playerid);
  908. public DropKevlarTimer(playerid){
  909. KevlarDropped[playerid] = 0;
  910. return 1;
  911. }
  912. /*=============================================================================*/
  913. /*====================================================*/
  914. stock ClearAnimationsEx(id)
  915. {
  916. ClearAnimations(id);
  917. SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
  918. }
  919. stock IsHoldJetpacknWeapon(playerid)
  920. {
  921. new getwep = GetPlayerWeapon(playerid);
  922. if((GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) && ( getwep == 22 || getwep == 28 || getwep == 32 )) return 1;
  923. return 0;
  924. }
  925. new newbieTips[MAX_NEWBIE_TIPS][0] =
  926. {
  927. "TIP: You can use ~r~Pot~w~, ~r~Sprunk~w~ and ~r~Food~n~~w~to stop the bleeding.",
  928. "TIP: You can use /carradio to change the cars radio station.",
  929. "TIP: You can also withdraw money from the ~b~Bank~w~,~n~you start with ~g~$20,000~w~.",
  930. "TIP: You can go to a ~b~Gas Station~w~ and type /fill~n~to refuel your vehicle.", //
  931. "TIP: You can go to a ~b~Clothes Store~n~~w~ to get a new skin or to customize your character.",
  932. "TIP: You can use /time to see your remaining jail time.",
  933. "TIP: You can press ~y~~k~~CONVERSATION_YES~ ~w~to interact with NPCs.",
  934. "TIP: You can use /dropcar to sell cars at the crane every 20 minutes.",
  935. "TIP: You can buy ~r~Weapons~w~ from Emmet without having~n~a weapons license.",
  936. "TIP: You can buy ~r~Weapons~w~ from Clayton without having~n~a weapons license.",
  937. "TIP: You can press ~y~~k~~PED_LOCK_TARGET~ ~w~to use the fishing rod.",
  938. "TIP: Press ~y~~k~~PED_FIREWEAPON~ ~w~to keep the bar centered and prevent the line from snapping~n~~y~~k~~PED_LOCK_TARGET~ ~w~to stop fishing.",
  939. "TIP: You can use /sellfish to sell your fish at ~b~24/7~w~ stores ~n~and /listfish to display all your fish.",
  940. "TIP: Keep your weapon aimed at the NPC to collect more money.",
  941. "TIP: You can type ~r~/pickpocket~w~ to steal from other players.",
  942. "TIP: You can type ~r~/stats~w~ at any time~n~to display your account stats.",
  943. "TIP: You can type ~r~/buylevel~w~ to level up,~n~ you will also receive higher ~y~paychecks~w~.",
  944. "TIP: You can ~r~/userod~w~ at the ~b~pier~n~~w~ and sell your fish at ~b~247 stores~w~.",
  945. "TIP: You can type ~r~/train~w~ at the ~b~gym~n~~w~to learn new martial arts.",
  946. "TIP: You can type ~r~/report~w~ at any time if you need an ~y~admin~w~.",
  947. "TIP: You can get a drivers license at the ~b~Department of Motor Vehicles~w~~n~Driving without one is illegal."
  948. };
  949. new displayedTip[MAX_PLAYERS][MAX_NEWBIE_TIPS]; //used for storing if the player has seen a particular newbie tip
  950. //===============================[Data Structures]==============================
  951. new SAPD, FBI, SAST, FMD, DOC, GOV, SCOTUS, NEWS, TAXI;
  952. #define MAX_VEHICLE_SLOTS 4 //vehicles.inc, if adjusted adjust players.sql: CKey[number]
  953. enum pInfo
  954. {
  955. pID,
  956. pName[MAX_PLAYER_NAME + 1],
  957. pKey[128],
  958. pSerial[128],
  959. pLevel,
  960. pNote1[255],
  961. pNote2[255],
  962. pNote3[255],
  963. pNote4[255],
  964. pNote5[255],
  965. pOldAdmin,
  966. pAdmin,
  967. pSecKey,
  968. // pDiscord[30],
  969. pBand,
  970. pCBand,
  971. pPermBand,
  972. pStealthed,
  973. pHiddenAss,
  974. pBanReason[128],
  975. pPrisonReason[128],
  976. pAdminJailed,
  977. pPrisonedBy[32],
  978. pWarns,
  979. pDisabled,
  980. pDonateRank,
  981. pTag,
  982. pVIPJoinDate[32],
  983. pVIPExpDate[32],
  984. pBanAppealer,
  985. pGangModd,
  986. pEventModd,
  987. pComplaintModd,
  988. pShopMod,
  989. pBizMod,
  990. pFactionMod,
  991. pFactionDirector,
  992. pGangDirector,
  993. gPupgrade,
  994. pConnectTime,
  995. pReg,
  996. pSex,
  997. pAge,
  998. pOrigin[128],
  999. pAppearance[128],
  1000. pMuted,
  1001. pExp,
  1002. pCash,
  1003. pAccount,
  1004. pCrimes,
  1005. pKills,
  1006. pDeaths,
  1007. pCHits,
  1008. pFHits,
  1009. pArrested,
  1010. pPhoneBook,
  1011. pLottoNr,
  1012. pFishes,
  1013. pBiggestFish,
  1014. pJob,
  1015. pPayCheck,
  1016. pHeadValue,
  1017. pJailed,
  1018. pJailCell,
  1019. pJailTime,
  1020. pProducts,
  1021. pMats,
  1022. pPotSeeds,
  1023. pCalculator,
  1024. pLeader,
  1025. pMember,
  1026. pNSB,
  1027. pFMember,
  1028. pRank,
  1029. pRadioStation,
  1030. pDetSkill,
  1031. pSexSkill,
  1032. pBoxSkill,
  1033. pLawSkill,
  1034. pMechSkill,
  1035. pJackSkill,
  1036. pCarSkill,
  1037. pDrugsSkill,
  1038. pArmsSkill,
  1039. pWasteSkill,
  1040. pSmugglerSkill,
  1041. pThieveSkill,
  1042. pFishSkill,
  1043. pPizzaSkill,
  1044. pFarmerSkill,
  1045. pFightingStyle,
  1046. Float:pHealth,
  1047. Float:pArmor,
  1048. pSHealth,
  1049. pSHP,
  1050. pInt,
  1051. pLocal,
  1052. pVirtualWorld,
  1053. pModel,
  1054. pClothes,
  1055. pPnumber,
  1056. pHasPhone,
  1057. pCellphoneType,
  1058. pBizKey,
  1059. pBizFixed,
  1060. pSetVehSpawn,
  1061. pFishLic,
  1062. pGun0,
  1063. pGun1,
  1064. pGun2,
  1065. pGun3,
  1066. pGun4,
  1067. pGun5,
  1068. pGun6,
  1069. pGun7,
  1070. pGun8,
  1071. pGun9,
  1072. pGun10,
  1073. pGun11,
  1074. pGun12,
  1075. pCarTime,
  1076. pDrugsTime,
  1077. pLawyerTime,
  1078. pLawyerFreeTime,
  1079. pMechTime,
  1080. pSexTime,
  1081. pPlantTime,
  1082. pRepairTime,
  1083. pRobTime,
  1084. pFishRod,
  1085. pBait,
  1086. pBaitAmount,
  1087. pLine,
  1088. pPayDay,
  1089. pPayDayHad,
  1090. piPod,
  1091. pDice,
  1092. pSpraycan,
  1093. pScrew,
  1094. pRope,
  1095. pGag,
  1096. pCigars,
  1097. pSprunk,
  1098. pTikis,
  1099. pWT,
  1100. pWTc,
  1101. pRadio,
  1102. pHandtazer,
  1103. ptazerGun,
  1104. pBombs,
  1105. pPoison,
  1106. pMask,
  1107. pWins,
  1108. pLoses,
  1109. pTut,
  1110. pOnDuty,
  1111. pHospital,
  1112. pAdjustable,
  1113. pMarried,
  1114. pMarriedTo[128],
  1115. pContractBy[128],
  1116. pIP[16],
  1117. pWantedLevel,
  1118. pNewbieMuted,
  1119. pNewbieWarns,
  1120. pAdMuted,
  1121. pBugMuted,
  1122. Float:pSPos_x,
  1123. Float:pSPos_y,
  1124. Float:pSPos_z,
  1125. Float:pSPos_r,
  1126. pHelper,
  1127. pDev,
  1128. pFamed,
  1129. pOldSchool,
  1130. pEnlightened,
  1131. pTester,
  1132. pMapper,
  1133. pGlasses,
  1134. pBandana,
  1135. pHelmet,
  1136. pRequestingBackup,
  1137. pVipColor,
  1138. pBlindfolds,
  1139. pSpeakPhone,
  1140. pCheck,
  1141. pDeck,
  1142. pStereo,
  1143. pMatches,
  1144. pJerrycan,
  1145. pBanDay,
  1146. pBanMonth,
  1147. pBanYear,
  1148. pBanTime,
  1149. pHouseID,
  1150. pRentingID,
  1151. hTicket,
  1152. gTicket,
  1153. gRefund,
  1154. pNMuteTime,
  1155. Float:helpmeX,
  1156. Float:helpmeY,
  1157. Float:helpmeZ,
  1158. Float:BugReportX,
  1159. Float:BugReportY,
  1160. Float:BugReportZ,
  1161. BugReportInterior,
  1162. BugReportVW,
  1163. helpmeInt,
  1164. helpmeVW,
  1165. pHelpMeMuted,
  1166. pAddressBook,
  1167. pHouseFire,
  1168. pEconomist,
  1169. pHAFakeBadge,
  1170. pBadge,
  1171. lastCarID,
  1172. pMaxCarSlots,
  1173. pKeys,
  1174. TowingVeh,
  1175. pLastLogin[128],
  1176. pPropExp[128],
  1177. pMap,
  1178. pJailnumber,
  1179. pCarLicense,
  1180. pBoatLicense,
  1181. pWeaponLicense,
  1182. pMarijuanaLicense,
  1183. pSueUnix,
  1184. pSueNotice,
  1185. pAllowedArmory,
  1186. pTesterReports,
  1187. pSpawnPos,
  1188. pLastLogoutUnix,
  1189. pWire,
  1190. pWireFound,
  1191. pJammer,
  1192. pGroup,
  1193. pGroupRank,
  1194. pHasCBomb,
  1195. pHasLockPick,
  1196. pCallCount,
  1197. pMonthlyCallCount,
  1198. pFKickTime,
  1199. pMDCLogged,
  1200. pMDCSearchName[26],
  1201. pMDCSearchID,
  1202. HasVoted[4],
  1203. pPortMDC,
  1204. // Drugs
  1205. pCannabis,
  1206. pCocaine,
  1207. pMeth,
  1208. pXanax,
  1209. pPromethazine,
  1210. pCodeine,
  1211. pLean,
  1212. pEthnicity,
  1213. pEyeColour,
  1214. pBuild,
  1215. pHeight,
  1216. pMaskName[21],
  1217. pDriverPoints,
  1218. pReqUnmute,
  1219. pRepMuted,
  1220. pReqNC,
  1221. pHidingStatus,
  1222. pInsurance,
  1223. // Remove this pPresentCount after christmas event
  1224. pPresentCount,
  1225. pTogNewbie,
  1226. pBeer,
  1227. pUnit,
  1228. bool:pHidingBadge,
  1229. pPR,
  1230. pBadgeNumber,
  1231. pBuggedTog,
  1232. pDrill,
  1233. pS9BadgeName[48],
  1234. pRecruiter,
  1235. pGroupNick[13],
  1236. pDuffleBagTime,
  1237. pShadowON,
  1238. pMaryON,
  1239. pFBIListen,
  1240. pSAPDListen,
  1241. pLSSDListen,
  1242. pFMDListen,
  1243. pSANGListen,
  1244. pGOVListen,
  1245. pSANListen,
  1246. pAdrenaline,
  1247. pFirework,
  1248. //Global Chat System
  1249. pGCTog,
  1250. pGCTag,
  1251. pGCTagName[30],
  1252. pGCMute,
  1253. pGCMuteTimer,
  1254. pGCMutePerm,
  1255. pGCReqTimer,
  1256. pGCReqUnmute,
  1257. bool:pGCRequestUnmute,
  1258. pGCUnmutePrice,
  1259. //Newbie Tag System
  1260. pNewbieTag,
  1261. pNewbieTagName[30],
  1262. pNewbieTagToggle,
  1263. };
  1264. new PlayerInfo[MAX_PLAYERS][pInfo];
  1265. #include "../gamemodes/inc/reports.inc"
  1266. #include "../gamemodes/inc/damages.inc"
  1267. #include "../gamemodes/inc/newspaper.inc"
  1268. new MySQLConnectionOrder[MAX_PLAYERS];
  1269. enum dInfo
  1270. {
  1271. dID,
  1272. dName[64],
  1273. Float:dPos[7],
  1274. dCars[64],
  1275. dCarPrice[64],
  1276. dPickup,
  1277. Text3D:d3DText,
  1278. bool:dCreated
  1279. };
  1280. new Dealerships[MAX_DEALERS][dInfo];
  1281. enum trInfo
  1282. {
  1283. cTrunkOpened,
  1284. cGun1,
  1285. cGun2,
  1286. cCocaine,
  1287. cMeth,
  1288. cCannabis,
  1289. cXanax,
  1290. cFoodtray,
  1291. Float:cArmor
  1292. };
  1293. new TrunkInfo[MAX_VEHICLES][trInfo],
  1294. IsByVehTrunk[MAX_PLAYERS];
  1295. enum hInfo
  1296. {
  1297. hOwner[MAX_PLAYER_NAME + 1],
  1298. hCreated,
  1299. hOwned,
  1300. hValue,
  1301. Float:hOutsideX,
  1302. Float:hOutsideY,
  1303. Float:hOutsideZ,
  1304. Float:hOutsideA,
  1305. Float:hInsideX,
  1306. Float:hInsideY,
  1307. Float:hInsideZ,
  1308. Float:hInsideA,
  1309. hWorld,
  1310. hInterior,
  1311. hLocked,
  1312. hAlarm,
  1313. hAlarmStatus,
  1314. hCash,
  1315. hMaterials,
  1316. hCannabis,
  1317. hCocaine,
  1318. hMeth,
  1319. hXanax,
  1320. hPromethazine,
  1321. hCodeine,
  1322. hLean,
  1323. hGun1,
  1324. hGun2,
  1325. hGun3,
  1326. hGun4,
  1327. hGun5,
  1328. hGun6,
  1329. hGun7,
  1330. hOutsidePickup,
  1331. hTag[25],
  1332. hLevel,
  1333. hOwnerID,
  1334. hSQLID,
  1335. hFreeze,
  1336. hModified,
  1337. hHasFurniture,
  1338. hFurnitureAmount, //used for storing number of house furniture, does not save
  1339. hDonated
  1340. };
  1341. new HouseInfo[MAX_HOUSES][hInfo];
  1342. enum SuInfo
  1343. {
  1344. Surname[64],
  1345. Owner[64],
  1346. AddedBy[64],
  1347. Taken,
  1348. };
  1349. new SurnameInfo[MAX_SURNAMES][SuInfo];
  1350. enum DoorInfo
  1351. {
  1352. outside_icon,
  1353. Float:outside_x,
  1354. Float:outside_y,
  1355. Float:outside_z,
  1356. Float:outside_a,
  1357. outside_i,
  1358. outside_w,
  1359. Float:inside_x,
  1360. Float:inside_y,
  1361. Float:inside_z,
  1362. Float:inside_a,
  1363. inside_i,
  1364. inside_w,
  1365. doorname[50],
  1366. dpassword[128],
  1367. bool:freeze,
  1368. createdby[50],
  1369. eowner
  1370. };
  1371. new Entrances[MAX_DOORS][DoorInfo];
  1372. //==============================================================================
  1373. new Text3D:BizText[MAX_BIZ], Text3D:HouseInfoText3D[MAX_HOUSES];
  1374. new EntranceRef[sizeof(Entrances)], EntranceRefInt[sizeof(Entrances)], Text3D:EntranceRefText[sizeof(Entrances)];
  1375. new lastSQLhouseID = 0;
  1376. new hasRubberBullets[MAX_PLAYERS], bool:loadedRubberBullets[MAX_PLAYERS];
  1377. new helibladecount[MAX_PLAYERS], Heliblade_Timer[MAX_PLAYERS];
  1378. new WireOfferID[MAX_PLAYERS] = INVALID_PLAYER_ID, Float:buggedPos[3][MAX_PLAYERS];
  1379. // Part of the /watchtv (SAN Camera) - Vega.
  1380. new bool: WatchingTV[MAX_PLAYERS];
  1381. /*#define MAX_POLLS 4
  1382. enum PollData
  1383. {
  1384. vote_head[51],
  1385. vote_option1[35],
  1386. vote_option2[35],
  1387. vote_option1count,
  1388. vote_option2count,
  1389. vote_creator[MAX_PLAYER_NAME+1],
  1390. vote_direction,
  1391. vote_active
  1392. };
  1393. new PollSecTimerID;
  1394. new currentpollcreated;
  1395. new Polls[MAX_POLLS][PollData];*/
  1396. #include "../gamemodes/inc/speed_cams.inc"
  1397. //#include "../gamemodes/inc/christmas.inc"
  1398. // Login textdraws
  1399. #include "../gamemodes/inc/core/logintd.inc"
  1400. #include "../gamemodes/inc/families/families.inc"
  1401. // Enum to store the states of a player //
  1402. enum
  1403. {
  1404. PLAYER_STATE_NORMAL = 0,
  1405. PLAYER_STATE_REVIVE,
  1406. PLAYER_STATE_DEAD,
  1407. PLAYER_STATE_INHOSP,
  1408. PLAYER_STATE_TREAT
  1409. };
  1410. // Variable to store player's current state. i.e. NORMAL / REVIVE / INHOSP
  1411. new pDeathState[MAX_PLAYERS];
  1412. /*
  1413. // SWAT skin armour //
  1414. SWAT_SetPlayerSkin(playerid, skinid)
  1415. {
  1416. if(skinid == 285 || skinid == 287 && pDeathState[playerid] == PLAYER_STATE_NORMAL) {
  1417. SetPlayerArmour(playerid, 150);
  1418. PlayerInfo[playerid][pArmor] = 150;
  1419. }
  1420. else {
  1421. if(PlayerInfo[playerid][pArmor] > 100) {
  1422. SetPlayerArmour(playerid, 100);
  1423. PlayerInfo[playerid][pArmor] = 100;
  1424. }
  1425. }
  1426. SetPlayerSkin(playerid, skinid);
  1427. return 1;
  1428. }
  1429. #if defined _ALS_SetPlayerSkin
  1430. #undef SetPlayerSkin
  1431. #else
  1432. #define _ALS_SetPlayerSkin
  1433. #endif
  1434. #define SetPlayerSkin SWAT_SetPlayerSkin
  1435. */
  1436. public OnPlayerFinishedDownloading(playerid, virtualworld)
  1437. {
  1438. return 1;
  1439. }
  1440. new gatecount, bizcount, houseCount;
  1441. forward onListSerial(playerid);
  1442. public onListSerial(playerid)
  1443. {
  1444. new ipstr[10000], lastlog[64], name[MAX_PLAYER_NAME];
  1445. if(!PlayerInfo[playerid][pAdmin]) return 1;
  1446. if(cache_num_rows() == 0)
  1447. {
  1448. SendClientMessage(playerid, COLOR_WHITE, "No Serials's detected.");
  1449. return 1;
  1450. }
  1451. else
  1452. {
  1453. for(new i = 0; i < cache_num_rows(); i++)
  1454. {
  1455. cache_get_field_content(i, "Name", name);
  1456. cache_get_field_content(i, "LastLogin", lastlog);
  1457. format(ipstr, sizeof(ipstr), "%s{FFFF00}%s (%s)\t\t{FFFFFF}\n", ipstr, name, lastlog);
  1458. }
  1459. }
  1460. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "Serials", ipstr, "Okay", "");
  1461. return 1;
  1462. }
  1463. forward onListIP(playerid);
  1464. public onListIP(playerid)
  1465. {
  1466. if(!PlayerInfo[playerid][pAdmin]) return 1;
  1467. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No IP's detected.");
  1468. new ipstr[10000], lastlog[64], name[MAX_PLAYER_NAME];
  1469. for(new i = 0; i < cache_num_rows(); i++)
  1470. {
  1471. cache_get_field_content(i, "Name", name);
  1472. cache_get_field_content(i, "LastLogin", lastlog);
  1473. format(ipstr, sizeof(ipstr), "%s{FFFF00}%s (%s)\t\t{FFFFFF}\n", ipstr, name, lastlog);
  1474. }
  1475. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "IPs", ipstr, "Okay", "");
  1476. return 1;
  1477. }
  1478. forward GetNameFromSQL( playerid );
  1479. public GetNameFromSQL( playerid ) {
  1480. new rows, fields;
  1481. cache_get_data(rows, fields);
  1482. if( !rows ) {
  1483. return SendClientMessage( playerid, COLOR_GREY, "No result found with the given SQL-ID." );
  1484. }
  1485. new namestr[128], name[MAX_PLAYER_NAME+1];
  1486. cache_get_field_content( 0, "Name", name, sqlGameConnection, 25 );
  1487. format( namestr, 128, "Name: %s", name );
  1488. SendClientMessage( playerid, COLOR_GREY, namestr );
  1489. return 1;
  1490. }
  1491. forward onLastLoginSQL(playerid, id);
  1492. public onLastLoginSQL(playerid, id)
  1493. {
  1494. new rows, fields, lastlogin[64];
  1495. cache_get_data(rows, fields);
  1496. new name[MAX_PLAYER_NAME+1];
  1497. cache_get_field_content( 0, "Name", name );
  1498. cache_get_field_content(0, "LastLogin", lastlogin);
  1499. new msgstr[128];
  1500. format(msgstr, sizeof(msgstr), "%s (%d) last logged in game on %s", name, id, lastlogin);
  1501. SendClientMessage(playerid, COLOR_WHITE, msgstr);
  1502. return 1;
  1503. }
  1504. new DEVMOTD[128], TESTERMOTD[128];
  1505. new lastgmx[128];
  1506. //==========================[ Dynamic Vehicle Sys ]=============================
  1507. #define THREAD_LOAD_VEHICLES 2
  1508. #define THREAD_LOAD_PLAYERINFO 1
  1509. #define THREAD_NO_RESULT 0
  1510. enum vehicleData {
  1511. v_id = 0,
  1512. v_sqlid,
  1513. v_model,
  1514. Float:v_x,
  1515. Float:v_y,
  1516. Float:v_z,
  1517. Float:v_rz,
  1518. v_color1,
  1519. v_color2,
  1520. v_faction,
  1521. v_lock,
  1522. v_family,
  1523. v_group,
  1524. v_lockfeature,
  1525. v_sirenfeature
  1526. }
  1527. new spawned_vehicles;
  1528. new sqlstring[400];
  1529. new Cache:PlayerCacheID[MAX_PLAYERS];
  1530. new sVehicleInfo[MAX_VEHICLES][vehicleData];
  1531. //===============[ Stock functions ]=================
  1532. stock LoadVehicleData()
  1533. {
  1534. new query[30];
  1535. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `vehicles`");
  1536. mysql_pquery(sqlGameConnection, query, "OnLoadVehicleData");
  1537. return 1;
  1538. }
  1539. forward OnLoadVehicleData();
  1540. public OnLoadVehicleData() {
  1541. new rows, fields;
  1542. cache_get_data(rows, fields);
  1543. if(rows) {
  1544. new value[8];
  1545. for(new i = 1; i < rows; i++)
  1546. {
  1547. if(i == MAX_VEHICLES - 1) return printf("Max vehicle limit (1999) reached.");
  1548. cache_get_field_content(i, "ID", value);
  1549. sVehicleInfo[i][v_sqlid] = strval(value);
  1550. cache_get_field_content(i, "model", value);
  1551. sVehicleInfo[i][v_model] = strval(value);
  1552. cache_get_field_content(i, "x", value);
  1553. sVehicleInfo[i][v_x] = floatstr(value);
  1554. cache_get_field_content(i, "y", value);
  1555. sVehicleInfo[i][v_y] = floatstr(value);
  1556. cache_get_field_content(i, "z", value);
  1557. sVehicleInfo[i][v_z] = floatstr(value);
  1558. cache_get_field_content(i, "rz", value);
  1559. sVehicleInfo[i][v_rz] = floatstr(value);
  1560. cache_get_field_content(i, "color1", value);
  1561. sVehicleInfo[i][v_color1] = strval(value);
  1562. cache_get_field_content(i, "color2", value);
  1563. sVehicleInfo[i][v_color2] = strval(value);
  1564. cache_get_field_content(i, "faction", value);
  1565. sVehicleInfo[i][v_lockfeature] = cache_get_field_content_int(i, "lockfeature");
  1566. if(sVehicleInfo[i][v_lockfeature])
  1567. sVehicleInfo[i][v_lock] = 1;
  1568. sVehicleInfo[i][v_faction] = strval(value);
  1569. sVehicleInfo[i][v_family] = cache_get_field_content_int(i, "family");
  1570. sVehicleInfo[i][v_group] = cache_get_field_content_int(i, "group");
  1571. sVehicleInfo[i][v_sirenfeature] = cache_get_field_content_int(i, "Siren");
  1572. sVehicleInfo[i][v_id] = CreateVehicle(sVehicleInfo[i][v_model],sVehicleInfo[i][v_x],sVehicleInfo[i][v_y],sVehicleInfo[i][v_z]+2,sVehicleInfo[i][v_rz],sVehicleInfo[i][v_color1],sVehicleInfo[i][v_color2],900, sVehicleInfo[i][v_sirenfeature]);
  1573. if(sVehicleInfo[i][v_faction] == 6 && GetVehicleModel(sVehicleInfo[i][v_id]) == 409)
  1574. {
  1575. SetVehicleHealth(sVehicleInfo[i][v_id], 10000);
  1576. }
  1577. }
  1578. spawned_vehicles = sVehicleInfo[rows - 1][v_sqlid] + 1;
  1579. }
  1580. else {
  1581. spawned_vehicles = 1;
  1582. }
  1583. printf("%d vehicles have been loaded.", rows);
  1584. return 1;
  1585. }
  1586. stock GetDynamicVehicleID(vehicleid)
  1587. {
  1588. for(new i = 0; i < MAX_VEHICLES; i++)
  1589. {
  1590. if(IsValidVehicle(i) && sVehicleInfo[i][v_id] == vehicleid)
  1591. {
  1592. return i;
  1593. }
  1594. }
  1595. return 0;
  1596. }
  1597. stock GetGearColour(c)
  1598. {
  1599. new colour = 0;
  1600. switch(c)
  1601. {
  1602. case 0: colour = COLOR_GEAR_NONE;
  1603. case 1: colour = COLOR_GEAR_RED;
  1604. case 2: colour = COLOR_GEAR_LIGHTRED;
  1605. case 3: colour = COLOR_GEAR_DARKRED;
  1606. case 4: colour = COLOR_GEAR_GREEN;
  1607. case 5: colour = COLOR_GEAR_LIGHTGREEN;
  1608. case 6: colour = COLOR_GEAR_DARKGREEN;
  1609. case 7: colour = COLOR_GEAR_BLUE;
  1610. case 8: colour = COLOR_GEAR_LIGHTBLUE;
  1611. case 9: colour = COLOR_GEAR_DARKBLUE;
  1612. case 10: colour = COLOR_GEAR_PINK;
  1613. case 11: colour = COLOR_GEAR_LIGHTPINK;
  1614. case 12: colour = COLOR_GEAR_PURPLE;
  1615. case 13: colour = COLOR_GEAR_LIGHTPURPLE;
  1616. case 14: colour = COLOR_GEAR_DARKPURPLE;
  1617. case 15: colour = COLOR_GEAR_ORANGE;
  1618. case 16: colour = COLOR_GEAR_LIGHTORANGE;
  1619. case 17: colour = COLOR_GEAR_DARKORANGE;
  1620. case 18: colour = COLOR_GEAR_TURQUOISE;
  1621. case 19: colour = COLOR_GEAR_LIGHTTURQUOISE;
  1622. case 20: colour = COLOR_GEAR_DARKTURQUOISE;
  1623. case 21: colour = COLOR_GEAR_BROWN;
  1624. case 22: colour = COLOR_GEAR_LIGHTBROWN;
  1625. case 23: colour = COLOR_GEAR_DARKBROWN;
  1626. case 24: colour = COLOR_GEAR_GREY;
  1627. case 25: colour = COLOR_GEAR_LIGHTGREY;
  1628. case 26: colour = COLOR_GEAR_DARKGREY;
  1629. case 27: colour = COLOR_GEAR_YELLOW;
  1630. case 28: colour = COLOR_GEAR_LIGHTYELLOW;
  1631. case 29: colour = COLOR_GEAR_DARKYELLOW;
  1632. case 30: colour = COLOR_GEAR_BLACK;
  1633. case 31: colour = COLOR_GEAR_WHITE;
  1634. default: colour = COLOR_GEAR_NONE;
  1635. }
  1636. return colour;
  1637. }
  1638. //==============================
  1639. //==============================================================================
  1640. //=============================[ Taxi Company ]=================================
  1641. #define MAX_TAXICALLS 20
  1642. enum TaxiCInfo_e {
  1643. taxiname,
  1644. taxiphone,
  1645. taxilocation
  1646. }
  1647. new TaxiCInfo[MAX_TAXICALLS][TaxiCInfo_e][65];
  1648. new TaxiCID[MAX_PLAYERS];
  1649. new Float:TaxiFromCoords[MAX_PLAYERS][3];
  1650. new TaxiCInfoID[MAX_TAXICALLS] = -1;
  1651. new IsPlayerInTaxi[MAX_PLAYERS];
  1652. new PlayerTaxiDriver[MAX_PLAYERS];
  1653. new TaxiDriverMoney[MAX_PLAYERS];
  1654. new LastCaller[65] = "0";
  1655. new TaxiTiming[MAX_PLAYERS];
  1656. #define TAXICALL_DIALOG 390
  1657. //==============================================================================
  1658. #define CLOTHESCOORDS 2727.1499, -2448.2400, 1299.5000
  1659. new Text3D:PNumber3D[MAX_PLAYERS];
  1660. new DOCbus;
  1661. stock OnInvalidPrisonNumber()
  1662. {
  1663. new pnumber = random(1999-1000)+1000;
  1664. return pnumber;
  1665. }
  1666. // DoC prison spawnpoints
  1667. new Float:prisoncells[][] =
  1668. {
  1669. { 2682.2185,-2513.7051,1299.8378 },
  1670. { 2685.4465,-2513.6990,1299.8378 },
  1671. { 2690.4292,-2513.9905,1299.8378 },
  1672. { 2694.1091,-2513.0457,1299.8378 },
  1673. { 2698.6995,-2513.1104,1299.8378 },
  1674. { 2701.9255,-2513.9192,1299.8378 },
  1675. { 2682.2896,-2498.6150,1295.6663 },
  1676. { 2682.0356,-2502.3997,1295.6663 },
  1677. { 2682.1284,-2506.7090,1295.6663 }
  1678. };
  1679. //==============================================================================
  1680. //preview models
  1681. new PlayerText:pModel_t[MAX_PLAYERS], pModelState[MAX_PLAYERS], Float:pModelRot[MAX_PLAYERS][3], pModelTimer[MAX_PLAYERS];
  1682. public UpdatePreviewModel(playerid)
  1683. {
  1684. if(pModel_t[playerid] != PlayerText:INVALID_TEXT_DRAW && pModel_t[playerid] != PlayerText:INVALID_3DTEXT_ID)
  1685. {
  1686. if(pModelState[playerid] == 0)
  1687. {
  1688. KillTimer(pModelTimer[playerid]);
  1689. }
  1690. else if(pModelState[playerid] == 1)
  1691. {
  1692. pModelRot[playerid][0] = 0;
  1693. if(pModelRot[playerid][1] < 360)
  1694. {
  1695. pModelRot[playerid][1] += 30;
  1696. }
  1697. else
  1698. {
  1699. pModelRot[playerid][1] = 30;
  1700. }
  1701. if(pModelRot[playerid][2] < 360)
  1702. {
  1703. pModelRot[playerid][2] += 30;
  1704. }
  1705. else
  1706. {
  1707. pModelRot[playerid][2] = 30;
  1708. }
  1709. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], pModelRot[playerid][0], pModelRot[playerid][1], pModelRot[playerid][2]);
  1710. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  1711. }
  1712. else if(pModelState[playerid] == 2)
  1713. {
  1714. pModelRot[playerid][0] = 0;
  1715. pModelRot[playerid][1] = 0;
  1716. if(pModelRot[playerid][2] < 360)
  1717. {
  1718. pModelRot[playerid][2] += 30;
  1719. }
  1720. else
  1721. {
  1722. pModelRot[playerid][2] = 30;
  1723. }
  1724. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], pModelRot[playerid][0], pModelRot[playerid][1], pModelRot[playerid][2]);
  1725. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  1726. }
  1727. else if(pModelState[playerid] == 3)
  1728. {
  1729. pModelRot[playerid][0] = -16;
  1730. pModelRot[playerid][1] = 0;
  1731. if(pModelRot[playerid][2] < 360)
  1732. {
  1733. pModelRot[playerid][2] += 30;
  1734. }
  1735. else
  1736. {
  1737. pModelRot[playerid][2] = 30;
  1738. }
  1739. PlayerTextDrawSetPreviewRot(playerid, pModel_t[playerid], pModelRot[playerid][0], pModelRot[playerid][1], pModelRot[playerid][2]);
  1740. PlayerTextDrawShow(playerid, pModel_t[playerid]);
  1741. }
  1742. else
  1743. {
  1744. PlayerTextDrawDestroy(playerid, pModel_t[playerid]);
  1745. pModelRot[playerid][0] = 0;
  1746. pModelRot[playerid][1] = 0;
  1747. pModelRot[playerid][2] = 0;
  1748. pModelState[playerid] = 0;
  1749. KillTimer(pModelTimer[playerid]);
  1750. }
  1751. }
  1752. return 1;
  1753. }
  1754. LoadDealerships()
  1755. {
  1756. new dfile[32], str[128];
  1757. for(new i = 0; i < MAX_DEALERS; i++)
  1758. {
  1759. format(dfile, sizeof(dfile), "dealerships/%d.ini", i);
  1760. if(dini_Exists(dfile))
  1761. {
  1762. format(str, sizeof(str), "%s", dini_Get(dfile, "dName"));
  1763. strmid(Dealerships[i][dName], str, 0, strlen(str), 255);
  1764. Dealerships[i][dPos][0] = dini_Float(dfile, "dPosX");
  1765. Dealerships[i][dPos][1] = dini_Float(dfile, "dPosY");
  1766. Dealerships[i][dPos][2] = dini_Float(dfile, "dPosZ");
  1767. Dealerships[i][dPos][3] = dini_Float(dfile, "dCPosX");
  1768. Dealerships[i][dPos][4] = dini_Float(dfile, "dCPosY");
  1769. Dealerships[i][dPos][5] = dini_Float(dfile, "dCPosZ");
  1770. Dealerships[i][dPos][6] = dini_Float(dfile, "dCPosA");
  1771. Dealerships[i][dPickup] = CreateDynamicPickup(1239, 23, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2]);
  1772. format(str, sizeof(str), "Dealership\nName: %s\nID: %d\n/buycar to buy a car.", Dealerships[i][dName], i);
  1773. Dealerships[i][d3DText] = CreateDynamic3DTextLabel(str, 0xFE9A2EFF, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2] +0.8, 40.0);
  1774. new ca = 0;
  1775. for(new c = 0; c < 64; c++)
  1776. {
  1777. format(str, sizeof(str), "car_%d", ca);
  1778. if(dini_Isset(dfile, str))
  1779. {
  1780. Dealerships[i][dCars][ca] = dini_Int(dfile, str);
  1781. format(str, sizeof(str), "car_%d_price", ca);
  1782. Dealerships[i][dCarPrice][ca] = dini_Int(dfile, str);
  1783. ca++;
  1784. }
  1785. }
  1786. Dealerships[i][dCreated] = true;
  1787. printf("Loaded dealership %s, ID %d", Dealerships[i][dName], i);
  1788. }
  1789. }
  1790. return 1;
  1791. }
  1792. SaveDealerships()
  1793. {
  1794. new dfile[32], str[128];
  1795. for(new i = 0; i < MAX_DEALERS; i++)
  1796. {
  1797. if(strlen(Dealerships[i][dName]))
  1798. {
  1799. format(dfile, sizeof(dfile), "dealerships/%d.ini", i);
  1800. if(!dini_Exists(dfile)) dini_Create(dfile);
  1801. dini_Set(dfile, "dName", Dealerships[i][dName]);
  1802. dini_FloatSet(dfile, "dPosX", Dealerships[i][dPos][0]);
  1803. dini_FloatSet(dfile, "dPosY", Dealerships[i][dPos][1]);
  1804. dini_FloatSet(dfile, "dPosZ", Dealerships[i][dPos][2]);
  1805. dini_FloatSet(dfile, "dCPosX", Dealerships[i][dPos][3]);
  1806. dini_FloatSet(dfile, "dCPosY", Dealerships[i][dPos][4]);
  1807. dini_FloatSet(dfile, "dCPosZ", Dealerships[i][dPos][5]);
  1808. dini_FloatSet(dfile, "dCPosA", Dealerships[i][dPos][6]);
  1809. new ca = 0;
  1810. for(new c = 0; c < 64; c++)
  1811. {
  1812. if(Dealerships[i][dCars][c] >= 400)
  1813. {
  1814. format(str, sizeof(str), "car_%d", ca);
  1815. dini_IntSet(dfile, str, Dealerships[i][dCars][c]);
  1816. format(str, sizeof(str), "car_%d_price", ca);
  1817. dini_IntSet(dfile, str, Dealerships[i][dCarPrice][c]);
  1818. ca++;
  1819. }
  1820. }
  1821. }
  1822. }
  1823. return 1;
  1824. }
  1825. //login tries
  1826. new LoginAttempts[MAX_PLAYERS];
  1827. //DamageInfo
  1828. new damagedBy[MAX_PLAYERS][24], damageGun[MAX_PLAYERS][24], killedBy[MAX_PLAYERS][24], killGun[MAX_PLAYERS][24], damageHour[MAX_PLAYERS], damageMinute[MAX_PLAYERS], killerHour[MAX_PLAYERS], killerMinute[MAX_PLAYERS];
  1829. //Map
  1830. new usingMap[MAX_PLAYERS];
  1831. //calculator
  1832. new Calc_Option[MAX_PLAYERS], Calc_Numb1[MAX_PLAYERS], Calc_Numb2[MAX_PLAYERS], Calc_Result[MAX_PLAYERS];
  1833. // Taxi sign
  1834. new Taxi[MAX_VEHICLES], TaxiSign[MAX_VEHICLES];
  1835. //Combine Harvester
  1836. new combvehid, combobjid;
  1837. new deathByCombine[MAX_PLAYERS], engineOn[MAX_VEHICLES], playerDisabledEngine[MAX_VEHICLES], bool:windowsDown[MAX_VEHICLES];
  1838. new LastDriver[MAX_VEHICLES][24];
  1839. new turningengine[MAX_PLAYERS], turningenginetimer[MAX_PLAYERS];
  1840. new BPLG1, BPLG2, BParkedCar[MAX_PLAYERS], ipchecking[MAX_PLAYERS][24];
  1841. // Accessories
  1842. new AttachmentBones[][24] =
  1843. {
  1844. {"Spine"},
  1845. {"Head"},
  1846. {"Left upper arm"},
  1847. {"Right upper arm"},
  1848. {"Left hand"},
  1849. {"Right hand"},
  1850. {"Left thigh"},
  1851. {"Right thigh"},
  1852. {"Left foot"},
  1853. {"Right foot"},
  1854. {"Right calf"},
  1855. {"Left calf"},
  1856. {"Left forearm"},
  1857. {"Right forearm"},
  1858. {"Left clavicle"},
  1859. {"Right clavicle"},
  1860. {"Neck"},
  1861. {"Jaw"}
  1862. };
  1863. enum AdminAccessersEnum
  1864. {
  1865. modid,
  1866. modname[24]
  1867. };
  1868. new AdminAccessers[][AdminAccessersEnum] =
  1869. {
  1870. {2103, "Stereo"},
  1871. {19078, "Parrot"},
  1872. {18632, "FishingRod"},
  1873. {18633, "GTASAWrench1"},
  1874. {18634, "GTASACrowbar1"},
  1875. {18635, "GTASAHammer1"},
  1876. {18636, "PoliceCap1"},
  1877. {18637, "PoliceShield1"},
  1878. {18641, "Flashlight1"},
  1879. {18642, "tazer1"},
  1880. {18643, "LaserPointer1"},
  1881. {19080, "LaserPointer2"},
  1882. {19081, "LaserPointer3"},
  1883. {19082, "LaserPointer4"},
  1884. {19083, "LaserPointer5"},
  1885. {19084, "LaserPointer6"},
  1886. {18644, "Screwdriver1"},
  1887. {18865, "MobilePhone1"},
  1888. {18866, "MobilePhone2"},
  1889. {18867, "MobilePhone3"},
  1890. {18868, "MobilePhone4"},
  1891. {18869, "MobilePhone5"},
  1892. {18870, "MobilePhone6"},
  1893. {18871, "MobilePhone7"},
  1894. {18872, "MobilePhone8"},
  1895. {18873, "MobilePhone9"},
  1896. {18874, "MobilePhone10"},
  1897. {18875, "Pager1"},
  1898. {18890, "Rake1"},
  1899. {18911, "Mask1"},
  1900. {18912, "Mask2"},
  1901. {18913, "Mask3"},
  1902. {18914, "Mask4"},
  1903. {18915, "Mask5"},
  1904. {18916, "Mask6"},
  1905. {18917, "Mask7"},
  1906. {18918, "Mask8"},
  1907. {18919, "Mask9"},
  1908. {18920, "Mask10"},
  1909. {18963, "CJElvisHead"},
  1910. {18974, "MaskZorro1"},
  1911. {19036, "HockeyMask1"},
  1912. {19037, "HockeyMask2"},
  1913. {19038, "HockeyMask3"},
  1914. {19085, "EyePatch1"},
  1915. {19086, "ChainsawDildo1"},
  1916. {19090, "PomPomBlue"},
  1917. {19091, "PomPomRed"},
  1918. {19092, "PomPomGreen"},
  1919. {19094, "BurgerShotHat1"},
  1920. {19099, "PoliceCap2"},
  1921. {19100, "PoliceCap3"},
  1922. {19101, "ArmyHelmet1"},
  1923. {19102, "ArmyHelmet2"},
  1924. {19103, "ArmyHelmet3"},
  1925. {19104, "ArmyHelmet4"},
  1926. {19105, "ArmyHelmet5"},
  1927. {19106, "ArmyHelmet6"},
  1928. {19107, "ArmyHelmet7"},
  1929. {19108, "ArmyHelmet8"},
  1930. {19109, "ArmyHelmet9"},
  1931. {19110, "ArmyHelmet10"},
  1932. {19111, "ArmyHelmet11"},
  1933. {19112, "ArmyHelmet12"},
  1934. {19137, "CluckinBellHat1"},
  1935. {19138, "PoliceGlasses1"},
  1936. {19139, "PoliceGlasses2"},
  1937. {19140, "PoliceGlasses3"},
  1938. {19141, "SWATHelmet1"},
  1939. {19142, "SWATArmour1"},
  1940. {19161, "PoliceHat1"},
  1941. {19162, "PoliceHat2"},
  1942. {19163, "GimpMask1"},
  1943. {19330, "fire_hat01"},
  1944. {19331, "fire_hat02"},
  1945. {19346, "hotdog01"},
  1946. {19347, "badge01"},
  1947. {19350, "moustache01"},
  1948. {19351, "moustache02"},
  1949. {19513, "whitephone"},
  1950. {19064, "SantaHat1"},
  1951. {19065, "SantaHat2"},
  1952. {19066, "SantaHat3"},
  1953. {19418, "handcuffs"},
  1954. {19514, "SWATHgrey"},
  1955. {19515, "SWATAgrey"},
  1956. {19528, "Witch Hat"}
  1957. };
  1958. new accessorysr[MAX_PLAYERS][sizeof(AdminAccessers)];
  1959. enum AccessEnum
  1960. {
  1961. modid,
  1962. modname[24],
  1963. modprice
  1964. };
  1965. new AccessNames[][AccessEnum] = {
  1966. //CLOTHING ITEMS 1
  1967. {18638, "HardHat1", 500},
  1968. {19093, "HardHat2", 500},
  1969. {19160, "HardHat3", 500},
  1970. {18639, "CowboyHat1", 500},
  1971. {18962, "CowboyHat2", 500},
  1972. {19095, "CowboyHat3", 500},
  1973. {19096, "CowboyHat4", 500},
  1974. {19097, "CowboyHat5", 500},
  1975. {19098, "CowboyHat6", 500},
  1976. {18645, "Helmet1", 600},
  1977. {18936, "Helmet2", 600},
  1978. {18937, "Helmet3", 600},
  1979. {18938, "Helmet4", 600},
  1980. {18976, "Helmet5", 600},
  1981. {18977, "Helmet6", 600},
  1982. {18978, "Helmet7", 600},
  1983. {18979, "Helmet8", 600},
  1984. {19116, "Helmet9", 600},
  1985. {19117, "Helmet10", 600},
  1986. {19118, "Helmet11", 600},
  1987. {19119, "Helmet12", 600},
  1988. {19120, "Helmet13", 600},
  1989. {18921, "Beret1", 500},
  1990. {18922, "Beret2", 500},
  1991. {18923, "Beret3", 500},
  1992. {18924, "Beret4", 500},
  1993. {18925, "Beret5", 500},
  1994. {18926, "Hat1", 500},
  1995. {18927, "Hat2", 500},
  1996. {18928, "Hat3", 500},
  1997. {18929, "Hat4", 500},
  1998. {18930, "Hat5", 500},
  1999. {18931, "Hat6", 500},
  2000. {18932, "Hat7", 500},
  2001. {18933, "Hat8", 500},
  2002. {18934, "Hat9", 500},
  2003. {18935, "Hat10", 500},
  2004. {18939, "CapBack1", 500},
  2005. {18940, "CapBack2", 500},
  2006. {18941, "CapBack3", 500},
  2007. {18942, "CapBack4", 500},
  2008. {18943, "CapBack5", 500},
  2009. {18944, "HatBoater1", 600},
  2010. {18945, "HatBoater2", 600},
  2011. {18946, "HatBoater3", 600},
  2012. {18947, "HatBowler1", 600},
  2013. {18948, "HatBowler2", 600},
  2014. {18949, "HatBowler3", 600},
  2015. {18950, "HatBowler4", 600},
  2016. {18951, "HatBowler5", 600},
  2017. {19488, "HatBowler6", 600},
  2018. {18952, "BoxingHelmet", 700},
  2019. {18953, "KnitCap1", 500},
  2020. {18954, "KnitCap2", 500},
  2021. {19087, "Rope1", 800},
  2022. {19085, "Rope2", 800},
  2023. {19089, "Rope3", 800},
  2024. {19091, "Pompom", 800},
  2025. {19143, "Spotlight", 800},
  2026. {18960, "Cap1", 400},
  2027. {18961, "TruckerCap", 600},
  2028. {18964, "SkullyCap1", 400},
  2029. {18965, "SkullyCap2", 400},
  2030. {18966, "SkullyCap3", 400},
  2031. {18967, "HatMan1", 300},
  2032. {18968, "HatMan2", 300},
  2033. {18969, "HatMan3", 300},
  2034. {18970, "HatTiger", 900},
  2035. {18971, "HatCool1", 800},
  2036. {18972, "HatCool2", 800},
  2037. {18973, "HatCool3", 800},
  2038. {19006, "Glasses1", 500},
  2039. {19007, "Glasses2", 500},
  2040. {19008, "Glasses3", 500},
  2041. {19009, "Glasses4", 500},
  2042. {19010, "Glasses5", 500},
  2043. {19011, "Glasses6", 500},
  2044. {19012, "Glasses7", 500},
  2045. {19013, "Glasses8", 500},
  2046. {19014, "Glasses9", 500},
  2047. {19015, "Glasses10", 500},
  2048. {19016, "Glasses11", 500},
  2049. {19017, "Glasses12", 500},
  2050. {19018, "Glasses13", 500},
  2051. {19019, "Glasses14", 500},
  2052. {19020, "Glasses15", 500},
  2053. {19021, "Glasses16", 500},
  2054. {19022, "Glasses17", 500},
  2055. {19023, "Glasses18", 500},
  2056. {19024, "Glasses19", 500},
  2057. {19025, "Glasses20", 500},
  2058. {19026, "Glasses21", 500},
  2059. {19027, "Glasses22", 500},
  2060. {19028, "Glasses23", 500},
  2061. {19029, "Glasses24", 500},
  2062. {19030, "Glasses25", 500},
  2063. {19031, "Glasses26", 500},
  2064. {19032, "Glasses27", 500},
  2065. {19033, "Glasses28", 500},
  2066. {19034, "Glasses29", 500},
  2067. {19035, "Glasses30", 500},
  2068. {19138, "Glasses31", 500},
  2069. {19139, "Glasses32", 500},
  2070. {19140, "Glasses33", 500},
  2071. {19039, "Watch1", 900},
  2072. {19040, "Watch2", 900},
  2073. {19041, "Watch3", 900},
  2074. {19042, "Watch4", 900},
  2075. {19043, "Watch5", 900},
  2076. {19044, "Watch6", 900},
  2077. {19045, "Watch7", 900},
  2078. {19046, "Watch8", 900},
  2079. {19047, "Watch9", 900},
  2080. {19048, "Watch10", 900},
  2081. {19049, "Watch11", 900},
  2082. {19050, "Watch12", 900},
  2083. {19051, "Watch13", 900},
  2084. {19052, "Watch14", 900},
  2085. {19053, "Watch15", 900},
  2086. {19067, "HoodyHat1", 1000},
  2087. {19068, "HoodyHat2", 1000},
  2088. {19069, "HoodyHat3", 1000},
  2089. {19085, "EyePatch", 500},
  2090. {19113, "SillyHelmet1", 500},
  2091. {19114, "SillyHelmet2", 500},
  2092. {19115, "SillyHelmet3", 500},
  2093. {18875, "Pager", 700},
  2094. {19801, "Balaclava", 1000},
  2095. //CLOTHING ITEMS 2
  2096. {19348, "Cane", 500},
  2097. {19349, "Monocle", 900},
  2098. {19352, "TopHat1", 900},
  2099. {19487, "TopHat2", 900},
  2100. {19421, "Headphones1", 500},
  2101. {19421, "Headphones2", 500},
  2102. {19421, "Headphones3", 500},
  2103. {19421, "Headphones4", 500},
  2104. {19472, "GasMask", 800},
  2105. {19520, "PilotHat", 1000},
  2106. {19521, "PoliceHat", 1000},
  2107. {19200, "PoliceBike Helmet", 1000},
  2108. {19314, "Horns", 1000},
  2109. {19320, "Pumpkin", 1000},
  2110. {19469, "Bandana", 1000},
  2111. {19136, "Hat+Wig", 1000},
  2112. {19274, "WigRed", 1000},
  2113. {19516, "Wig1", 1000},
  2114. {19517, "Wig2", 1000},
  2115. {19518, "Wig3", 1000},
  2116. {19519, "Wig4", 1000},
  2117. {18975, "Wig5", 1000},
  2118. {19350, "Moustache1", 1000},
  2119. {19351, "Moustache2", 1000},
  2120. {19078, "Parrot", 1000},
  2121. {18633, "Wrench", 1000},
  2122. {18634, "Crowbar", 1000},
  2123. {18635, "Hammer", 1000},
  2124. {18636, "PoliceCap", 1000},
  2125. {18637, "PoliceShield", 1000},
  2126. {18641, "Flashlight", 1000},
  2127. {18642, "Taser", 1000},
  2128. {18643, "LaserPointer1", 1000},
  2129. {19080, "LaserPointer2", 1000},
  2130. {19081, "LaserPointer3", 1000},
  2131. {19082, "LaserPointer4", 1000},
  2132. {19083, "LaserPointer5", 1000},
  2133. {19084, "LaserPointer6", 1000},
  2134. {18644, "Screwdriver", 1000},
  2135. {18890, "Rake1", 1000},
  2136. {18911, "Mask1", 1000},
  2137. {18912, "Mask2", 1000},
  2138. {18913, "Mask3", 1000},
  2139. {18914, "Mask4", 1000},
  2140. {18915, "Mask5", 1000},
  2141. {18916, "Mask6", 1000},
  2142. {18917, "Mask7", 1000},
  2143. {18918, "Mask8", 1000},
  2144. {18919, "Mask9", 1000},
  2145. {18920, "Mask10", 1000},
  2146. {18963, "CJElvisHead", 1000},
  2147. {18974, "MaskZorro1", 1000},
  2148. {19036, "HockeyMask 1", 1000},
  2149. {19037, "HockeyMask 2", 1000},
  2150. {19038, "HockeyMask 3", 1000},
  2151. {19085, "EyePatch", 1000},
  2152. {19086, "ChainsawDildo", 1000},
  2153. {19090, "PompomBlue", 1000},
  2154. {19091, "PompomRed", 1000},
  2155. {19092, "PompomGreen", 1000},
  2156. {19094, "BurgerShotHat1", 1000},
  2157. {19099, "Police Cap1", 1000},
  2158. {19100, "Police Cap2", 1000},
  2159. {19101, "Army Helmet1", 1000},
  2160. {19102, "Army Helmet2", 1000},
  2161. {19103, "Army Helmet3", 1000},
  2162. {19104, "Army Helmet4", 1000},
  2163. {19105, "Army Helmet5", 1000},
  2164. {19106, "Army Helmet6", 1000},
  2165. {19107, "Army Helmet7", 1000},
  2166. {19108, "Army Helmet8", 1000},
  2167. {19109, "Army Helmet9", 1000},
  2168. {19110, "Army Helmet10", 1000},
  2169. {19111, "Army Helmet11", 1000},
  2170. {19112, "Army Helmet12", 1000},
  2171. {19137, "ClucknBellHat", 1000},
  2172. {19138, "PoliceGlasses1", 1000},
  2173. {19139, "PoliceGlasses2", 1000},
  2174. {19140, "PoliceGlasses3", 1000},
  2175. {19141, "SWAT Helmet", 1000},
  2176. {19142, "SWAT Armour", 1000},
  2177. {19161, "PoliceHat1", 1000},
  2178. {19162, "PoliceHat 2", 1000},
  2179. {19163, "Gimp Mask", 1000},
  2180. {19330, "Fireman Hat 1", 1000},
  2181. {19331, "Fireman Hat 2", 1000},
  2182. {19347, "Badge", 1000},
  2183. {19064, "SantaHat1", 1000},
  2184. {19065, "SantaHat2", 1000},
  2185. {19066, "SantaHat3", 1000},
  2186. {19514, "SWATHelmetGrey", 1000},
  2187. {19515, "SWATArmourGrey", 1000},
  2188. {3012, "PilotMask", 1000},
  2189. {2052, "ArmyHelmet1", 1000},
  2190. {2053, "Army Helmet2", 1000},
  2191. {373, "Vest", 1000},
  2192. {2054, "PilotHat", 1000},
  2193. {18891, "Bandana1", 1000},
  2194. {18892, "Bandana2", 1000},
  2195. {18893, "Bandana3", 1000},
  2196. {18894, "Bandana4", 1000},
  2197. {18895, "Bandana5", 1000},
  2198. {18896, "Bandana6", 1000},
  2199. {18897, "Bandana7", 1000},
  2200. {18898, "Bandana8", 1000},
  2201. {18899, "Bandana9", 1000},
  2202. {18900, "Bandana10", 1000},
  2203. {18901, "Bandana11", 1000},
  2204. {18902, "Bandana12", 1000},
  2205. {18903, "Bandana13", 1000},
  2206. {18904, "Bandana14", 1000},
  2207. {18905, "Bandana15", 1000},
  2208. {18906, "Bandana16", 1000},
  2209. {18907, "Bandana17", 1000},
  2210. {18908, "Bandana18", 1000},
  2211. {18909, "Bandana19", 1000},
  2212. {18910, "Bandana20", 1000},
  2213. //TOYS 1
  2214. {341, "Chainsaw", 1000},
  2215. {19346, "Hotdog", 1000},
  2216. {19317, "Bass Guitar", 2000},
  2217. {19318, "FlyingVGuitar", 3000},
  2218. {19319, "WarlockGuitar", 2000},
  2219. {321, "Dildo1", 1000},
  2220. {322, "Dildo2", 1000},
  2221. {323, "Dildo3", 1000},
  2222. {324, "Dildo4", 1000},
  2223. {325, "Flowers", 1000},
  2224. {326, "Cane", 1000},
  2225. {327, "WeddingringBox", 1000},
  2226. {331, "BrassKnuckles", 1000},
  2227. {333, "GolfClub", 1000},
  2228. {334, "NightStick", 1000},
  2229. {336, "BaseballBat", 1000},
  2230. {337, "Shovel", 1000},
  2231. {338, "PoolCue", 1000},
  2232. {339, "Katana", 1000},
  2233. {335, "Knife", 1000},
  2234. {346, "Glock", 1000},
  2235. {347, "SDPistol", 1000},
  2236. {348, "DesertEagle", 1000},
  2237. {349, "Shotgun", 1000},
  2238. {349, "Sawnoff", 1000},
  2239. {351, "SPAS12", 1000},
  2240. {352, "Micro SMG", 1000},
  2241. {353, "MP5", 1000},
  2242. {355, "AK47", 1000},
  2243. {356, "M4", 1000},
  2244. {357, "Rifle", 1000},
  2245. {358, "Sniper", 1000},
  2246. {363, "C4", 1000},
  2247. {342, "Grenade", 1000},
  2248. {343, "SmokeGrenade", 1000},
  2249. {365, "Spraycan", 1000},
  2250. {367, "Camera", 1000},
  2251. {368, "NV Goggles", 1000},
  2252. {370, "Jetpack", 1000},
  2253. //{1602, "Jellyfish", 1000},
  2254. {1212, "Money", 1000},
  2255. //TOYS 2
  2256. {19066, "Santa Hat 3", 1000},
  2257. {371, "Para Backpack", 1000},
  2258. {3026, "Black Backpack", 1000},
  2259. {19066, "Scuba Gear1", 1000},
  2260. {19066, "Scuba Gear2", 1000},
  2261. {1025, "Wheel", 1000},
  2262. {1265, "Trashbag", 1000},
  2263. {1549, "Bin", 1000},
  2264. {1486, "Bottle1", 1000},
  2265. {1520, "Bottle2", 1000},
  2266. {1543, "Bottle3", 1000},
  2267. {1544, "Bottle4", 1000},
  2268. {1575, "Black Package", 1000},
  2269. {2891, "Drug Package", 1000},
  2270. {1644, "Lotion", 1000},
  2271. {1781, "Old TV", 1000},
  2272. {2056, "Target", 1000},
  2273. {2060, "Sandbag", 1000},
  2274. {2268, "Cat Painting 1", 1000},
  2275. {2277, "Cat Painting 2", 1000},
  2276. {2410, "Surfboard1", 1000},
  2277. {2406, "Surfboard2", 1000},
  2278. {2405, "Surfboard3", 1000},
  2279. {2404, "Surfboard4", 1000},
  2280. {2590, "Hook", 1000},
  2281. {2663, "Burgershot Bag", 1000},
  2282. {2680, "Lock and Chain", 1000},
  2283. {2690, "Fire Extinguisher", 1000},
  2284. {2703, "Hamburger", 1000},
  2285. {2712, "Mop", 1000},
  2286. {2719, "Sign 99c", 1000},
  2287. {2749, "Hairspray", 1000},
  2288. {2750, "Hairdryer", 1000},
  2289. {2769, "Burrito", 1000},
  2290. {2804, "Raw Meat", 1000},
  2291. {2805, "Raw Meat Bag", 1000},
  2292. {2908, "Zombie Mask", 1000},
  2293. {2907, "Zombie Torso", 1000},
  2294. {2906, "Zombie Arm", 1000},
  2295. {2905, "Zombie Leg", 1000},
  2296. {2914, "Flag", 1000},
  2297. {2916, "Dumbell", 1000},
  2298. {2969, "Crate", 1000},
  2299. {2976, "Kryptonite", 1000},
  2300. {3014, "Weapon Crate", 1000},
  2301. {3028, "Katana", 1000},
  2302. {3056, "Magnet", 1000},
  2303. {3106, "8 Ball", 1000},
  2304. {1946, "BasketBall", 1000},
  2305. {1960, "Record", 1000},
  2306. {2045, "SpikedClub", 1000},
  2307. {2062, "Barrel", 1000},
  2308. {2589, "MeatOnRope", 1000},
  2309. {2901, "WeedBundle", 1000},
  2310. {3027, "Joint", 1000},
  2311. {3044, "Cigar", 1000},
  2312. {3054, "SteelBall", 1000},
  2313. {3082, "GreenTank", 1000},
  2314. {3524, "SkullOnStick", 1},
  2315. {3528, "DragonMask", 1000},
  2316. {3790, "Missile", 1000},
  2317. {18887, "ForceField", 1},
  2318. //special
  2319. {359, "RPG1", 1},
  2320. {360, "RPG2", 1},
  2321. {363, "Satchel", 1000},
  2322. {364, "Detonator", 1000},
  2323. {18677, "Smoke", 1},
  2324. {18675, "Smoke Flash", 1},
  2325. {18673, "Cigar Smoke", 1000},
  2326. {372, "Uzi", 1},
  2327. {635, "Grass1", 1000},
  2328. {636, "Grass2", 1000},
  2329. {18688, "Fire Flame", 1},
  2330. {18689, "Fire & Smoke", 1},
  2331. {902, "Starfish", 1000},
  2332. {18648, "Blue Neon", 1},
  2333. {18693, "Energy Trail", 1},
  2334. {18694, "Particle", 1},
  2335. {928, "Box", 1000},
  2336. {932, "Wheelchair1", 1000},
  2337. {1363, "Wheelchair2", 1000},
  2338. {935, "Oil Drum", 1000},
  2339. {1019, "Exhaust1", 1},
  2340. {1020, "Exhaust2", 1},
  2341. {1114, "Exhaust3", 1},
  2342. {1136, "Exhaust4", 1},
  2343. {1025, "Tire", 1000},
  2344. {1210, "Briefcase", 1000},
  2345. {18698, "Flies", 1000},
  2346. {1238, "Cone", 1000},
  2347. {1271, "Crate", 1000},
  2348. {1310, "Magnet", 1000},
  2349. {1328, "Bin", 1000},
  2350. {1349, "Trolly", 1000},
  2351. {1453 , "Hay", 1000},
  2352. {1454 , "Haystack", 1000},
  2353. {1484 , "Bottle1", 1000},
  2354. {1486 , "Bottle2", 1000},
  2355. {18729, "Green Energy", 1},
  2356. {18699 , "Nitro Trail", 1},
  2357. {1546 , "Sprunk", 1},
  2358. {18701 , "Small Energy Trail", 1},
  2359. {1512 , "Whiskey", 1000},
  2360. {1514 , "Cash Register", 1000},
  2361. {1550 , "Moneybag", 1000},
  2362. {1581 , "ID Card", 1000},
  2363. {1582 , "Pizzabox", 1000},
  2364. {1588 , "Dummy head", 1},
  2365. {1589 , "Dummy shoulderL", 1},
  2366. {1590 , "Dummy shoulderR", 1},
  2367. {1591 , "Dummy torsoR", 1},
  2368. {1592 , "Dummy torsoL", 1},
  2369. {1598, "Beachball", 1},
  2370. {1599, "Fish1", 1},
  2371. {1600, "Fish2", 1},
  2372. {1603, "Jellyfish", 1},
  2373. {1607, "Dolphin", 1},
  2374. {1608, "Shark", 1},
  2375. {1609, "Turtle", 1000},
  2376. {1946, "Baseketball", 1000},
  2377. {1974, "Golfball", 1000},
  2378. {1640, "Beachtowel1", 1000},
  2379. {1641, "Beachtowel2", 1000},
  2380. {18717, "Sparks", 1},
  2381. {18702 , "Blue Flash", 1},
  2382. {1960, "Record1", 1000},
  2383. {1961, "Record2", 1000},
  2384. {18703 , "Smoke", 1},
  2385. {1644, "Sunscreen", 1000},
  2386. {1650, "Jerrycan", 1000},
  2387. {2049, "Target", 1000},
  2388. {2051, "Target2", 1000},
  2389. {2056, "Target3", 1000},
  2390. {2265, "Cat", 1000},
  2391. {2510, "Plane", 1000},
  2392. {18705 , "Piss", 1},
  2393. {2702, "Pizza slice", 1000},
  2394. {2750, "Hair dryer", 1000},
  2395. {2913, "Barbell", 1000},
  2396. {2916, "Dumbell", 1000},
  2397. {3012, "Mask", 1000},
  2398. //0.3.7 objects (0.3.7)
  2399. {19569, "Milk1", 1000},
  2400. {19570, "Milk2", 1000},
  2401. {19567, "Icecream1", 1000},
  2402. {19568, "Icecream2", 1000},
  2403. {19566, "Cereal1", 1000},
  2404. {19565, "Cereal2", 1000},
  2405. {19564, "Cereal3", 1000},
  2406. {19563, "Cereal4", 1000},
  2407. {19562, "Cereal5", 1000},
  2408. {19561, "Cereal6", 1000},
  2409. {19560, "Meat Tray", 1000},
  2410. {19559, "Hiker Backpack", 1000},
  2411. {19558, "Pizza Hat", 1000},
  2412. {19557, "Orgie Mask", 1000},
  2413. {19555, "Boxing GloveL", 1000},
  2414. {19556, "Boxing GloveR", 1000},
  2415. {19554, "Beanie", 1000},
  2416. {19527, "Couldron", 1000},
  2417. {19528, "Witch hat", 1000},
  2418. {19553, "Straw hat", 1000},
  2419. {19583, "Kitchen Knife", 1000},
  2420. {19582, "Raw Meat", 1000},
  2421. {19581, "Frying Pan", 1000},
  2422. {19580, "Pizza", 1000},
  2423. {19573, "BriquettesBag1", 1000},
  2424. {19572, "Pissh", 1000},
  2425. {19571, "Pizza Box1", 1000},
  2426. {19613, "Mic amp", 1000},
  2427. {19611, "Mic stand", 1000},
  2428. {19610, "Mic", 1000},
  2429. {19592, "Basket", 1000},
  2430. {19591, "Fan ", 1000},
  2431. {19590, "Sword ", 1000},
  2432. {19586, "Spatula", 1000},
  2433. {19584, "Pot1", 1000},
  2434. {19585, "Pot2", 1000},
  2435. {19804, "Padlock", 1000},
  2436. {19847, "LegHam", 1000},
  2437. {19792, "Keycard", 1000},
  2438. {19808, "Keyboard", 1000},
  2439. {19807, "Phone", 1000},
  2440. {19632, "Campfire", 1000},
  2441. {19631, "Sledgehammer", 1000},
  2442. {19630, "Fish", 1000},
  2443. {19627, "Wrench", 1000},
  2444. {19624, "Suitcase", 1000},
  2445. {19623, "Flash camera", 1000},
  2446. {19621, "Oil Can", 1000},
  2447. {19622, "Broom", 1000},
  2448. {11738 , "Medic Box", 1000},
  2449. {11736, "Medic Pack", 1000},
  2450. {11735, "Cowboy Boot", 1000},
  2451. {11734 , "Rocking Chair", 1000},
  2452. {11733, "Rocking Horse", 1000},
  2453. {11729, "New Phone", 1000},
  2454. {11722, "Sauce1", 1000},
  2455. {11723, "Sauce2", 1000},
  2456. {11719, "Old pot 1", 1000},
  2457. {11720, "Old pot 2", 1000},
  2458. {11716, "Knife", 1000},
  2459. {11715, "Fork", 1000},
  2460. {11712, "Cross", 1000},
  2461. {11706, "Bin", 1000},
  2462. {11705, "Black Phone", 1000},
  2463. {11704, "Devil Mask", 1000},
  2464. {19944, "Body Bag", 1000},
  2465. {19878, "Skateboard", 1000},
  2466. {19894, "Laptop Closed", 1000},
  2467. {19893, "Laptop Open ", 1000},
  2468. {19836, "Blood Pool", 1000},
  2469. {19835, "Coffee", 1000},
  2470. {19825, "Clock", 1000},
  2471. {19820, "Alcohol1", 1000},
  2472. {19821, "Alcohol2", 1000},
  2473. {19822, "Alcohol3", 1000},
  2474. {19823, "Alcohol4", 1000},
  2475. {19824, "Alcohol5", 1000},
  2476. {19625, "Ciggy", 1000},
  2477. {19626, "Spade", 1000},
  2478. {19816, "Oxygen", 1000},
  2479. {19818, "Glass1", 1000},
  2480. {19819, "Glass2", 1000},
  2481. {19811, "BurgerBox", 1000},
  2482. {19833, "Cow", 1000},
  2483. {19574, "Orange", 1000},
  2484. {19575, "Apple1", 1000},
  2485. {19576, "Apple2", 1000},
  2486. {19577, "Tomato1", 1000},
  2487. {19578, "Banana1", 1000},
  2488. {19579, "Bread Loaf", 1000},
  2489. {19883, "Bread Slice", 1000},
  2490. {19896, "CigarettePack1", 1000},
  2491. {19897, "CigarettePack2", 1000},
  2492. {19904, "ConstructionVest1", 1000},
  2493. {19941, "GoldBar1", 1000},
  2494. {19942, "Police Radio", 1000},
  2495. {19873, "Toilet paper", 1000},
  2496. {19874, "Soap", 1000},
  2497. {19773, "Gun Holster", 1000},
  2498. {19774, "Police Badge1", 1000},
  2499. {19775, "Police Badge2", 1000},
  2500. {19776, "FBI Card1", 1000},
  2501. {19777, "FBI Logo", 1000},
  2502. {19778, "InsigniaDetective1", 1000},
  2503. {19779, "InsigniaDetective2", 1000},
  2504. {19780, "InsigniaDetective3", 1000},
  2505. {19781, "InsigniaSergeant1", 1000},
  2506. {19782, "InsigniaSergeant2", 1000},
  2507. {19783, "InsigniaPOfficer2", 1000},
  2508. {19784, "InsigniaPOfficer3", 1000},
  2509. {19785, "InsigniaSeniorLdOff", 1000}
  2510. };
  2511. new Accessories[MAX_PLAYERS][7], AccessoriesB[MAX_PLAYERS][7], Float:AccessoriesX[MAX_PLAYERS][7], Float:AccessoriesY[MAX_PLAYERS][7];
  2512. new Float:AccessoriesZ[MAX_PLAYERS][7], Float:AccessoriesrX[MAX_PLAYERS][7], Float:AccessoriesrY[MAX_PLAYERS][7], Float:AccessoriesrZ[MAX_PLAYERS][7];
  2513. new Float:AccessoriessX[MAX_PLAYERS][7], Float:AccessoriessY[MAX_PLAYERS][7], Float:AccessoriessZ[MAX_PLAYERS][7], Accessoriesc1[MAX_PLAYERS][7]; //color1
  2514. // Siren
  2515. new Siren[MAX_VEHICLES];
  2516. new SirenObject[MAX_VEHICLES];
  2517. stock IsValidSirenVehicle(vehicleid)
  2518. {
  2519. if(IsAPlane(vehicleid)) return 0;
  2520. else if(IsAHelicopter(vehicleid)) return 0;
  2521. else if(IsABike(vehicleid)) return 0;
  2522. else if(IsABoat(vehicleid)) return 0;
  2523. switch(GetVehicleModel(vehicleid))
  2524. {
  2525. case 403, 406, 407, 416, 420, 423, 427, 428, 432, 437,
  2526. 438, 441, 451, 471, 481, 486, 490, 501, 509, 510, 524,
  2527. 525, 532, 537, 538, 539, 544, 564, 571, 588, 594,
  2528. 596, 597, 598, 599, 531, 601:
  2529. {
  2530. return 0;
  2531. }
  2532. }
  2533. return 1;
  2534. }
  2535. //Namechange
  2536. new NameChangeRequest[MAX_PLAYERS][MAX_PLAYER_NAME];
  2537. //Anti-CS
  2538. new CSDisable[MAX_PLAYERS];
  2539. // Fuel...
  2540. new Filling[MAX_PLAYERS], displayingText[MAX_PLAYERS], hideCenterHUDTimerID[MAX_PLAYERS], OfferedGunTo[MAX_PLAYERS] = -1, OfferedGunFrom[MAX_PLAYERS] = -1, GunOffered[MAX_PLAYERS] = 0, string5[128];
  2541. //Give kevlars
  2542. new KevlarOfferTo[MAX_PLAYERS] = -1, KevlarOfferFrom[MAX_PLAYERS] = -1;
  2543. //Give keys
  2544. new KeysOfferTo[MAX_PLAYERS] = -1, KeysOfferFrom[MAX_PLAYERS] = -1, KeysOfferIndex[MAX_PLAYERS];
  2545. // Dropping weapons
  2546. new CanDrop[MAX_PLAYERS];
  2547. // Sell house
  2548. new OfferedSellHouse[MAX_PLAYERS][3];
  2549. // Selling vehicles
  2550. new OfferedSellVehicle[MAX_PLAYERS][3];
  2551. //VIP Sys
  2552. new PlayerHasMP5Laser[MAX_PLAYERS], PlayerHasM4Laser[MAX_PLAYERS], PlayerHasAKLaser[MAX_PLAYERS], PlayerHasSpasLaser[MAX_PLAYERS], PlayerHasDeagleLaser[MAX_PLAYERS];
  2553. new PlayerHasLaserOn[MAX_PLAYERS], GottenGift[MAX_PLAYERS], GottenTimeLeft[MAX_PLAYERS], VIPChatTog[MAX_PLAYERS] = 0;
  2554. // Pause Detection
  2555. new PlayerPaused[MAX_PLAYERS], pausetick[MAX_PLAYERS], playerDesynced[MAX_PLAYERS];
  2556. // getJobLevelReq shit
  2557. new jlevel1, jlevel2, jlevel3, jlevel4, jlevel5;
  2558. //food crap
  2559. new foodTray[MAX_TRAYS][5]; //100 rows, 3 columns [OBJ ID/TYPE/AMOUNT/ACTIVE TIME/POISONED].
  2560. new hasFoodTray[MAX_PLAYERS], finishedEatingTimer[MAX_PLAYERS], beingPoisonedTimer[MAX_PLAYERS], boughtFoodTimer[MAX_PLAYERS], playerPoisoned[MAX_PLAYERS], foodTrays, Lockpicking[MAX_PLAYERS], CLockpicking[MAX_PLAYERS];
  2561. stock CreateBladesForCombine(vehicleid) {
  2562. combobjid = CreateObject(983, 0, 0, 0, 0, 0, 0);
  2563. AttachObjectToVehicle(combobjid, vehicleid, 0.00, 5.76, -1.99, 0.00, 90.00, 90.00);
  2564. //invisible combine
  2565. SetObjectMaterial(combobjid, 0, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2566. SetObjectMaterial(combobjid, 1, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2567. SetObjectMaterial(combobjid, 2, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2568. SetObjectMaterial(combobjid, 3, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2569. SetObjectMaterial(combobjid, 4, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2570. SetObjectMaterial(combobjid, 5, COLOR_GREY, "none", "none", 0x00FFFFFF);
  2571. return 1;
  2572. }
  2573. new legalmods[48][22] =
  2574. {
  2575. {400, 1024, 1021, 1020, 1019, 1018, 1013, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2576. {401, 1145, 1144, 1143, 1142, 1020, 1019, 1017, 1013, 1007, 1006, 1005, 1004, 1003, 1001, 0000, 0000, 0000, 0000},
  2577. {404, 1021, 1020, 1019, 1017, 1016, 1013, 1007, 1002, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2578. {405, 1023, 1021, 1020, 1019, 1018, 1014, 1001, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2579. {410, 1024, 1023, 1021, 1020, 1019, 1017, 1013, 1007, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2580. {415, 1023, 1019, 1018, 1017, 1007, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2581. {418, 1021, 1020, 1016, 1006, 1002, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2582. {420, 1021, 1019, 1005, 1004, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2583. {421, 1023, 1021, 1020, 1019, 1018, 1016, 1014, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2584. {422, 1021, 1020, 1019, 1017, 1013, 1007, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2585. {426, 1021, 1019, 1006, 1005, 1004, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2586. {436, 1022, 1021, 1020, 1019, 1017, 1013, 1007, 1006, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2587. {439, 1145, 1144, 1143, 1142, 1023, 1017, 1013, 1007, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2588. {477, 1021, 1020, 1019, 1018, 1017, 1007, 1006, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2589. {478, 1024, 1022, 1021, 1020, 1013, 1012, 1005, 1004, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2590. {489, 1024, 1020, 1019, 1018, 1016, 1013, 1006, 1005, 1004, 1002, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2591. {491, 1145, 1144, 1143, 1142, 1023, 1021, 1020, 1019, 1018, 1017, 1014, 1007, 1003, 0000, 0000, 0000, 0000, 0000},
  2592. {492, 1016, 1006, 1005, 1004, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2593. {496, 1143, 1142, 1023, 1020, 1019, 1017, 1011, 1007, 1006, 1003, 1002, 1001, 0000, 0000, 0000, 0000, 0000, 0000},
  2594. {500, 1024, 1021, 1020, 1019, 1013, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2595. {516, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1007, 1004, 1002, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2596. {517, 1145, 1144, 1143, 1142, 1023, 1020, 1019, 1018, 1017, 1016, 1007, 1003, 1002, 0000, 0000, 0000, 0000, 0000},
  2597. {518, 1145, 1144, 1143, 1142, 1023, 1020, 1018, 1017, 1013, 1007, 1006, 1005, 1003, 1001, 0000, 0000, 0000, 0000},
  2598. {527, 1021, 1020, 1018, 1017, 1015, 1014, 1007, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2599. {529, 1023, 1020, 1019, 1018, 1017, 1012, 1011, 1007, 1006, 1003, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2600. {534, 1185, 1180, 1179, 1178, 1127, 1126, 1125, 1124, 1123, 1122, 1106, 1101, 1100, 0000, 0000, 0000, 0000, 0000},
  2601. {535, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1110, 1109, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2602. {536, 1184, 1183, 1182, 1181, 1128, 1108, 1107, 1105, 1104, 1103, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2603. {540, 1145, 1144, 1143, 1142, 1024, 1023, 1020, 1019, 1018, 1017, 1007, 1006, 1004, 1001, 0000, 0000, 0000, 0000},
  2604. {542, 1145, 1144, 1021, 1020, 1019, 1018, 1015, 1014, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2605. {546, 1145, 1144, 1143, 1142, 1024, 1023, 1019, 1018, 1017, 1007, 1006, 1004, 1002, 1001, 0000, 0000, 0000, 0000},
  2606. {547, 1143, 1142, 1021, 1020, 1019, 1018, 1016, 1003, 1000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2607. {549, 1145, 1144, 1143, 1142, 1023, 1020, 1019, 1018, 1017, 1012, 1011, 1007, 1003, 1001, 0000, 0000, 0000, 0000},
  2608. {550, 1145, 1144, 1143, 1142, 1023, 1020, 1019, 1018, 1006, 1005, 1004, 1003, 1001, 0000, 0000, 0000, 0000, 0000},
  2609. {551, 1023, 1021, 1020, 1019, 1018, 1016, 1006, 1005, 1003, 1002, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2610. {558, 1168, 1167, 1166, 1165, 1164, 1163, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 0000, 0000, 0000, 0000},
  2611. {559, 1173, 1162, 1161, 1160, 1159, 1158, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 0000, 0000, 0000, 0000},
  2612. {560, 1170, 1169, 1141, 1140, 1139, 1138, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 0000, 0000, 0000, 0000},
  2613. {561, 1157, 1156, 1155, 1154, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1031, 1030, 1027, 1026},
  2614. {562, 1172, 1171, 1149, 1148, 1147, 1146, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 0000, 0000, 0000, 0000},
  2615. {565, 1153, 1152, 1151, 1150, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 0000, 0000, 0000, 0000},
  2616. {567, 1189, 1188, 1187, 1186, 1133, 1132, 1131, 1130, 1129, 1102, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2617. {575, 1177, 1176, 1175, 1174, 1099, 1044, 1043, 1042, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2618. {576, 1193, 1192, 1191, 1190, 1137, 1136, 1135, 1134, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2619. {580, 1023, 1020, 1018, 1017, 1007, 1006, 1001, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2620. {589, 1145, 1144, 1024, 1020, 1018, 1017, 1016, 1013, 1007, 1006, 1005, 1004, 1000, 0000, 0000, 0000, 0000, 0000},
  2621. {600, 1022, 1020, 1018, 1017, 1013, 1007, 1006, 1005, 1004, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000},
  2622. {603, 1145, 1144, 1143, 1142, 1024, 1023, 1020, 1019, 1018, 1017, 1007, 1006, 1001, 0000, 0000, 0000, 0000, 0000}
  2623. };
  2624. new wheelmodels[17] = {1025, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1096, 1097, 1098};
  2625. new illegalvehs[29] = { 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 };
  2626. iswheelmodel(modelid)
  2627. {
  2628. for(new wm; wm < sizeof(wheelmodels); wm++)
  2629. {
  2630. if(modelid == wheelmodels[wm])
  2631. {
  2632. return true;
  2633. }
  2634. }
  2635. return false;
  2636. }
  2637. IllegalCarNitroIde(carmodel)
  2638. {
  2639. for(new iv; iv < sizeof(illegalvehs); iv++)
  2640. {
  2641. if(carmodel == illegalvehs[iv])
  2642. {
  2643. return true;
  2644. }
  2645. }
  2646. return false;
  2647. }
  2648. stock islegalcarmod(vehicleide, componentid)
  2649. {
  2650. if(vehicleide == INVALID_VEHICLE_ID) return true;
  2651. vehicleide = GetVehicleModel(vehicleide);
  2652. new modok = false;
  2653. if((iswheelmodel(componentid)) || (componentid == 1086) || (componentid == 1087) || ((componentid >= 1008) && (componentid <= 1010)))
  2654. {
  2655. new nosblocker = IllegalCarNitroIde(vehicleide);
  2656. if(!nosblocker)
  2657. modok = true;
  2658. }
  2659. else
  2660. {
  2661. for(new lm; lm < sizeof(legalmods); lm++)
  2662. {
  2663. if(legalmods[lm][0] == vehicleide)
  2664. {
  2665. for(new J = 1; J < 22; J++)
  2666. {
  2667. if(legalmods[lm][J] == componentid && legalmods[lm][J] != 0000)
  2668. modok = true;
  2669. }
  2670. }
  2671. }
  2672. }
  2673. return modok;
  2674. }
  2675. public OnVehicleMod(playerid, vehicleid, componentid)
  2676. {
  2677. new str[128];
  2678. if(GetPlayerInterior(playerid) == 0)
  2679. {
  2680. if(PlayerInfo[playerid][pAdmin] < 2)
  2681. {
  2682. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) is possibly car mod hacking.", PlayerOOCName(playerid), playerid);
  2683. ABroadCast(COLOR_WHITE, str, 1);
  2684. return 0;
  2685. }
  2686. }
  2687. new modok = islegalcarmod(vehicleid, componentid);
  2688. if(!modok)
  2689. {
  2690. OnDestroyVehicle(vehicleid);
  2691. return 0;
  2692. }
  2693. return 1;
  2694. }
  2695. stock AlphaNumeric(const string2[])
  2696. {
  2697. new z = 0;
  2698. for(new x, y = strlen(string2); x != y; x++)
  2699. {
  2700. if((string2[x] >= 48 && string2[x] <= 57) || (string2[x] >= 65 && string2[x] <= 90) || (string2[x] >= 97 && string2[x] <= 122) || string2[x] == 32)
  2701. {
  2702. z++;
  2703. }
  2704. }
  2705. if(z == strlen(string2))
  2706. {
  2707. return true;
  2708. }
  2709. else
  2710. {
  2711. return false;
  2712. }
  2713. }
  2714. stock AlphaNumericTwo(const string2[])
  2715. {
  2716. new z = 0;
  2717. for(new x, y = strlen(string2); x != y; x++)
  2718. {
  2719. if((string2[x] >= 65 && string2[x] <= 90) || (string2[x] >= 97 && string2[x] <= 122))
  2720. {
  2721. z++;
  2722. }
  2723. }
  2724. if(z == strlen(string2))
  2725. {
  2726. return true;
  2727. }
  2728. else
  2729. {
  2730. return false;
  2731. }
  2732. }
  2733. stock AlphaNumericName(const string2[])
  2734. {
  2735. new z = 0;
  2736. for(new x, y = strlen(string2); x != y; x++)
  2737. {
  2738. if((string2[x] >= 65 && string2[x] <= 90) || (string2[x] >= 97 && string2[x] <= 122) || string2[x] == 95)
  2739. {
  2740. z++;
  2741. }
  2742. }
  2743. if(z == strlen(string2))
  2744. {
  2745. return true;
  2746. }
  2747. else
  2748. {
  2749. return false;
  2750. }
  2751. }
  2752. new gCarLock[MAX_VEHICLES];
  2753. new VehicleFriendlyNames[212][] =
  2754. {
  2755. {"Landstalker"}, {"Bravura"}, {"Buffalo"}, {"Linerunner"}, {"Perrenial"}, {"Sentinel"},
  2756. {"Dumper"}, {"Firetruck"}, {"Trashmaster"}, {"Stretch"}, {"Manana"}, {"Infernus"}, {"Voodoo"},
  2757. {"Pony"}, {"Mule"}, {"Cheetah"}, {"Ambulance"}, {"Leviathan"}, {"Moonbeam"}, {"Esperanto"}, {"Taxi"},
  2758. {"Washington"}, {"Bobcat"}, {"Mr. Whoopee"}, {"BF. Injection"}, {"Hunter"}, {"Premier"}, {"Enforcer"},
  2759. {"Securicar"}, {"Banshee"}, {"Predator"}, {"Bus"}, {"Rhino"}, {"Barracks"}, {"Hotknife"}, {"Article Trailer"},
  2760. {"Previon"}, {"Coach"}, {"Cabbie"}, {"Stallion"}, {"Rumpo"}, {"RC Bandit"}, {"Romero"}, {"Packer"}, {"Monster"},
  2761. {"Admiral"}, {"Squalo"}, {"Seasparrow"}, {"Pizzaboy"}, {"Tram"}, {"Article Trailer 2"}, {"Turismo"}, {"Speeder"},
  2762. {"Reefer"}, {"Tropic"}, {"Flatbed"}, {"Yankee"}, {"Caddy"}, {"Solair"}, {"Berkley's RC Van"}, {"Skimmer"},
  2763. {"PCJ-600"}, {"Faggio"}, {"Freeway"}, {"RC Baron"}, {"RC Raider"}, {"Glendale"}, {"Oceanic"}, {"Sanchez"},
  2764. {"Sparrow"}, {"Patriot"}, {"Quad"}, {"Coastguard"}, {"Dinghy"}, {"Hermes"}, {"Sabre"}, {"Rustler"}, {"ZR-350"},
  2765. {"Walton"}, {"Regina"}, {"Comet"}, {"BMX"}, {"Burrito"}, {"Camper"}, {"Marquis"}, {"Baggage"}, {"Dozer"},
  2766. {"Maverick"}, {"News Chopper"}, {"Rancher"}, {"FBI Rancher"}, {"Virgo"}, {"Greenwood"}, {"Jetmax"}, {"Hotring"},
  2767. {"Sandking"}, {"Blista Compact"}, {"Police Maverick"}, {"Boxville"}, {"Benson"}, {"Mesa"}, {"RC Goblin"},
  2768. {"Hotring Racer A"}, {"Hotring Racer B"}, {"Bloodring Banger"}, {"Rancher"}, {"Super GT"}, {"Elegant"},
  2769. {"Journey"}, {"Bike"}, {"Mountain Bike"}, {"Beagle"}, {"Cropdust"}, {"Stunt"}, {"Tanker"}, {"Roadtrain"},
  2770. {"Nebula"}, {"Majestic"}, {"Buccaneer"}, {"Shamal"}, {"Hydra"}, {"FCR-900"}, {"NRG-500"}, {"HPV1000"},
  2771. {"Cement Truck"}, {"Tow Truck"}, {"Fortune"}, {"Cadrona"}, {"FBI Truck"}, {"Willard"}, {"Forklift"},
  2772. {"Tractor"}, {"Combine"}, {"Feltzer"}, {"Remington"}, {"Slamvan"}, {"Blade"}, {"Freight"}, {"Streak"},
  2773. {"Vortex"}, {"Vincent"}, {"Bullet"}, {"Clover"}, {"Sadler"}, {"Firetruck LA"}, {"Hustler"}, {"Intruder"},
  2774. {"Primo"}, {"Cargobob"}, {"Tampa"}, {"Sunrise"}, {"Merit"}, {"Utility"}, {"Nevada"}, {"Yosemite"}, {"Windsor"},
  2775. {"Monster A"}, {"Monster B"}, {"Uranus"}, {"Jester"}, {"Sultan"}, {"Stratum"}, {"Elegy"}, {"Raindance"},
  2776. {"RC Tiger"}, {"Flash"}, {"Tahoma"}, {"Savanna"}, {"Bandito"}, {"Freight Flat"}, {"Streak Carriage"},
  2777. {"Kart"}, {"Mower"}, {"Dunerider"}, {"Sweeper"}, {"Broadway"}, {"Tornado"}, {"AT-400"}, {"DFT-30"}, {"Huntley"},
  2778. {"Stafford"}, {"BF-400"}, {"Newsvan"}, {"Tug"}, {"Article Trailer 3"}, {"Emperor"}, {"Wayfarer"}, {"Euros"}, {"Mobile Hotdog"},
  2779. {"Club"}, {"Freight Carriage"}, {"Trailer 3"}, {"Andromada"}, {"Dodo"}, {"RC Cam"}, {"Launch"}, {"Police Car (SAPD)"},
  2780. {"Police Car (SFPD)"}, {"Police Car (LVPD)"}, {"Police Ranger"}, {"Picador"}, {"S.W.A.T Van"}, {"Alpha"},
  2781. {"Phoenix"}, {"Glendale"}, {"Sadler"}, {"Luggage Trailer A"}, {"Luggage Trailer B"}, {"Stair Trailer"},
  2782. {"Boxville"}, {"Farm Plow"}, {"Utility Trailer"}
  2783. };
  2784. stock GetVehicleFriendlyName(vehicleid)
  2785. {
  2786. new GVFNstring[56];
  2787. format(GVFNstring, sizeof(GVFNstring), "None");
  2788. if(GetVehicleModel(vehicleid) -400 < 0) return GVFNstring;
  2789. format(GVFNstring, sizeof(GVFNstring), VehicleFriendlyNames[GetVehicleModel(vehicleid) -400]);
  2790. return GVFNstring;
  2791. }
  2792. stock GetVehicleFriendlyNameFromModel(model)
  2793. {
  2794. new GVFNstring[56];
  2795. format(GVFNstring, sizeof(GVFNstring), "None");
  2796. if(model - 400 < 0) return GVFNstring;
  2797. format(GVFNstring, sizeof(GVFNstring), VehicleFriendlyNames[model -400]);
  2798. return GVFNstring;
  2799. }
  2800. stock GetVehicleCatogory(vhid) //took me a while... Could help fixing up the seatbelt system also?;)
  2801. {
  2802. new vm = GetVehicleModel(vhid);
  2803. if(vm == 460 || vm == 476 || vm == 511 || vm == 512 || vm == 513 || vm == 519 || vm == 520 || vm == 553 || vm == 577 || vm == 592 || vm == 593 || vm == 548 || vm == 425 || vm == 417 || vm == 487 || vm == 488 || vm == 497 || vm == 563 || vm == 447 || vm == 469)
  2804. {
  2805. return 2; //AIR (planes/helis)
  2806. }
  2807. else if(vm == 472 || vm == 473 || vm == 493 || vm == 595 || vm == 484 || vm == 430 || vm == 453 || vm == 452 || vm == 446 || vm == 454 || vm == 539)
  2808. {
  2809. return 3; //WATER (boats, hovercraft included)
  2810. }
  2811. else if(vm == 435 || vm == 411 || vm == 449 || vm == 450 || vm == 464 || vm == 465 || vm == 501 || vm == 537 || vm == 538 || vm == 564 || vm == 569 || vm == 570 || vm == 584 || vm == 590 || vm == 594 || vm == 606 || vm == 607 || vm == 608 || vm == 610 || vm == 611 || vm == 509 || vm == 481 || vm == 510)
  2812. {
  2813. return 4; //SPECIAL (maintaunbikes, bmx's, trailers, RC veh's, trams/trains...)
  2814. }
  2815. else
  2816. {
  2817. return 1; //LAND (Cars, trucks, motorbikes)
  2818. }
  2819. }
  2820. stock FMDVehicle(vehicleid)
  2821. {
  2822. new model = GetVehicleModel(vehicleid);
  2823. switch(model)
  2824. {
  2825. case 416:
  2826. return 1;
  2827. case 407:
  2828. return 1;
  2829. case 544:
  2830. return 1;
  2831. }
  2832. return 0;
  2833. }
  2834. stock GetVehicleSpeed(vehicleid)
  2835. {
  2836. new Float:Vx, Float:Vy, Float:Vz;
  2837. GetVehicleVelocity(vehicleid, Vx, Vy, Vz);
  2838. new Float:rtn;
  2839. rtn = floatsqroot(floatpower(Vx *100, 2) + floatpower(Vy *100, 2));
  2840. rtn = floatsqroot(floatpower(rtn, 2) + floatpower(Vz *100, 2));
  2841. return floatround(rtn);
  2842. }
  2843. new iconCount[MAX_PLAYERS], bizIconID[MAX_PLAYERS], EditingGate[MAX_PLAYERS], GateAction[MAX_PLAYERS];
  2844. new usingRadio[MAX_PLAYERS], usingFC[MAX_PLAYERS], PlayerHasRod[MAX_PLAYERS], IsFishing[MAX_PLAYERS];
  2845. new FishingTimer[MAX_PLAYERS], CatchingTimer[MAX_PLAYERS], TextDrawTimer[MAX_PLAYERS], LineTension[MAX_PLAYERS], FishDist[MAX_PLAYERS];
  2846. new Caught[MAX_PLAYERS], Security = 0, CreatedCars[MAX_VEHICLES] = {INVALID_VEHICLE_ID, ...};
  2847. new gDestroyVehicle[MAX_VEHICLES], lightsOff[MAX_VEHICLES], hoodOpen[MAX_VEHICLES], trunkOpen[MAX_VEHICLES], aGun[MAX_PLAYERS][13];
  2848. new GPSOn[MAX_PLAYERS], playerHoldingTazer[MAX_PLAYERS], AdminHelp[MAX_PLAYERS], Tax = 0, TaxValue = 0, Jackpot = 0;
  2849. //Global Chat System Variables
  2850. new AGCTog;
  2851. new Text3D:syndicateSign;
  2852. //hitman badges
  2853. new HitmanBadgeSAPD = 0, HitmanBadgeFBI = 0, HitmanBadgeRCSD = 0, HitmanBadgeLSFMD = 0, HitmanBadgeNG = 0, HitmanBadgeGOV = 0;
  2854. new HitmanBadgeSCOTUS = 0, HitmanBadgeDEA = 0, HitmanBadgeATF = 0;
  2855. new InRing = 0, RoundStarted = 0, BoxDelay = 0, Boxer1 = 255, Boxer2 = 255, TBoxer = 255, PlayerBoxing[MAX_PLAYERS], Float:PlayerKevBox[MAX_PLAYERS];
  2856. new MedicCall = 999, MedicCallTime[MAX_PLAYERS], LawyerCall = 999, LawyerCallTime[MAX_PLAYERS], MechanicCall = 999;
  2857. new MechanicCallTime[MAX_PLAYERS], TaxiDrivers = 0, TaxiCall = 999, TaxiCallTime[MAX_PLAYERS], TaxiAccepted[MAX_PLAYERS];
  2858. new BusDrivers = 0, BusCall = 999, BusCallTime[MAX_PLAYERS], BusAccepted[MAX_PLAYERS], TransportDuty[MAX_PLAYERS];
  2859. new TransportValue[MAX_PLAYERS], TransportMoney[MAX_PLAYERS], TransportTime[MAX_PLAYERS], TransportCost[MAX_PLAYERS];
  2860. new TransportDriver[MAX_PLAYERS], JobDuty[MAX_PLAYERS], usingVendingMachine[MAX_PLAYERS], UsedFind[MAX_PLAYERS];
  2861. new GotMats[MAX_PLAYERS], GotDrugs[MAX_PLAYERS], DrugsLoaded[MAX_PLAYERS], GotPlant[MAX_PLAYERS], LoadObjects[MAX_PLAYERS], usingNameTag[MAX_PLAYERS];
  2862. new Text3D:nametagText[MAX_PLAYERS], Text3D:ThiefText[MAX_PLAYERS], CallDescription[MAX_PLAYERS][128];
  2863. new Float:OldHealth[MAX_PLAYERS], Float:OldArmour[MAX_PLAYERS], Float:OldWeedX[MAX_PLAYERS], Float:OldWeedY[MAX_PLAYERS];
  2864. new Float:OldWeedZ[MAX_PLAYERS], HoldingDetonator[MAX_PLAYERS], Language[MAX_PLAYERS], Robbing[MAX_PLAYERS], playerDisconnecting[MAX_PLAYERS];
  2865. new Float:RobbingX[MAX_PLAYERS], Float:RobbingY[MAX_PLAYERS], Float:RobbingZ[MAX_PLAYERS], FReloadTime[MAX_PLAYERS];
  2866. new CheckNumber[MAX_PLAYERS], JustReported[MAX_PLAYERS], JustBugReported[MAX_PLAYERS], HasActiveBugReport[MAX_PLAYERS];
  2867. new HelpMeTimer[MAX_PLAYERS], TazerTime[MAX_PLAYERS], Warnings[20][128], Accent[MAX_PLAYERS][32], LastPaid[MAX_PLAYERS][MAX_PLAYER_NAME];
  2868. new iCurrentWeapon[MAX_PLAYERS], lastAnimIndex[MAX_PLAYERS], gPlayerUsingLoopingAnim[MAX_PLAYERS];
  2869. new PlayersChannel[MAX_PLAYERS], HasBoughtMask[MAX_PLAYERS], UsingSate[MAX_PLAYERS], ZOOM[MAX_PLAYERS], Float:oldsposx[MAX_PLAYERS], Float:oldsposy[MAX_PLAYERS], Float:oldsposz[MAX_PLAYERS], Float: oldfacingangle[MAX_PLAYERS], oldvw[MAX_PLAYERS], oldint[MAX_PLAYERS];
  2870. new Float:newsposx[MAX_PLAYERS], Float:newsposy[MAX_PLAYERS], Float:newsposz[MAX_PLAYERS], DivorceOffer[MAX_PLAYERS];
  2871. new MarriageCeremoney[MAX_PLAYERS], ProposeOffer[MAX_PLAYERS], ProposedTo[MAX_PLAYERS], GotProposedBy[MAX_PLAYERS];
  2872. new MarryWitness[MAX_PLAYERS], MarryWitnessOffer[MAX_PLAYERS];
  2873. new BeingRobbed[MAX_PLAYERS];
  2874. new KissType[MAX_PLAYERS], ContractOffer[MAX_PLAYERS], ContractID[MAX_PLAYERS], PlayerStoned[MAX_PLAYERS], BMPurchased[MAX_PLAYERS];
  2875. new FishCount[MAX_PLAYERS], FindTimePoints[MAX_PLAYERS], FindTime[MAX_PLAYERS], FindingID[MAX_PLAYERS], BoxWaitTime[MAX_PLAYERS];
  2876. new BoxOffer[MAX_PLAYERS], GoChase[MAX_PLAYERS], SAPDClearing[MAX_PLAYERS], HospitalTime[MAX_PLAYERS], vipRepairTime[MAX_PLAYERS];
  2877. new HospitalSpawnID[MAX_PLAYERS], PlayerTied[MAX_PLAYERS], PlayerTiedTime[MAX_PLAYERS], PlayerBlinded[MAX_PLAYERS];
  2878. new PlayerCuffed[MAX_PLAYERS], PlayerCuffedTime[MAX_PLAYERS], PlayerTazed[MAX_PLAYERS], PlayerTazedTime[MAX_PLAYERS], PlayerFrozen[MAX_PLAYERS], breakingpcuffs[MAX_PLAYERS], bool:isbreakingcuffs[MAX_PLAYERS];
  2879. new LiveOffer[MAX_PLAYERS], LiveName[MAX_PLAYERS][MAX_PLAYER_NAME], TalkingLive[MAX_PLAYERS];
  2880. new InviteOffer[MAX_PLAYERS];
  2881. new FriskOffer[MAX_PLAYERS], BizOffer[MAX_PLAYERS], BizPrice[MAX_PLAYERS], BizID[MAX_PLAYERS], VestOffer[MAX_PLAYERS];
  2882. new VestPrice[MAX_PLAYERS], GuardOffer[MAX_PLAYERS], GuardPrice[MAX_PLAYERS], GuardedBy[MAX_PLAYERS], GuardingPrice[MAX_PLAYERS];
  2883. new Guarding[MAX_PLAYERS], healOffer[MAX_PLAYERS], healPrice[MAX_PLAYERS], DefenseOffer[MAX_PLAYERS], DefensePrice[MAX_PLAYERS];
  2884. new FamilyOffer[MAX_PLAYERS], FactionOffer[MAX_PLAYERS], CallLawyer[MAX_PLAYERS], WantLawyer[MAX_PLAYERS], CP[MAX_PLAYERS];
  2885. new MoneyMessage[MAX_PLAYERS], Condom[MAX_PLAYERS];
  2886. new RepairOffer[MAX_PLAYERS], RepairPrice[MAX_PLAYERS], RefillOffer[MAX_PLAYERS], RefillPrice[MAX_PLAYERS], RepairCar[MAX_PLAYERS];
  2887. new ProdOffer[MAX_PLAYERS], ProdPrice[MAX_PLAYERS], ProdAmount[MAX_PLAYERS], PotOffer[MAX_PLAYERS], PotPrice[MAX_PLAYERS];
  2888. new PotGram[MAX_PLAYERS], MatsOffer[MAX_PLAYERS], MatsPrice[MAX_PLAYERS], MatsGram[MAX_PLAYERS], MatsGram2[MAX_PLAYERS];
  2889. new Packages[MAX_PLAYERS], Crates[MAX_PLAYERS], CrackOffer[MAX_PLAYERS], CrackPrice[MAX_PLAYERS], CrackGram[MAX_PLAYERS], LastFriskedPlayer[MAX_PLAYERS];
  2890. new JailPrice[MAX_PLAYERS], gPlayerLogged[MAX_PLAYERS], startSpawnLoc[MAX_PLAYERS], gAdminAuthorized[MAX_PLAYERS], viewingStatsOf[MAX_PLAYERS];
  2891. new gLastCar[MAX_PLAYERS], gOoc[MAX_PLAYERS], bool: mcTog[MAX_PLAYERS], bool: mcOff, bool: toggedDevChat[MAX_PLAYERS], gHelperCh[MAX_PLAYERS], gTesterCh[MAX_PLAYERS];
  2892. new namesOff[MAX_PLAYERS], disabledRadios[MAX_PLAYERS], autoChat[MAX_PLAYERS], autoChatTime[MAX_PLAYERS], gNews[MAX_PLAYERS];
  2893. new gFam[MAX_PLAYERS], BigEar[MAX_PLAYERS], CellTime[MAX_PLAYERS], HidePM[MAX_PLAYERS], PhoneOffline[MAX_PLAYERS], AlarmOnline[MAX_PLAYERS];
  2894. new WTOnline[MAX_PLAYERS], gVehicleLock[MAX_PLAYERS], hotWireTime[MAX_PLAYERS], hotWireVeh[MAX_PLAYERS];
  2895. new hoskperm[MAX_PLAYERS] = INVALID_PLAYER_ID;
  2896. new HSHAKEOFFER[MAX_PLAYERS], HShakeType[MAX_PLAYERS], KissOffer[MAX_PLAYERS];
  2897. new onpizzadelivery[MAX_PLAYERS], PlayerBar:pizzajobdeliveryid[MAX_PLAYERS];
  2898. new beingtreatedtime[MAX_PLAYERS], treatedinroom[MAX_PLAYERS], istreatedinallsaints[MAX_PLAYERS];
  2899. new allsaintsrooms[6], countygenrooms[6];
  2900. new bool: blackscreened[MAX_PLAYERS] = false;
  2901. new lastpguns[MAX_PLAYERS][13][2];
  2902. new iswatching[MAX_PLAYERS];
  2903. new globall[MAX_PLAYERS];
  2904. //jobs7
  2905. new GettingJob[MAX_PLAYERS];
  2906. //==============================================================================
  2907. new Mobile[1002], ReplyTo[MAX_PLAYERS], CallCost[MAX_PLAYERS], anticheatbans = 0, anticheatwarns = 0;
  2908. new levelcost = 25000, deathcost = 1500, insuranceprice = 50000;
  2909. new callcost = 10, matprice = 500, matpayout = 250, seedprice = 1000, crackgprice = 500, prodprice = 500, potcprice = 1000;
  2910. new crackcprice = 1000, dhstock = 0, chstock = 0, levelexp = 4, nonewbie = 0, adds;
  2911. new noooc = 1, timeshift = -1;
  2912. new noglobal = 1;
  2913. new TimeAfterBankJob = 0;
  2914. new SELLCAR1[] = { 1000, 1124, 1245, 1349, 1475, 1574, 1636, 1762, 1895, 1946, 2000 };
  2915. new SELLCAR2[] = { 2099, 2135, 2255, 2378, 2457, 2563, 2614, 2721, 2878, 2988, 3000 };
  2916. new SELLCAR3[] = { 3058, 3175, 3212, 3377, 3454, 3555, 3678, 3751, 3865, 3964, 4000 };
  2917. new SELLCAR4[] = { 4077, 4123, 4275, 4378, 4422, 4565, 4613, 4752, 4897, 4911, 5000 };
  2918. new Float:TeleportDest[MAX_PLAYERS][3], LockPickingBiz[MAX_PLAYERS];
  2919. new LockPickingHouse[MAX_PLAYERS], LockPickingCar[MAX_PLAYERS], LockPickTime[MAX_PLAYERS], SellCarTimer[MAX_PLAYERS];
  2920. new StopAniTimer[MAX_PLAYERS], WeedPickTimer[MAX_PLAYERS], UseDrugsTimer[MAX_PLAYERS], UseBMTimer[MAX_PLAYERS], SellGunTimer[MAX_PLAYERS], DropWeaponTimer[MAX_PLAYERS], UseHYDTimer[MAX_PLAYERS];
  2921. new UseDrinkTimer[MAX_PLAYERS], UseNewbieTimer[MAX_PLAYERS], UseFareTimer[MAX_PLAYERS];
  2922. new UseAdmCmdTimer[MAX_PLAYERS], UseAcceptTimer[MAX_PLAYERS], Called911[MAX_PLAYERS], calledTaxi[MAX_PLAYERS];
  2923. new PaintballDieTimer[MAX_PLAYERS];
  2924. new LockSpam[MAX_PLAYERS], bool:watchingPDCCTV[MAX_PLAYERS];
  2925. new ExitTimer[MAX_PLAYERS], EnterTimer[MAX_PLAYERS];
  2926. //spec
  2927. new Spectated[MAX_PLAYERS], beingSpectatedID[MAX_PLAYERS], SpectatingID[MAX_PLAYERS], SpectateType[MAX_PLAYERS];
  2928. new PrisonCell[MAX_PLAYERS];
  2929. new CapturingTimer[MAX_PLAYERS], BombID[MAX_PLAYERS], BombInCar[MAX_PLAYERS], firstSpawned[MAX_PLAYERS], Gas[MAX_VEHICLES], bool:JustRegistered[MAX_PLAYERS] = {false, ...};
  2930. new Refueling[MAX_PLAYERS], gPlayerSpawned[MAX_PLAYERS], oldindex[MAX_PLAYERS], OnABugReport[MAX_PLAYERS];
  2931. new bool:DptBanned[6] = {false, ...};
  2932. // Gag related
  2933. new gagRequester[MAX_PLAYERS], gagExpire[MAX_PLAYERS];
  2934. //===========================[Death System]=====================================
  2935. new DeathWeapons[MAX_PLAYERS][13][2], PlayerCalledEMS[MAX_PLAYERS], PlayerParamedic[MAX_PLAYERS]; //id of the paramedic for player
  2936. new PlayerVictim[MAX_PLAYERS], ParaOnACall[MAX_PLAYERS], CallAccepted[MAX_PLAYERS], EMSArrived[MAX_PLAYERS], RapidResKit[MAX_PLAYERS];
  2937. new RapidResKitActive[MAX_PLAYERS], HasARapidResKit[MAX_PLAYERS], gotBombed[MAX_PLAYERS];
  2938. //=======[Pos enum]===========
  2939. enum Death_Info
  2940. {
  2941. Float:DeathX,
  2942. Float:DeathY,
  2943. Float:DeathZ,
  2944. Float:DeathA,
  2945. DeathInt,
  2946. DeathVW,
  2947. Float:DeathHP
  2948. }
  2949. new DeathPos[MAX_PLAYERS][Death_Info];
  2950. //===========================[Events]===========================================
  2951. new Float: EventX, Float: EventY, Float: EventZ, EventInt, EventWorld, EventHP = 100, EventArmour = 0, EventActive = 0, EventStarted = 0, EventJoinText = 0, EventLocked = 0;
  2952. new EventWeapon1, EventWeapon2, EventWeapon3, EventWeapon4, EventWeapon5, EventText[128], IsAtEvent[MAX_PLAYERS];
  2953. new Float:StuffEvent[MAX_PLAYERS][6], StuffEvent2[MAX_PLAYERS][2], EventGuns[MAX_PLAYERS][13], RefundingNumber[MAX_PLAYERS], RefundingID[MAX_PLAYERS];
  2954. new PlayerEventMod[MAX_PLAYERS];
  2955. //===========================[For Sales]========================================
  2956. enum SaleBoard
  2957. {
  2958. bool:PlayerHasASaleBoard = false,
  2959. Saleobject
  2960. }
  2961. new gForSales[MAX_PLAYERS][SaleBoard];
  2962. //===================================[Groups]===================================
  2963. // Groups
  2964. #define MAX_GROUPS 12
  2965. #define GROUP_NONE 0
  2966. #define GROUP_HITMAN 1 // Non-donated. [Hitman agency]
  2967. #define GROUP_CRIME 2 // Non-donated. [Syndicate]
  2968. #define GROUP_REBELS 3 // Donated. [Zherdev OPG] Owner: Lucas Maxwell
  2969. #define GROUP_CARTEL 4 // Non-donated. [CJNG]
  2970. #define GROUP_TIJUANA 5 // Donated. [The Network] Owner: Capo
  2971. #define GROUP_COMMISSION 6 // Donated. [The Commission] Owner: Petrucci
  2972. #define GROUP_EXEC 7 // Donated. [Executive Outcomes] Owner: Dragus
  2973. #define GROUP_LLS 8 // Donated. [The Bohl Front Ageny] Owner: Some LSRP cunt from USA
  2974. #define GROUP_OPG 9 // Donated. [The Grey Wolves] Owner: Heidi Stone
  2975. #define GROUP_S9 10 // Non-donated. [Sector 9]
  2976. #define GROUP_BRATVA 11 // Donated Solntsevskaya Bratva Owner: Akib Khan
  2977. #define GROUP_FACISTS 12 // Donated Wermacht/The Fascist Revolution Owner: Jessa
  2978. // Group ranks
  2979. #define GROUP_HITMAN_RANKS 6
  2980. #define GROUP_CRIME_RANKS 5
  2981. #define GROUP_CARTEL_RANKS 4
  2982. #define GROUP_REBELS_RANKS 5
  2983. #define GROUP_TIJUANA_RANKS 6
  2984. #define GROUP_COMMISSION_RANKS 5
  2985. #define GROUP_EXEC_RANKS 7
  2986. #define GROUP_LLS_RANKS 5
  2987. #define GROUP_OPG_RANKS 5
  2988. #define GROUP_S9_RANKS 4
  2989. #define GROUP_BRATVA_RANKS 5
  2990. #define GROUP_FACISTS_RANKS 6
  2991. new groupNamechangeRequest[MAX_PLAYERS][25];
  2992. new groupLevelChangeRequest[MAX_PLAYERS];
  2993. // Group toggle radio
  2994. new groupRadioToggled[MAX_GROUPS+1];
  2995. new OOCgroupRadioToggled[MAX_GROUPS+1];
  2996. new GroupOffer[MAX_PLAYERS];
  2997. /*
  2998. Functions
  2999. */
  3000. stock GetGroupName(groupID) {
  3001. new gname[64];
  3002. switch(groupID)
  3003. {
  3004. case GROUP_HITMAN: gname = "Hitman Agency";
  3005. case GROUP_CRIME: gname = "The Syndicate";
  3006. case GROUP_REBELS: gname = "Zherdev OPG";
  3007. case GROUP_CARTEL: gname = "The Ruggiero Crew";
  3008. case GROUP_TIJUANA: gname = "Tijuana Cartel";
  3009. case GROUP_COMMISSION: gname = "The Commission";
  3010. case GROUP_EXEC: gname = "Schedule 017";
  3011. case GROUP_LLS: gname = "The Bohl Front Ageny";
  3012. case GROUP_OPG: gname = "The Volkssturm Foundation";
  3013. case GROUP_S9: gname = "Sector 9";
  3014. case GROUP_BRATVA: gname = "Solntsevskaya Bratva";
  3015. case GROUP_FACISTS: gname = "The Fascist Revolution";
  3016. default: gname = "None";
  3017. }
  3018. return gname;
  3019. }
  3020. stock GetPlayerGroupName(playerid)
  3021. {
  3022. new gname[64];
  3023. format(gname, sizeof(gname), "%s", GetGroupName(PlayerInfo[playerid][pGroup]));
  3024. return gname;
  3025. }
  3026. stock GetGroupColour(groupid)
  3027. {
  3028. switch(groupid)
  3029. {
  3030. case GROUP_HITMAN: return COLOR_HITMAN;
  3031. case GROUP_CRIME: return COLOR_CRIME;
  3032. case GROUP_REBELS: return COLOR_REBELS;
  3033. case GROUP_CARTEL: return COLOR_CARTEL_DE_TIJUANA;
  3034. case GROUP_TIJUANA: return COLOR_BUREAU;
  3035. case GROUP_COMMISSION: return COLOR_RAVENS;
  3036. case GROUP_EXEC: return COLOR_EXEC_GROUP;
  3037. case GROUP_LLS: return COLOR_LLS;
  3038. case GROUP_OPG: return COLOR_PALERMO;
  3039. case GROUP_S9: return COLOR_S9;
  3040. case GROUP_BRATVA: return COLOR_HITMAN;
  3041. case GROUP_FACISTS: return COLOR_HITMAN;
  3042. }
  3043. return -1;
  3044. }
  3045. stock GetGroupMaxRanks(groupid)
  3046. {
  3047. switch(groupid)
  3048. {
  3049. case GROUP_HITMAN: return GROUP_HITMAN_RANKS;
  3050. case GROUP_CRIME: return GROUP_CRIME_RANKS;
  3051. case GROUP_REBELS: return GROUP_REBELS_RANKS;
  3052. case GROUP_CARTEL: return GROUP_CARTEL_RANKS;
  3053. case GROUP_TIJUANA: return GROUP_TIJUANA_RANKS;
  3054. case GROUP_COMMISSION: return GROUP_COMMISSION_RANKS;
  3055. case GROUP_EXEC: return GROUP_EXEC_RANKS;
  3056. case GROUP_LLS: return GROUP_LLS_RANKS;
  3057. case GROUP_OPG: return GROUP_OPG_RANKS;
  3058. case GROUP_S9: return GROUP_S9_RANKS;
  3059. case GROUP_BRATVA: return GROUP_BRATVA_RANKS;
  3060. case GROUP_FACISTS: return GROUP_FACISTS_RANKS;
  3061. }
  3062. return -1;
  3063. }
  3064. stock IsGroupLeader(playerid) {
  3065. if(!PlayerInfo[playerid][pGroup])
  3066. return false;
  3067. return PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(PlayerInfo[playerid][pGroup])-1;
  3068. }
  3069. stock GetPlayerGroupRankName(playerid)
  3070. {
  3071. new rankname[64] = "None";
  3072. switch(PlayerInfo[playerid][pGroup])
  3073. {
  3074. case GROUP_HITMAN: //hitman
  3075. {
  3076. switch(PlayerInfo[playerid][pGroupRank])
  3077. {
  3078. case 0:
  3079. rankname = "Initiate";
  3080. case 1:
  3081. rankname = "Freelancer";
  3082. case 2:
  3083. rankname = "Operative";
  3084. case 3:
  3085. rankname = "Agent";
  3086. case 4:
  3087. rankname = "Elite Agent";
  3088. case 5:
  3089. rankname = "Vice Director";
  3090. case 6:
  3091. rankname = "Director";
  3092. }
  3093. }
  3094. case GROUP_CRIME:
  3095. {
  3096. switch(PlayerInfo[playerid][pGroupRank])
  3097. {
  3098. case 5:
  3099. rankname = "Director";
  3100. case 4:
  3101. rankname = "Assistant Director";
  3102. case 3:
  3103. rankname = "Specialist";
  3104. case 2:
  3105. rankname = "Operative";
  3106. case 1:
  3107. rankname = "Inductee";
  3108. case 0:
  3109. rankname = "Outsider";
  3110. }
  3111. }
  3112. case GROUP_REBELS:
  3113. {
  3114. switch(PlayerInfo[playerid][pGroupRank])
  3115. {
  3116. case 5:
  3117. rankname = "Avtoritet";
  3118. case 4:
  3119. rankname = "Derzhatel Obschaka";
  3120. case 3:
  3121. rankname = "Brigadier";
  3122. case 2:
  3123. rankname = "Bratok";
  3124. case 1:
  3125. rankname = "Boyevik";
  3126. case 0:
  3127. rankname = "Shestyorka";
  3128. }
  3129. }
  3130. case GROUP_CARTEL:
  3131. {
  3132. switch(PlayerInfo[playerid][pGroupRank])
  3133. {
  3134. case 4:
  3135. rankname = "Boss";
  3136. case 3:
  3137. rankname = "Consigiliere";
  3138. case 2:
  3139. rankname = "Caporegime";
  3140. case 1:
  3141. rankname = "Soldier";
  3142. case 0:
  3143. rankname = "Associate";
  3144. }
  3145. }
  3146. case GROUP_TIJUANA:
  3147. {
  3148. switch(PlayerInfo[playerid][pGroupRank])
  3149. {
  3150. case 6:
  3151. rankname = "Jefe";
  3152. case 5:
  3153. rankname = "Delegar";
  3154. case 4:
  3155. rankname = "Asociar";
  3156. case 3:
  3157. rankname = "Fideicomisario";
  3158. case 2:
  3159. rankname = "Empleado";
  3160. case 1:
  3161. rankname = "Soldado de Infantería";
  3162. case 0:
  3163. rankname = "Forastero";
  3164. }
  3165. }
  3166. case GROUP_COMMISSION:
  3167. {
  3168. switch(PlayerInfo[playerid][pGroupRank])
  3169. {
  3170. case 5:
  3171. rankname = "CEO";
  3172. case 4:
  3173. rankname = "Underboss";
  3174. case 3:
  3175. rankname = "Shots-caller";
  3176. case 2:
  3177. rankname = "Specialist";
  3178. case 1:
  3179. rankname = "Associate";
  3180. case 0:
  3181. rankname = "Informant";
  3182. }
  3183. }
  3184. case GROUP_EXEC:
  3185. {
  3186. switch(PlayerInfo[playerid][pGroupRank])
  3187. {
  3188. case 7:
  3189. rankname = "Secretary";
  3190. case 6:
  3191. rankname = "Secretary";
  3192. case 5:
  3193. rankname = "Vice Secretary";
  3194. case 4:
  3195. rankname = "Joint Chief";
  3196. case 3:
  3197. rankname = "SS Agent";
  3198. case 2:
  3199. rankname = "Special Agent";
  3200. case 1:
  3201. rankname = "Agent";
  3202. case 0:
  3203. rankname = "Initiate";
  3204. }
  3205. }
  3206. case GROUP_LLS:
  3207. {
  3208. switch(PlayerInfo[playerid][pGroupRank])
  3209. {
  3210. case 5:
  3211. rankname = "Supremo";
  3212. case 4:
  3213. rankname = "Executive";
  3214. case 3:
  3215. rankname = "Secretary";
  3216. case 2:
  3217. rankname = "Enforcer";
  3218. case 1:
  3219. rankname = "Associate";
  3220. case 0:
  3221. rankname = "Employee";
  3222. }
  3223. }
  3224. case GROUP_OPG:
  3225. {
  3226. switch(PlayerInfo[playerid][pGroupRank])
  3227. {
  3228. case 5:
  3229. rankname = "Volkssturmmann";
  3230. case 4:
  3231. rankname = "Gruppenfuhrer";
  3232. case 3:
  3233. rankname = "Sanitatsdienstgrad";
  3234. case 2:
  3235. rankname = "Zugfuhrer";
  3236. case 1:
  3237. rankname = "Kompaniefuhrer";
  3238. case 0:
  3239. rankname = "Bataillonsfuhrer";
  3240. }
  3241. }
  3242. case GROUP_S9:
  3243. {
  3244. switch(PlayerInfo[playerid][pGroupRank])
  3245. {
  3246. case 4:
  3247. rankname = "Director";
  3248. case 3:
  3249. rankname = "Assistant Director";
  3250. case 2:
  3251. rankname = "Special Agent";
  3252. case 1:
  3253. rankname = "Senior Agent";
  3254. case 0:
  3255. rankname = "Agent";
  3256. }
  3257. }
  3258. case GROUP_BRATVA:
  3259. {
  3260. switch(PlayerInfo[playerid][pGroupRank])
  3261. {
  3262. case 5:
  3263. rankname = "Pakhan";
  3264. case 4:
  3265. rankname = "Sovietnik";
  3266. case 3:
  3267. rankname = "Derzhatel Obschaka";
  3268. case 2:
  3269. rankname = "Brigadier";
  3270. case 1:
  3271. rankname = "Bratok";
  3272. case 0:
  3273. rankname = "Shestyorka";
  3274. }
  3275. }
  3276. case GROUP_FACISTS:
  3277. {
  3278. switch(PlayerInfo[playerid][pGroupRank])
  3279. {
  3280. case 6:
  3281. rankname = "Generalfeldmarshall";
  3282. case 5:
  3283. rankname = "Generaloberst";
  3284. case 4:
  3285. rankname = "Oberleutnant";
  3286. case 3:
  3287. rankname = "Offizier";
  3288. case 2:
  3289. rankname = "Unteroffizier";
  3290. case 1:
  3291. rankname = "Obersoldat";
  3292. case 0:
  3293. rankname = "Soldat";
  3294. }
  3295. }
  3296. }
  3297. return rankname;
  3298. }
  3299. SendGroupMessage(group, color, string2[])
  3300. {
  3301. foreach( new i: Player )
  3302. {
  3303. if(PlayerInfo[i][pGroup] == group)
  3304. {
  3305. SendClientMessage(i, color, string2);
  3306. }
  3307. }
  3308. return 1;
  3309. }
  3310. /*FakeRadioSAPD(group, color, string3[])
  3311. {
  3312. foreach( new i: Player )
  3313. {
  3314. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pSAPDListen])
  3315. {
  3316. SendClientMessage(i, color, string3);
  3317. }
  3318. }
  3319. return 1;
  3320. }
  3321. FakeRadioFBI(group, color, string3[])
  3322. {
  3323. foreach( new i: Player )
  3324. {
  3325. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pFBIListen])
  3326. {
  3327. SendClientMessage(i, color, string3);
  3328. }
  3329. }
  3330. return 1;
  3331. }
  3332. FakeRadioLSSD(group, color, string3[])
  3333. {
  3334. foreach( new i: Player )
  3335. {
  3336. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pLSSDListen])
  3337. {
  3338. SendClientMessage(i, color, string3);
  3339. }
  3340. }
  3341. return 1;
  3342. }
  3343. FakeRadioFMD(group, color, string3[])
  3344. {
  3345. foreach( new i: Player )
  3346. {
  3347. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pFMDListen])
  3348. {
  3349. SendClientMessage(i, color, string3);
  3350. }
  3351. }
  3352. return 1;
  3353. }
  3354. FakeRadioGOV(group, color, string3[])
  3355. {
  3356. foreach( new i: Player )
  3357. {
  3358. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pGOVListen])
  3359. {
  3360. SendClientMessage(i, color, string3);
  3361. }
  3362. }
  3363. return 1;
  3364. }
  3365. FakeRadioSANG(group, color, string3[])
  3366. {
  3367. foreach( new i: Player )
  3368. {
  3369. if(PlayerInfo[i][pGroup] == group && PlayerInfo[i][pSANGListen])
  3370. {
  3371. SendClientMessage(i, color, string3);
  3372. }
  3373. }
  3374. return 1;
  3375. }*/
  3376. SendFakeRadioMessage(group, color, string2[])
  3377. {
  3378. foreach( new i: Player )
  3379. {
  3380. if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_SAPD)
  3381. {
  3382. SendClientMessage(i, color, string2);
  3383. }
  3384. else if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_FMD)
  3385. {
  3386. SendClientMessage(i, color, string2);
  3387. }
  3388. else if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_ARMY)
  3389. {
  3390. SendClientMessage(i, color, string2);
  3391. }
  3392. else if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_GOV)
  3393. {
  3394. SendClientMessage(i, color, string2);
  3395. }
  3396. else if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_FBI)
  3397. {
  3398. SendClientMessage(i, color, string2);
  3399. }
  3400. else if(PlayerInfo[i][pGroup] == group && RadioFrequency[i] == FACTION_SANG)
  3401. {
  3402. SendClientMessage(i, color, string2);
  3403. }
  3404. }
  3405. return 1;
  3406. }
  3407. forward onOGMembers(playerid);
  3408. public onOGMembers(playerid)
  3409. {
  3410. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline members to display.");
  3411. new memberstr[10000], lastlog[64], name[MAX_PLAYER_NAME], playerfrank, hanickname[13];
  3412. for(new i = 0; i < cache_num_rows(); i++)
  3413. {
  3414. new temp[10];
  3415. cache_get_field_content(i, "Name", name);
  3416. cache_get_field_content(i, "LastLogin", lastlog);
  3417. cache_get_field_content(i, "GroupRank", temp);
  3418. cache_get_field_content(i, "pGroupNick", hanickname);
  3419. playerfrank = strval(temp);
  3420. if(cache_get_field_content_int(i, "Group") == GROUP_HITMAN) format(memberstr, sizeof(memberstr), "%s{3366FF}%s (%s) (%d)\t\t{FFFFFF}%s\n", memberstr, name, hanickname, playerfrank, lastlog);
  3421. else format(memberstr, sizeof(memberstr), "%s{3366FF}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  3422. }
  3423. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "Offline Members", memberstr, "Okay", "");
  3424. return 1;
  3425. }
  3426. forward OnOGUninvite(playerid, name[]);
  3427. public OnOGUninvite(playerid, name[])
  3428. {
  3429. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  3430. if(cache_get_field_content_int(0, "Group") != PlayerInfo[playerid][pGroup]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That member does not belong to your group.");
  3431. new str[128];
  3432. format(str, sizeof(str), "* You have kicked %s from your group.", name);
  3433. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3434. new query[300];
  3435. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Group`= 0,`GroupRank`= 0, `HAFakeBadge`= 0 WHERE `Name`= '%e'", name);
  3436. mysql_pquery(sqlGameConnection, query);
  3437. return 1;
  3438. }
  3439. Hook:groups_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  3440. {
  3441. if(dialogid == DIALOG_TIJUANA_ARMORY)
  3442. {
  3443. if(!response) return 1;
  3444. switch(listitem)
  3445. {
  3446. case 0:
  3447. {
  3448. if(PlayerInfo[playerid][pCash] >= 100000)
  3449. {
  3450. GiveMoney(playerid, -100000);
  3451. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Deagle for $100,000.");
  3452. GivePlayerGun(playerid, 24);
  3453. }
  3454. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3455. }
  3456. case 1:
  3457. {
  3458. if(PlayerInfo[playerid][pCash] >= 150000)
  3459. {
  3460. GiveMoney(playerid, -150000);
  3461. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a M4 for $150,000.");
  3462. GivePlayerGun(playerid, 31);
  3463. }
  3464. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3465. }
  3466. case 2:
  3467. {
  3468. if(PlayerInfo[playerid][pCash] >= 130000)
  3469. {
  3470. GiveMoney(playerid, -130000);
  3471. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased an AK47 for $130,000.");
  3472. GivePlayerGun(playerid, 30);
  3473. }
  3474. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3475. }
  3476. case 3:
  3477. {
  3478. if(PlayerInfo[playerid][pCash] >= 45000)
  3479. {
  3480. GiveMoney(playerid, -45000);
  3481. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Full Vest for $45,000.");
  3482. SetPlayerArmour(playerid, 100.00);
  3483. }
  3484. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3485. }
  3486. case 4:
  3487. {
  3488. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have healed yourself using a first aid kit.");
  3489. SetPlayerHealth(playerid, 100.00);
  3490. }
  3491. case 5:
  3492. {
  3493. if(PlayerInfo[playerid][pCash] >= 50000)
  3494. {
  3495. GiveMoney(playerid, -50000);
  3496. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased an MP5 for $50,000.");
  3497. GivePlayerGun(playerid, 29);
  3498. }
  3499. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3500. }
  3501. case 6:
  3502. {
  3503. if(PlayerInfo[playerid][pCash] >= 30000)
  3504. {
  3505. GiveMoney(playerid, -30000);
  3506. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Shotgun for $30,000.");
  3507. GivePlayerGun(playerid, 25);
  3508. }
  3509. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3510. }
  3511. }
  3512. }
  3513. if(dialogid == DIALOG_GREYWOLF_ARMORY)
  3514. {
  3515. if(!response) return 1;
  3516. switch(listitem)
  3517. {
  3518. case 0:
  3519. {
  3520. if(PlayerInfo[playerid][pCash] >= 50000)
  3521. {
  3522. GiveMoney(playerid, -50000);
  3523. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Deagle for $50,000.");
  3524. GivePlayerGun(playerid, 24);
  3525. }
  3526. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3527. }
  3528. case 1:
  3529. {
  3530. if(PlayerInfo[playerid][pCash] >= 75000)
  3531. {
  3532. GiveMoney(playerid, -75000);
  3533. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a M4 for $75,000.");
  3534. GivePlayerGun(playerid, 31);
  3535. }
  3536. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3537. }
  3538. case 2:
  3539. {
  3540. if(PlayerInfo[playerid][pCash] >= 65000)
  3541. {
  3542. GiveMoney(playerid, -65000);
  3543. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased an AK47 for $65,000.");
  3544. GivePlayerGun(playerid, 30);
  3545. }
  3546. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3547. }
  3548. case 3:
  3549. {
  3550. if(PlayerInfo[playerid][pCash] >= 15000)
  3551. {
  3552. GiveMoney(playerid, -15000);
  3553. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Full Vest for $15,000.");
  3554. SetPlayerArmour(playerid, 100.00);
  3555. }
  3556. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3557. }
  3558. case 4:
  3559. {
  3560. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have healed yourself using a first aid kit.");
  3561. SetPlayerHealth(playerid, 100.00);
  3562. }
  3563. case 5:
  3564. {
  3565. if(PlayerInfo[playerid][pCash] >= 13000)
  3566. {
  3567. GiveMoney(playerid, -13000);
  3568. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased an MP5 for $13,000.");
  3569. GivePlayerGun(playerid, 29);
  3570. }
  3571. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3572. }
  3573. case 6:
  3574. {
  3575. if(PlayerInfo[playerid][pCash] >= 7000)
  3576. {
  3577. GiveMoney(playerid, -7000);
  3578. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Shotgun for $7,000.");
  3579. GivePlayerGun(playerid, 25);
  3580. }
  3581. else return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  3582. }
  3583. }
  3584. }
  3585. return 1;
  3586. }
  3587. /* Returns true if the given group ID is a donor group */
  3588. isDonatedGroup(groupID) {
  3589. return (
  3590. groupID == GROUP_TIJUANA ||
  3591. groupID == GROUP_COMMISSION ||
  3592. groupID == GROUP_EXEC ||
  3593. groupID == GROUP_LLS ||
  3594. groupID == GROUP_OPG ||
  3595. groupID == GROUP_REBELS ||
  3596. groupID == GROUP_BRATVA ||
  3597. groupID == GROUP_FACISTS
  3598. );
  3599. }
  3600. // Needs to be moved for organisation
  3601. /*IsGroupLeaderOn(groupid) {
  3602. foreach(new i: Player)
  3603. if(PlayerInfo[i][pGroup] == groupid && IsGroupLeader(i))
  3604. return 1;
  3605. return 0;
  3606. }*/
  3607. /*
  3608. Commands
  3609. */
  3610. CMD:quitgroup(playerid, params[])
  3611. {
  3612. new str[128];
  3613. new conf[10];
  3614. if(PlayerInfo[playerid][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a Group.");
  3615. if(sscanf(params, "s[10]", conf)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /quitgroup 'confirm'");
  3616. if(strcmp(conf, "confirm", true) == 0)
  3617. {
  3618. format(str, sizeof(str), "* You have quit the %s, you are now a civilian again.", GetPlayerGroupName(playerid));
  3619. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3620. PlayerInfo[playerid][pGroup] = GROUP_NONE;
  3621. PlayerInfo[playerid][pGroupRank] = 0;
  3622. PlayerInfo[playerid][pHAFakeBadge] = 0;
  3623. SetPlayerMasked(playerid, false);
  3624. }
  3625. return 1;
  3626. }
  3627. CMD:ggiverank(playerid, params[])
  3628. {
  3629. new str[128];
  3630. if(PlayerInfo[playerid][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a group.");
  3631. if(!IsGroupLeader(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not the group leader.");
  3632. new giveplayerid, newrank;
  3633. format(str, sizeof(str), "{00BFFF}Usage:{FFFFFF} /ggiverank [playerid/PartOfName] [0-%d]", GetGroupMaxRanks(PlayerInfo[playerid][pGroup]));
  3634. if(sscanf(params, "u d", giveplayerid, newrank)) return SendClientMessage(playerid, COLOR_GREY, str);
  3635. if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't change your own rank.");
  3636. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
  3637. if(PlayerInfo[giveplayerid][pGroup] != PlayerInfo[playerid][pGroup]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not a member of your group.");
  3638. format(str, sizeof(str), "{FF0000}Error:{FFFFFF} Your factions ranks go from 0 to %d.", GetGroupMaxRanks(PlayerInfo[playerid][pGroup]));
  3639. if(newrank < 0 || newrank > GetGroupMaxRanks(PlayerInfo[playerid][pGroup])) return SendClientMessage(playerid, COLOR_GREY, str);
  3640. if(PlayerInfo[giveplayerid][pGroupRank] > newrank)
  3641. {
  3642. format(str, sizeof(str), "* You have demoted %s to rank %d.", PlayerICName(giveplayerid), newrank);
  3643. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3644. format(str, sizeof(str), "* You have been demoted to Rank %d by Leader %s.", newrank, PlayerICName(playerid));
  3645. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3646. }
  3647. else
  3648. {
  3649. format(str, sizeof(str), "* You have been promoted to Rank %d by Leader %s.", newrank, PlayerICName(playerid));
  3650. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3651. format(str, sizeof(str), "* You have promoted %s to rank %d.", PlayerICName(giveplayerid), newrank);
  3652. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3653. }
  3654. PlayerInfo[giveplayerid][pGroupRank] = newrank;
  3655. return 1;
  3656. }
  3657. CMD:grouphelp(playerid)
  3658. {
  3659. SendClientMessage(playerid, GetGroupColour(PlayerInfo[playerid][pGroup]), "____________________________________________");
  3660. switch(PlayerInfo[playerid][pGroup]) {
  3661. case GROUP_HITMAN: {
  3662. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /setucname /lockpickdoor /undercover /approveuc /contracts /ranks /disguise");
  3663. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /callerid /profile /givehit /denyhit /givemehit /hitmanundercover /order /cuff /uncuff /sdtazer /handtazer");
  3664. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /mask /takebadge /placebadge /fakebadge /fl /togglefl /sethanicnkname");
  3665. }
  3666. case GROUP_CRIME:
  3667. {
  3668. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /mask /disguise /mask /syndicate /undercover");
  3669. }
  3670. case GROUP_CARTEL:
  3671. {
  3672. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /mask /disguise /cjng /undercover");
  3673. }
  3674. case GROUP_S9:
  3675. {
  3676. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /mask /disguise /s9 /profile");
  3677. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /callerid /fire /profile /fd");
  3678. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /edits9badge, /deploydrone /controldrone");
  3679. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /placejammer /crushjammer /removejammer /jammer /find /removebadge /showbadge");
  3680. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /(m)egaphone /setucname /removefactionban /fire /togdept /fakedepartments");
  3681. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /edits9badge /shows9badge /s9nametag /lockpickdoor /undercover /approveuc /hitmanundercover");
  3682. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /plantbug /removebug /togbug /changefreq /fakeradio /nocarlisten");
  3683. }
  3684. case GROUP_LLS:
  3685. {
  3686. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /order");
  3687. }
  3688. case GROUP_COMMISSION:
  3689. {
  3690. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /comarmory");
  3691. }
  3692. case GROUP_OPG:
  3693. {
  3694. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /greyarmory, /mask");
  3695. }
  3696. case GROUP_BRATVA:
  3697. {
  3698. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /bratvaarmory, /mask");
  3699. }
  3700. case GROUP_FACISTS:
  3701. {
  3702. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /facistsarmory /mask");
  3703. }
  3704. }
  3705. if(isDonatedGroup(PlayerInfo[playerid][pGroup]))
  3706. SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /disguise /callerid /callerid");
  3707. SendClientMessage(playerid, COLOR_GREY, "COMMANDS: /ginvite /guninvite /quitgroup /ggiverank /(g)roup(r)adio /(g)roup(o)oc(r)adio /gmembers");
  3708. SendClientMessage(playerid, COLOR_GREY, "COMMANDS: /ogmembers /oguninvite /togglegroupradio (/togglegr) /togglegroupoocradio (/togglegor)");
  3709. return 1;
  3710. }
  3711. CMD:ghelp(playerid) return cmd_grouphelp(playerid);
  3712. CMD:gmembers(playerid, params[])
  3713. {
  3714. if(PlayerInfo[playerid][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a Group.");
  3715. new memberstr[3600];
  3716. foreach( new i: Player )
  3717. {
  3718. if(PlayerInfo[i][pGroup] == PlayerInfo[playerid][pGroup])
  3719. {
  3720. if(PlayerPaused[i])
  3721. {
  3722. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s (%s) - Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pGroupNick], GetPlayerGroupRankName(i), PlayerInfo[i][pGroupRank]);
  3723. else format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s (%s) - Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pGroupNick], GetPlayerGroupRankName(i), PlayerInfo[i][pGroupRank]);
  3724. }
  3725. else
  3726. {
  3727. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) format(memberstr, sizeof(memberstr), "%s%s (%s) - Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pGroupNick], GetPlayerGroupRankName(i), PlayerInfo[i][pGroupRank]);
  3728. else format(memberstr, sizeof(memberstr), "%s%s (%s) - Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pGroupNick], GetPlayerGroupRankName(i), PlayerInfo[i][pGroupRank]);
  3729. }
  3730. }
  3731. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Group Members Online", memberstr, "Close", "");
  3732. }
  3733. return 1;
  3734. }
  3735. CMD:ogmembers(playerid, params[])
  3736. {
  3737. if(PlayerInfo[playerid][pGroup] > 0)
  3738. {
  3739. new query[128];
  3740. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin`, `Group`, `GroupRank`, `GroupNick` FROM `players` WHERE `Adjustable`=1 AND `Group`=%d", PlayerInfo[playerid][pGroup]);
  3741. mysql_pquery(sqlGameConnection, query, "onOGMembers", "i", playerid);
  3742. }
  3743. else
  3744. {
  3745. SendClientMessage(playerid, COLOR_WHITE, "You're not in a group.");
  3746. }
  3747. return 1;
  3748. }
  3749. CMD:ginvite(playerid, params[])
  3750. {
  3751. if(PlayerInfo[playerid][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a group.");
  3752. if(PlayerInfo[playerid][pGroupRank] < GetGroupMaxRanks(PlayerInfo[playerid][pGroup]) - 1) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not the group leader.");
  3753. new giveplayerid;
  3754. new str[128];
  3755. if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ginvite [playerid/PartOfName]");
  3756. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
  3757. // To avoid MG which has been happening recently.
  3758. if(PlayerInfo[giveplayerid][pGroup] == GROUP_S9) {
  3759. format(str, sizeof(str), "* You have invited %s to join %s.", PlayerICName(giveplayerid), GetPlayerGroupName(playerid));
  3760. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3761. format(str, sizeof(str), "%s has just tried to invite you to join the %s. But S9 is gr8.", PlayerOOCName(playerid), GetPlayerGroupName(playerid));
  3762. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3763. return 1;
  3764. }
  3765. if(PlayerInfo[giveplayerid][pGroup] > 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already in a group.");
  3766. format(str, sizeof(str), "* You have invited %s to join %s.", PlayerICName(giveplayerid), GetPlayerGroupName(playerid));
  3767. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3768. format(str, sizeof(str), "* %s has invited you to join %s, (type /accept group) to accept.", PlayerICName(playerid), GetPlayerGroupName(playerid));
  3769. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3770. GroupOffer[giveplayerid] = playerid;
  3771. return 1;
  3772. }
  3773. CMD:guninvite(playerid, params[])
  3774. {
  3775. if(PlayerInfo[playerid][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a group.");
  3776. if(PlayerInfo[playerid][pGroupRank] < GetGroupMaxRanks(PlayerInfo[playerid][pGroup]) - 1) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not the group leader.");
  3777. new giveplayerid;
  3778. new str[128];
  3779. if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /guninvite [playerid/PartOfName]");
  3780. if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't uninvite yourself.");
  3781. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
  3782. if(PlayerInfo[giveplayerid][pGroup] != PlayerInfo[playerid][pGroup]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not in your group.");
  3783. if(PlayerInfo[giveplayerid][pGroupRank] >= PlayerInfo[playerid][pGroupRank]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't kick out other group leaders.");
  3784. format(str, sizeof(str), "* You have been kicked out of the %s by Leader %s.", GetPlayerGroupName(giveplayerid), PlayerICName(playerid));
  3785. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3786. format(str, sizeof(str), "* You have kicked out %s from the group.", PlayerOOCName(giveplayerid));
  3787. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3788. PlayerInfo[giveplayerid][pGroup] = GROUP_NONE;
  3789. PlayerInfo[giveplayerid][pGroupRank] = 0;
  3790. PlayerInfo[giveplayerid][pHAFakeBadge] = 0;
  3791. SetPlayerMasked(giveplayerid, false);
  3792. return 1;
  3793. }
  3794. CMD:togor(playerid, params[])
  3795. {
  3796. if(PlayerInfo[playerid][pMember] != 0)
  3797. {
  3798. if(ToggedOR[playerid] == false)
  3799. {
  3800. ToggedOR[playerid] = true;
  3801. SendClientMessage(playerid, COLOR_WHITE, "You have disabled the OOC radio channel.");
  3802. }
  3803. else
  3804. {
  3805. ToggedOR[playerid] = false;
  3806. SendClientMessage(playerid, COLOR_WHITE, "You have re-enabled the OOC radio channel.");
  3807. }
  3808. }
  3809. else return SendClientMessage(playerid, COLOR_GREY, "You're not in a faction.");
  3810. return 1;
  3811. }
  3812. CMD:makegroupleader(playerid, params[])
  3813. {
  3814. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pFactionMod] > 0)
  3815. {
  3816. new giveplayerid, group;
  3817. new str[128];
  3818. if(sscanf(params, "ui", giveplayerid, group)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makegroupleader [playerid/PartOfName] [number]");
  3819. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
  3820. if(group < 0 || group > MAX_GROUPS) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Group cannot be below 0 or above 11.");
  3821. /* if((group == 10 || group == 1) && PlayerInfo[playerid][pFactionDirector] != 1) {
  3822. if(playerid == giveplayerid)
  3823. format(str, sizeof(str), "%s just tried to put his self into HA or S9.", PlayerName(playerid));
  3824. else
  3825. format(str, sizeof(str), "%s just tried to make %s a member of S9 or HA.", PlayerName(playerid), PlayerName(giveplayerid));
  3826. ABroadCast(COLOR_LIGHTYELLOW, str, 1);
  3827. return SendClientMessage(playerid, COLOR_GREY, "You cannot make yourself a member of S9 or HA.");
  3828. } */
  3829. PlayerInfo[giveplayerid][pGroup] = group;
  3830. PlayerInfo[giveplayerid][pGroupRank] = GetGroupMaxRanks(group);
  3831. format(str, sizeof(str), "* You have given %s leadership of the %s.", PlayerOOCName(giveplayerid), GetPlayerGroupName(giveplayerid));
  3832. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3833. format(str, sizeof(str), "* %s has given you leadership of the %s.", PlayerOOCName(playerid), GetPlayerGroupName(giveplayerid));
  3834. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  3835. }
  3836. else
  3837. {
  3838. return AdmErrorMsg;
  3839. }
  3840. return 1;
  3841. }
  3842. CMD:oguninvite(playerid, params[])
  3843. {
  3844. // If the player is in a group, and they are co-leader, or leader, then you can uninvite. GetGroupMaxRanks -1 for co-leader+
  3845. if(PlayerInfo[playerid][pGroup] != GROUP_NONE && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(PlayerInfo[playerid][pGroup])-1)
  3846. {
  3847. new name[MAX_PLAYER_NAME];
  3848. if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /oguninvite [full name(case sensitive)]");
  3849. if(GetPlayerIDFromName(name) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is currently logged in.");
  3850. new query[128];
  3851. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `GroupRank`, `Group` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
  3852. mysql_pquery(sqlGameConnection, query, "OnOGUninvite", "is", playerid, name);
  3853. }
  3854. else
  3855. {
  3856. SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not a group leader.");
  3857. }
  3858. return 1;
  3859. }
  3860. CMD:setgrouprank(playerid, params[]) {
  3861. if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pGroup] != GROUP_NONE) {
  3862. new toplayer, rank, grStr[128];
  3863. if(sscanf(params, "ui", toplayer, rank)) return SendClientMessage(playerid, COLOR_GREY, "/setgrouprank [player] [rank]");
  3864. // If the requested rank is greater than the group's max rank or less than 0
  3865. if(rank > GetGroupMaxRanks(PlayerInfo[toplayer][pGroup]) || rank < 0) {
  3866. format(grStr, sizeof(grStr), "Rank must be between 0 and %d", GetGroupMaxRanks(PlayerInfo[toplayer][pGroup]));
  3867. return SendClientMessage(playerid, COLOR_RED, grStr);
  3868. }
  3869. if(PlayerInfo[playerid][pGroup] != PlayerInfo[toplayer][pGroup]) return SendClientMessage(playerid, COLOR_GREY, "That player is not in your group.");
  3870. PlayerInfo[toplayer][pGroupRank] = rank;
  3871. format(grStr, sizeof(grStr), "You have set %s's rank to %d.", PlayerOOCName(toplayer), rank);
  3872. SendClientMessage(playerid, GetGroupColour(PlayerInfo[toplayer][pGroup]), grStr);
  3873. format(grStr, sizeof(grStr), "An admin has set your group rank to %d", rank);
  3874. SendClientMessage(toplayer, GetGroupColour(PlayerInfo[toplayer][pGroup]), grStr);
  3875. }
  3876. return 1;
  3877. }
  3878. // For faction leader
  3879. CMD:togglegroupradio(playerid) {
  3880. new playerGroup = PlayerInfo[playerid][pGroup];
  3881. if(playerGroup != GROUP_NONE && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(playerGroup)-1) {
  3882. switch(groupRadioToggled[playerGroup])
  3883. {
  3884. case 0:
  3885. {
  3886. groupRadioToggled[playerGroup] = 1;
  3887. SendClientMessage(playerid, GetGroupColour(playerGroup), "You have turned group radio off.");
  3888. }
  3889. case 1:
  3890. {
  3891. groupRadioToggled[playerGroup] = 0;
  3892. SendClientMessage(playerid, GetGroupColour(playerGroup), "You have turned group radio on.");
  3893. }
  3894. }
  3895. }
  3896. return 1;
  3897. }
  3898. CMD:togglegr(playerid) return cmd_togglegroupradio(playerid);
  3899. // For faction leader
  3900. CMD:togglegroupoocradio(playerid) {
  3901. new playerGroup = PlayerInfo[playerid][pGroup];
  3902. if(playerGroup != GROUP_NONE && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(playerGroup)-1) {
  3903. switch(OOCgroupRadioToggled[playerGroup])
  3904. {
  3905. case 0:
  3906. {
  3907. OOCgroupRadioToggled[playerGroup] = 1;
  3908. SendClientMessage(playerid, GetGroupColour(playerGroup), "You have turned the OOC group radio off.");
  3909. }
  3910. case 1:
  3911. {
  3912. OOCgroupRadioToggled[playerGroup] = 0;
  3913. SendClientMessage(playerid, GetGroupColour(playerGroup), "You have turned the OOC group radio on.");
  3914. }
  3915. }
  3916. }
  3917. return 1;
  3918. }
  3919. CMD:togglegor(playerid) return cmd_togglegroupoocradio(playerid);
  3920. CMD:groupradio(playerid, params[])
  3921. {
  3922. if(PlayerInfo[playerid][pGroup] == GROUP_NONE)
  3923. return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a Group.");
  3924. // If the player's group radio is toggled, and they aren't a leader.
  3925. if(groupRadioToggled[PlayerInfo[playerid][pGroup]] && PlayerInfo[playerid][pGroupRank] < GetGroupMaxRanks(PlayerInfo[playerid][pGroup])-1)
  3926. return SendClientMessage(playerid, COLOR_GREY, "The group radio is disabled.");
  3927. new msg[128];
  3928. if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/g)roup(r)adio [message]");
  3929. if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
  3930. new str[128];
  3931. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) format(str, sizeof(str), "** %s %s (%s): %s **", GetPlayerGroupRankName(playerid), PlayerICName(playerid), PlayerInfo[playerid][pGroupNick], msg);
  3932. else format(str, sizeof(str), "** %s %s: %s **", GetPlayerGroupRankName(playerid), PlayerICName(playerid), msg);
  3933. SendGroupMessage(PlayerInfo[playerid][pGroup], GetGroupColour(PlayerInfo[playerid][pGroup]), str);
  3934. format(str, sizeof(str), "[GC]** %s %s: %s **", GetPlayerGroupRankName(playerid), PlayerOOCName(playerid), msg);
  3935. SendShadowMsg(COLOR_GREEN, str);
  3936. // For FBI | DEA bugs
  3937. foreach( new i: Player )
  3938. {
  3939. if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
  3940. {
  3941. new Float: x[3];
  3942. GetPlayerPos(playerid, x[0], x[1], x[2]);
  3943. if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))
  3944. {
  3945. if(i == playerid)
  3946. {
  3947. format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg);
  3948. }
  3949. else
  3950. {
  3951. format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg);
  3952. }
  3953. if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
  3954. {
  3955. SendBuggedMessage(COLOR_ORANGE, str);
  3956. SendS9BuggedMessage(COLOR_ORANGE, str);
  3957. }
  3958. else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
  3959. // that s9 bugged them
  3960. }
  3961. }
  3962. }
  3963. return 1;
  3964. }
  3965. CMD:groupoocradio(playerid, params[])
  3966. {
  3967. if(PlayerInfo[playerid][pGroup] == GROUP_NONE)
  3968. return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not in a Group.");
  3969. if(OOCgroupRadioToggled[PlayerInfo[playerid][pGroup]] && PlayerInfo[playerid][pGroupRank] < GetGroupMaxRanks(PlayerInfo[playerid][pGroup])-1)
  3970. return SendClientMessage(playerid, COLOR_GREY, "The group OOC radio is disabled.");
  3971. new msg[128];
  3972. new str[128];
  3973. if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(g)roup(o)oc(r)adio [message]");
  3974. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) format(str, sizeof(str), "** (( %s %s (%s): %s )) **", GetPlayerGroupRankName(playerid), PlayerICName(playerid), PlayerInfo[playerid][pGroupNick], msg);
  3975. else format(str, sizeof(str), "** (( %s %s: %s )) **", GetPlayerGroupRankName(playerid), PlayerICName(playerid), msg);
  3976. SendGroupMessage(PlayerInfo[playerid][pGroup], GetGroupColour(PlayerInfo[playerid][pGroup]), str);
  3977. format(str, sizeof(str), "[GC]** (( %s %s: %s )) **", GetPlayerGroupRankName(playerid), PlayerOOCName(playerid), msg);
  3978. SendShadowMsg(COLOR_GREEN, str);
  3979. return 1;
  3980. }
  3981. CMD:g(playerid, params[]) return cmd_groupradio(playerid, params);
  3982. CMD:gr(playerid, params[]) return cmd_groupradio(playerid, params);
  3983. CMD:gor(playerid, params[]) return cmd_groupoocradio(playerid, params);
  3984. /*
  3985. Tijuana Cartel Armory - approved by Smo and scripted by Hank
  3986. */
  3987. CMD:crarmory(playerid)
  3988. {
  3989. if(PlayerInfo[playerid][pGroup] != GROUP_TIJUANA) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  3990. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1091.78, 2121.75, 15.35)) return SendClientMessage(playerid, COLOR_GREY,"You're not at the armory of the Network.");
  3991. new cartelstr[1000];
  3992. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  3993. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$100,000\nM4\t$150,000\nAK47\t$130,000\nFull Vest\t$45,000", cartelstr);
  3994. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$50,000\nShotgun\t$30,000", cartelstr);
  3995. ShowPlayerDialog(playerid, DIALOG_TIJUANA_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Cartel Armory", cartelstr, "Purchase", "Cancel");
  3996. return 1;
  3997. }
  3998. CMD:comarmory(playerid)
  3999. {
  4000. if(PlayerInfo[playerid][pGroup] != 6) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  4001. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2358.69, 922.03, 9007.61)) return SendClientMessage(playerid, COLOR_GREY,"You're not at the armory of the Network.");
  4002. new cartelstr[1000];
  4003. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  4004. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$100,000\nM4\t$150,000\nAK47\t$130,000\nFull Vest\t$45,000", cartelstr);
  4005. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$50,000\nShotgun\t$30,000", cartelstr);
  4006. ShowPlayerDialog(playerid, DIALOG_TIJUANA_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", cartelstr, "Purchase", "Cancel");
  4007. return 1;
  4008. }
  4009. CMD:greyarmory(playerid)
  4010. {
  4011. if(PlayerInfo[playerid][pGroup] != GROUP_OPG) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  4012. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 374.68, 180.50, 1014.18)) return SendClientMessage(playerid, COLOR_GREY,"You're not at the armory of the Grey Wolves.");
  4013. new cartelstr[1000];
  4014. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  4015. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$50,000\nM4\t$85,000\nAK47\t$65,000\nFull Vest\t$15,000", cartelstr);
  4016. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$13,000\nShotgun\t$7,000", cartelstr);
  4017. ShowPlayerDialog(playerid, DIALOG_GREYWOLF_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", cartelstr, "Purchase", "Cancel");
  4018. return 1;
  4019. }
  4020. CMD:facistsarmory(playerid)
  4021. {
  4022. if(PlayerInfo[playerid][pGroup] != GROUP_FACISTS) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  4023. if(!IsPlayerNearHitmenHQ(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
  4024. ProofJessaIsNazi(playerid);
  4025. return 1;
  4026. }
  4027. CMD:sarmory(playerid)
  4028. {
  4029. if(PlayerInfo[playerid][pGroup] != 7) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  4030. if(!IsPlayerInRangeOfPoint(playerid, 5.0, -2160.21, 646.55, 1057.58)) return SendClientMessage(playerid, COLOR_GREY,"Not at your HQ.");
  4031. new cartelstr[1000];
  4032. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  4033. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$50,000\nM4\t$85,000\nAK47\t$65,000\nFull Vest\t$15,000", cartelstr);
  4034. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$13,000\nShotgun\t$7,000", cartelstr);
  4035. ShowPlayerDialog(playerid, DIALOG_GREYWOLF_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", cartelstr, "Purchase", "Cancel");
  4036. return 1;
  4037. }
  4038. CMD:bratvaarmory(playerid)
  4039. {
  4040. if(PlayerInfo[playerid][pGroup] != GROUP_BRATVA) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
  4041. if(!IsPlayerInRangeOfPoint(playerid, 5.0, -2160.21, 646.55, 1057.58)) return SendClientMessage(playerid, COLOR_GREY,"Not at your HQ.");
  4042. new cartelstr[1000];
  4043. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  4044. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$50,000\nM4\t$85,000\nAK47\t$65,000\nFull Vest\t$15,000", cartelstr);
  4045. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$13,000\nShotgun\t$7,000", cartelstr);
  4046. ShowPlayerDialog(playerid, DIALOG_GREYWOLF_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", cartelstr, "Purchase", "Cancel");
  4047. return 1;
  4048. }
  4049. CMD:sethanickname(playerid, params[])
  4050. {
  4051. if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return AdmErrorMsg;
  4052. new targetid, name[13];
  4053. if(sscanf(params, "us[13]", targetid, name)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /sethanickname [playerid/PartOfName] [nickname] (12 characters max)");
  4054. if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid player.");
  4055. if(PlayerInfo[targetid][pGroup] != GROUP_HITMAN) return SendClientMessage(playerid, COLOR_GREY, "That player is not in your group.");
  4056. format(PlayerInfo[targetid][pGroupNick], 12, "%s", name);
  4057. new msg[70];
  4058. format(msg, sizeof(msg), "You have set %s's nickname to %s.", PlayerOOCName(targetid), PlayerInfo[targetid][pGroupNick]);
  4059. SendClientMessage(playerid, GetGroupColour(PlayerInfo[playerid][pGroup]), msg);
  4060. format(msg, sizeof(msg), "%s has set your nickname to %s", PlayerOOCName(playerid), PlayerInfo[targetid][pGroupNick]);
  4061. SendClientMessage(targetid, GetGroupColour(PlayerInfo[playerid][pGroup]), msg);
  4062. return 1;
  4063. }
  4064. //===================================[Drone]===================================
  4065. #include "../gamemodes/inc/drone.inc"
  4066. //===================================[Property]===================================
  4067. #include "..\gamemodes\inc\Property\houses.inc"
  4068. #include "..\gamemodes\inc\Property\businesses.inc"
  4069. #include "..\gamemodes\inc\Property\garages.inc"
  4070. #include "..\gamemodes\inc\Property\gates.inc"
  4071. #include "..\gamemodes\inc\Property\bars.inc"
  4072. #include "..\gamemodes\inc\Property\inactivechecker.inc"
  4073. //==============================[ Fire system ]=================================
  4074. #include "../gamemodes/inc/fire_system/internal.inc" //fire system
  4075. #include "../gamemodes/inc/effects/blood.inc"
  4076. //==============================[ Furniture system ]============================
  4077. #include "../gamemodes/inc/furniture_system.inc"
  4078. #include "../gamemodes/inc/objectviewer.inc"
  4079. //==============================[ Spectating system ]===========================
  4080. #include "../gamemodes/inc/Player/spectextdraws.inc"
  4081. //==============================[ Custom Nametag system ]===========================
  4082. //#include "../gamemodes/inc/CustomNametag.inc"
  4083. //Clothing store
  4084. new listItemClothes[MAX_PLAYERS];
  4085. //Fuel/Speedo (iGetty)
  4086. new PlayerText:FuelTextdraw[MAX_PLAYERS], PlayerText:SpeedoTextdraw[MAX_PLAYERS], bool:ToggedSpeedo[MAX_PLAYERS], bool:ToggedFuel[MAX_PLAYERS], bool:CurrentSpeedUnitMPH[MAX_PLAYERS];
  4087. new PlayerText:VHealthTextDraw[MAX_PLAYERS], bool:ToggedVHealth[MAX_PLAYERS];
  4088. //motd
  4089. new Text:motd, hidingMOTDTimer[MAX_PLAYERS];
  4090. //event notice
  4091. new Text:eventcup_icon, Text:nexteventin, Text:eventfunds, Text:howtofund, displayingEventHUD[MAX_PLAYERS];
  4092. //event variables
  4093. new isNextEvent, eventCash, eventTime, largestFund, largestFunder[MAX_PLAYER_NAME];
  4094. new viewingGuide[MAX_PLAYERS];
  4095. //==============================================================================
  4096. new CardNames[53][0] =
  4097. {
  4098. "No card", "Ace of Clubs", "2 of Clubs", "3 of Clubs", "4 of Clubs", "5 of Clubs", "6 of Clubs", "7 of Clubs", "8 of Clubs", "9 of Clubs",
  4099. "10 of Clubs", "Jack of Clubs", "Queen of Clubs", "King of Clubs", "Ace of Diamonds", "2 of Diamonds", "3 of Diamonds", "4 of Diamonds",
  4100. "5 of Diamonds", "6 of Diamonds", "7 of Diamonds", "8 of Diamonds", "9 of Diamonds", "10 of Diamonds", "Jack of Diamonds",
  4101. "Queen of Diamonds", "King of Diamonds", "Ace of Hearts", "2 of Hearts", "3 of Hearts", "4 of Hearts", "5 of Hearts", "6 of Hearts",
  4102. "7 of Hearts", "8 of Hearts", "9 of Hearts", "10 of Hearts", "Jack of Hearts", "Queen of Hearts", "King of Hearts", "Ace of Spades",
  4103. "2 of Spades", "3 of Spades", "4 of Spades", "5 of Spades", "6 of Spades", "7 of Spades", "8 of Spades", "9 of Spades", "10 of Spades",
  4104. "Jack of Spades", "Queen of Spades", "King of Spades"
  4105. };
  4106. //=============================[Cards]==========================================
  4107. new Cards[MAX_PLAYERS][5], CardsHave[MAX_PLAYERS], Deck[MAX_PLAYERS][52], CardsDealt[MAX_PLAYERS];
  4108. //=============================[Pickups]========================================
  4109. new iPaintball, iDrughouse, iMget1, iMget2, iCrateGet, iClothes, iDrugfactory, iGuide;
  4110. new iArrest1, iArrest2, iDeliver, iDeliver2, iSprunk, iTikiEntrance; //iCrackLab;
  4111. //==============================[HQ]============================================
  4112. new iBM, iVIP, iChurch, iArrest3;
  4113. new iTiki, VoodooSpell[MAX_PLAYERS];
  4114. //==================================[VIP Cars]==================================
  4115. new VipCars[31];
  4116. //==================================[DMV Cars]==================================
  4117. new DMVCar[3];
  4118. //================================[Jobs]========================================
  4119. new iTraining, clubFunds, para, dildo, poolcue;
  4120. new iDetective, iLawyer, iDealer, iMechanic, iGarbageman, iProductDealer, iProduct, iBodyguard, iArms, iPizza, iArms2, iBoxer, iTaxi, iTaxi1, iSmuggler, iMiner, iFarmer;
  4121. //============================[Weed System]=====================================
  4122. enum weedInfo
  4123. {
  4124. WeedPlanter[MAX_PLAYER_NAME],
  4125. Float:WeedX,
  4126. Float:WeedY,
  4127. Float:WeedZ,
  4128. WeedTime,
  4129. WeedPlanted,
  4130. WeedGrams,
  4131. };
  4132. new WeedInfo[MAX_WEED][weedInfo], weedObject[MAX_WEED];
  4133. new vehName[][] =
  4134. {
  4135. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster",
  4136. "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  4137. "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer",
  4138. "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach",
  4139. "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow",
  4140. "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
  4141. "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic",
  4142. "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton",
  4143. "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher",
  4144. "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick",
  4145. "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher",
  4146. "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt", "Tanker", "Roadtrain",
  4147. "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck",
  4148. "Fortune", "Cadrona", "SWAT Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan",
  4149. "Blade", "Streak", "Freight", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder",
  4150. "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster",
  4151. "Uranus", "Jester", "Sultan", "Stratium", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  4152. "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30",
  4153. "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  4154. "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "SAPD Car", "SFPD Car", "LVPD Car",
  4155. "Police Rancher", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs",
  4156. "Boxville", "Tiller", "Utility Trailer"
  4157. };
  4158. new PayDayAccount[MAX_PLAYERS];
  4159. //============================[Weed Pos]========================================
  4160. enum WeedPickPos
  4161. {
  4162. Float:PosX,
  4163. Float:PosY,
  4164. Float:PosZ
  4165. }
  4166. new WeedPickPosition[MAX_PLAYERS][WeedPickPos];
  4167. /////////////////////////////////////////////////////////////////////////////////
  4168. //===========================[FMD Rank names]=================================
  4169. static rankNames_FMD[][18] = {
  4170. "Trainee",
  4171. "First Responder",
  4172. "EMT-A/B",
  4173. "Paramedic",
  4174. "Lieutenant",
  4175. "District Chief",
  4176. "Chief"
  4177. };
  4178. Float:GetDistanceBetweenPlayers(p1, p2)
  4179. {
  4180. new Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2;
  4181. if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
  4182. {
  4183. return -1.00;
  4184. }
  4185. GetPlayerPos(p1, x1, y1, z1);
  4186. GetPlayerPos(p2, x2, y2, z2);
  4187. return floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2) +floatpower(floatabs(floatsub(y2, y1)), 2) +floatpower(floatabs(floatsub(z2, z1)), 2));
  4188. }
  4189. //=========================[Hospital Spawns]=====================================
  4190. new Float:HospitalSpawns[2][4] = {
  4191. {1176.6326,-1325.5374,14.0309,270.0000},
  4192. {2034.1111,-1404.4347,17.5000,180.0000}
  4193. //{854.5510,-604.0355,18.4219,359.1621} //dillimore
  4194. };
  4195. //=========================[LS Jail Spawns]======================================
  4196. new Float:LSJailSpawns[6][4] =
  4197. {
  4198. {-1120.93, -941.22, 29999.24, 0.0},
  4199. {-1120.93, -945.25, 29999.24, 0.0},
  4200. {-1120.93, -948.50, 29999.24, 0.0},
  4201. {-1110.57, -941.22, 29999.24, 0.0},
  4202. {-1110.57, -945.25, 29999.24, 0.0},
  4203. {-1110.57, -948.50, 29999.24, 0.0}
  4204. };
  4205. //=======================[Prison Spawns]========================================
  4206. new Float:PrisonSpawns[12][4] =
  4207. {
  4208. {1772.8984, -1581.8361, 1636.9736, 0.0000},
  4209. {1779.1259, -1581.6355, 1636.9736, 0.0000},
  4210. {1784.5406, -1581.5651, 1636.9736, 0.0000},
  4211. {1790.4741, -1581.5254, 1636.9736, 0.0000},
  4212. {1795.7205, -1581.5287, 1636.9736, 0.0000},
  4213. {1800.6487, -1581.1351, 1636.9736, 0.0000},
  4214. {1800.5258, -1557.4760, 1636.9736, 180.0000},
  4215. {1796.1321, -1557.8774, 1636.9736, 180.0000},
  4216. {1790.5198, -1558.0527, 1636.9736, 180.0000},
  4217. {1784.5649, -1557.9910, 1636.9736, 180.0000},
  4218. {1779.5862, -1557.9115, 1636.9736, 180.0000},
  4219. {1773.6440, -1557.8591, 1636.9736, 180.0000}
  4220. };
  4221. //SF Prison Spawns
  4222. new Float:SFPrisonSpawns[12][4] =
  4223. {
  4224. {1930.9679, 1844.5880, 27.5159, 87.2528},
  4225. {1931.2271, 1847.3126, 27.5159, 87.2528},
  4226. {1931.3435, 1850.6062, 27.5159, 96.6529},
  4227. {1931.6733, 1853.2310, 27.5159, 95.3995},
  4228. {1931.3214, 1856.8075, 27.5159, 79.7326},
  4229. {1931.0250, 1859.8428, 27.5159, 82.8660},
  4230. {1906.4645, 1860.0432, 27.5159, 259.2744},
  4231. {1906.5186, 1857.0646, 27.5159, 270.8679},
  4232. {1906.7711, 1853.8832, 27.5159, 263.6611},
  4233. {1906.5165, 1850.8103, 27.5159, 258.6478},
  4234. {1906.1536, 1847.0586, 27.5159, 259.2745},
  4235. {1906.4305, 1844.4436, 27.5159, 268.3613}
  4236. };
  4237. //prison ambient intercom sounds
  4238. new prisonAmbientSounds[14] =
  4239. {
  4240. 13622,
  4241. 13623,
  4242. 13624,
  4243. 13625,
  4244. 13626,
  4245. 13627,
  4246. 13628,
  4247. 13629,
  4248. 13630,
  4249. 13631,
  4250. 13632,
  4251. 13633,
  4252. 13634,
  4253. 13635
  4254. };
  4255. //==========================[Box Stats]=========================================
  4256. enum pBoxingStats
  4257. {
  4258. TitelName[128],
  4259. TitelWins,
  4260. TitelLoses,
  4261. };
  4262. new Titel[pBoxingStats];
  4263. //==========================[Spike Info]========================================
  4264. enum sInfo
  4265. {
  4266. sCreated,
  4267. Float:sX,
  4268. Float:sY,
  4269. Float:sZ,
  4270. sObject,
  4271. };
  4272. new SpikeInfo[MAX_SPIKESTRIPS][sInfo];
  4273. //===========================================================================
  4274. enum pCrime
  4275. {
  4276. pBplayer[32],
  4277. pAccusing[32],
  4278. pAccusedof[32],
  4279. pVictim[32]
  4280. };
  4281. new PlayerCrime[MAX_PLAYERS][pCrime];
  4282. //===========================[Tiki System]======================================
  4283. enum tInfo // Tiki
  4284. {
  4285. tCreated,
  4286. Float:tX,
  4287. Float:tY,
  4288. Float:tZ,
  4289. tPickup,
  4290. };
  4291. new TikiInfo[MAX_TIKIS][tInfo]; // Tiki
  4292. //============================[Family System]===================================
  4293. enum fInfo
  4294. {
  4295. FamilyTaken,
  4296. FamilyName[24],
  4297. FamilyMOTD[64],
  4298. FamilyLeader[MAX_PLAYER_NAME],
  4299. FamilyBank,
  4300. FamilyCash,
  4301. FamilySafe,
  4302. FamilySafeWorld,
  4303. Float:FamilySafePos[3],
  4304. FamilyCocaine,
  4305. FamilyMeth,
  4306. FamilyCannabis,
  4307. FamilyPromethazine,
  4308. FamilyCodeine,
  4309. FamilyLean,
  4310. FamilyPot,
  4311. FamilyCrack,
  4312. FamilyMats,
  4313. FamilyMembers,
  4314. FamilySkins,
  4315. Family4s,
  4316. FamilySkin1,
  4317. FamilySkin2,
  4318. FamilySkin3,
  4319. FamilySkin4,
  4320. FamilySkin5,
  4321. FamilySkin6,
  4322. FamilySkin7,
  4323. FamilySkin8,
  4324. PickupID,
  4325. FStrikes,
  4326. Colt45,
  4327. Shotgun,
  4328. MP5,
  4329. AK47,
  4330. M4,
  4331. SPAS12,
  4332. Rifle,
  4333. Sniper,
  4334. Deagle,
  4335. UZI,
  4336. TEC9,
  4337. Tagsplaced,
  4338. FamilyLeaderHide,
  4339. fXP
  4340. };
  4341. new FamilyInfo[20][fInfo];
  4342. new FamilyRank[20][6][24];
  4343. //============================[Fishing System]==================================
  4344. enum pFishing
  4345. {
  4346. pFish1[20],
  4347. pFish2[20],
  4348. pFish3[20],
  4349. pFish4[20],
  4350. pFish5[20],
  4351. pWeight1,
  4352. pWeight2,
  4353. pWeight3,
  4354. pWeight4,
  4355. pWeight5,
  4356. pFid1,
  4357. pFid2,
  4358. pFid3,
  4359. pFid4,
  4360. pFid5,
  4361. pLastFish,
  4362. };
  4363. new Fishes[MAX_PLAYERS][pFishing];
  4364. //===============================[IRC Info]=====================================
  4365. enum iInfo
  4366. {
  4367. iAdmin[128],
  4368. iMOTD[128],
  4369. iPassword[128],
  4370. iNeedPass,
  4371. iLock,
  4372. iPlayers,
  4373. };
  4374. new IRCInfo[10][iInfo];
  4375. //===============================[Roadblocks]===================================
  4376. enum RBInfo
  4377. {
  4378. RBCreated,
  4379. Float:RBX,
  4380. Float:RBY,
  4381. Float:RBZ,
  4382. RBObject,
  4383. };
  4384. new RoadBlockInfo[MAX_ROADBLOCKS][RBInfo];
  4385. //===============================[Payphone]===================================
  4386. enum pPhone
  4387. {
  4388. Float: pPhoneX,
  4389. Float: pPhoneY,
  4390. Float: pPhoneZ,
  4391. pPhoneInt,
  4392. pPhoneVW,
  4393. inUse
  4394. };
  4395. //currently static payphones
  4396. new payPhone[19][pPhone] = {
  4397. { 1178.21, -1329.16, 13.78, 0, 0, 0 },
  4398. { 1102.16, -1456.01, 15.49, 0, 0, 0 },
  4399. { 1497.12, -1667.58, 13.74, 0, 0, 0 },
  4400. { 1890.20, -1947.59, 13.25, 0, 0, 0 },
  4401. { 2265.06, -1721.87, 13.22, 0, 0, 0 },
  4402. { 1501.98, -1060.08, 24.71, 0, 0, 0 },
  4403. { 1500.40, -1060.11, 24.71, 0, 0, 0 },
  4404. { 1770.37, -1191.11, 23.54, 0, 0, 0 },
  4405. { 2352.22, -1538.29, 23.67, 0, 0, 0 },
  4406. { -38.68, 1186.27, 19.06, 0, 0, 0 },
  4407. { 1536.26, -1662.37, 13.16, 0, 0, 0 },
  4408. { 1535.85, -1661.89, 13.16, 0, 0, 0 },
  4409. { 1536.27, -1661.62, 13.16, 0, 0, 0 },
  4410. { 1536.77, -1661.96, 13.16, 0, 0, 0 },
  4411. { 1722.26, -1721.54, 13.18, 0, 0, 0 },
  4412. { 1722.00, -1721.09, 13.18, 0, 0, 0 },
  4413. { 1722.20, -1720.72, 13.18, 0, 0, 0 },
  4414. { 1722.71, -1721.10, 13.18, 0, 0, 0 },
  4415. { 2731.1685, -2460.1809, 1299.4523, 50, 50, 0}
  4416. };
  4417. // probly make a dynamic system in the future
  4418. new usePayphone[MAX_PLAYERS];
  4419. //Soda system/Soda machine
  4420. enum sMachine {
  4421. Float: sMachineX,
  4422. Float: sMachineY,
  4423. Float: sMachineZ,
  4424. Float: sMachineRX,
  4425. Float: sMachineRY,
  4426. Float: sMachineRZ,
  4427. sMachineInt,
  4428. sMachineVW
  4429. };
  4430. new SodaMachines[][sMachine] = {
  4431. { 2689.3223, -2494.6492, 1294.6591, 0.0, 0.0, 0.0, 1, 0 }
  4432. };
  4433. //Weapons
  4434. new Float:ObjCoords[100][3];
  4435. new object[100];
  4436. new wObjectID[100][2];
  4437. //Kevlar
  4438. new Float:kObjCoords[100][3];
  4439. new kobject[100];
  4440. new Float:kObjectVal[100][2];
  4441. // Pot
  4442. new Float:pObjCoords[100][3];
  4443. new pobject[100];
  4444. new pObjectID[100][2];
  4445. // Crack
  4446. new Float:cObjCoords[100][3];
  4447. new cobject[100];
  4448. new cObjectID[100][2];
  4449. // Mats
  4450. new Float:mObjCoords[100][3];
  4451. new mobject[100];
  4452. new mObjectID[100][2];
  4453. // The objects
  4454. new GunObjects[47][0] = // (c) gimini
  4455. {
  4456. {0},// Emty
  4457. {331},// Brass Knuckles
  4458. {333},// Golf Club
  4459. {334},// Nitestick
  4460. {335},// Knife
  4461. {336},// Baseball Bat
  4462. {337},// Showel
  4463. {338},// Pool Cue
  4464. {339},// Katana
  4465. {341},// Chainsaw
  4466. {321},// Purple Dildo
  4467. {322},// Small White Dildo
  4468. {323},// Long White Dildo
  4469. {324},// Vibrator
  4470. {325},// Flowers
  4471. {326},// Cane
  4472. {342},// Grenade
  4473. {343},// Tear Gas
  4474. {344},// Molotov
  4475. {0},
  4476. {0},
  4477. {0},
  4478. {346},// Glock
  4479. {347},// Silenced Colt
  4480. {348},// Desert Eagle
  4481. {349},// Shotgun
  4482. {350},// Sawn Off
  4483. {351},// Combat Shotgun
  4484. {352},// Micro UZI
  4485. {353},// MP5
  4486. {355},// AK47
  4487. {356},// M4
  4488. {372},// Tec9
  4489. {357},// Rifle
  4490. {358},// Sniper Rifle
  4491. {359},// Rocket Launcher
  4492. {360},// HS Rocket Launcher
  4493. {361},// Flamethrower
  4494. {362},// Minigun
  4495. {363},// Detonator
  4496. {364},// Detonator Button
  4497. {365},// Spraycan
  4498. {366},// Fire Extinguisher
  4499. {367},// Camera
  4500. {368},// Nightvision
  4501. {368},// Infrared Vision
  4502. {371}// Parachute
  4503. };
  4504. public DeleteGun(objectid, f)
  4505. {
  4506. if(object[f]) { DestroyDynamicObjectEx(objectid); }
  4507. ObjCoords[f][0] = 0.0;
  4508. ObjCoords[f][1] = 0.0;
  4509. ObjCoords[f][2] = 0.0;
  4510. wObjectID[f][0] = 0;
  4511. object[f] = 0;
  4512. return 1;
  4513. }
  4514. public DeleteKevlar(objectid, f)
  4515. {
  4516. if(kobject[f]) { DestroyDynamicObjectEx(objectid); }
  4517. kObjCoords[f][0] = 0.0;
  4518. kObjCoords[f][1] = 0.0;
  4519. kObjCoords[f][2] = 0.0;
  4520. kObjectVal[f][0] = 0.0;
  4521. kobject[f] = 0;
  4522. }
  4523. public DeletePot(objectid, f)
  4524. {
  4525. if(pobject[f]) { DestroyDynamicObjectEx(objectid); }
  4526. pObjCoords[f][0] = 0.0;
  4527. pObjCoords[f][1] = 0.0;
  4528. pObjCoords[f][2] = 0.0;
  4529. pObjectID[f][0] = 0;
  4530. pobject[f] = 0;
  4531. return 1;
  4532. }
  4533. public DeleteCrack(objectid, f)
  4534. {
  4535. if(cobject[f]) { DestroyDynamicObjectEx(objectid); }
  4536. cObjCoords[f][0] = 0.0;
  4537. cObjCoords[f][1] = 0.0;
  4538. cObjCoords[f][2] = 0.0;
  4539. cObjectID[f][0] = 0;
  4540. cobject[f] = 0;
  4541. return 1;
  4542. }
  4543. public DeleteMats(objectid, f)
  4544. {
  4545. if(mobject[f]) { DestroyDynamicObjectEx(objectid); }
  4546. mObjCoords[f][0] = 0.0;
  4547. mObjCoords[f][1] = 0.0;
  4548. mObjCoords[f][2] = 0.0;
  4549. mObjectID[f][0] = 0;
  4550. mobject[f] = 0;
  4551. return 1;
  4552. }
  4553. #include "../gamemodes/inc/vehicles/core.inc" //player owned vehicles
  4554. #include "../gamemodes/inc/core/accounts.inc" //passwords & account security
  4555. #include "../gamemodes/inc/jobs/jobs_core.inc"
  4556. #include "../gamemodes/inc/units.inc"
  4557. #include "../gamemodes/inc/Player/deaths.inc"
  4558. #include "../gamemodes/inc/missilelaunchers.inc"
  4559. /*#if UseDiscordBot 1
  4560. #include "../gamemodes/inc/discord/init.inc"
  4561. #endif*/
  4562. //=====================[ Destroy vehicle fix by Jacob ]=========================
  4563. stock OnDestroyVehicle(vehicleid) //is automatically called when using DestroyVehicle()
  4564. //hook DestroyVehicle(vehicleid)
  4565. {
  4566. if(!IsValidVehicle(vehicleid))
  4567. return 0; // Stop processing this function instantly and not hook into any other hooks and return 0 in the base function //
  4568. SetVehicleLockState( vehicleid, 0 ); //reset the car's lock
  4569. new
  4570. dynveh = GetDynamicVehicleID(vehicleid);
  4571. if(dynveh > 0) //is a dynamic vehicle
  4572. {
  4573. sVehicleInfo[dynveh][v_id] = INVALID_VEHICLE_ID;
  4574. sVehicleInfo[dynveh][v_lock] = 0;
  4575. }
  4576. TrunkInfo[vehicleid][cFoodtray] = 0;
  4577. if(Neon[vehicleid]) { DestroyDynamicObjectEx(Neon[vehicleid]); Neon[vehicleid] = 0; } //destroy neons
  4578. if(Neon2[vehicleid]) { DestroyDynamicObjectEx(Neon2[vehicleid]); Neon2[vehicleid] = 0; }
  4579. if(Neon3[vehicleid]) { DestroyDynamicObjectEx(Neon3[vehicleid]); Neon3[vehicleid] = 0; }
  4580. if(Neon4[vehicleid]) { DestroyDynamicObjectEx(Neon4[vehicleid]); Neon4[vehicleid] = 0; }
  4581. if(TaxiSign[vehicleid]) { DestroyDynamicObjectEx(TaxiSign[vehicleid]); TaxiSign[vehicleid] = 0; } //destroy taxi sign
  4582. Delete3DTextLabel(UnitsCallSign[vehicleid]);
  4583. if(SirenObject[vehicleid]) //destroy siren
  4584. {
  4585. DestroyDynamicObjectEx(SirenObject[vehicleid]);
  4586. Siren[vehicleid] = 0;
  4587. SirenObject[vehicleid] = 0;
  4588. }
  4589. //vehicles.inc
  4590. for( new i; i < GetPlayerPoolSize(); i++ ) {
  4591. for( new s; s < PlayerInfo[i][pMaxCarSlots]; s++ ) {
  4592. if( vehicleid == PlayerVehicles[i][s][pvID] ) {
  4593. destroyPlayerVehicle( i, s );
  4594. return 1;
  4595. }
  4596. }
  4597. }
  4598. VehicleInfo[vehicleid][radioStation] = 0;
  4599. stopVehicleStreamForAll(vehicleid);
  4600. DestroyVehicle(vehicleid); //destroying the vehicle
  4601. return 1;
  4602. }
  4603. #if defined _ALS_DestroyVehicle
  4604. #undef DestroyVehicle
  4605. #else
  4606. #define _ALS_DestroyVehicle
  4607. #endif
  4608. #define DestroyVehicle OnDestroyVehicle
  4609. stock LoadAutoMessages()
  4610. {
  4611. if(dini_Exists("automsg.ini"))
  4612. {
  4613. format(autoMessages[1], 128, "%s", dini_Get("automsg.ini", "motd1"));
  4614. format(autoMessages[2], 128, "%s", dini_Get("automsg.ini", "motd2"));
  4615. format(autoMessages[3], 128, "%s", dini_Get("automsg.ini", "motd3"));
  4616. format(autoMessages[4], 128, "%s", dini_Get("automsg.ini", "motd4"));
  4617. format(autoMessages[5], 128, "%s", dini_Get("automsg.ini", "motd5"));
  4618. messagePos = 1;
  4619. }
  4620. else
  4621. {
  4622. autoMessages[1] = "None";
  4623. autoMessages[2] = "None";
  4624. autoMessages[3] = "None";
  4625. autoMessages[4] = "None";
  4626. autoMessages[5] = "None";
  4627. dini_Create("automsg.ini");
  4628. dini_Set("automsg.ini", "motd1", autoMessages[1]);
  4629. dini_Set("automsg.ini", "motd2", autoMessages[2]);
  4630. dini_Set("automsg.ini", "motd3", autoMessages[3]);
  4631. dini_Set("automsg.ini", "motd4", autoMessages[4]);
  4632. dini_Set("automsg.ini", "motd5", autoMessages[5]);
  4633. messagePos = 1;
  4634. }
  4635. return 1;
  4636. }
  4637. stock showNewbieTipMessage(playerid, number)
  4638. {
  4639. if(!gPlayerLogged[playerid]) return;
  4640. if(!displayedTip[playerid][number])
  4641. {
  4642. displayCenterHUDInfo(playerid, newbieTips[number], 8); //display for 8 seconds
  4643. displayedTip[playerid][number] = 1;
  4644. }
  4645. }
  4646. //==============================================================================
  4647. main()
  4648. {
  4649. print(" ");
  4650. print(" ");
  4651. print("PRP");
  4652. print("______________");
  4653. print(" ");
  4654. }
  4655. //==============================================================================
  4656. SearchingHits(playerid)
  4657. {
  4658. new hits = 0, dialogstr[50000];
  4659. foreach( new i: Player )
  4660. {
  4661. if(IsPlayerConnected(i))
  4662. {
  4663. if(PlayerInfo[i][pHeadValue] > 0)
  4664. {
  4665. if(!(PlayerInfo[i][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0)) {
  4666. format(dialogstr, sizeof(dialogstr), "%s\n{FFFFFF}(ID %d) Name: %s Price: $%s Contracted By: %s (%s)", dialogstr, i, PlayerOOCName(i), AddThousandsSeparators(PlayerInfo[i][pHeadValue]), PlayerInfo[i][pContractBy], GetPlayerFactionName(i));
  4667. hits++;
  4668. }
  4669. }
  4670. }
  4671. }
  4672. if(hits != 0)
  4673. {
  4674. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "{FF0000}Contracts Available", dialogstr, "Close", "");
  4675. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) {
  4676. if(PlayerInfo[playerid][pGroupRank] != 0)
  4677. {
  4678. SendClientMessage(playerid, COLOR_YELLOW, "Use /givemehit to assign a contract to yourself.");
  4679. }
  4680. SendClientMessage(playerid, COLOR_YELLOW, "Ask an R4+ to assign you a hit with /givehit.");
  4681. }
  4682. }
  4683. else return SendClientMessage(playerid, COLOR_GREY, "There are currently no hits available.");
  4684. return 1;
  4685. }
  4686. //==============================================================================
  4687. stock ApplyAnimationEx(playerid, animlib[], animname[], Float:Speed, looping, lockx, locky, lockz, lp, force =0)
  4688. {
  4689. if((pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0) && force == 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  4690. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst inside of a vehicle.");
  4691. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp, 1);
  4692. return 1;
  4693. }
  4694. stock LoopingAnim(playerid, animlib[], animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  4695. {
  4696. if(pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  4697. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst inside of a vehicle.");
  4698. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp, 1);
  4699. displayCenterHUDInfo(playerid, "~r~~k~~PED_SPRINT~ ~w~to stop the animation", 8); //display for 8 seconds
  4700. gPlayerUsingLoopingAnim[playerid] = 1;
  4701. return 1;
  4702. }
  4703. stock LoopingWalk(playerid, lib[], anim[], Float:one, two, three, four, five, six, seven = 0)
  4704. {
  4705. ApplyAnimation(playerid, lib, anim, one, two, three, four, five, six, seven);
  4706. return 1;
  4707. }
  4708. StopLoopingAnim(playerid)
  4709. {
  4710. gPlayerUsingLoopingAnim[playerid] = 0;
  4711. ApplyAnimationEx(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
  4712. }
  4713. //==============================================================================
  4714. stock PreloadAnimLib(playerid, animlib[])
  4715. {
  4716. if(pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  4717. ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
  4718. }
  4719. stock PreloadAnims(playerid) //calgon
  4720. {
  4721. if(!IsPlayerNPC(playerid))
  4722. {
  4723. ApplyAnimation(playerid, "AIRPORT", "null", 0.0, 0, 0, 0, 0, 0);
  4724. ApplyAnimation(playerid, "Attractors", "null", 0.0, 0, 0, 0, 0, 0);
  4725. ApplyAnimation(playerid, "BAR", "null", 0.0, 0, 0, 0, 0, 0);
  4726. ApplyAnimation(playerid, "BASEBALL", "null", 0.0, 0, 0, 0, 0, 0);
  4727. ApplyAnimation(playerid, "BD_FIRE", "null", 0.0, 0, 0, 0, 0, 0);
  4728. ApplyAnimation(playerid, "BEACH", "null", 0.0, 0, 0, 0, 0, 0);
  4729. ApplyAnimation(playerid, "benchpress", "null", 0.0, 0, 0, 0, 0, 0);
  4730. ApplyAnimation(playerid, "BF_injection", "null", 0.0, 0, 0, 0, 0, 0);
  4731. ApplyAnimation(playerid, "BIKED", "null", 0.0, 0, 0, 0, 0, 0);
  4732. ApplyAnimation(playerid, "BIKEH", "null", 0.0, 0, 0, 0, 0, 0);
  4733. ApplyAnimation(playerid, "BIKELEAP", "null", 0.0, 0, 0, 0, 0, 0);
  4734. ApplyAnimation(playerid, "BIKES", "null", 0.0, 0, 0, 0, 0, 0);
  4735. ApplyAnimation(playerid, "BIKEV", "null", 0.0, 0, 0, 0, 0, 0);
  4736. ApplyAnimation(playerid, "BIKE_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
  4737. ApplyAnimation(playerid, "BLOWJOBZ", "null", 0.0, 0, 0, 0, 0, 0);
  4738. ApplyAnimation(playerid, "BMX", "null", 0.0, 0, 0, 0, 0, 0);
  4739. ApplyAnimation(playerid, "BOMBER", "null", 0.0, 0, 0, 0, 0, 0);
  4740. ApplyAnimation(playerid, "BOX", "null", 0.0, 0, 0, 0, 0, 0);
  4741. ApplyAnimation(playerid, "BSKTBALL", "null", 0.0, 0, 0, 0, 0, 0);
  4742. ApplyAnimation(playerid, "BUDDY", "null", 0.0, 0, 0, 0, 0, 0);
  4743. ApplyAnimation(playerid, "BUS", "null", 0.0, 0, 0, 0, 0, 0);
  4744. ApplyAnimation(playerid, "CAMERA", "null", 0.0, 0, 0, 0, 0, 0);
  4745. ApplyAnimation(playerid, "CAR", "null", 0.0, 0, 0, 0, 0, 0);
  4746. ApplyAnimation(playerid, "CARRY", "null", 0.0, 0, 0, 0, 0, 0);
  4747. ApplyAnimation(playerid, "CAR_CHAT", "null", 0.0, 0, 0, 0, 0, 0);
  4748. ApplyAnimation(playerid, "CASINO", "null", 0.0, 0, 0, 0, 0, 0);
  4749. ApplyAnimation(playerid, "CHAINSAW", "null", 0.0, 0, 0, 0, 0, 0);
  4750. ApplyAnimation(playerid, "CHOPPA", "null", 0.0, 0, 0, 0, 0, 0);
  4751. ApplyAnimation(playerid, "CLOTHES", "null", 0.0, 0, 0, 0, 0, 0);
  4752. ApplyAnimation(playerid, "COACH", "null", 0.0, 0, 0, 0, 0, 0);
  4753. ApplyAnimation(playerid, "COLT45", "null", 0.0, 0, 0, 0, 0, 0);
  4754. ApplyAnimation(playerid, "COP_AMBIENT", "null", 0.0, 0, 0, 0, 0, 0);
  4755. ApplyAnimation(playerid, "COP_DVBYZ", "null", 0.0, 0, 0, 0, 0, 0);
  4756. ApplyAnimation(playerid, "CRACK", "null", 0.0, 0, 0, 0, 0, 0);
  4757. ApplyAnimation(playerid, "CRIB", "null", 0.0, 0, 0, 0, 0, 0);
  4758. ApplyAnimation(playerid, "DAM_JUMP", "null", 0.0, 0, 0, 0, 0, 0);
  4759. ApplyAnimation(playerid, "DANCING", "null", 0.0, 0, 0, 0, 0, 0);
  4760. ApplyAnimation(playerid, "DEALER", "null", 0.0, 0, 0, 0, 0, 0);
  4761. ApplyAnimation(playerid, "DILDO", "null", 0.0, 0, 0, 0, 0, 0);
  4762. ApplyAnimation(playerid, "DODGE", "null", 0.0, 0, 0, 0, 0, 0);
  4763. ApplyAnimation(playerid, "DOZER", "null", 0.0, 0, 0, 0, 0, 0);
  4764. ApplyAnimation(playerid, "DRIVEBYS", "null", 0.0, 0, 0, 0, 0, 0);
  4765. ApplyAnimation(playerid, "FAT", "null", 0.0, 0, 0, 0, 0, 0);
  4766. ApplyAnimation(playerid, "FIGHT_B", "null", 0.0, 0, 0, 0, 0, 0);
  4767. ApplyAnimation(playerid, "FIGHT_C", "null", 0.0, 0, 0, 0, 0, 0);
  4768. ApplyAnimation(playerid, "FIGHT_D", "null", 0.0, 0, 0, 0, 0, 0);
  4769. ApplyAnimation(playerid, "FIGHT_E", "null", 0.0, 0, 0, 0, 0, 0);
  4770. ApplyAnimation(playerid, "FINALE", "null", 0.0, 0, 0, 0, 0, 0);
  4771. ApplyAnimation(playerid, "FINALE2", "null", 0.0, 0, 0, 0, 0, 0);
  4772. ApplyAnimation(playerid, "FLAME", "null", 0.0, 0, 0, 0, 0, 0);
  4773. ApplyAnimation(playerid, "Flowers", "null", 0.0, 0, 0, 0, 0, 0);
  4774. ApplyAnimation(playerid, "FOOD", "null", 0.0, 0, 0, 0, 0, 0);
  4775. ApplyAnimation(playerid, "Freeweights", "null", 0.0, 0, 0, 0, 0, 0);
  4776. ApplyAnimation(playerid, "GANGS", "null", 0.0, 0, 0, 0, 0, 0);
  4777. ApplyAnimation(playerid, "GHANDS", "null", 0.0, 0, 0, 0, 0, 0);
  4778. ApplyAnimation(playerid, "GHETTO_DB", "null", 0.0, 0, 0, 0, 0, 0);
  4779. ApplyAnimation(playerid, "goggles", "null", 0.0, 0, 0, 0, 0, 0);
  4780. ApplyAnimation(playerid, "GRAFFITI", "null", 0.0, 0, 0, 0, 0, 0);
  4781. ApplyAnimation(playerid, "GRAVEYARD", "null", 0.0, 0, 0, 0, 0, 0);
  4782. ApplyAnimation(playerid, "GRENADE", "null", 0.0, 0, 0, 0, 0, 0);
  4783. ApplyAnimation(playerid, "GYMNASIUM", "null", 0.0, 0, 0, 0, 0, 0);
  4784. ApplyAnimation(playerid, "HAIRCUTS", "null", 0.0, 0, 0, 0, 0, 0);
  4785. ApplyAnimation(playerid, "HEIST9", "null", 0.0, 0, 0, 0, 0, 0);
  4786. ApplyAnimation(playerid, "INT_HOUSE", "null", 0.0, 0, 0, 0, 0, 0);
  4787. ApplyAnimation(playerid, "INT_OFFICE", "null", 0.0, 0, 0, 0, 0, 0);
  4788. ApplyAnimation(playerid, "INT_SHOP", "null", 0.0, 0, 0, 0, 0, 0);
  4789. ApplyAnimation(playerid, "JST_BUISNESS", "null", 0.0, 0, 0, 0, 0, 0);
  4790. ApplyAnimation(playerid, "KART", "null", 0.0, 0, 0, 0, 0, 0);
  4791. ApplyAnimation(playerid, "KISSING", "null", 0.0, 0, 0, 0, 0, 0);
  4792. ApplyAnimation(playerid, "KNIFE", "null", 0.0, 0, 0, 0, 0, 0);
  4793. ApplyAnimation(playerid, "LOWRIDER", "null", 0.0, 0, 0, 0, 0, 0);
  4794. ApplyAnimation(playerid, "MD_CHASE", "null", 0.0, 0, 0, 0, 0, 0);
  4795. ApplyAnimation(playerid, "MD_END", "null", 0.0, 0, 0, 0, 0, 0);
  4796. ApplyAnimation(playerid, "MEDIC", "null", 0.0, 0, 0, 0, 0, 0);
  4797. ApplyAnimation(playerid, "MISC", "null", 0.0, 0, 0, 0, 0, 0);
  4798. ApplyAnimation(playerid, "MTB", "null", 0.0, 0, 0, 0, 0, 0);
  4799. ApplyAnimation(playerid, "MUSCULAR", "null", 0.0, 0, 0, 0, 0, 0);
  4800. ApplyAnimation(playerid, "NEVADA", "null", 0.0, 0, 0, 0, 0, 0);
  4801. ApplyAnimation(playerid, "ON_LOOKERS", "null", 0.0, 0, 0, 0, 0, 0);
  4802. ApplyAnimation(playerid, "OTB", "null", 0.0, 0, 0, 0, 0, 0);
  4803. ApplyAnimation(playerid, "PARACHUTE", "null", 0.0, 0, 0, 0, 0, 0);
  4804. ApplyAnimation(playerid, "PARK", "null", 0.0, 0, 0, 0, 0, 0);
  4805. ApplyAnimation(playerid, "PAULNMAC", "null", 0.0, 0, 0, 0, 0, 0);
  4806. ApplyAnimation(playerid, "ped", "null", 0.0, 0, 0, 0, 0, 0);
  4807. ApplyAnimation(playerid, "PLAYER_DVBYS", "null", 0.0, 0, 0, 0, 0, 0);
  4808. ApplyAnimation(playerid, "PLAYIDLES", "null", 0.0, 0, 0, 0, 0, 0);
  4809. ApplyAnimation(playerid, "POLICE", "null", 0.0, 0, 0, 0, 0, 0);
  4810. ApplyAnimation(playerid, "POOL", "null", 0.0, 0, 0, 0, 0, 0);
  4811. ApplyAnimation(playerid, "POOR", "null", 0.0, 0, 0, 0, 0, 0);
  4812. ApplyAnimation(playerid, "PYTHON", "null", 0.0, 0, 0, 0, 0, 0);
  4813. ApplyAnimation(playerid, "QUAD", "null", 0.0, 0, 0, 0, 0, 0);
  4814. ApplyAnimation(playerid, "QUAD_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
  4815. ApplyAnimation(playerid, "RAPPING", "null", 0.0, 0, 0, 0, 0, 0);
  4816. ApplyAnimation(playerid, "RIFLE", "null", 0.0, 0, 0, 0, 0, 0);
  4817. ApplyAnimation(playerid, "RIOT", "null", 0.0, 0, 0, 0, 0, 0);
  4818. ApplyAnimation(playerid, "ROB_BANK", "null", 0.0, 0, 0, 0, 0, 0);
  4819. ApplyAnimation(playerid, "RUSTLER", "null", 0.0, 0, 0, 0, 0, 0);
  4820. ApplyAnimation(playerid, "RYDER", "null", 0.0, 0, 0, 0, 0, 0);
  4821. ApplyAnimation(playerid, "SCRATCHING", "null", 0.0, 0, 0, 0, 0, 0);
  4822. ApplyAnimation(playerid, "SHAMAL", "null", 0.0, 0, 0, 0, 0, 0);
  4823. ApplyAnimation(playerid, "SHOP", "null", 0.0, 0, 0, 0, 0, 0);
  4824. ApplyAnimation(playerid, "SHOTGUN", "null", 0.0, 0, 0, 0, 0, 0);
  4825. ApplyAnimation(playerid, "SILENCED", "null", 0.0, 0, 0, 0, 0, 0);
  4826. ApplyAnimation(playerid, "SKATE", "null", 0.0, 0, 0, 0, 0, 0);
  4827. ApplyAnimation(playerid, "SMOKING", "null", 0.0, 0, 0, 0, 0, 0);
  4828. ApplyAnimation(playerid, "SNIPER", "null", 0.0, 0, 0, 0, 0, 0);
  4829. ApplyAnimation(playerid, "SPRAYCAN", "null", 0.0, 0, 0, 0, 0, 0);
  4830. ApplyAnimation(playerid, "STRIP", "null", 0.0, 0, 0, 0, 0, 0);
  4831. ApplyAnimation(playerid, "SUNBATHE", "null", 0.0, 0, 0, 0, 0, 0);
  4832. ApplyAnimation(playerid, "SWAT", "null", 0.0, 0, 0, 0, 0, 0);
  4833. ApplyAnimation(playerid, "SWEET", "null", 0.0, 0, 0, 0, 0, 0);
  4834. ApplyAnimation(playerid, "SWIM", "null", 0.0, 0, 0, 0, 0, 0);
  4835. ApplyAnimation(playerid, "SWORD", "null", 0.0, 0, 0, 0, 0, 0);
  4836. ApplyAnimation(playerid, "TANK", "null", 0.0, 0, 0, 0, 0, 0);
  4837. ApplyAnimation(playerid, "TATTOOS", "null", 0.0, 0, 0, 0, 0, 0);
  4838. ApplyAnimation(playerid, "TEC", "null", 0.0, 0, 0, 0, 0, 0);
  4839. ApplyAnimation(playerid, "TRAIN", "null", 0.0, 0, 0, 0, 0, 0);
  4840. ApplyAnimation(playerid, "TRUCK", "null", 0.0, 0, 0, 0, 0, 0);
  4841. ApplyAnimation(playerid, "UZI", "null", 0.0, 0, 0, 0, 0, 0);
  4842. ApplyAnimation(playerid, "VAN", "null", 0.0, 0, 0, 0, 0, 0);
  4843. ApplyAnimation(playerid, "VENDING", "null", 0.0, 0, 0, 0, 0, 0);
  4844. ApplyAnimation(playerid, "VORTEX", "null", 0.0, 0, 0, 0, 0, 0);
  4845. ApplyAnimation(playerid, "WAYFARER", "null", 0.0, 0, 0, 0, 0, 0);
  4846. ApplyAnimation(playerid, "WEAPONS", "null", 0.0, 0, 0, 0, 0, 0);
  4847. ApplyAnimation(playerid, "WUZI", "null", 0.0, 0, 0, 0, 0, 0);
  4848. }
  4849. return 1;
  4850. }
  4851. //==============================================================================
  4852. stock IsKeyJustDown(key, newkeys, oldkeys)
  4853. {
  4854. if((newkeys & key) && !(oldkeys & key))
  4855. {
  4856. return 1;
  4857. }
  4858. return 0;
  4859. }
  4860. //==============================================================================
  4861. OnePlayAnim(playerid, animlib[], animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  4862. {
  4863. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst inside of a vehicle.");
  4864. if(pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  4865. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  4866. return 1;
  4867. }
  4868. //==============================================================================
  4869. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  4870. {
  4871. if(source == CLICK_SOURCE_SCOREBOARD)
  4872. {
  4873. if(PlayerInfo[playerid][pAdmin] >= 2)
  4874. {
  4875. new str[1024];
  4876. if(playerid == clickedplayerid) return unspec(playerid);
  4877. if(!gPlayerLogged[clickedplayerid]) return SendClientMessage(playerid, COLOR_GRAD2, "That player hasn't spawned yet.");
  4878. if(GetPlayerState(clickedplayerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GRAD2, "That player is spectating someone.");
  4879. if(Spectated[playerid]) //if i'm being spectated
  4880. {
  4881. foreach( new i: Player )
  4882. {
  4883. if(SpectatingID[i] == playerid)
  4884. {
  4885. if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) //double check they are spectating
  4886. {
  4887. unspec(i);
  4888. format(str, sizeof(str), "AdmCMD: %s is no longer spectating.", PlayerOOCName(playerid));
  4889. SendSpectatorsMessage(7378, COLOR_YELLOW, str);
  4890. SendSpectatorsMessage(7619, COLOR_YELLOW, str);
  4891. }
  4892. }
  4893. }
  4894. }
  4895. spectate(playerid, clickedplayerid);
  4896. format(str, sizeof(str), "AdmCMD: %s is spectating %s.", PlayerOOCName(playerid), PlayerOOCName(clickedplayerid));
  4897. SendSpectatorsMessage(7378, COLOR_YELLOW, str);
  4898. SendSpectatorsMessage(7619, COLOR_YELLOW, str);
  4899. return 1;
  4900. }
  4901. return 1;
  4902. }
  4903. return 1;
  4904. }
  4905. //==============================================================================
  4906. //=============================[MESSAGES]=======================================
  4907. SendEventHelperMessage(color, string2[])
  4908. {
  4909. foreach( new i: Player )
  4910. {
  4911. if(IsPlayerConnected(i))
  4912. {
  4913. if(PlayerInfo[i][pEventModd] == 1 || PlayerEventMod[i] == 1)
  4914. {
  4915. SendClientMessage(i, color, string2);
  4916. }
  4917. }
  4918. }
  4919. }
  4920. SendHelperMessage(color, string2[], type) // made type. 0 - send only to helpers, 1 - to both admins and helpers. this is so admins can see newbie warns, mutes and such but still not see /hc (since they both use SendHelperMessage).
  4921. {
  4922. foreach( new i: Player )
  4923. {
  4924. if(IsPlayerConnected(i))
  4925. {
  4926. if(type == 1)
  4927. {
  4928. if(PlayerInfo[i][pHelper] >= 1 || PlayerInfo[i][pAdmin] >= 2)
  4929. {
  4930. if(!gHelperCh[i] || PlayerInfo[i][pAdmin] >= 2)
  4931. {
  4932. SendClientMessage(i, color, string2);
  4933. }
  4934. }
  4935. }
  4936. else
  4937. {
  4938. if(PlayerInfo[i][pHelper] >= 1)
  4939. {
  4940. if(!gHelperCh[i])
  4941. {
  4942. SendClientMessage(i, color, string2);
  4943. }
  4944. }
  4945. }
  4946. }
  4947. }
  4948. }
  4949. SendDeveloperMessage(color, string2[])
  4950. {
  4951. foreach( new i: Player )
  4952. {
  4953. if(PlayerInfo[i][pDev] >= 1 && toggedDevChat[i] != true)
  4954. {
  4955. SendClientMessage(i, color, string2);
  4956. }
  4957. }
  4958. }
  4959. SendMapperMessage(color, string2[])
  4960. {
  4961. foreach( new i: Player )
  4962. {
  4963. if(IsPlayerConnected(i))
  4964. {
  4965. if(PlayerInfo[i][pMapper] >= 1 && mcTog[i] == false)
  4966. {
  4967. SendClientMessage(i, color, string2);
  4968. }
  4969. }
  4970. }
  4971. }
  4972. SendTesterMessage(color, string2[])
  4973. {
  4974. foreach( new i: Player )
  4975. {
  4976. if(IsPlayerConnected(i))
  4977. {
  4978. if(PlayerInfo[i][pTester] >= 1)
  4979. {
  4980. if(!gTesterCh[i])
  4981. {
  4982. SendClientMessage(i, color, string2);
  4983. }
  4984. }
  4985. }
  4986. }
  4987. }
  4988. new FamedChatTog[MAX_PLAYERS] = 0;
  4989. SendFamedMessage(color, string2[])
  4990. {
  4991. foreach( new i: Player )
  4992. {
  4993. if(IsPlayerConnected(i))
  4994. {
  4995. if(PlayerInfo[i][pFamed] >= 1)
  4996. {
  4997. if(FamedChatTog[i] == 0)
  4998. {
  4999. SendClientMessage(i, color, string2);
  5000. }
  5001. }
  5002. }
  5003. }
  5004. }
  5005. new OldSchoolChatTog[MAX_PLAYERS] = {0, ...};
  5006. SendOldSchoolMessage(color, string2[])
  5007. {
  5008. foreach( new i: Player )
  5009. {
  5010. if(IsPlayerConnected(i))
  5011. {
  5012. if(PlayerInfo[i][pOldSchool] >= 1)
  5013. {
  5014. if(OldSchoolChatTog[i] == 0)
  5015. {
  5016. SendClientMessage(i, color, string2);
  5017. }
  5018. }
  5019. }
  5020. }
  5021. }
  5022. SendVIPMessage(color, string2[])
  5023. {
  5024. foreach( new i: Player )
  5025. {
  5026. if(IsPlayerConnected(i))
  5027. {
  5028. if(PlayerInfo[i][pDonateRank] >= 1)
  5029. {
  5030. if(VIPChatTog[i] == 0)
  5031. {
  5032. SendClientMessage(i, color, string2);
  5033. }
  5034. }
  5035. }
  5036. }
  5037. }
  5038. //==============================================================================
  5039. //==============================================================================
  5040. StartCar(vehicleid)
  5041. {
  5042. new engine, lights, alarm, doors, bonnet, boot, objective;
  5043. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  5044. SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
  5045. return 1;
  5046. }
  5047. //==============================================================================
  5048. // This timer is only used for vehicles created with /veh which are temporary vehicles //
  5049. Timer:KillCar(vehicleid)
  5050. {
  5051. if(!IsValidVehicle(vehicleid)) {gDestroyVehicle[vehicleid] = 0; return 1;}
  5052. engineOn[vehicleid] = 0;
  5053. windowsDown[vehicleid] = false;
  5054. SetVehicleParamsCarWindows(vehicleid, 1, 1, 1, 1);
  5055. playerDisabledEngine[vehicleid] = 0;
  5056. DestroyVehicle(vehicleid); // destroy vehicle
  5057. gDestroyVehicle[vehicleid] = 0;
  5058. return 1;
  5059. }
  5060. //==============================================================================
  5061. public CheckHacks2(playerid)
  5062. {
  5063. TogglePlayerControllable(playerid, true);
  5064. GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
  5065. PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
  5066. PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
  5067. GetPlayerHealth(playerid, OldHealth[playerid]);
  5068. GetPlayerArmour(playerid, OldArmour[playerid]);
  5069. SetPlayerPos(playerid, 2632.5059, 2832.3647, 127.5781);
  5070. SetPlayerInterior(playerid, 0);
  5071. SetPlayerVirtualWorld(playerid, playerid +10);
  5072. SetPlayerArmour(playerid, 0);
  5073. SetPlayerHealth(playerid, 100);
  5074. SetPlayerArmour(playerid, 0);
  5075. CreateExplosion(2632.5059, 2832.3647, 128.5781, 6, 10.0);
  5076. //CreateExplosion(280.4137,-134.6537,1004.0625, 6, 10.0);
  5077. return 1;
  5078. }
  5079. //==============================================================================
  5080. Timer:DoneCheckHacks2(playerid, hacker)
  5081. {
  5082. new str[128];
  5083. if(PlayerCuffed[hacker] != 0 || PlayerTied[hacker] != 0 || PlayerFrozen[hacker] != 0)
  5084. {
  5085. TogglePlayerControllable(hacker, 0);
  5086. }
  5087. new Float:newhealth, Float:newarmor;
  5088. GetPlayerHealth(hacker, newhealth);
  5089. GetPlayerArmour(hacker, newarmor);
  5090. SetPlayerPos(hacker, PlayerInfo[hacker][pSPos_x], PlayerInfo[hacker][pSPos_y], PlayerInfo[hacker][pSPos_z]);
  5091. SetPlayerInterior(hacker, PlayerInfo[hacker][pInt]);
  5092. SetPlayerVirtualWorld(hacker, PlayerInfo[hacker][pVirtualWorld]);
  5093. SetPlayerHealth(hacker, OldHealth[hacker]);
  5094. SetPlayerArmour(hacker, OldArmour[hacker]);
  5095. new ping = GetPlayerPing(hacker);
  5096. if(newhealth <= 35 && newarmor == 0)
  5097. {
  5098. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s checked %s for health hacks, results: {00FF00}NOT A HACKER{FFFFFF}, Ping: %d.", PlayerOOCName(playerid), PlayerOOCName(hacker), ping);
  5099. }
  5100. else
  5101. {
  5102. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s checked %s for health hacks, results: {F00000}HACKER{FFFFFF}, Ping: %d.", PlayerOOCName(playerid), PlayerOOCName(hacker), ping);
  5103. }
  5104. if(PlayerPaused[hacker] == 1) format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s checked %s for health hacks, results: {FFFF00}PAUSED{FFFFFF}.", PlayerOOCName(playerid), PlayerOOCName(hacker));
  5105. ABroadCast(COLOR_WHITE, str, 1);
  5106. return 1;
  5107. }
  5108. //==============================================================================
  5109. Encrypt(string2[])
  5110. {
  5111. for(new x =0; x < strlen(string2); x++)
  5112. {
  5113. string2[x] += (3 ^x) * (x % 15);
  5114. if(string2[x] > (0xff))
  5115. {
  5116. string2[x] -= 256;
  5117. }
  5118. }
  5119. return 1;
  5120. }
  5121. public OnPlayerChangeWeapon(playerid, oldweapon, newweapon)
  5122. {
  5123. if(hasFlashlight[playerid])
  5124. {
  5125. if(newweapon == 24 || newweapon == 31 || newweapon == WEAPON_SHOTGUN)
  5126. {
  5127. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT1, 18656, 6, 0.25, -0.0155, 0.16, 86.5, -185, 86.5, 0.03, 0.03, 0.03);
  5128. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT2, 18641, 6, 0.2, 0.01, 0.16, 90, -95, 90, 1, 1, 1);
  5129. }
  5130. else
  5131. {
  5132. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT1, 18656, 5, 0.1, 0.038, -0.1, -90, 180, 0, 0.03, 0.03, 0.03);
  5133. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT2, 18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
  5134. }
  5135. }
  5136. if(PlayerBoxing[playerid] > 0)// in boxing ring prevent guns
  5137. {
  5138. SetPlayerArmedWeapon(playerid, 0);
  5139. }
  5140. if(playerHoldingTazer[playerid] == 1)
  5141. {
  5142. if(!IsPlayerInAnyVehicle(playerid))
  5143. {
  5144. SetPlayerArmedWeapon(playerid, 23);
  5145. }
  5146. else
  5147. {
  5148. SetPlayerArmedWeapon(playerid, 0);
  5149. }
  5150. }
  5151. if(playerHoldingTazer[playerid] == 2)
  5152. {
  5153. SetPlayerArmedWeapon(playerid, 0);
  5154. }
  5155. if(HasARapidResKit[playerid] == 1 && RapidResKitActive[playerid] == 1)
  5156. {
  5157. SetPlayerArmedWeapon(playerid, 0);
  5158. }
  5159. if(PlayerHasRod[playerid] == 1)
  5160. {
  5161. SetPlayerArmedWeapon(playerid, 0);
  5162. }
  5163. if(newweapon == PlayerInfo[playerid][pGun12])
  5164. {
  5165. if(BombID[playerid] != -1)
  5166. {
  5167. HoldingDetonator[playerid] = 1;
  5168. }
  5169. }
  5170. else
  5171. {
  5172. HoldingDetonator[playerid] = 0;
  5173. }
  5174. if(PlayerInfo[playerid][pAdmin] < 2)
  5175. {
  5176. new WeaponName[65];
  5177. if(newweapon > 0)
  5178. {
  5179. if(
  5180. (newweapon == 4 && PlayerInfo[playerid][pGroup] != GROUP_HITMAN) || //knife
  5181. newweapon == 16 || //grenades
  5182. newweapon == 18 || //molotovs
  5183. (newweapon == 17 && !IsACop(playerid)) || //teargas
  5184. newweapon == 26 || //sawn off
  5185. newweapon == 28 || //uzi
  5186. newweapon == 32 || //tec9
  5187. newweapon == 35 || //rpg
  5188. newweapon == 36 || //heat seeker
  5189. newweapon == 37 || //flame thrower
  5190. newweapon == 38 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 425 ||//minigun
  5191. newweapon == 39 || //satchels
  5192. (newweapon == 40 && PlayerInfo[playerid][pGroup] != GROUP_HITMAN) || //detonators
  5193. newweapon == 44 || //nv gogles
  5194. newweapon == 45) //hs goggles
  5195. {
  5196. if(HaveWeapon(playerid, newweapon) != newweapon && HaveAdminWeapon(playerid, newweapon) != newweapon)
  5197. {
  5198. if(IsPlayerConnected(playerid))
  5199. {
  5200. new str[128];
  5201. if(PlayerInfo[playerid][pBand] == 3) return 1; // Avoid spam, should already be banned.
  5202. GetWeaponName(newweapon, WeaponName, 64);
  5203. anticheatbans ++;
  5204. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected. (%d hackers banned)", PlayerOOCName(playerid), WeaponName, anticheatbans);
  5205. SendClientMessageToAll(COLOR_WHITE, str);
  5206. PlayerInfo[playerid][pBand] = 3;
  5207. BanLog(str);
  5208. format(str, sizeof(str), "Ban Reason: Hacked %s detected - Banned by: ANTICHEAT", WeaponName);
  5209. SendClientMessage(playerid, COLOR_GREY, str);
  5210. strmid(PlayerInfo[playerid][pBanReason], str, 0, strlen(str));
  5211. new ip[16];
  5212. GetPlayerIp(playerid, ip, sizeof(ip));
  5213. gpci(playerid,playerserial,sizeof(playerserial));
  5214. BanExx(playerid);
  5215. if(NextBan == 1) {
  5216. format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(playerid));
  5217. format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
  5218. format(Ban1ip, sizeof(Ban1ip), "%s", ip);
  5219. NextBan = 2;
  5220. return 1;
  5221. }
  5222. if(NextBan == 2) {
  5223. format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(playerid));
  5224. format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
  5225. format(Ban2ip, sizeof(Ban2ip), "%s", ip);
  5226. NextBan = 3;
  5227. return 1;
  5228. }
  5229. if(NextBan == 3) {
  5230. format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(playerid));
  5231. format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
  5232. format(Ban3ip, sizeof(Ban3ip), "%s", ip);
  5233. NextBan = 4;
  5234. return 1;
  5235. }
  5236. if(NextBan == 4) {
  5237. format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(playerid));
  5238. format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
  5239. format(Ban4ip, sizeof(Ban4ip), "%s", ip);
  5240. NextBan = 5;
  5241. return 1;
  5242. }
  5243. if(NextBan == 5) {
  5244. format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(playerid));
  5245. format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
  5246. format(Ban5ip, sizeof(Ban5ip), "%s", ip);
  5247. NextBan = 1;
  5248. return 1;
  5249. }
  5250. return 1;
  5251. }
  5252. }
  5253. }
  5254. }
  5255. if(newweapon > 0 && newweapon != 46)
  5256. {
  5257. if(HaveWeapon(playerid, newweapon) != newweapon && HaveAdminWeapon(playerid, newweapon) != newweapon)
  5258. {
  5259. if(IsPlayerConnected(playerid))
  5260. {
  5261. if(PlayerInfo[playerid][pConnectTime] < 4)
  5262. {
  5263. if(PlayerInfo[playerid][pBand] == 3) return 1; // Avoid spam, should already be banned.
  5264. GetWeaponName(newweapon, WeaponName, 64);
  5265. anticheatbans ++;
  5266. new str[128];
  5267. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected. (%d hackers banned)", PlayerOOCName(playerid), WeaponName, anticheatbans);
  5268. SendClientMessageToAll(COLOR_WHITE, str);
  5269. PlayerInfo[playerid][pBand] = 3;
  5270. BanLog(str);
  5271. format(str, sizeof(str), "Ban Reason: Hacked %s detected - Banned by: ANTICHEAT", WeaponName);
  5272. strmid(PlayerInfo[playerid][pBanReason], str, 0, strlen(str));
  5273. BanExx(playerid);
  5274. new ip[16];
  5275. GetPlayerIp(playerid, ip, sizeof(ip));
  5276. gpci(playerid,playerserial,sizeof(playerserial));
  5277. if(NextBan == 1) {
  5278. format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(playerid));
  5279. format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
  5280. format(Ban1ip, sizeof(Ban1ip), "%s", ip);
  5281. NextBan = 2;
  5282. return 1;
  5283. }
  5284. if(NextBan == 2) {
  5285. format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(playerid));
  5286. format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
  5287. format(Ban2ip, sizeof(Ban2ip), "%s", ip);
  5288. NextBan = 3;
  5289. return 1;
  5290. }
  5291. if(NextBan == 3) {
  5292. format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(playerid));
  5293. format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
  5294. format(Ban3ip, sizeof(Ban3ip), "%s", ip);
  5295. NextBan = 4;
  5296. return 1;
  5297. }
  5298. if(NextBan == 4) {
  5299. format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(playerid));
  5300. format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
  5301. format(Ban4ip, sizeof(Ban4ip), "%s", ip);
  5302. NextBan = 5;
  5303. return 1;
  5304. }
  5305. if(NextBan == 5) {
  5306. format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(playerid));
  5307. format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
  5308. format(Ban5ip, sizeof(Ban5ip), "%s", ip);
  5309. NextBan = 1;
  5310. return 1;
  5311. }
  5312. }
  5313. GetWeaponName(newweapon, WeaponName, 64);
  5314. anticheatwarns ++;
  5315. new str[128];
  5316. format(str, sizeof(str), "{FF6347}Hack: %s (%d) has a desynced or hacked %s.", PlayerOOCName(playerid), playerid, WeaponName);
  5317. UpdateWarnings(str);
  5318. }
  5319. }
  5320. }
  5321. }
  5322. return 1;
  5323. }
  5324. //create HUD
  5325. stock createCenterHUDTextDraw(playerid)
  5326. {
  5327. centerHUDInfo[playerid] = TextDrawCreate(319.000000, 380.000000, "");
  5328. TextDrawAlignment(centerHUDInfo[playerid], 2);
  5329. TextDrawBackgroundColor(centerHUDInfo[playerid], 255);
  5330. TextDrawFont(centerHUDInfo[playerid], 1);
  5331. TextDrawLetterSize(centerHUDInfo[playerid], 0.320000, 1.500000);
  5332. TextDrawColor(centerHUDInfo[playerid], -1);
  5333. TextDrawSetOutline(centerHUDInfo[playerid], 0);
  5334. TextDrawSetProportional(centerHUDInfo[playerid], 1);
  5335. TextDrawSetShadow(centerHUDInfo[playerid], 1);
  5336. }
  5337. //display HUD
  5338. stock displayCenterHUDInfo(playerid, string2[], duration)
  5339. {
  5340. //SendClientMessageToAll(0xFFFFFFAA, "displayCenterHUDInfo");
  5341. if(displayingText[playerid])
  5342. {
  5343. //printf("hideCenterHUDTimerID %d for ID: %d", hideCenterHUDTimerID[playerid], playerid);
  5344. KillTimer(hideCenterHUDTimerID[playerid]);
  5345. }
  5346. //printf("displayCenterHUDInfo for ID: %d", playerid);
  5347. TextDrawSetString(centerHUDInfo[playerid], string2);
  5348. TextDrawShowForPlayer(playerid, centerHUDInfo[playerid]);
  5349. hideCenterHUDTimerID[playerid] = SetTimerEx("Timer_hideCenterHUDInfo", duration *1000, 0, "i", playerid);
  5350. displayingText[playerid] = 1;
  5351. }
  5352. //hide HUD
  5353. Timer:hideCenterHUDInfo(playerid)
  5354. {
  5355. //printf("hideCenterHUDInfo for ID: %d", playerid);
  5356. TextDrawHideForPlayer(playerid, centerHUDInfo[playerid]);
  5357. displayingText[playerid] = 0;
  5358. //SendClientMessageToAll(0xFFFFFFAA, "hideCenterHUDInfo");
  5359. }
  5360. //destroy HUD
  5361. stock destroyCenterHUDInfo(playerid)
  5362. {
  5363. //printf("destroyCenterHUDInfo for ID: %d", playerid);
  5364. TextDrawDestroy(centerHUDInfo[playerid]);
  5365. }
  5366. //food crap
  5367. stock givePlayerFoodTray(playerid, type)
  5368. {
  5369. if(type == 1) //pizza box
  5370. {
  5371. SetPlayerAttachedObject(playerid, INDEX_8, 2814, 6, 0.05, -0.04, -0.20, 250, 0, 0, 1.0, 1.0, 1.0); //index 2, bone 6 (right hand)
  5372. }
  5373. else if(type == 2) //clucknbell tray
  5374. {
  5375. SetPlayerAttachedObject(playerid, INDEX_8, 2217, 6, 0.109999, -0.029999, -0.439999, 264.000000, -36.000000, 153.000000, 1.0, 1.0, 1.0); //index 2, bone 6 (right hand)
  5376. }
  5377. else if(type == 3) //burgershot tray
  5378. {
  5379. SetPlayerAttachedObject(playerid, INDEX_8, 2212, 6, 0.109999, -0.029999, -0.439999, 264.000000, -36.000000, 153.000000, 1.0, 1.0, 1.0); //index 2, bone 6 (right hand)
  5380. }
  5381. else if(type == 4) //donut tray
  5382. {
  5383. SetPlayerAttachedObject(playerid, INDEX_8, 2222, 6, 0.039999, 0.069999, -0.210000, -111.000000, -6.000000, -12.000000, 1.0, 1.0, 1.0); //index 2, bone 6 (right hand)
  5384. }
  5385. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  5386. SetPlayerArmedWeapon(playerid, 0); // disables weapons
  5387. }
  5388. stock getJobLevelReq(job) // get Job Level Requirements
  5389. {
  5390. jlevel1 = 0;
  5391. if(job == JOBID_DETECTIVE || job == JOBID_LAWYER || job == JOBID_DRUGDEAL ||
  5392. job == JOBID_CARJACK || job == JOBID_MECHANIC || job == JOBID_ARMS || job == JOBID_BOXER)
  5393. {
  5394. jlevel2 = 50;
  5395. jlevel3 = 100;
  5396. jlevel4 = 200;
  5397. jlevel5 = 400;
  5398. }
  5399. if(job == JOBID_SMUGGLER)
  5400. {
  5401. jlevel2 = 20;
  5402. jlevel3 = 40;
  5403. jlevel4 = 60;
  5404. jlevel5 = 80;
  5405. }
  5406. if(job == JOBID_THIEF || job == JOBID_FISHING)
  5407. {
  5408. jlevel2 = 50;
  5409. jlevel3 = 250;
  5410. jlevel4 = 500;
  5411. jlevel5 = 1000;
  5412. }
  5413. }
  5414. stock convertToLevel(job, jobskill)
  5415. {
  5416. new lvl;
  5417. getJobLevelReq(job);
  5418. if(jobskill >= jlevel1 && jobskill < jlevel2)
  5419. {
  5420. lvl = 1;
  5421. }
  5422. else if(jobskill >= jlevel2 && jobskill < jlevel3)
  5423. {
  5424. lvl = 2;
  5425. }
  5426. else if(jobskill >= jlevel3 && jobskill < jlevel4)
  5427. {
  5428. lvl = 3;
  5429. }
  5430. else if(jobskill >= jlevel4 && jobskill < jlevel5)
  5431. {
  5432. lvl = 4;
  5433. }
  5434. else if(jobskill >= jlevel5)
  5435. {
  5436. lvl = 5;
  5437. }
  5438. return lvl;
  5439. }
  5440. stock lostFoodTray(playerid)
  5441. {
  5442. if(hasFoodTray[playerid])
  5443. {
  5444. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8)) RemovePlayerAttachedObject(playerid, INDEX_8); //if carrying food tray, remove the object
  5445. SetPlayerSpecialAction(playerid, 0);
  5446. hasFoodTray[playerid] = 0;
  5447. }
  5448. }
  5449. stock throwAwayFoodTray(playerid)
  5450. {
  5451. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8)) RemovePlayerAttachedObject(playerid, INDEX_8); //if carrying food tray, remove the object
  5452. SetPlayerSpecialAction(playerid, 0);
  5453. ApplyAnimationEx(playerid, "CARRY", "putdwn05", 3.0, 0, 0, 0, 0, 0, 0);
  5454. hasFoodTray[playerid] = 0;
  5455. }
  5456. stock removePlayerFoodTray(playerid)
  5457. {
  5458. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8)) RemovePlayerAttachedObject(playerid, INDEX_8); //if carrying food tray, remove the object
  5459. SetPlayerSpecialAction(playerid, 0);
  5460. ApplyAnimationEx(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0, 0);
  5461. //place on ground
  5462. if(foodTrays < MAX_TRAYS)
  5463. {
  5464. placeFoodTrayOnGround(playerid, hasFoodTray[playerid]);
  5465. }
  5466. hasFoodTray[playerid] = 0;
  5467. }
  5468. stock placeFoodTrayOnGround(playerid, type)
  5469. {
  5470. //spawn the object on the ground
  5471. new Float: fX, Float: fY, Float: fZ, Float: fA;
  5472. GetXYInFrontOfPlayer(playerid, fX, fY, fZ, fA, 1.0);
  5473. if(type == 1)
  5474. { //pizza box
  5475. foodTray[foodTrays][0] = CreateDynamicObject(2860, fX, fY, fZ -1.0, 0.0, 0.0, fA); //object id
  5476. foodTray[foodTrays][1] = TRAY_TYPE_PIZZA; //set tray type to pizza
  5477. foodTray[foodTrays][2] = PIZZA_AMOUNT; //set the amount of food on this tray to pizza amount
  5478. foodTray[foodTrays][3] = TRAY_RESPAWN_TIME;
  5479. foodTray[foodTrays][4] = TRAY_NO_POISONED;
  5480. } else if(type == 2)
  5481. { //clucknbell tray
  5482. foodTray[foodTrays][0] = CreateDynamicObject(2217, fX, fY, fZ -0.93, -27.000000, 24.000000, fA +75.0); //fA -118
  5483. foodTray[foodTrays][1] = TRAY_TYPE_CHICKEN;
  5484. foodTray[foodTrays][2] = CHICKEN_AMOUNT;
  5485. foodTray[foodTrays][3] = TRAY_RESPAWN_TIME;
  5486. foodTray[foodTrays][4] = TRAY_NO_POISONED;
  5487. } else if(type == 3)
  5488. { //burgershot tray
  5489. foodTray[foodTrays][0] = CreateDynamicObject(2212, fX, fY, fZ -0.93, -27.000000, 24.000000, fA +75.0); //fA -118
  5490. foodTray[foodTrays][1] = TRAY_TYPE_BURGER;
  5491. foodTray[foodTrays][2] = BURGER_AMOUNT;
  5492. foodTray[foodTrays][3] = TRAY_RESPAWN_TIME;
  5493. foodTray[foodTrays][4] = TRAY_NO_POISONED;
  5494. } else if(type == 4)
  5495. { //donut tray
  5496. foodTray[foodTrays][0] = CreateDynamicObject(2222, fX, fY, fZ -0.90, 0.0, 0.0, fA);
  5497. foodTray[foodTrays][1] = TRAY_TYPE_DONUT;
  5498. foodTray[foodTrays][2] = DONUT_AMOUNT;
  5499. foodTray[foodTrays][3] = TRAY_RESPAWN_TIME;
  5500. foodTray[foodTrays][4] = TRAY_NO_POISONED;
  5501. }
  5502. foodTrays++;
  5503. }
  5504. sortArray()
  5505. {
  5506. new currIndex;
  5507. new oldIndex;
  5508. for(new i = 0; i < MAX_TRAYS; i++)
  5509. {
  5510. if(i < MAX_TRAYS)
  5511. {
  5512. currIndex = i;
  5513. if(foodTray[oldIndex][0] == SLOT_EMPTY && foodTray[currIndex][0] != SLOT_EMPTY)
  5514. {
  5515. //format(str, sizeof(str), "currIndex %d SLOT_EMPTY ------- oldIndex %d NOT_EMPTY, (SWAP)", currIndex, oldIndex);
  5516. //SendClientMessageToAll(COLOR_WHITE, str);
  5517. foodTray[oldIndex][0] = foodTray[currIndex][0]; //obj id
  5518. foodTray[oldIndex][1] = foodTray[currIndex][1]; //type
  5519. foodTray[oldIndex][2] = foodTray[currIndex][2]; //food amount
  5520. foodTray[oldIndex][3] = foodTray[currIndex][3]; //food amount
  5521. foodTray[oldIndex][4] = foodTray[currIndex][4]; //food amount
  5522. foodTray[currIndex][0] = SLOT_EMPTY; //obj id
  5523. foodTray[currIndex][1] = TYPE_EMPTY; //type
  5524. foodTray[currIndex][2] = TRAY_EMPTY; //food amount
  5525. foodTray[currIndex][3] = TRAY_NO_RESPAWN; //respawn time
  5526. foodTray[currIndex][4] = TRAY_NO_POISONED; //poisoned
  5527. }
  5528. oldIndex = currIndex;
  5529. }
  5530. }
  5531. }
  5532. stock hidePlayerFoodTray(playerid)
  5533. {
  5534. if(hasFoodTray[playerid] && IsPlayerAttachedObjectSlotUsed(playerid, INDEX_3)) RemovePlayerAttachedObject(playerid, INDEX_3); //if carrying food tray, remove the object
  5535. }
  5536. stock showPlayerFoodTray(playerid)
  5537. {
  5538. if(hasFoodTray[playerid])
  5539. {
  5540. givePlayerFoodTray(playerid, hasFoodTray[playerid]);
  5541. }
  5542. }
  5543. stock eatFromTray(playerid)
  5544. {
  5545. if(!finishedEatingTimer[playerid]) //if player is currently not eating
  5546. {
  5547. for(new i = 0; i < foodTrays; i++)
  5548. {
  5549. //printf("looped %d times.", i);
  5550. new Float:objX, Float:objY, Float:objZ;
  5551. GetDynamicObjectPos(foodTray[i][0], objX, objY, objZ);
  5552. if(IsPlayerInRangeOfPoint(playerid, 2.0, objX, objY, objZ))
  5553. {
  5554. if(foodTray[i][2] > TRAY_EMPTY) //if the tray has food on it
  5555. {
  5556. new type = foodTray[i][1]; //type of foodtray eg. pizza/clucknbell etc.
  5557. //health
  5558. new Float: health;
  5559. GetPlayerHealth(playerid, health);
  5560. new Float: amount;
  5561. //armor
  5562. if(type == TRAY_TYPE_PIZZA)
  5563. {
  5564. SetPlayerAttachedObject(playerid, INDEX_8, 2702, 6, 0.057441, 0.057173, 0.052805, 63.711444, 278.175994, 0.000000, 1.000000, 1.000000, 1.000000); //index 2, bone 6 (right hand) pizza slice
  5565. amount = 20;
  5566. }
  5567. else if(type == TRAY_TYPE_CHICKEN)
  5568. {
  5569. SetPlayerAttachedObject(playerid, INDEX_8, 2769, 6, 0.034267, 0.040272, 0.031289, 271.366149, 178.684631, 68.694839, 1.000000, 1.000000, 1.000000);
  5570. amount = 33.3333;
  5571. }
  5572. else if(type == TRAY_TYPE_BURGER)
  5573. {
  5574. SetPlayerAttachedObject(playerid, INDEX_8, 2703, 6, 0.055717, 0.063831, 0.000000, 335.850250, 345.594818, 87.406021, 1.000000, 1.000000, 1.000000);
  5575. amount = 33.3333;
  5576. }
  5577. else if(type == TRAY_TYPE_DONUT)
  5578. {
  5579. if(IsACop(playerid))
  5580. {
  5581. new Float: armor;
  5582. GetPlayerArmour(playerid, armor);
  5583. if(armor + 5.0 > 100)
  5584. {
  5585. SetPlayerArmour(playerid, 100);
  5586. }
  5587. else
  5588. {
  5589. SetPlayerArmour(playerid, armor + 5.0);
  5590. }
  5591. amount = 15;
  5592. }
  5593. else
  5594. {
  5595. amount = 12.5;
  5596. }
  5597. //SetPlayerAttachedObject(playerid, INDEX_9, 2702, 6, 0.08, 0.14, 0, 0, -17, 0, 1.0, 1.0, 1.0); //index 2, bone 6 (right hand) pizza slice
  5598. }
  5599. if(health + amount > 100)
  5600. {
  5601. SetPlayerHealth(playerid, 100);
  5602. }
  5603. else
  5604. {
  5605. SetPlayerHealth(playerid, health + amount);
  5606. }
  5607. ApplyAnimationEx(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  5608. SetTimerEx("Timer_finishedEating", 4 *1000, 0, "i", playerid); //5 seconds
  5609. finishedEatingTimer[playerid] = true;
  5610. foodTray[i][2]--; //take away a slice of food from the tray
  5611. //if the foodtray has been poisoned
  5612. if(foodTray[i][4] == TRAY_POISONED)
  5613. { //poisoned
  5614. if(!beingPoisonedTimer[playerid])
  5615. { //if player is currently not already poisoned
  5616. SetTimerEx("Timer_beingPoisoned", 10*1000, 0,"i",playerid, 0); //10 seconds
  5617. beingPoisonedTimer[playerid] = true;
  5618. }
  5619. }
  5620. if(foodTray[i][2] == 0) //no more slices, delete obj and create rubbish obj
  5621. {
  5622. new Float:RotX, Float:RotY, Float:RotZ;
  5623. GetDynamicObjectRot(foodTray[i][0], RotX, RotY, RotZ);
  5624. DestroyDynamicObjectEx(foodTray[i][0]);
  5625. new rand = random(360);
  5626. if(type == TRAY_TYPE_PIZZA) //pizza box
  5627. {
  5628. foodTray[i][0] = CreateDynamicObject(2838, objX, objY, objZ, RotX, RotY, RotZ); //pizza trash
  5629. }
  5630. else if(type == TRAY_TYPE_CHICKEN) //clucknbell tray
  5631. {
  5632. foodTray[i][0] = CreateDynamicObject(2837, objX, objY, objZ - 0.07, 0, 0, rand);
  5633. }
  5634. else if(type == TRAY_TYPE_BURGER) //burgershot tray
  5635. {
  5636. foodTray[i][0] = CreateDynamicObject(2840, objX, objY, objZ - 0.07, 0, 0, rand);
  5637. }
  5638. else if(type == TRAY_TYPE_DONUT) //donut tray
  5639. {
  5640. foodTray[i][0] = CreateDynamicObject(2342, objX, objY, objZ + 0.05, RotX, RotY, RotZ); //empty tray
  5641. }
  5642. Streamer_Update(playerid);
  5643. SendClientMessage(playerid, COLOR_GREY, "You can type /cleanup to pick up any rubbish.");
  5644. }
  5645. }
  5646. //printf("broken out of loop");
  5647. break;
  5648. }
  5649. }
  5650. }
  5651. else
  5652. {
  5653. SendClientMessage(playerid, 0xAFAFAFAA, "You must wait 4 seconds before eating again.");
  5654. }
  5655. return 1;
  5656. }
  5657. stock cleanUpFood(playerid)
  5658. {
  5659. for(new i = 0; i < foodTrays; i++) {
  5660. new Float:objX, Float:objY, Float:objZ;
  5661. GetDynamicObjectPos(foodTray[i][0], objX, objY, objZ);
  5662. if(IsPlayerInRangeOfPoint(playerid, 2.0, objX, objY, objZ)) {
  5663. if(foodTray[i][2] == 0) { //no more slices, delete obj and create rubbish obj
  5664. new str[128];
  5665. format(str, sizeof(str), "* %s has cleaned up some rubbish.", PlayerICName(playerid));
  5666. if(PlayerInfo[playerid][pMask] == 1){
  5667. format(str, sizeof(str), "* Stranger has cleaned up some rubbish.", PlayerICName(playerid));
  5668. }
  5669. ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  5670. if(foodTray[i][0]) { DestroyDynamicObjectEx(foodTray[i][0]); }
  5671. //set array slot to empty
  5672. foodTray[i][0] = SLOT_EMPTY; //obj ID
  5673. foodTray[i][1] = TYPE_EMPTY; //type
  5674. foodTray[i][2] = TRAY_EMPTY; //food
  5675. foodTray[i][3] = TRAY_NO_RESPAWN; //respawn time
  5676. foodTray[i][4] = TRAY_NO_POISONED;
  5677. foodTrays--;
  5678. sortArray();
  5679. break;
  5680. } else {
  5681. SendClientMessage(playerid, 0xAFAFAFAA, "You can still eat from this, type /eat before cleaning up !");
  5682. }
  5683. }
  5684. }
  5685. }
  5686. public boughtFood(playerid)
  5687. {
  5688. if(IsPlayerConnected(playerid))
  5689. {
  5690. if(boughtFoodTimer[playerid])
  5691. {
  5692. boughtFoodTimer[playerid] = false;
  5693. }
  5694. }
  5695. }
  5696. Timer:finishedEating(playerid)
  5697. {
  5698. if(IsPlayerConnected(playerid))
  5699. {
  5700. if(finishedEatingTimer[playerid])
  5701. {
  5702. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8)) RemovePlayerAttachedObject(playerid, INDEX_8);
  5703. finishedEatingTimer[playerid] = false;
  5704. }
  5705. }
  5706. }
  5707. #define SOUND_RADIUS 30
  5708. Timer:beingPoisoned(playerid, step)
  5709. {
  5710. if(IsPlayerConnected(playerid)) {
  5711. if(beingPoisonedTimer[playerid]) {
  5712. new str[128];
  5713. switch(step) {
  5714. case 0: { //start choking
  5715. beingPoisonedTimer[playerid] = SetTimerEx("Timer_beingPoisoned", 2*1000, 0,"ii",playerid, 1); //2 seconds
  5716. format(str, sizeof(str), "* %s begins choking.", PlayerICName(playerid));
  5717. ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  5718. ClearAnimationsEx(playerid);
  5719. ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Damage", 4.1, 0, 0, 0, 0, 0);
  5720. playLocalSound(playerid, 19024, SOUND_RADIUS, 0);
  5721. }
  5722. case 1: { //collapse
  5723. beingPoisonedTimer[playerid] = SetTimerEx("Timer_beingPoisoned", 3*1000, 0,"ii",playerid, 2); //3 seconds
  5724. ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.1, 0, 0, 0, 1, 0);
  5725. }
  5726. case 2: {
  5727. if(PlayerInfo[playerid][pHospital] == 0)
  5728. {
  5729. playerPoisoned[playerid] = 1;
  5730. ApplyAnimation(playerid,"PED","FLOOR_hit_f",4.0,0,1,1,1,0,1);
  5731. new Float:x, Float:y, Float:z, Float:a;
  5732. GetPlayerPos(playerid, x, y, z);
  5733. GetPlayerFacingAngle(playerid, a);
  5734. DeathPos[playerid][DeathX] = x;
  5735. DeathPos[playerid][DeathY] = y;
  5736. DeathPos[playerid][DeathZ] = z;
  5737. DeathPos[playerid][DeathA] = a;
  5738. DeathPos[playerid][DeathInt] = GetPlayerInterior(playerid);
  5739. DeathPos[playerid][DeathVW] = GetPlayerVirtualWorld(playerid);
  5740. pDeathState[playerid] = PLAYER_STATE_REVIVE;
  5741. SetPlayerHealth(playerid, 100.0);
  5742. DeathPos[playerid][DeathHP] = 100;
  5743. TextDrawShowForPlayer(playerid, DieText);
  5744. TextDrawShowForPlayer(playerid, InjuredText);
  5745. if(PlayerInfo[playerid][pHeadValue] > 0)
  5746. {
  5747. foreach( new i: Player )
  5748. {
  5749. if(GoChase[i] == playerid)
  5750. {
  5751. format(str, sizeof(str), "You were killed by a hitman and have lost $%d.", PlayerInfo[playerid][pHeadValue] /2);
  5752. SendClientMessage(playerid, COLOR_YELLOW, str);
  5753. GiveMoney(playerid, -PlayerInfo[playerid][pHeadValue] /2);
  5754. GiveMoney(i, PlayerInfo[playerid][pHeadValue] /2);
  5755. PlayerInfo[i][pCHits]++;
  5756. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pContractBy])))
  5757. {
  5758. format(str, sizeof(str), "SMS: %s has been taken care of, Sender: Unknown", PlayerOOCName(playerid));
  5759. SendClientMessage(GetPlayerIDFromName(PlayerInfo[playerid][pContractBy]), COLOR_YELLOW, str);
  5760. }
  5761. playLocalSound(PlayerInfo[playerid][pContractBy], SMS_RECIEVED, 2.0, 0);
  5762. format(PlayerInfo[playerid][pContractBy], 24, "Nobody");
  5763. GoChase[i] = 999;
  5764. format(str, sizeof(str), "Hitman %s has successfully assassinated %s with poison and collected $%d.", PlayerICName(i), PlayerICName(playerid), PlayerInfo[playerid][pHeadValue] /2);
  5765. PlayerInfo[playerid][pHeadValue] = 0;
  5766. break;
  5767. }
  5768. }
  5769. foreach( new i: Player )
  5770. {
  5771. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  5772. {
  5773. SendClientMessage(i, COLOR_YELLOW, str);
  5774. }
  5775. }
  5776. }
  5777. }
  5778. beingPoisonedTimer[playerid] = false;
  5779. }
  5780. }
  5781. }
  5782. }
  5783. return 1;
  5784. }
  5785. Timer:playLocalSoundCheck(playerid, sound, Float:range, time, type)
  5786. {
  5787. new Float:x, Float:y, Float:z;
  5788. if(IsValidActor(playerid))
  5789. {
  5790. GetActorPos(playerid, x, y, z);
  5791. }
  5792. else
  5793. {
  5794. GetPlayerPos(playerid, x, y, z);
  5795. PlayerPlaySound(playerid, sound, 0.0, 0.0, 0.0);
  5796. }
  5797. foreach( new i: Player )
  5798. {
  5799. if(IsPlayerInRangeOfPoint(i, range, x, y, z) && (i != playerid))
  5800. {
  5801. if(type == 1) PlayerPlaySound(i, sound, x, y, z);
  5802. else if(type == 2) PlayerPlaySound(i, sound, x, y, z);
  5803. }
  5804. }
  5805. }
  5806. stock playLocalSound(playerid, sound, Float:range, time)
  5807. {
  5808. new type = 1;
  5809. if(!IsValidActor(playerid))
  5810. {
  5811. if(IsPlayerInAnyVehicle(playerid)) type = 2;
  5812. }
  5813. SetTimerEx("Timer_playLocalSoundCheck", time, 0, "iifii", playerid, sound, range, time, type);
  5814. }
  5815. stock clearAttachedObjects(playerid)
  5816. {
  5817. RemovePlayerAttachedObject(playerid, 0);
  5818. RemovePlayerAttachedObject(playerid, 1);
  5819. RemovePlayerAttachedObject(playerid, 2);
  5820. RemovePlayerAttachedObject(playerid, 3);
  5821. RemovePlayerAttachedObject(playerid, 4);
  5822. RemovePlayerAttachedObject(playerid, 5);
  5823. RemovePlayerAttachedObject(playerid, 6);
  5824. RemovePlayerAttachedObject(playerid, 7);
  5825. RemovePlayerAttachedObject(playerid, 8);
  5826. RemovePlayerAttachedObject(playerid, 9);
  5827. }
  5828. //==============================================================================
  5829. stock LoadEntrances()
  5830. {
  5831. new File:file = fopen("entrances.cfg", io_read);
  5832. if(file)
  5833. {
  5834. new line[1024], parts[18][50], commentpos = -1, count;
  5835. while(count < sizeof(Entrances))
  5836. {
  5837. fread(file, line);
  5838. if( strlen( line ) < 1 ) { //it was writing over data
  5839. count++;
  5840. continue;
  5841. }
  5842. commentpos = strfind(line, "//", true);
  5843. if(commentpos != -1)
  5844. {
  5845. strmid(line, line, commentpos, strlen(line));
  5846. }
  5847. split(line, parts, ',');
  5848. Entrances[count][outside_icon] = strval(parts[0]);
  5849. Entrances[count][outside_x] = floatstr(parts[1]);
  5850. Entrances[count][outside_y] = floatstr(parts[2]);
  5851. Entrances[count][outside_z] = floatstr(parts[3]);
  5852. Entrances[count][outside_a] = floatstr(parts[4]);
  5853. Entrances[count][outside_i] = strval(parts[5]);
  5854. Entrances[count][outside_w] = strval(parts[6]);
  5855. Entrances[count][inside_x] = floatstr(parts[7]);
  5856. Entrances[count][inside_y] = floatstr(parts[8]);
  5857. Entrances[count][inside_z] = floatstr(parts[9]);
  5858. Entrances[count][inside_a] = floatstr(parts[10]);
  5859. Entrances[count][inside_i] = strval(parts[11]);
  5860. Entrances[count][inside_w] = strval(parts[12]);
  5861. if(strval(parts[15]) > 0)
  5862. Entrances[count][freeze] = true;
  5863. else
  5864. Entrances[count][freeze] = false;
  5865. strdel(Entrances[count][doorname], 0, 50);
  5866. strins(Entrances[count][doorname], parts[13], 0);
  5867. strdel(Entrances[count][dpassword], 0, 50);
  5868. strins(Entrances[count][dpassword], parts[14], 0);
  5869. strdel(Entrances[count][createdby], 0, 50);
  5870. strins(Entrances[count][createdby], parts[16], 0);
  5871. Entrances[count][eowner] = strval(parts[17]);
  5872. if(strfind(Entrances[count][doorname], "\n", true) != -1)
  5873. strdel(Entrances[count][doorname], strfind(Entrances[count][doorname], "\n", true), strfind(Entrances[count][doorname], "\n", true) + 2);
  5874. if(strfind(Entrances[count][doorname], "\r", true) != -1)
  5875. strdel(Entrances[count][doorname], strfind(Entrances[count][doorname], "\r", true), strfind(Entrances[count][doorname], "\r", true) + 2);
  5876. if(strfind(Entrances[count][dpassword], "\n", true) != -1)
  5877. strdel(Entrances[count][dpassword], strfind(Entrances[count][dpassword], "\n", true), strfind(Entrances[count][dpassword], "\n", true) + 2);
  5878. if(strfind(Entrances[count][dpassword], "\r", true) != -1)
  5879. strdel(Entrances[count][dpassword], strfind(Entrances[count][dpassword], "\r", true), strfind(Entrances[count][dpassword], "\r", true) + 2);
  5880. if(strfind(Entrances[count][createdby], "\n", true) != -1)
  5881. strdel(Entrances[count][createdby], strfind(Entrances[count][createdby], "\n", true), strfind(Entrances[count][createdby], "\n", true) + 2);
  5882. if(strfind(Entrances[count][createdby], "\r", true) != -1)
  5883. strdel(Entrances[count][createdby], strfind(Entrances[count][createdby], "\r", true), strfind(Entrances[count][createdby], "\r", true) + 2);
  5884. new actualpickupid = 0;
  5885. if(Entrances[count][outside_icon] == 0)
  5886. {
  5887. actualpickupid = 19198;
  5888. }
  5889. else if(Entrances[count][outside_icon] == 1)
  5890. {
  5891. actualpickupid = 1239;
  5892. }
  5893. else if(Entrances[count][outside_icon] == 2)
  5894. {
  5895. actualpickupid = 19131;
  5896. }
  5897. else if(Entrances[count][outside_icon] == 3)
  5898. {
  5899. actualpickupid = 19132;
  5900. }
  5901. else if(Entrances[count][outside_icon] == 4)
  5902. {
  5903. actualpickupid = 19133;
  5904. }
  5905. else if(Entrances[count][outside_icon] == 5)
  5906. {
  5907. actualpickupid = 19134;
  5908. }
  5909. else if(Entrances[count][outside_icon] == 6)
  5910. {
  5911. actualpickupid = 19135;
  5912. }
  5913. if(EntranceRef[count])
  5914. {
  5915. DestroyDynamicPickup(EntranceRef[count]);
  5916. }
  5917. if(EntranceRefInt[count])
  5918. {
  5919. DestroyDynamicPickup(EntranceRefInt[count]);
  5920. }
  5921. if(EntranceRefText[count])
  5922. {
  5923. DestroyDynamic3DTextLabel(EntranceRefText[count]);
  5924. }
  5925. //I cannot really be bothered adding in a detection for "DOOR IS CREATED"...whoever made this door system jez
  5926. if( Entrances[count][outside_icon] == 0 ) {
  5927. EntranceRef[count] = CreateDynamicPickup(actualpickupid, 23, Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z]+0.4, Entrances[count][outside_w]);
  5928. EntranceRefInt[count] = CreateDynamicPickup(actualpickupid, 23, Entrances[count][inside_x], Entrances[count][inside_y], Entrances[count][inside_z]+0.4, Entrances[count][inside_w]);
  5929. } else {
  5930. EntranceRef[count] = CreateDynamicPickup(actualpickupid, 23, Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z], Entrances[count][outside_w]);
  5931. EntranceRefInt[count] = CreateDynamicPickup(actualpickupid, 23, Entrances[count][inside_x], Entrances[count][inside_y], Entrances[count][inside_z], Entrances[count][inside_w]);
  5932. }
  5933. new doornametxt[128];
  5934. format(doornametxt, sizeof(doornametxt), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[count][doorname]);
  5935. EntranceRefText[count] = CreateDynamic3DTextLabel(doornametxt, COLOR_ENTRANCE, Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z] +0.75, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, Entrances[count][outside_w], Entrances[count][outside_i]);
  5936. new str[128];
  5937. format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z]);
  5938. if(strcmp(str, "0.00,0.00,0.00", true) == 0)
  5939. {
  5940. DestroyDynamicPickup(EntranceRef[count]);
  5941. DestroyDynamicPickup(EntranceRefInt[count]);
  5942. DestroyDynamic3DTextLabel(EntranceRefText[count]);
  5943. EntranceRef[count] = 0;
  5944. EntranceRefInt[count] = 0;
  5945. EntranceRefText[count] = Text3D:INVALID_3DTEXT_ID;
  5946. }
  5947. count++;
  5948. }
  5949. fclose(file);
  5950. } else {
  5951. printf("[error] Failed to find entrances.cfg");
  5952. }
  5953. return 1;
  5954. }
  5955. stock SaveEntrances()
  5956. {
  5957. new idx = 0;
  5958. new File:file;
  5959. file = fopen("entrances.cfg", io_write);
  5960. fclose(file);
  5961. file = fopen("entrances.cfg", io_append);
  5962. new coordsstring[512];
  5963. if(file) {
  5964. while(idx < sizeof(Entrances))
  5965. {
  5966. format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d\n",
  5967. Entrances[idx][outside_icon],
  5968. Entrances[idx][outside_x],
  5969. Entrances[idx][outside_y],
  5970. Entrances[idx][outside_z],
  5971. Entrances[idx][outside_a],
  5972. Entrances[idx][outside_i],
  5973. Entrances[idx][outside_w],
  5974. Entrances[idx][inside_x],
  5975. Entrances[idx][inside_y],
  5976. Entrances[idx][inside_z],
  5977. Entrances[idx][inside_a],
  5978. Entrances[idx][inside_i],
  5979. Entrances[idx][inside_w],
  5980. Entrances[idx][doorname],
  5981. Entrances[idx][dpassword],
  5982. Entrances[idx][freeze],
  5983. Entrances[idx][createdby],
  5984. Entrances[idx][eowner]);
  5985. fwrite(file, coordsstring);
  5986. idx++;
  5987. }
  5988. fclose(file);
  5989. } else {
  5990. printf("[error] Failed to find entrances.cfg");
  5991. }
  5992. return 1;
  5993. }
  5994. //==============================================================================
  5995. //============================[Fishing System]==============================
  5996. stock LoadTextDraws()
  5997. {
  5998. FishingOutline = TextDrawCreate(547.000000, 33.000000, "_");
  5999. TextDrawBackgroundColor(FishingOutline, -65281);
  6000. TextDrawFont(FishingOutline, 1);
  6001. TextDrawLetterSize(FishingOutline, 0.500000, 0.599999);
  6002. TextDrawColor(FishingOutline, -1);
  6003. TextDrawSetProportional(FishingOutline, 1);
  6004. TextDrawUseBox(FishingOutline, 1);
  6005. TextDrawBoxColor(FishingOutline, 255);
  6006. TextDrawTextSize(FishingOutline, 606.000000, 0.000000);
  6007. //
  6008. FishingBackground = TextDrawCreate(549.000000, 35.000000, "_");
  6009. TextDrawBackgroundColor(FishingBackground, 255);
  6010. TextDrawFont(FishingBackground, 1);
  6011. TextDrawLetterSize(FishingBackground, 0.079999, 0.199999);
  6012. TextDrawColor(FishingBackground, -1);
  6013. TextDrawSetProportional(FishingBackground, 1);
  6014. TextDrawUseBox(FishingBackground, 1);
  6015. TextDrawBoxColor(FishingBackground, 0x00646CFF); // 6911487
  6016. TextDrawTextSize(FishingBackground, 604.000000, 0.000000);
  6017. //
  6018. FishingBar = TextDrawCreate(549.000000, 35.000000, "_");
  6019. TextDrawBackgroundColor(FishingBar, 255);
  6020. TextDrawFont(FishingBar, 1);
  6021. TextDrawLetterSize(FishingBar, 0.079999, 0.199999);
  6022. TextDrawColor(FishingBar, -65281);
  6023. TextDrawSetProportional(FishingBar, 1);
  6024. TextDrawUseBox(FishingBar, 1);
  6025. TextDrawBoxColor(FishingBar, -2114848513);
  6026. TextDrawTextSize(FishingBar, 549.000000, 0.000000);
  6027. InjuredText = TextDrawCreate(279.000000, 342.000000, "~r~You are injured.");
  6028. TextDrawBackgroundColor(InjuredText, 255);
  6029. TextDrawFont(InjuredText, 1);
  6030. TextDrawLetterSize(InjuredText, 0.300000, 1.300000);
  6031. TextDrawSetProportional(InjuredText, 1);
  6032. TextDrawSetShadow(InjuredText, 1);
  6033. DieText = TextDrawCreate(198.000000, 359.000000, "Type ~y~/service EMS~w~ to call a ~r~medic~w~ or ~y~/accept death~w~ to skip.");
  6034. TextDrawBackgroundColor(DieText, 255);
  6035. TextDrawFont(DieText, 1);
  6036. TextDrawLetterSize(DieText, 0.250000, 1.399999);
  6037. TextDrawSetProportional(DieText, 1);
  6038. TextDrawSetShadow(DieText, 1);
  6039. EnteranceStuff[0] = TextDrawCreate(185.000000, 181.000000, "Box");
  6040. TextDrawBackgroundColor(EnteranceStuff[0], 0);
  6041. TextDrawFont(EnteranceStuff[0], 1);
  6042. TextDrawLetterSize(EnteranceStuff[0], 1.590000, 7.700005);
  6043. TextDrawColor(EnteranceStuff[0], 0);
  6044. TextDrawSetOutline(EnteranceStuff[0], 0);
  6045. TextDrawSetProportional(EnteranceStuff[0], 1);
  6046. TextDrawSetShadow(EnteranceStuff[0], 1);
  6047. TextDrawUseBox(EnteranceStuff[0], 1);
  6048. TextDrawBoxColor(EnteranceStuff[0], 100);
  6049. TextDrawTextSize(EnteranceStuff[0], 448.000000, 30.000000);
  6050. //
  6051. EnteranceStuff[1] = TextDrawCreate(315.000000, 180.000000, "Project");
  6052. TextDrawAlignment(EnteranceStuff[1], 2);
  6053. TextDrawBackgroundColor(EnteranceStuff[1], 255);
  6054. TextDrawFont(EnteranceStuff[1], 0);
  6055. TextDrawLetterSize(EnteranceStuff[1], 0.70, 4);
  6056. TextDrawColor(EnteranceStuff[1], SARPTD_COLOUR);
  6057. TextDrawSetOutline(EnteranceStuff[1], 1);
  6058. TextDrawSetProportional(EnteranceStuff[1], 1);
  6059. //
  6060. EnteranceStuff[2] = TextDrawCreate(315.000000, 220.000000, "Roleplay");
  6061. TextDrawAlignment(EnteranceStuff[2], 2);
  6062. TextDrawBackgroundColor(EnteranceStuff[2], 255);
  6063. TextDrawFont(EnteranceStuff[2], 3);
  6064. TextDrawLetterSize(EnteranceStuff[2], 0.45, 3);
  6065. TextDrawColor(EnteranceStuff[2], SARPTD_COLOUR);
  6066. TextDrawSetOutline(EnteranceStuff[2], 1);
  6067. TextDrawSetProportional(EnteranceStuff[2], 1);
  6068. //
  6069. EnteranceStuff[3] = TextDrawCreate(405.000000, 240.000000, "Loading objects...");
  6070. TextDrawAlignment(EnteranceStuff[3], 2);
  6071. TextDrawBackgroundColor(EnteranceStuff[3], 255);
  6072. TextDrawFont(EnteranceStuff[3], 2);
  6073. TextDrawLetterSize(EnteranceStuff[3], 0.189999, 1.200000);
  6074. TextDrawColor(EnteranceStuff[3], LOADINGTD_COLOUR);
  6075. TextDrawSetOutline(EnteranceStuff[3], 1);
  6076. TextDrawSetProportional(EnteranceStuff[3], 1);
  6077. //
  6078. EnteranceStuff[4] = TextDrawCreate(405.000000, 240.000000, "Awaiting helper...");
  6079. TextDrawAlignment(EnteranceStuff[4], 2);
  6080. TextDrawBackgroundColor(EnteranceStuff[4], 255);
  6081. TextDrawFont(EnteranceStuff[4], 2);
  6082. TextDrawLetterSize(EnteranceStuff[4], 0.189999, 1.200000);
  6083. TextDrawColor(EnteranceStuff[4], LOADINGTD_COLOUR);
  6084. TextDrawSetOutline(EnteranceStuff[4], 1);
  6085. TextDrawSetProportional(EnteranceStuff[4], 1);
  6086. //
  6087. EnteranceStuff[5] = TextDrawCreate(405.000000, 240.000000, "Awaiting tester...");
  6088. TextDrawAlignment(EnteranceStuff[5], 2);
  6089. TextDrawBackgroundColor(EnteranceStuff[5], 255);
  6090. TextDrawFont(EnteranceStuff[5], 2);
  6091. TextDrawLetterSize(EnteranceStuff[5], 0.189999, 1.200000);
  6092. TextDrawColor(EnteranceStuff[5], LOADINGTD_COLOUR);
  6093. TextDrawSetOutline(EnteranceStuff[5], 1);
  6094. TextDrawSetProportional(EnteranceStuff[5], 1);
  6095. EnteranceStuff[6] = TextDrawCreate(405.000000, 240.000000, "Server Restart");
  6096. TextDrawAlignment(EnteranceStuff[6], 2);
  6097. TextDrawBackgroundColor(EnteranceStuff[6], 255);
  6098. TextDrawFont(EnteranceStuff[6], 2);
  6099. TextDrawLetterSize(EnteranceStuff[6], 0.189999, 1.200000);
  6100. TextDrawColor(EnteranceStuff[6], LOADINGTD_COLOUR);
  6101. TextDrawSetOutline(EnteranceStuff[6], 1);
  6102. TextDrawSetProportional(EnteranceStuff[6], 1);
  6103. //motd
  6104. motd = TextDrawCreate(322.000000, 356.000000, "~b~MOTD:~w~ Welcome to PRP, enjoy your stay.");
  6105. TextDrawAlignment(motd, 2);
  6106. TextDrawBackgroundColor(motd, 255);
  6107. TextDrawFont(motd, 1);
  6108. TextDrawLetterSize(motd, 0.220000, 1.000000);
  6109. TextDrawColor(motd, -1);
  6110. TextDrawSetOutline(motd, 0);
  6111. TextDrawSetProportional(motd, 1);
  6112. TextDrawSetShadow(motd, 0);
  6113. TextDrawSetSelectable(motd, 0);
  6114. //event notice
  6115. eventcup_icon = TextDrawCreate(7.000000, 103.000000, "hud:radar_race");
  6116. TextDrawAlignment(eventcup_icon, 2);
  6117. TextDrawBackgroundColor(eventcup_icon, 255);
  6118. TextDrawFont(eventcup_icon, 4);
  6119. TextDrawLetterSize(eventcup_icon, 0.029999, 0.200000);
  6120. TextDrawColor(eventcup_icon, -1);
  6121. TextDrawSetOutline(eventcup_icon, 0);
  6122. TextDrawSetProportional(eventcup_icon, 1);
  6123. TextDrawSetShadow(eventcup_icon, 1);
  6124. TextDrawUseBox(eventcup_icon, 1);
  6125. TextDrawBoxColor(eventcup_icon, 995727615);
  6126. TextDrawTextSize(eventcup_icon, 6.000000, 6.000000);
  6127. TextDrawSetSelectable(eventcup_icon, 0);
  6128. nexteventin = TextDrawCreate(16.000000, 101.000000, "Next event in:~b~ 0 hours");
  6129. TextDrawBackgroundColor(nexteventin, 255);
  6130. TextDrawFont(nexteventin, 1);
  6131. TextDrawLetterSize(nexteventin, 0.160000, 0.899999);
  6132. TextDrawColor(nexteventin, -1);
  6133. TextDrawSetOutline(nexteventin, 0);
  6134. TextDrawSetProportional(nexteventin, 1);
  6135. TextDrawSetShadow(nexteventin, 0);
  6136. TextDrawSetSelectable(nexteventin, 0);
  6137. eventfunds = TextDrawCreate(16.000000, 110.000000, "Event funds: ~g~$0");
  6138. TextDrawBackgroundColor(eventfunds, 255);
  6139. TextDrawFont(eventfunds, 1);
  6140. TextDrawLetterSize(eventfunds, 0.160000, 0.899999);
  6141. TextDrawColor(eventfunds, -1);
  6142. TextDrawSetOutline(eventfunds, 0);
  6143. TextDrawSetProportional(eventfunds, 1);
  6144. TextDrawSetShadow(eventfunds, 0);
  6145. TextDrawSetSelectable(eventfunds, 0);
  6146. howtofund = TextDrawCreate(16.000000, 119.000000, "Type ~y~/fundevent~w~ to help fund the event");
  6147. TextDrawBackgroundColor(howtofund, 255);
  6148. TextDrawFont(howtofund, 1);
  6149. TextDrawLetterSize(howtofund, 0.160000, 0.899999);
  6150. TextDrawColor(howtofund, -1);
  6151. TextDrawSetOutline(howtofund, 0);
  6152. TextDrawSetProportional(howtofund, 1);
  6153. TextDrawSetShadow(howtofund, 0);
  6154. TextDrawSetSelectable(howtofund, 0);
  6155. }
  6156. //==============================================================================
  6157. stock detachPhoneFromPlayer(playerid)
  6158. {
  6159. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  6160. RemovePlayerAttachedObject(playerid, INDEX_8);
  6161. if(!IsPlayerInAnyVehicle(playerid))
  6162. ClearAnimationsEx(playerid);
  6163. }
  6164. //==============================================================================
  6165. stock attachPhoneToPlayer(playerid)
  6166. {
  6167. switch(PlayerInfo[playerid][pCellphoneType])
  6168. {
  6169. case 0:
  6170. {
  6171. SetPlayerAttachedObject(playerid, INDEX_8, 330, 6);
  6172. }
  6173. case 1:
  6174. {
  6175. SetPlayerAttachedObject(playerid, INDEX_8, 2967, 6, 0.095121, 0.030734, 0.000968, 94.332405, 181.820236, 2.332283, 1.000000, 1.000000, 1.000000);
  6176. }
  6177. case 2:
  6178. {
  6179. SetPlayerAttachedObject(playerid, INDEX_8, 2966, 6, 0.086296, 0.067802, -0.052033, 91.819984, 184.425216, 0.000000, 1.000000, 1.000000, 1.000000);
  6180. }
  6181. case 3:
  6182. {
  6183. SetPlayerAttachedObject(playerid, INDEX_8, 18865, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6184. }
  6185. case 4:
  6186. {
  6187. SetPlayerAttachedObject(playerid, INDEX_8, 18866, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6188. }
  6189. case 5:
  6190. {
  6191. SetPlayerAttachedObject(playerid, INDEX_8, 18867, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6192. }
  6193. case 6:
  6194. {
  6195. SetPlayerAttachedObject(playerid, INDEX_8, 18868, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6196. }
  6197. case 7:
  6198. {
  6199. SetPlayerAttachedObject(playerid, INDEX_8, 18869, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6200. }
  6201. case 8:
  6202. {
  6203. SetPlayerAttachedObject(playerid, INDEX_8, 18870, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6204. }
  6205. case 9:
  6206. {
  6207. SetPlayerAttachedObject(playerid, INDEX_8, 18871, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6208. }
  6209. case 10:
  6210. {
  6211. SetPlayerAttachedObject(playerid, INDEX_8, 18872, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6212. }
  6213. case 11:
  6214. {
  6215. SetPlayerAttachedObject(playerid, INDEX_8, 18873, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6216. }
  6217. case 12:
  6218. {
  6219. SetPlayerAttachedObject(playerid, INDEX_8, 18874, 6, 0.096336, 0.026433, -0.002379, 91.759994, 191.558837, 0.000000, 1.000000, 1.000000, 1.000000);
  6220. }
  6221. }
  6222. if(!IsPlayerInAnyVehicle(playerid)){
  6223. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  6224. }
  6225. }
  6226. //==============================================================================
  6227. stock buyCellphone(playerid, type)
  6228. {
  6229. //assign type
  6230. new str[128];
  6231. PlayerInfo[playerid][pCellphoneType] = type;
  6232. if(PlayerInfo[playerid][pPnumber] != 0) //already has a phone
  6233. {
  6234. displayCenterHUDInfo(playerid, "~r~Cellphone~w~ purchased!~n~your old number has been assigned to this phone.", 8); //display for 8 seconds
  6235. }
  6236. else //set new number
  6237. {
  6238. new randphone = 1000 + random(8999);//minimum 1000 max 9999
  6239. PlayerInfo[playerid][pPnumber] = randphone;
  6240. format(str, sizeof(str), "~r~Cellphone~w~ purchased!~n~your number is ~b~%d~n~~w~type~y~/cellphonehelp~w~ for more info.", PlayerInfo[playerid][pPnumber]);
  6241. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  6242. SendClientMessage(playerid, COLOR_GRAD5, "Your cellphone number is listed in your /stats.");
  6243. }
  6244. }
  6245. //==============================================================================
  6246. stock DiscardAll(playerid)
  6247. {
  6248. if(IsPlayerConnected(playerid))
  6249. {
  6250. new str[128];
  6251. Cards[playerid][0] = 0;
  6252. Cards[playerid][1] = 0;
  6253. Cards[playerid][2] = 0;
  6254. Cards[playerid][3] = 0;
  6255. Cards[playerid][4] = 0;
  6256. CardsHave[playerid] = 0;
  6257. format(str, sizeof(str), "* %s discards all their cards.", PlayerICName(playerid));
  6258. ProxDetector(5.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  6259. }
  6260. return 1;
  6261. }
  6262. //==============================================================================
  6263. stock Discard(playerid, card)
  6264. {
  6265. if(IsPlayerConnected(playerid))
  6266. {
  6267. new str[128];
  6268. if(Cards[playerid][card] < 1)
  6269. {
  6270. SendClientMessage(playerid, COLOR_GREY, "You don't have a card in that slot to discard.");
  6271. return 1;
  6272. }
  6273. CardsHave[playerid]--;
  6274. Cards[playerid][card] = 0;
  6275. format(str, sizeof(str), "* %s has discarded one of their cards.", PlayerICName(playerid));
  6276. ProxDetector(5.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  6277. }
  6278. return 1;
  6279. }
  6280. //==============================================================================
  6281. stock Showcard(playerid, card)
  6282. {
  6283. if(IsPlayerConnected(playerid))
  6284. {
  6285. new str[128];
  6286. if(Cards[playerid][card] < 1)
  6287. {
  6288. SendClientMessage(playerid, COLOR_GREY, "You don't have a card in that slot to show.");
  6289. return 1;
  6290. }
  6291. format(str, sizeof(str), "* %s shows %s.", PlayerICName(playerid), CardNames[Cards[playerid][card]]);
  6292. ProxDetector(10.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  6293. }
  6294. return 1;
  6295. }
  6296. //==============================================================================
  6297. stock ShowHand(playerid)
  6298. {
  6299. if(IsPlayerConnected(playerid))
  6300. {
  6301. new cardstring[128], str[128];
  6302. format(str, sizeof(str), "* %s shows: ", PlayerICName(playerid));
  6303. for(new i =0; i <5; i++)
  6304. {
  6305. if(Cards[playerid][i] != 0)
  6306. {
  6307. format(cardstring, sizeof(cardstring), "%s | ", CardNames[Cards[playerid][i]]);
  6308. strcat(str, cardstring);
  6309. }
  6310. }
  6311. ProxDetector(10.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  6312. }
  6313. return 1;
  6314. }
  6315. //==============================================================================
  6316. stock SendWeaponMessage(playerid)
  6317. {
  6318. new level = PlayerInfo[playerid][pArmsSkill];
  6319. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sellgun [Playerid/PartOfName] [weapon name]");
  6320. SendClientMessage(playerid, COLOR_GREY, "Items: Flowers(25), Knuckles(25), Baseballbat(25), Poolcue(25), Parachute(25)");
  6321. SendClientMessage(playerid, COLOR_GREY, "Items: Cane(25), Shovel(25), Golfclub(25), Katana(50), Dildo(25)");
  6322. SendClientMessage(playerid, COLOR_GREY, "Level 1 Weapons: Colt45(150)");
  6323. if(level >= 50)
  6324. {
  6325. SendClientMessage(playerid, COLOR_GREY, "Level 2 Weapons: Rifle(1000), Shotgun(200)");
  6326. }
  6327. if(level >= 100)
  6328. {
  6329. SendClientMessage(playerid, COLOR_GREY, "Level 3 Weapons: MP5(400), UZI(1500), TEC9(1500)");
  6330. }
  6331. if(level >= 200)
  6332. {
  6333. SendClientMessage(playerid, COLOR_GREY, "Level 4 Weapons: Deagle(2000), SawnOff(1000), SDPistol(1500)");
  6334. }
  6335. if(level >= 400)
  6336. {
  6337. SendClientMessage(playerid, COLOR_GREY, "Level 5 Weapons: AK47(5000)");
  6338. }
  6339. if(PlayerInfo[playerid][pGroup] == 2 || PlayerInfo[playerid][pFMember]) {
  6340. SendClientMessage(playerid, COLOR_GREY, "Restricted Weapons: M4 (5500), Sniper (7500)");
  6341. }
  6342. return 1;
  6343. }
  6344. //==============================================================================
  6345. stock DealCard(playerid, targetPlayer)
  6346. {
  6347. if(IsPlayerConnected(playerid) && IsPlayerConnected(targetPlayer))
  6348. {
  6349. new str[128];
  6350. new openSlot = -1;
  6351. for(new i = 0; i < 5; i++)
  6352. {
  6353. if(Cards[targetPlayer][i] < 1)
  6354. {
  6355. openSlot = i;
  6356. break;
  6357. }
  6358. }
  6359. if(openSlot < 0)
  6360. {
  6361. format(str, sizeof(str), "** %s's card slots are full.", PlayerICName(playerid));
  6362. ProxDetector(10.0, playerid, str, TEAM_GROVE_COLOR, TEAM_GROVE_COLOR, TEAM_GROVE_COLOR, TEAM_GROVE_COLOR, TEAM_GROVE_COLOR);
  6363. return 1;
  6364. }
  6365. CardsHave[targetPlayer]++;
  6366. CardsDealt[playerid]++;
  6367. new rand = random(52);
  6368. while(Deck[playerid][rand] == 1)
  6369. {
  6370. rand = random(52);
  6371. }
  6372. Deck[playerid][rand] = 1;
  6373. Cards[targetPlayer][openSlot] = rand +1;
  6374. }
  6375. return 1;
  6376. }
  6377. //==============================================================================
  6378. stock ShuffleDeck(playerid)
  6379. {
  6380. if(IsPlayerConnected(playerid))
  6381. {
  6382. for(new i = 0; i < 52; i++)
  6383. {
  6384. Deck[playerid][i] = 0;
  6385. }
  6386. CardsDealt[playerid] = 0;
  6387. }
  6388. }
  6389. //==============================================================================
  6390. stock ContainsValidCharacters(string2[])
  6391. {
  6392. if((strfind(string2, "[") != -1) ||
  6393. (strfind(string2, "]") != -1) ||
  6394. (strfind(string2, "/") != -1) ||
  6395. (strfind(string2, "\\") != -1) ||
  6396. (strfind(string2, ":") != -1) ||
  6397. (strfind(string2, "*") != -1) ||
  6398. (strfind(string2, "?") != -1) ||
  6399. (strfind(string2, "<") != -1) ||
  6400. (strfind(string2, ">") != -1) ||
  6401. (strfind(string2, "|") != -1) ||
  6402. (strfind(string2, "\"") != -1))//"
  6403. {
  6404. return 0;
  6405. }
  6406. return 1;
  6407. }
  6408. //==============================================================================
  6409. stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
  6410. {
  6411. if(IsPlayerConnected(playerid))
  6412. {
  6413. new Float:PX, Float:PY, Float:PZ, Float:X, Float:Y, Float:Z;
  6414. GetPlayerPos(playerid, PX, PY, PZ);
  6415. GetVehiclePos(vehicleid, X, Y, Z);
  6416. new Float:ddd = (X -PX) *(X -PX) +(Y -PY) *(Y -PY) +(Z -PZ) *(Z -PZ);
  6417. if(ddd <= radi *radi)
  6418. {
  6419. return 1;
  6420. }
  6421. }
  6422. return 0;
  6423. }
  6424. //==============================================================================
  6425. public GiveMoney(playerid, money)
  6426. {
  6427. PlayerInfo[playerid][pCash] += money;
  6428. ResetPlayerMoney(playerid);
  6429. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  6430. return 1;
  6431. }
  6432. //==============================================================================
  6433. stock ResetMoney(playerid)
  6434. {
  6435. ResetPlayerMoney(playerid);
  6436. PlayerInfo[playerid][pCash] = 0;
  6437. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  6438. return 1;
  6439. }
  6440. //==============================================================================
  6441. public GetMoney(playerid)
  6442. {
  6443. ResetPlayerMoney(playerid);
  6444. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  6445. return PlayerInfo[playerid][pCash];
  6446. }
  6447. //==============================================================================
  6448. stock CreateStrip(Float:x, Float:y, Float:z, Float:Angle)
  6449. {
  6450. for(new i = 0; i < sizeof(SpikeInfo); i++)
  6451. {
  6452. if(SpikeInfo[i][sCreated] == 0)
  6453. {
  6454. SpikeInfo[i][sCreated] =1;
  6455. SpikeInfo[i][sX] =x;
  6456. SpikeInfo[i][sY] =y;
  6457. SpikeInfo[i][sZ] =z -0.7;
  6458. SpikeInfo[i][sObject] = CreateDynamicObject(2899, x, y, z -0.9, 0, 0, Angle -90);
  6459. return 1;
  6460. }
  6461. }
  6462. return 0;
  6463. }
  6464. //==============================================================================
  6465. stock CreateRoadBlock(Float:x, Float:y, Float:z, Float:Angle)
  6466. {
  6467. for(new i = 0; i < sizeof(RoadBlockInfo); i++)
  6468. {
  6469. if(RoadBlockInfo[i][RBCreated] == 0)
  6470. {
  6471. RoadBlockInfo[i][RBCreated] =1;
  6472. RoadBlockInfo[i][RBX] =x;
  6473. RoadBlockInfo[i][RBY] =y;
  6474. RoadBlockInfo[i][RBZ] =z -0.7;
  6475. RoadBlockInfo[i][RBObject] = CreateDynamicObject(973, x, y, z -1.3, 0, 0, Angle);
  6476. return 1;
  6477. }
  6478. }
  6479. return 0;
  6480. }
  6481. //==============================================================================
  6482. stock CreateTiki(Float:x, Float:y, Float:z) // Tiki
  6483. {
  6484. for(new i = 0; i < sizeof(TikiInfo); i++)
  6485. {
  6486. if(TikiInfo[i][tCreated] == 0)
  6487. {
  6488. TikiInfo[i][tCreated] =1;
  6489. TikiInfo[i][tX] =x;
  6490. TikiInfo[i][tY] =y;
  6491. TikiInfo[i][tZ] =z;
  6492. TikiInfo[i][tPickup] = CreateDynamicPickup(1276, 23, x, y, z);
  6493. return 1;
  6494. }
  6495. }
  6496. return 0;
  6497. }
  6498. //==============================================================================
  6499. stock DeleteClosestTiki(playerid) // Tiki
  6500. {
  6501. new str[128];
  6502. for(new i = 0; i < sizeof(TikiInfo); i++)
  6503. {
  6504. if(IsPlayerInRangeOfPoint(playerid, 4.0, TikiInfo[i][tX], TikiInfo[i][tY], TikiInfo[i][tZ]))
  6505. {
  6506. if(TikiInfo[i][tCreated] == 1)
  6507. {
  6508. new location[MAX_ZONE_NAME];
  6509. GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
  6510. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has destroyed a tiki in %s (%0.2f, %0.2f, %0.2f).", PlayerOOCName(playerid), location, TikiInfo[i][tX], TikiInfo[i][tY], TikiInfo[i][tZ]);
  6511. ABroadCast(COLOR_WHITE, str, 1);
  6512. TikiInfo[i][tCreated] =0;
  6513. TikiInfo[i][tX] =0.0;
  6514. TikiInfo[i][tY] =0.0;
  6515. TikiInfo[i][tZ] =0.0;
  6516. DestroyDynamicPickup(TikiInfo[i][tPickup]);
  6517. return 1;
  6518. }
  6519. }
  6520. }
  6521. return 0;
  6522. }
  6523. //==============================================================================
  6524. stock DeleteAllTiki()
  6525. {
  6526. for(new i = 0; i < sizeof(TikiInfo); i++)
  6527. {
  6528. if(TikiInfo[i][tCreated] == 1)
  6529. {
  6530. TikiInfo[i][tCreated] =0;
  6531. TikiInfo[i][tX] =0.0;
  6532. TikiInfo[i][tY] =0.0;
  6533. TikiInfo[i][tZ] =0.0;
  6534. DestroyDynamicPickup(TikiInfo[i][tPickup]);
  6535. }
  6536. }
  6537. return 0;
  6538. }
  6539. //==============================================================================
  6540. stock DeleteAllStrip()
  6541. {
  6542. for(new i = 0; i < sizeof(SpikeInfo); i++)
  6543. {
  6544. if(SpikeInfo[i][sCreated] == 1)
  6545. {
  6546. SpikeInfo[i][sCreated] = 0;
  6547. SpikeInfo[i][sX] = 0.0;
  6548. SpikeInfo[i][sY] = 0.0;
  6549. SpikeInfo[i][sZ] = 0.0;
  6550. if(SpikeInfo[i][sObject]) { DestroyDynamicObjectEx(SpikeInfo[i][sObject]); }
  6551. SpikeInfo[i][sObject] = 0;
  6552. }
  6553. }
  6554. return 0;
  6555. }
  6556. //==============================================================================
  6557. stock DeleteClosestStrip(playerid)
  6558. {
  6559. new str[128];
  6560. for(new i = 0; i < sizeof(SpikeInfo); i++)
  6561. {
  6562. if(IsPlayerInRangeOfPoint(playerid, 2.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
  6563. {
  6564. if(SpikeInfo[i][sCreated] == 1)
  6565. {
  6566. new location[MAX_ZONE_NAME];
  6567. GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
  6568. format(str, sizeof(str), "HQ: %s %s has deleted a spike strip at %s.", GetPlayerRank(playerid), PlayerICName(playerid), location);
  6569. SendRadioMessage(1, TEAM_BLUE_COLOR, str);
  6570. SendRadioMessage(2, TEAM_BLUE_COLOR, str);
  6571. SendRadioMessage(3, TEAM_BLUE_COLOR, str);
  6572. SendRadioMessage(5, TEAM_BLUE_COLOR, str);
  6573. SendRadioMessage(14, TEAM_BLUE_COLOR, str);
  6574. SpikeInfo[i][sCreated] = 0;
  6575. SpikeInfo[i][sX] = 0.0;
  6576. SpikeInfo[i][sY] = 0.0;
  6577. SpikeInfo[i][sZ] = 0.0;
  6578. if(SpikeInfo[i][sObject]) { DestroyDynamicObjectEx(SpikeInfo[i][sObject]); }
  6579. SpikeInfo[i][sObject] = 0;
  6580. return 1;
  6581. }
  6582. }
  6583. }
  6584. return 0;
  6585. }
  6586. //==============================================================================
  6587. stock DeleteAllRoadBlocks()
  6588. {
  6589. for(new i = 0; i < sizeof(RoadBlockInfo); i++)
  6590. {
  6591. if(RoadBlockInfo[i][RBCreated] == 1)
  6592. {
  6593. RoadBlockInfo[i][RBCreated] = 0;
  6594. RoadBlockInfo[i][RBX] = 0.0;
  6595. RoadBlockInfo[i][RBY] = 0.0;
  6596. RoadBlockInfo[i][RBZ] = 0.0;
  6597. if(RoadBlockInfo[i][RBObject]) { DestroyDynamicObjectEx(RoadBlockInfo[i][RBObject]); }
  6598. RoadBlockInfo[i][RBObject] = 0;
  6599. }
  6600. }
  6601. return 0;
  6602. }
  6603. //==============================================================================
  6604. stock DeleteClosestRoadBlock(playerid)
  6605. {
  6606. for(new i = 0; i < sizeof(RoadBlockInfo); i++)
  6607. {
  6608. if(IsPlayerInRangeOfPoint(playerid, 10, RoadBlockInfo[i][RBX], RoadBlockInfo[i][RBY], RoadBlockInfo[i][RBZ]))
  6609. {
  6610. if(RoadBlockInfo[i][RBCreated] == 1)
  6611. {
  6612. RoadBlockInfo[i][RBCreated] = 0;
  6613. RoadBlockInfo[i][RBX] = 0.0;
  6614. RoadBlockInfo[i][RBY] = 0.0;
  6615. RoadBlockInfo[i][RBZ] = 0.0;
  6616. if(RoadBlockInfo[i][RBObject]) { DestroyDynamicObjectEx(RoadBlockInfo[i][RBObject]); }
  6617. RoadBlockInfo[i][RBObject] = 0;
  6618. return 1;
  6619. }
  6620. }
  6621. }
  6622. return 0;
  6623. }
  6624. //==============================================================================
  6625. encode_tires(tires1, tires2, tires3, tires4)
  6626. {
  6627. return tires1 | (tires2 << 1) | (tires3 << 2) | (tires4 << 3);
  6628. }
  6629. //==============================================================================
  6630. stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, &Float:z, &Float:a, Float:dist)
  6631. {
  6632. GetPlayerPos(playerid, x, y, z);
  6633. GetPlayerFacingAngle(playerid, a);
  6634. if(GetPlayerVehicleID(playerid))
  6635. {
  6636. GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  6637. }
  6638. x += (dist * floatsin(-a, degrees));
  6639. y += (dist * floatcos(-a, degrees));
  6640. }
  6641. //==============================================================================
  6642. stock UpdateWarnings(warning[])
  6643. {
  6644. for(new i = 0; i < sizeof(Warnings) - 1; i++)
  6645. {
  6646. Warnings[i] = Warnings[i +1];
  6647. }
  6648. new hour, minute, second;
  6649. gettime(hour, minute, second);
  6650. hour = FixHour(hour);
  6651. format(Warnings[19], 256, "[%d:%d:%d] %s", hour, minute, second, warning);
  6652. AWarncast(warning);
  6653. return 1;
  6654. }
  6655. //==============================================================================
  6656. stock AWarncast(const string2[])
  6657. {
  6658. foreach( new i: Player )
  6659. {
  6660. if(IsPlayerConnected(i) && gPlayerLogged[i])
  6661. {
  6662. if(PlayerInfo[i][pAdmin] >= 1 && ToggedWarns[i] == false)
  6663. {
  6664. SendClientMessage(i, COLOR_WHITE, string2);
  6665. }
  6666. }
  6667. }
  6668. return 1;
  6669. }
  6670. //==============================================================================
  6671. stock PlayerHasWeapon(playerid, _weaponid)
  6672. {
  6673. const MAX_WEAPONS_SLOTS = 13;
  6674. static ammo, weaponid;
  6675. for (new i; i != MAX_WEAPONS_SLOTS; i++)
  6676. {
  6677. if (GetPlayerWeaponData(playerid,
  6678. i, weaponid, ammo) == 0)
  6679. return 0;
  6680. if (weaponid == _weaponid)
  6681. return 1;
  6682. }
  6683. return 0;
  6684. }
  6685. //==============================================================================
  6686. stock HaveWeapon(playerid, weaponid)
  6687. {
  6688. if(IsPlayerConnected(playerid))
  6689. {
  6690. switch(weaponid)
  6691. {
  6692. case 1:
  6693. {
  6694. return PlayerInfo[playerid][pGun0];
  6695. }
  6696. case 2..9:
  6697. {
  6698. return PlayerInfo[playerid][pGun1];
  6699. }
  6700. case 10..15:
  6701. {
  6702. return PlayerInfo[playerid][pGun10];
  6703. }
  6704. case 16..18:
  6705. {
  6706. return PlayerInfo[playerid][pGun8];
  6707. }
  6708. case 22..24:
  6709. {
  6710. return PlayerInfo[playerid][pGun2];
  6711. }
  6712. case 25..27:
  6713. {
  6714. return PlayerInfo[playerid][pGun3];
  6715. }
  6716. case 28..29:
  6717. {
  6718. return PlayerInfo[playerid][pGun4];
  6719. }
  6720. case 30..31:
  6721. {
  6722. return PlayerInfo[playerid][pGun5];
  6723. }
  6724. case 32:
  6725. {
  6726. return PlayerInfo[playerid][pGun4];
  6727. }
  6728. case 33..34:
  6729. {
  6730. return PlayerInfo[playerid][pGun6];
  6731. }
  6732. case 35..38:
  6733. {
  6734. return PlayerInfo[playerid][pGun7];
  6735. }
  6736. case 39:
  6737. {
  6738. return PlayerInfo[playerid][pGun8];
  6739. }
  6740. case 41..43:
  6741. {
  6742. return PlayerInfo[playerid][pGun9];
  6743. }
  6744. case 44..46:
  6745. {
  6746. return PlayerInfo[playerid][pGun11];
  6747. }
  6748. case 40:
  6749. {
  6750. return PlayerInfo[playerid][pGun12];
  6751. }
  6752. }
  6753. }
  6754. return 1;
  6755. }
  6756. //==============================================================================
  6757. stock GivePlayerGun(playerid, weaponid)
  6758. {
  6759. switch(weaponid)
  6760. {
  6761. case 1:
  6762. {
  6763. aGun[playerid][0] = 0;
  6764. PlayerInfo[playerid][pGun0] = 1;
  6765. GivePlayerWeapon(playerid, 1, 1);
  6766. }
  6767. case 2..9:
  6768. {
  6769. aGun[playerid][1] = 0;
  6770. PlayerInfo[playerid][pGun1] = weaponid;
  6771. GivePlayerWeapon(playerid, weaponid, 1);
  6772. }
  6773. case 10..15:
  6774. {
  6775. aGun[playerid][10] = 0;
  6776. PlayerInfo[playerid][pGun10] = weaponid;
  6777. GivePlayerWeapon(playerid, weaponid, 1);
  6778. }
  6779. case 16..18, 39:
  6780. {
  6781. aGun[playerid][8] = 0;
  6782. PlayerInfo[playerid][pGun8] = weaponid;
  6783. GivePlayerWeapon(playerid, weaponid, 2);
  6784. }
  6785. case 21:
  6786. {
  6787. aGun[playerid][12] = 0;
  6788. PlayerInfo[playerid][pGun12] = 21;
  6789. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  6790. }
  6791. case 22..24:
  6792. {
  6793. aGun[playerid][2] = 0;
  6794. PlayerInfo[playerid][pGun2] = weaponid;
  6795. GivePlayerWeapon(playerid, weaponid, 99999);
  6796. }
  6797. case 25..27:
  6798. {
  6799. aGun[playerid][3] = 0;
  6800. PlayerInfo[playerid][pGun3] = weaponid;
  6801. GivePlayerWeapon(playerid, weaponid, 99999);
  6802. }
  6803. case 28..29, 32:
  6804. {
  6805. aGun[playerid][4] = 0;
  6806. PlayerInfo[playerid][pGun4] = weaponid;
  6807. GivePlayerWeapon(playerid, weaponid, 99999);
  6808. }
  6809. case 30, 31:
  6810. {
  6811. aGun[playerid][5] = 0;
  6812. PlayerInfo[playerid][pGun5] = weaponid;
  6813. GivePlayerWeapon(playerid, weaponid, 99999);
  6814. }
  6815. case 33, 34:
  6816. {
  6817. aGun[playerid][6] = 0;
  6818. PlayerInfo[playerid][pGun6] = weaponid;
  6819. GivePlayerWeapon(playerid, weaponid, 99999);
  6820. }
  6821. case 35, 36:
  6822. {
  6823. aGun[playerid][7] = 0;
  6824. PlayerInfo[playerid][pGun7] = weaponid;
  6825. GivePlayerWeapon(playerid, weaponid, 2);
  6826. }
  6827. case 37..38:
  6828. {
  6829. aGun[playerid][7] = 0;
  6830. PlayerInfo[playerid][pGun7] = weaponid;
  6831. GivePlayerWeapon(playerid, weaponid, 99999);
  6832. }
  6833. case 40:
  6834. {
  6835. aGun[playerid][12] = 0;
  6836. PlayerInfo[playerid][pGun12] = 40;
  6837. GivePlayerWeapon(playerid, 40, 1);
  6838. }
  6839. case 41..43:
  6840. {
  6841. aGun[playerid][9] = 0;
  6842. PlayerInfo[playerid][pGun9] = weaponid;
  6843. GivePlayerWeapon(playerid, weaponid, 99999);
  6844. }
  6845. case 44..46:
  6846. {
  6847. aGun[playerid][11] = 0;
  6848. PlayerInfo[playerid][pGun11] = weaponid;
  6849. GivePlayerWeapon(playerid, weaponid, 99999);
  6850. }
  6851. }
  6852. return 1;
  6853. }
  6854. //==============================================================================
  6855. stock HaveAdminWeapon(playerid, weaponid)
  6856. {
  6857. if(IsPlayerConnected(playerid))
  6858. {
  6859. switch(weaponid)
  6860. {
  6861. case 1:
  6862. {
  6863. return aGun[playerid][0];
  6864. }
  6865. case 2..9:
  6866. {
  6867. return aGun[playerid][1];
  6868. }
  6869. case 10..15:
  6870. {
  6871. return aGun[playerid][10];
  6872. }
  6873. case 16..18:
  6874. {
  6875. return aGun[playerid][8];
  6876. }
  6877. case 22..24:
  6878. {
  6879. return aGun[playerid][2];
  6880. }
  6881. case 25..27:
  6882. {
  6883. return aGun[playerid][3];
  6884. }
  6885. case 28..29:
  6886. {
  6887. return aGun[playerid][4];
  6888. }
  6889. case 30..31:
  6890. {
  6891. return aGun[playerid][5];
  6892. }
  6893. case 32:
  6894. {
  6895. return aGun[playerid][4];
  6896. }
  6897. case 33..34:
  6898. {
  6899. return aGun[playerid][6];
  6900. }
  6901. case 35..38:
  6902. {
  6903. return aGun[playerid][7];
  6904. }
  6905. case 39:
  6906. {
  6907. return aGun[playerid][8];
  6908. }
  6909. case 41..43:
  6910. {
  6911. return aGun[playerid][9];
  6912. }
  6913. case 44..46:
  6914. {
  6915. return aGun[playerid][11];
  6916. }
  6917. case 40:
  6918. {
  6919. return aGun[playerid][12];
  6920. }
  6921. }
  6922. }
  6923. return 1;
  6924. }
  6925. //==============================================================================
  6926. stock GivePlayerAdminGun(playerid, weaponid)
  6927. {
  6928. switch(weaponid)
  6929. {
  6930. case 1:
  6931. {
  6932. aGun[playerid][0] = 1;
  6933. GivePlayerWeapon(playerid, 1, 1);
  6934. }
  6935. case 2..9:
  6936. {
  6937. aGun[playerid][1] = weaponid;
  6938. GivePlayerWeapon(playerid, weaponid, 1);
  6939. }
  6940. case 10..15:
  6941. {
  6942. aGun[playerid][10] = weaponid;
  6943. GivePlayerWeapon(playerid, weaponid, 1);
  6944. }
  6945. case 16..18, 39:
  6946. {
  6947. aGun[playerid][8] = weaponid;
  6948. GivePlayerWeapon(playerid, weaponid, 2);
  6949. }
  6950. case 21:
  6951. {
  6952. aGun[playerid][12] = 21;
  6953. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
  6954. }
  6955. case 22..24:
  6956. {
  6957. aGun[playerid][2] = weaponid;
  6958. GivePlayerWeapon(playerid, weaponid, 99999);
  6959. }
  6960. case 25..27:
  6961. {
  6962. aGun[playerid][3] = weaponid;
  6963. GivePlayerWeapon(playerid, weaponid, 99999);
  6964. }
  6965. case 28..29, 32:
  6966. {
  6967. aGun[playerid][4] = weaponid;
  6968. GivePlayerWeapon(playerid, weaponid, 99999);
  6969. }
  6970. case 30, 31:
  6971. {
  6972. aGun[playerid][5] = weaponid;
  6973. GivePlayerWeapon(playerid, weaponid, 99999);
  6974. }
  6975. case 33, 34:
  6976. {
  6977. aGun[playerid][6] = weaponid;
  6978. GivePlayerWeapon(playerid, weaponid, 99999);
  6979. }
  6980. case 35..38:
  6981. {
  6982. aGun[playerid][7] = weaponid;
  6983. GivePlayerWeapon(playerid, weaponid, 99999);
  6984. }
  6985. case 40:
  6986. {
  6987. aGun[playerid][12] = 40;
  6988. GivePlayerWeapon(playerid, 40, 1);
  6989. }
  6990. case 41..43:
  6991. {
  6992. aGun[playerid][9] = weaponid;
  6993. GivePlayerWeapon(playerid, weaponid, 99999);
  6994. }
  6995. case 44..46:
  6996. {
  6997. aGun[playerid][11] = weaponid;
  6998. GivePlayerWeapon(playerid, weaponid, 99999);
  6999. }
  7000. }
  7001. return 1;
  7002. }
  7003. //==============================================================================
  7004. stock ResetPlayerAdminWeaponsEx(playerid)
  7005. {
  7006. ResetPlayerWeapons(playerid);
  7007. aGun[playerid][0] = 0;
  7008. aGun[playerid][1] = 0;
  7009. aGun[playerid][2] = 0;
  7010. aGun[playerid][3] = 0;
  7011. aGun[playerid][4] = 0;
  7012. aGun[playerid][5] = 0;
  7013. aGun[playerid][6] = 0;
  7014. aGun[playerid][7] = 0;
  7015. aGun[playerid][8] = 0;
  7016. aGun[playerid][9] = 0;
  7017. aGun[playerid][10] = 0;
  7018. aGun[playerid][11] = 0;
  7019. aGun[playerid][12] = 0;
  7020. return 1;
  7021. }
  7022. //==============================================================================
  7023. stock Teleport(playerid, Float:x, Float:y, Float:z, Float:a, interiorid, virtualid, getvehicle)
  7024. {
  7025. if(getvehicle && (getvehicle = GetPlayerVehicleID(playerid)))
  7026. {
  7027. SetVehiclePos(getvehicle, x, y, z);
  7028. SetVehicleZAngle(getvehicle, a);
  7029. LinkVehicleToInterior(getvehicle, interiorid);
  7030. SetVehicleVirtualWorld(getvehicle, virtualid);
  7031. new
  7032. trailerid = GetVehicleTrailer(getvehicle);
  7033. //bike = IsABike(getvehicle);
  7034. if(trailerid)
  7035. {
  7036. DetachTrailerFromVehicle(getvehicle);
  7037. SetVehiclePos(trailerid, x, y, z);
  7038. LinkVehicleToInterior(trailerid, interiorid);
  7039. SetVehicleVirtualWorld(trailerid, virtualid);
  7040. SetVehicleZAngle(trailerid, a);
  7041. AttachTrailerToVehicle(trailerid, getvehicle);
  7042. }
  7043. foreach( new i: Player )
  7044. {
  7045. if(IsPlayerConnected(i))
  7046. {
  7047. if(IsPlayerInVehicle(i, getvehicle))
  7048. {
  7049. SetPlayerInterior(i, interiorid);
  7050. SetPlayerVirtualWorld(i, virtualid);
  7051. }
  7052. else if(trailerid && IsPlayerInVehicle(i, trailerid))
  7053. {
  7054. SetPlayerInterior(i, interiorid);
  7055. SetPlayerVirtualWorld(i, virtualid);
  7056. SetCameraBehindPlayer(i);
  7057. }
  7058. }
  7059. }
  7060. }
  7061. else
  7062. {
  7063. SetPlayerPos(playerid, x, y, z);
  7064. SetPlayerInterior(playerid, interiorid);
  7065. SetPlayerFacingAngle(playerid, a);
  7066. SetPlayerVirtualWorld(playerid, virtualid);
  7067. SetCameraBehindPlayer(playerid);
  7068. }
  7069. }
  7070. //==============================================================================
  7071. stock IsABadgeFaction(playerid) // could be written better, assigned to me ~ Desmond
  7072. {
  7073. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) return 1;
  7074. if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) return 1;
  7075. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) return 1;
  7076. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) return 1;
  7077. if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) return 1;
  7078. if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) return 1;
  7079. if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) return 1;
  7080. if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) return 1;
  7081. if(PlayerInfo[playerid][pGroup] == 11) return 1;
  7082. return 0;
  7083. }
  7084. stock GetPlayerHAFactionName(playerid)
  7085. {
  7086. new ttext[64];
  7087. switch(PlayerInfo[playerid][pHAFakeBadge])
  7088. {
  7089. case 1:
  7090. ttext = "SAPD";
  7091. case 2:
  7092. //ttext = "FBI";
  7093. ttext = "FBI";
  7094. case 4:
  7095. ttext = "SAFMD";
  7096. case 5:
  7097. ttext = "DoC";
  7098. case 6:
  7099. ttext = "Government";
  7100. case 14:
  7101. //ttext = "SANG";
  7102. ttext = "AFSA";
  7103. }
  7104. return ttext;
  7105. }
  7106. stock IsRoadblockFaction(playerid)
  7107. {
  7108. switch(PlayerInfo[playerid][pMember])
  7109. {
  7110. case 1:
  7111. return true;
  7112. case 2:
  7113. return true;
  7114. case 3:
  7115. return true;
  7116. case 4:
  7117. return true;
  7118. case 5:
  7119. return true;
  7120. case 11:
  7121. return true;
  7122. case 14:
  7123. return true;
  7124. case 15:
  7125. return true;
  7126. }
  7127. if(PlayerInfo[playerid][pGroup] == GROUP_S9) return true;
  7128. return false;
  7129. }
  7130. stock IsRoadblockRank(playerid)
  7131. {
  7132. switch(PlayerInfo[playerid][pMember])
  7133. {
  7134. case 1:
  7135. {
  7136. if(PlayerInfo[playerid][pRank] >= 2) return true;
  7137. }
  7138. case 2:
  7139. {
  7140. if(PlayerInfo[playerid][pRank] >= 3) return true;
  7141. }
  7142. case 3:
  7143. {
  7144. if(PlayerInfo[playerid][pRank] >= 2) return true;
  7145. }
  7146. case 4:
  7147. {
  7148. if(PlayerInfo[playerid][pRank] >= 4) return true;
  7149. }
  7150. case 5:
  7151. {
  7152. if(PlayerInfo[playerid][pRank] >= 3) return true;
  7153. }
  7154. case 11:
  7155. {
  7156. return true;
  7157. }
  7158. case 14:
  7159. {
  7160. if(PlayerInfo[playerid][pRank] >= 2) return true;
  7161. }
  7162. case 15:
  7163. {
  7164. if(PlayerInfo[playerid][pRank] >= 2) return true;
  7165. }
  7166. }
  7167. return false;
  7168. }
  7169. stock getClosestRoadblockID(playerid)
  7170. {
  7171. for(new i; i < 11; i++) if(IsPlayerNearDynamicObject(playerid, roadblockObjects[playerid][i], 2.0)) return i;
  7172. return -1;
  7173. }
  7174. stock IsPlayerNearDynamicObject(playerid, objectid, Float:range)
  7175. {
  7176. new Float:X, Float:Y, Float:Z;
  7177. GetDynamicObjectPos(objectid, X, Y, Z);
  7178. if(IsPlayerInRangeOfPoint(playerid, range, X, Y, Z)) return true;
  7179. return false;
  7180. }
  7181. stock GetPlayerFamilyName(playerid)
  7182. {
  7183. new fname[64];
  7184. if(PlayerInfo[playerid][pFMember] != 255)
  7185. format(fname, sizeof(fname), "%s", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyName]);
  7186. return fname;
  7187. }
  7188. stock GetFactionName(facID)
  7189. {
  7190. new fname[64];
  7191. switch(facID)
  7192. {
  7193. case 1: fname = "SAPD";
  7194. //case 2: fname = "FBI"; // Old FBi | New DEA //
  7195. case 2: fname = "FBI";
  7196. case 3: fname = "SASD";
  7197. case 4: fname = "SAFMD";
  7198. case 5: fname = "DoC";
  7199. case 6: fname = "Government";
  7200. case 7: fname = "DOJ";
  7201. case 8: fname = "HA";
  7202. case 9: fname = "News";
  7203. case 10: fname = "Taxi";
  7204. case 11: fname = "S9";
  7205. case 12: fname = "DEA";
  7206. case 13: fname = "ATF";
  7207. //case 14: fname = "SANG";
  7208. case 14: fname = "AFSA";
  7209. case 15: fname = "SAS";
  7210. default: fname = "None";
  7211. }
  7212. return fname;
  7213. }
  7214. stock GetPlayerFactionName(playerid, bool:ignoreUndercover = false)
  7215. {
  7216. new fname[64];
  7217. if(PlayerInfo[playerid][pMember] == 11) {
  7218. if(ignoreUndercover) fname = "S9";
  7219. else {
  7220. if(FakeFaction[playerid])
  7221. format(fname, sizeof(fname), "%s", GetFactionName(FakeFaction[playerid]));
  7222. else
  7223. format(fname, sizeof(fname), "%s", GetFactionName(FACTION_NONE));
  7224. }
  7225. }
  7226. else {
  7227. format(fname, sizeof(fname), "%s", GetFactionName(PlayerInfo[playerid][pMember]));
  7228. }
  7229. return fname;
  7230. }
  7231. stock GetPlayerAffiliationName(playerid)
  7232. {
  7233. new fname[64];
  7234. // if player is in a family, format family name
  7235. if(PlayerInfo[playerid][pFMember] != 255)
  7236. format(fname, sizeof(fname), "%s", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyName]);
  7237. // else format faction name
  7238. else
  7239. {
  7240. switch(PlayerInfo[playerid][pMember])
  7241. {
  7242. case 1:
  7243. fname = "SAPD";
  7244. case 2:
  7245. //fname = "FBI";
  7246. fname = "FBI";
  7247. case 3:
  7248. fname = "SASD";
  7249. case 4:
  7250. fname = "SAFMD";
  7251. case 5:
  7252. fname = "DoC";
  7253. case 6:
  7254. fname = "Government";
  7255. case 7:
  7256. fname = "DOJ";
  7257. case 8:
  7258. fname = "HA";
  7259. case 9:
  7260. fname = "SAN";
  7261. case 10:
  7262. fname = "Taxi";
  7263. case 11:
  7264. fname = "None";
  7265. case 12:
  7266. fname = "DEA";
  7267. case 13:
  7268. fname = "ATF";
  7269. case 14:
  7270. //fname ="SANG";
  7271. fname ="AFSA";
  7272. case 15:
  7273. fname ="SAS";
  7274. default:
  7275. fname = "None";
  7276. }
  7277. }
  7278. return fname;
  7279. }
  7280. //==============================================================================
  7281. stock ReturnVehicleModelID(string2[])
  7282. {
  7283. if(IsNumeric(string2))
  7284. {
  7285. new idd = strval(string2);
  7286. if(idd >= 400 && idd <= 611)
  7287. {
  7288. return idd;
  7289. }
  7290. }
  7291. for(new i = 0; i < sizeof(vehName); i++)
  7292. {
  7293. if(strfind(vehName[i], string2, true) != -1)
  7294. {
  7295. return i + 400;
  7296. }
  7297. }
  7298. return 0;
  7299. }
  7300. //==============================================================================
  7301. stock IsFactionVehicle(modelid)
  7302. {
  7303. if(modelid == 470 || modelid == 596 || modelid == 597|| modelid == 598 || modelid == 599 || modelid == 582 || modelid == 548 || modelid == 544 || modelid == 523 || modelid == 497 || modelid == 490 || modelid == 488 || modelid == 432 || modelid == 430 || modelid == 427 || modelid == 425 || modelid == 420 || modelid == 416 || modelid == 407) return 1;
  7304. else return 0;
  7305. }
  7306. //==============================================================================
  7307. stock GetPlayerGender(playerid)
  7308. {
  7309. new str[128];
  7310. switch(PlayerInfo[playerid][pSex])
  7311. {
  7312. case 1:
  7313. str = "his";
  7314. case 2:
  7315. str = "her";
  7316. default: // If player sex is unknown - Vega
  7317. str = "their";
  7318. }
  7319. return str;
  7320. }
  7321. stock GetCrimeType(type)
  7322. {
  7323. new str[128];
  7324. switch(type)
  7325. {
  7326. case 0: str = "ERROR";
  7327. case 1: str = "Ticket";
  7328. case 2: str = "Warrant";
  7329. case 3: str = "BOLO";
  7330. }
  7331. return str;
  7332. }
  7333. stock GetPlayerRank(playerid)
  7334. {
  7335. new str[128];
  7336. str = "None";
  7337. if(customRankName[playerid] == true)
  7338. {
  7339. if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pFMember] != 0)
  7340. {
  7341. format(str, sizeof(str), "%s", customRank[playerid]);
  7342. }
  7343. else
  7344. {
  7345. str = "None";
  7346. }
  7347. }
  7348. else
  7349. {
  7350. // if player is in a family, format family rank
  7351. if(PlayerInfo[playerid][pFMember] != 255)
  7352. {
  7353. new fam = PlayerInfo[playerid][pFMember];
  7354. new rank = PlayerInfo[playerid][pRank];
  7355. if(rank >= 1 && rank <= 6)
  7356. {
  7357. format(str, sizeof(str), "%s", FamilyRank[fam][rank -1]);
  7358. }
  7359. else
  7360. {
  7361. format(str, sizeof(str), "%s", FamilyRank[fam][0]);
  7362. }
  7363. }
  7364. // else format faction rank
  7365. else if(PlayerInfo[playerid][pMember] >= 1)
  7366. {
  7367. // format str according to rank title and broadcast
  7368. switch(PlayerInfo[playerid][pMember])
  7369. {
  7370. case 1: // police
  7371. {
  7372. switch(PlayerInfo[playerid][pRank])
  7373. {
  7374. case 9:
  7375. str = "Commissioner";
  7376. case 8:
  7377. str = "Chief of Police";
  7378. case 7:
  7379. str = "Deputy Chief of Police";
  7380. case 6:
  7381. str = "Commander";
  7382. case 5:
  7383. str = "Captain";
  7384. case 4:
  7385. str = "Lieutenant";
  7386. case 3:
  7387. str = "Sergeant";
  7388. case 2:
  7389. str = "Senior Officer";
  7390. case 1:
  7391. str = "Officer";
  7392. default:
  7393. str = "Cadet";
  7394. }
  7395. }
  7396. case 2: // fbi
  7397. {
  7398. switch(PlayerInfo[playerid][pRank])
  7399. {
  7400. case 7:
  7401. str = "Director";
  7402. case 6:
  7403. str = "Deputy Director";
  7404. case 5:
  7405. str = "Chief of Staff";
  7406. case 4:
  7407. str = "Special Agent in Charge";
  7408. case 3:
  7409. str = "Special Agent";
  7410. case 2:
  7411. str = "Agent";
  7412. case 1:
  7413. str = "Staff";
  7414. default:
  7415. str = "Intern";
  7416. }
  7417. }
  7418. case 3: // SASD
  7419. {
  7420. switch(PlayerInfo[playerid][pRank])
  7421. {
  7422. case 7: str = "Sheriff";
  7423. case 6: str = "Undersheriff";
  7424. case 5: str = "Commander";
  7425. case 4: str = "Captain";
  7426. case 3: str = "Sergeant";
  7427. case 2: str = "Deputy ll";
  7428. case 1: str = "Deputy";
  7429. default: str = "Cadet";
  7430. }
  7431. }
  7432. case 4: // SAFMD
  7433. {
  7434. switch(PlayerInfo[playerid][pRank])
  7435. {
  7436. case 6:
  7437. str = rankNames_FMD[6];
  7438. case 5:
  7439. str = rankNames_FMD[5];
  7440. case 4:
  7441. str = rankNames_FMD[4];
  7442. case 3:
  7443. str = rankNames_FMD[3];
  7444. case 2:
  7445. str = rankNames_FMD[2];
  7446. case 1:
  7447. str = rankNames_FMD[1];
  7448. default:
  7449. str = rankNames_FMD[0];
  7450. }
  7451. }
  7452. case 5: // DoC
  7453. {
  7454. switch(PlayerInfo[playerid][pRank])
  7455. {
  7456. case 6:
  7457. str = "Warden";
  7458. case 5:
  7459. str = "Deputy Warden";
  7460. case 4:
  7461. str = "Captain";
  7462. case 3:
  7463. str = "Lieutenant";
  7464. case 2:
  7465. str = "Sergeant";
  7466. case 1:
  7467. str = "Corporal";
  7468. default:
  7469. str = "Correctional Officer";
  7470. }
  7471. }
  7472. case 6: // senate
  7473. {
  7474. switch(PlayerInfo[playerid][pRank])
  7475. {
  7476. case 5:
  7477. str = "President";
  7478. case 4:
  7479. str = "Vice-President";
  7480. case 3:
  7481. str = "Secretary";
  7482. case 2:
  7483. str = "Staff";
  7484. case 1:
  7485. str = "Security";
  7486. default:
  7487. str = "Intern";
  7488. }
  7489. }
  7490. case 7: // high court
  7491. {
  7492. switch(PlayerInfo[playerid][pRank])
  7493. {
  7494. case 1:
  7495. str = "Federal Judge";
  7496. default:
  7497. str = "State Judge";
  7498. }
  7499. }
  7500. case 9: // news
  7501. {
  7502. switch(PlayerInfo[playerid][pRank])
  7503. {
  7504. case 7:
  7505. str = "Network Executive";
  7506. case 6:
  7507. str = "Network Manager";
  7508. case 5:
  7509. str = "Chief of Staff";
  7510. case 4:
  7511. str = "News Anchor";
  7512. case 3:
  7513. str = "Correspondent";
  7514. case 2:
  7515. str = "Field Reporter";
  7516. case 1:
  7517. str = "Junior Reporter";
  7518. default:
  7519. str = "Intern";
  7520. }
  7521. }
  7522. case 10: // taxi
  7523. {
  7524. switch(PlayerInfo[playerid][pRank])
  7525. {
  7526. case 6:
  7527. str = "Commissioner";
  7528. case 5:
  7529. str = "Supervisor";
  7530. case 4:
  7531. str = "Veteran Driver";
  7532. case 3:
  7533. str = "Cabbie";
  7534. case 2:
  7535. str = "Taxi Driver";
  7536. case 1:
  7537. str = "Taxi Rookie";
  7538. default:
  7539. str = "Trainee";
  7540. }
  7541. }
  7542. case 11: // S9 ranks
  7543. {
  7544. switch(PlayerInfo[playerid][pRank])
  7545. {
  7546. case 3:
  7547. str = "ERROR66";
  7548. case 2:
  7549. str = "ERROR66";
  7550. case 1:
  7551. str = "ERROR66";
  7552. default:
  7553. str = "ERROR66";
  7554. }
  7555. }
  7556. case 14: // SANG
  7557. {
  7558. switch(PlayerInfo[playerid][pRank])
  7559. {
  7560. case 6:
  7561. str = "General";
  7562. case 5:
  7563. str = "Lieutenant General";
  7564. case 4:
  7565. str = "Colonel";
  7566. case 3:
  7567. str = "Major";
  7568. case 2:
  7569. str = "Sergeant";
  7570. case 1:
  7571. str = "Corporal";
  7572. default:
  7573. str = "Private";
  7574. }
  7575. }
  7576. case 15: //SAS
  7577. {
  7578. switch(PlayerInfo[playerid][pRank])
  7579. {
  7580. case 8:
  7581. str = "Executive";
  7582. case 7:
  7583. str = "Comptroller";
  7584. case 6:
  7585. str = "Manager";
  7586. case 5:
  7587. str = "Assistant Manager";
  7588. case 4:
  7589. str = "Supervisor";
  7590. case 3:
  7591. str = "Senior Worker";
  7592. case 2:
  7593. str = "Worker";
  7594. case 1:
  7595. str = "Laborer";
  7596. default:
  7597. str = "Probationary";
  7598. }
  7599. }
  7600. }
  7601. }
  7602. }
  7603. if(PlayerInfo[playerid][pMember] == 11)
  7604. {
  7605. str = GetFakeRank(playerid);
  7606. }
  7607. return str;
  7608. }
  7609. stock GetFactionRankName(factionid, rankid)
  7610. {
  7611. new str[128];
  7612. switch(factionid)
  7613. {
  7614. case 1: // police
  7615. {
  7616. switch(rankid)
  7617. {
  7618. case 9:
  7619. str = "Commissioner";
  7620. case 8:
  7621. str = "Chief of Police";
  7622. case 7:
  7623. str = "Deputy Chief of Police";
  7624. case 6:
  7625. str = "Commander";
  7626. case 5:
  7627. str = "Captain";
  7628. case 4:
  7629. str = "Lieutenant";
  7630. case 3:
  7631. str = "Sergeant";
  7632. case 2:
  7633. str = "Senior Officer";
  7634. case 1:
  7635. str = "Officer";
  7636. default:
  7637. str = "Cadet";
  7638. }
  7639. }
  7640. case 2: // old fbi | New DEA
  7641. {
  7642. switch(rankid)
  7643. {
  7644. case 8:
  7645. str = "Director";
  7646. case 7:
  7647. str = "Deputy Director";
  7648. case 6:
  7649. str = "Chief of Staff";
  7650. case 4:
  7651. str = "Special Agent in Charge";
  7652. case 3:
  7653. str = "Special Agent";
  7654. case 2:
  7655. str = "Agent";
  7656. case 1:
  7657. str = "Staff";
  7658. default:
  7659. str = "Intern";
  7660. }
  7661. }
  7662. case 3: // SASD
  7663. {
  7664. switch(rankid)
  7665. {
  7666. case 7: str = "Sheriff";
  7667. case 6: str = "Undersheriff";
  7668. case 5: str = "Commander";
  7669. case 4: str = "Captain";
  7670. case 3: str = "Sergeant";
  7671. case 2: str = "Deputy ll";
  7672. case 1: str = "Deputy";
  7673. default: str = "Cadet";
  7674. }
  7675. }
  7676. case 4: // SAFMD
  7677. {
  7678. switch(rankid)
  7679. {
  7680. case 6:
  7681. str = rankNames_FMD[6];
  7682. case 5:
  7683. str = rankNames_FMD[5];
  7684. case 4:
  7685. str = rankNames_FMD[4];
  7686. case 3:
  7687. str = rankNames_FMD[3];
  7688. case 2:
  7689. str = rankNames_FMD[2];
  7690. case 1:
  7691. str = rankNames_FMD[1];
  7692. default:
  7693. str = rankNames_FMD[0];
  7694. }
  7695. }
  7696. case 5: // DoC
  7697. {
  7698. switch(rankid)
  7699. {
  7700. case 6:
  7701. str = "Warden";
  7702. case 5:
  7703. str = "Deputy Warden";
  7704. case 4:
  7705. str = "Captain";
  7706. case 3:
  7707. str = "Lieutenant";
  7708. case 2:
  7709. str = "Sergeant";
  7710. case 1:
  7711. str = "Corporal";
  7712. default:
  7713. str = "Correctional Officer";
  7714. }
  7715. }
  7716. case 6: // senate
  7717. {
  7718. switch(rankid)
  7719. {
  7720. case 5:
  7721. str = "President";
  7722. case 4:
  7723. str = "Vice-President";
  7724. case 3:
  7725. str = "Secretary";
  7726. case 2:
  7727. str = "Staff";
  7728. case 1:
  7729. str = "Security";
  7730. default:
  7731. str = "Intern";
  7732. }
  7733. }
  7734. case 7: // high court
  7735. {
  7736. switch(rankid)
  7737. {
  7738. case 6:
  7739. str = "Chief Justice";
  7740. case 5:
  7741. str = "Attorney General";
  7742. case 4:
  7743. str = "Associate Justice";
  7744. case 3:
  7745. str = "Judge";
  7746. case 2:
  7747. str = "District Attorney";
  7748. case 1:
  7749. str = "Public Defender";
  7750. default:
  7751. str = "Law Student";
  7752. }
  7753. }
  7754. case 9: // news
  7755. {
  7756. switch(rankid)
  7757. {
  7758. case 7:
  7759. str = "Network Executive";
  7760. case 6:
  7761. str = "Network Manager";
  7762. case 5:
  7763. str = "Chief of Staff";
  7764. case 4:
  7765. str = "News Anchor";
  7766. case 3:
  7767. str = "Correspondent";
  7768. case 2:
  7769. str = "Field Reporter";
  7770. case 1:
  7771. str = "Junior Reporter";
  7772. default:
  7773. str = "Intern";
  7774. }
  7775. }
  7776. case 10: // taxi
  7777. {
  7778. switch(rankid)
  7779. {
  7780. case 6:
  7781. str = "Commissioner";
  7782. case 5:
  7783. str = "Supervisor";
  7784. case 4:
  7785. str = "Veteran Driver";
  7786. case 3:
  7787. str = "Cabbie";
  7788. case 2:
  7789. str = "Taxi Driver";
  7790. case 1:
  7791. str = "Taxi Rookie";
  7792. default:
  7793. str = "Trainee";
  7794. }
  7795. }
  7796. case 11: // S9 ranks
  7797. {
  7798. switch(rankid)
  7799. {
  7800. case 3:
  7801. str = "ERROR66";
  7802. case 2:
  7803. str = "ERROR66";
  7804. case 1:
  7805. str = "ERROR66";
  7806. default:
  7807. str = "ERROR66";
  7808. }
  7809. }
  7810. case 14: // SANG
  7811. {
  7812. switch(rankid)
  7813. {
  7814. case 6:
  7815. str = "General";
  7816. case 5:
  7817. str = "Lieutenant General";
  7818. case 4:
  7819. str = "Colonel";
  7820. case 3:
  7821. str = "Major";
  7822. case 2:
  7823. str = "Sergeant";
  7824. case 1:
  7825. str = "Corporal";
  7826. default:
  7827. str = "Private";
  7828. }
  7829. }
  7830. case 15: //SAS
  7831. {
  7832. switch(rankid)
  7833. {
  7834. case 8:
  7835. str = "Executive";
  7836. case 7:
  7837. str = "Comptroller";
  7838. case 6:
  7839. str = "Manager";
  7840. case 5:
  7841. str = "Assistant Manager";
  7842. case 4:
  7843. str = "Supervisor";
  7844. case 3:
  7845. str = "Senior Worker";
  7846. case 2:
  7847. str = "Worker";
  7848. case 1:
  7849. str = "Laborer";
  7850. default:
  7851. str = "Probationary";
  7852. }
  7853. }
  7854. }
  7855. return str;
  7856. }
  7857. stock IsValidPaymentFaction(playerid)
  7858. {
  7859. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == FACTION_SANG) return 1;
  7860. return 0;
  7861. }
  7862. stock GetPlayerFactionPayment(playerid)
  7863. {
  7864. new payment;
  7865. switch(PlayerInfo[playerid][pMember])
  7866. {
  7867. case 1: // police
  7868. {
  7869. switch(PlayerInfo[playerid][pRank])
  7870. {
  7871. case 9:
  7872. payment = 15500;
  7873. case 8:
  7874. payment = 15000;
  7875. case 7:
  7876. payment = 14500;
  7877. case 6:
  7878. payment = 12000;
  7879. case 5:
  7880. payment = 10000;
  7881. case 4:
  7882. payment = 8000;
  7883. case 3:
  7884. payment = 6500;
  7885. case 2:
  7886. payment = 5500;
  7887. case 1:
  7888. payment = 5000;
  7889. default:
  7890. payment = 4500;
  7891. }
  7892. }
  7893. case 2: // fbi | DEA
  7894. {
  7895. switch(PlayerInfo[playerid][pRank])
  7896. {
  7897. case 6:
  7898. payment = 13000;
  7899. case 5:
  7900. payment = 12000;
  7901. case 4:
  7902. payment = 10000;
  7903. case 3:
  7904. payment = 9000;
  7905. case 2:
  7906. payment = 8000;
  7907. case 1:
  7908. payment = 7000;
  7909. default:
  7910. payment = 5500;
  7911. }
  7912. }
  7913. case 4: // fmd
  7914. {
  7915. switch(PlayerInfo[playerid][pRank])
  7916. {
  7917. case 8:
  7918. payment = 16000;
  7919. case 7:
  7920. payment = 15000;
  7921. case 6:
  7922. payment = 14500;
  7923. case 5:
  7924. payment = 12000;
  7925. case 4:
  7926. payment = 9000;
  7927. case 3:
  7928. payment = 7000;
  7929. case 2:
  7930. payment = 5500;
  7931. case 1:
  7932. payment = 5300;
  7933. default:
  7934. payment = 4500;
  7935. }
  7936. }
  7937. case 14: // SANG
  7938. {
  7939. switch(PlayerInfo[playerid][pRank])
  7940. {
  7941. case 8:
  7942. payment = 14000;
  7943. case 7:
  7944. payment = 13500;
  7945. case 6:
  7946. payment = 11000;
  7947. case 5:
  7948. payment = 9000;
  7949. case 4:
  7950. payment = 7000;
  7951. case 3:
  7952. payment = 5500;
  7953. case 2:
  7954. payment = 4500;
  7955. case 1:
  7956. payment = 4000;
  7957. default:
  7958. payment = 3500;
  7959. }
  7960. }
  7961. case 6: // gov
  7962. {
  7963. switch(PlayerInfo[playerid][pRank])
  7964. {
  7965. case 7:
  7966. payment = 16500;
  7967. case 6:
  7968. payment = 13500;
  7969. case 5:
  7970. payment = 10000;
  7971. case 4:
  7972. payment = 8000;
  7973. case 3:
  7974. payment = 6500;
  7975. case 2:
  7976. payment = 5500;
  7977. case 1:
  7978. payment = 4500;
  7979. default:
  7980. payment = 3500;
  7981. }
  7982. }
  7983. }
  7984. return payment;
  7985. }
  7986. stock GetFakeRank(playerid)
  7987. {
  7988. new str[128];
  7989. str = "None";
  7990. new DEARank[24];
  7991. if(PlayerInfo[playerid][pMember] == 11)
  7992. {
  7993. str = GetFactionRankName(FakeFaction[playerid], FakeRank[playerid]);
  7994. }
  7995. else
  7996. {
  7997. if(PlayerInfo[playerid][pHAFakeBadge] == 12 && PlayerInfo[playerid][pGroup] == 1)
  7998. switch(PlayerInfo[playerid][pGroupRank])
  7999. {
  8000. case 1:
  8001. DEARank = "Staff";
  8002. case 2:
  8003. DEARank = "Agent";
  8004. case 3:
  8005. DEARank = "Agent";
  8006. case 4:
  8007. DEARank = "Special Agent";
  8008. case 5:
  8009. DEARank = "Special Agent In-Charge";
  8010. case 6:
  8011. DEARank = "Special Agent In-Charge";
  8012. default:
  8013. DEARank = "Staff";
  8014. }
  8015. switch(PlayerInfo[playerid][pHAFakeBadge])
  8016. {
  8017. case 1:
  8018. str = "Officer";
  8019. case 2:
  8020. str = "Staff";
  8021. case 3:
  8022. str = "Deputy Trooper I";
  8023. case 4:
  8024. str = "First Responder";
  8025. case 5:
  8026. str = "Corporal";
  8027. case 6:
  8028. str = "Staff";
  8029. case 14:
  8030. str = "Corporal";
  8031. case 12:
  8032. str = DEARank;
  8033. }
  8034. }
  8035. return str;
  8036. }
  8037. stock RealS9Rank(playerid)
  8038. {
  8039. new str[128];
  8040. switch(PlayerInfo[playerid][pGroupRank])
  8041. {
  8042. case 4:
  8043. str = "Director";
  8044. case 3:
  8045. str = "Assistant Director";
  8046. case 2:
  8047. str = "Special Agent";
  8048. case 1:
  8049. str = "Senior Agent";
  8050. case 0:
  8051. str = "Agent";
  8052. default:
  8053. str = "Error: contact Avery";
  8054. }
  8055. return str;
  8056. }
  8057. //==============================================================================
  8058. stock str_replace(sSearch, sReplace, const sSubject[], &iCount = 0)
  8059. {
  8060. #pragma unused iCount
  8061. new sReturn[128];
  8062. format(sReturn, sizeof(sReturn), sSubject);
  8063. for(new i = 0; i < sizeof(sReturn); i++)
  8064. {
  8065. if(sReturn[i] == sSearch)
  8066. {
  8067. sReturn[i] = sReplace;
  8068. }
  8069. }
  8070. return sReturn;
  8071. }
  8072. stock PlayerName(playerid)
  8073. {
  8074. new name[MAX_PLAYER_NAME+1];
  8075. GetPlayerName(playerid, name, sizeof(name));
  8076. return name;
  8077. }
  8078. stock CallerIDName(playerid, bool:status)
  8079. {
  8080. new name[MAX_PLAYER_NAME];
  8081. if(status == true)name = "Unknown";
  8082. else
  8083. {
  8084. strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
  8085. }
  8086. return name;
  8087. }
  8088. stock PlayerOOCName(playerid)
  8089. {
  8090. new name[24];
  8091. strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
  8092. return name;
  8093. }
  8094. stock PlayerICName(playerid)
  8095. {
  8096. new name[MAX_PLAYER_NAME];
  8097. if(PlayerInfo[playerid][pMask] == 0 || ADuty[playerid])
  8098. {
  8099. strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
  8100. }
  8101. else
  8102. {
  8103. if(PlayerInfo[playerid][pMember] == FACTION_FBI)
  8104. {
  8105. format(name, sizeof(name), "Agent");
  8106. }
  8107. // Masks without numbers
  8108. if(
  8109. PlayerInfo[playerid][pGroup] == GROUP_S9 ||
  8110. PlayerInfo[playerid][pGroup] == GROUP_HITMAN ||
  8111. PlayerInfo[playerid][pGroup] == GROUP_CRIME
  8112. )
  8113. {
  8114. if(PlayerInfo[playerid][pMaskName][0] != 0)
  8115. format(name, sizeof(name), "%s", PlayerInfo[playerid][pMaskName]);
  8116. else
  8117. {
  8118. format(name, sizeof(name), "Stranger");
  8119. }
  8120. }
  8121. // Mask with numbers
  8122. else if(
  8123. PlayerInfo[playerid][pGroup] == GROUP_CARTEL
  8124. )
  8125. {
  8126. if(PlayerInfo[playerid][pMaskName][0] != 0)
  8127. {
  8128. format(name, sizeof(name), "%s (%i)", PlayerInfo[playerid][pMaskName], MaskNumber[playerid]);
  8129. }
  8130. else
  8131. {
  8132. format(name, sizeof(name), "Stranger (%i)", MaskNumber[playerid]);
  8133. }
  8134. }
  8135. else
  8136. {
  8137. format(name, sizeof(name), "Stranger (%i)", MaskNumber[playerid]);
  8138. }
  8139. }
  8140. return name;
  8141. }
  8142. stock GetPlayerICName(playerid, stringtoedit[], size)
  8143. {
  8144. strmid(stringtoedit, PlayerICName(playerid), 0, MAX_PLAYER_NAME, size);
  8145. }
  8146. //==============================================================================
  8147. stock InvalidChar(string[])
  8148. {
  8149. if(strfind(string, "|", true) == -1)
  8150. {
  8151. return 0;
  8152. }
  8153. else
  8154. {
  8155. return 1;
  8156. }
  8157. }
  8158. //==============================================================================
  8159. stock strvalEx(string[ ])
  8160. {
  8161. if(strlen(string) >= 50) return -1;
  8162. return strval(string);
  8163. }
  8164. stock DestroyDynamicObjectEx(&objectid)
  8165. {
  8166. if(IsValidDynamicObject(objectid)){
  8167. DestroyDynamicObject(objectid);
  8168. objectid = 0;
  8169. return 1;
  8170. }
  8171. return 0;
  8172. }
  8173. //==============================================================================
  8174. stock IsValidNosVehicle(vehicleid)
  8175. {
  8176. if(IsAPlane(vehicleid)) return 0;
  8177. else if(IsAHelicopter(vehicleid)) return 0;
  8178. switch(GetVehicleModel(vehicleid))
  8179. {
  8180. case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586,
  8181. 509, 481, 510, 472, 473, 493, 595, 484, 430, 453,
  8182. 452, 446, 454, 590, 569, 537, 538, 570, 449: return 0;
  8183. }
  8184. return 1;
  8185. }
  8186. stock IsACar(vehicleid)
  8187. {
  8188. switch(GetVehicleModel(vehicleid))
  8189. {
  8190. case 400 .. 416, 418 .. 424, 426 .. 429, 431 .. 445, 448, 451, 455 .. 459, 461 .. 463, 466 .. 468, 470, 471, 474, 475, 477 .. 480, 482, 483, 485, 486, 489 .. 492, 494 .. 496, 498 .. 500, 502 .. 508, 514 .. 518, 521 .. 536, 540 .. 547, 549 .. 552, 554 .. 562, 565 .. 576, 578 .. 591, 596 .. 611:
  8191. return 1;
  8192. }
  8193. return 0;
  8194. }
  8195. //==============================================================================
  8196. stock IsADriveByWeapon(weaponid)
  8197. {
  8198. if( weaponid == WEAPON_UZI ||
  8199. weaponid == WEAPON_TEC9 ||
  8200. weaponid == WEAPON_MP5 ||
  8201. weaponid == WEAPON_AK47 ||
  8202. weaponid == WEAPON_M4
  8203. ) return true;
  8204. return false;
  8205. }
  8206. //==============================================================================
  8207. stock IsInvalidSkin(skinid)
  8208. {
  8209. switch(skinid)
  8210. {
  8211. case 3, 4, 5, 6, 7, 8, 42, 65, 74, 86,
  8212. 119, 149, 208, 273, 289: return 1;
  8213. }
  8214. return 0;
  8215. }
  8216. //==============================================================================
  8217. stock IsInvalidDetainSeat(vehicleid)
  8218. {
  8219. switch(GetVehicleModel(vehicleid))
  8220. {
  8221. case 528, 601, 599:
  8222. return 1;
  8223. }
  8224. return 0;
  8225. }
  8226. //==============================================================================
  8227. stock IsInvalidDetainVehicle(vehicleid)
  8228. {
  8229. switch(GetVehicleModel(vehicleid))
  8230. {
  8231. case 509, 481, 462, 510, 448, 471:
  8232. return 1;
  8233. }
  8234. return 0;
  8235. }
  8236. //==============================================================================
  8237. IsValidStretcherVehicle(vehicleid)
  8238. {
  8239. switch(GetVehicleModel(vehicleid))
  8240. {
  8241. case 563, 416:
  8242. return 1;
  8243. }
  8244. return 0;
  8245. }
  8246. //==============================================================================
  8247. stock IsNonFuelVehicle(vehicleid)
  8248. {
  8249. switch(GetVehicleModel(vehicleid))
  8250. {
  8251. case 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513, 548, 425,
  8252. 417, 487, 488, 497, 563, 447, 469, 509, 481, 510, 472, 473, 493, 595,
  8253. 484, 430, 453, 452, 446, 454, 449, 537, 538, 569, 570, 590: return 1;
  8254. }
  8255. return 0;
  8256. }
  8257. //==============================================================================
  8258. stock IsABike(vehicleid)
  8259. {
  8260. switch(GetVehicleModel(vehicleid))
  8261. {
  8262. case 448, 461, 462, 463, 468, 521, 522, 523, 581, 586, 481, 509, 510:
  8263. return 1;
  8264. }
  8265. return 0;
  8266. }
  8267. stock IsAPushBike(vehicleid)
  8268. {
  8269. switch(GetVehicleModel(vehicleid))
  8270. {
  8271. case 509, 481, 510:
  8272. return 1;
  8273. }
  8274. return 0;
  8275. }
  8276. stock isABike(vehicleid)
  8277. {
  8278. switch(GetVehicleModel(vehicleid))
  8279. {
  8280. case 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471:
  8281. return 1;
  8282. }
  8283. return 0;
  8284. }
  8285. //==============================================================================
  8286. stock IsABicycle(vehicleid)
  8287. {
  8288. switch(GetVehicleModel(vehicleid))
  8289. {
  8290. case 509, 481, 510:
  8291. return 1;
  8292. }
  8293. return 0;
  8294. }
  8295. //==============================================================================
  8296. stock IsInvalidNeonVehicle(vehicleid)
  8297. {
  8298. switch(GetVehicleModel(vehicleid))
  8299. {
  8300. case 403, 406..408, 414, 416, 417, 423, 425, 427, 428, 430..433,
  8301. 435, 437, 441, 443, 446..450, 452..456, 460..465, 468..473, 476,
  8302. 478, 481..490, 493, 497, 498, 499, 501, 504, 505, 507..517, 519..526,
  8303. 528..532, 537..539, 542..544, 546..549, 551..557, 561, 563, 564,
  8304. 568..574, 577, 578, 581..586, 588, 590..597, 599..602, 604..611: return 1;
  8305. }
  8306. return 0;
  8307. }
  8308. //==============================================================================
  8309. stock IsABoat(vehicleid)
  8310. {
  8311. switch(GetVehicleModel(vehicleid))
  8312. {
  8313. case 430, 446, 452, 453, 454, 472, 473, 484, 493, 595:
  8314. return 1;
  8315. }
  8316. return 0;
  8317. }
  8318. //==============================================================================
  8319. stock IsAPlane(vehicleid)
  8320. {
  8321. switch(GetVehicleModel(vehicleid))
  8322. {
  8323. case 460, 464, 476, 511, 512, 513, 519, 520, 553, 577, 592, 593:
  8324. return 1;
  8325. }
  8326. return 0;
  8327. }
  8328. //==============================================================================
  8329. stock IsAHelicopter(vehicleid)
  8330. {
  8331. switch(GetVehicleModel(vehicleid))
  8332. {
  8333. case 417, 425, 447, 465, 469, 487, 488, 497, 501, 548, 563:
  8334. return 1;
  8335. }
  8336. return 0;
  8337. }
  8338. //==============================================================================
  8339. stock IsATrain(vehicleid)
  8340. {
  8341. switch(GetVehicleModel(vehicleid))
  8342. {
  8343. case 449, 537, 538, 569, 570, 590:
  8344. return 1;
  8345. }
  8346. return 0;
  8347. }
  8348. //==============================================================================
  8349. stock IsACopCar(vehicleid)
  8350. {
  8351. switch(GetVehicleModel(vehicleid))
  8352. {
  8353. //commented enforcer 427 so people can drive it
  8354. case 523, 528, 596, 598, 597, 599, 601, 497, 430, 427, 472:
  8355. return 1;
  8356. }
  8357. return 0;
  8358. }
  8359. //==============================================================================
  8360. stock IsANGCar(vehicleid)
  8361. {
  8362. if(vehicleid == DOCbus) return 1;
  8363. switch(GetVehicleModel(vehicleid))
  8364. {
  8365. case 470, 472, 548, 433, 432, 425, 520, 427, 476:
  8366. return 1;
  8367. }
  8368. return 0;
  8369. }
  8370. //==============================================================================
  8371. //==============================================================================
  8372. stock IsAGovtCar(vehicleid)
  8373. {
  8374. switch(GetVehicleModel(vehicleid))
  8375. {
  8376. case 0:
  8377. return 1;
  8378. }
  8379. return 0;
  8380. }
  8381. //==============================================================================
  8382. stock IsAnAmbulance(vehicleid)
  8383. {
  8384. switch(GetVehicleModel(vehicleid))
  8385. {
  8386. case 416, 407, 563, 544:
  8387. return 1;
  8388. }
  8389. return 0;
  8390. }
  8391. stock IsDMVCar(vehicleid)
  8392. {
  8393. for(new i = 0; i < sizeof(DMVCar); i++)
  8394. {
  8395. if(vehicleid == DMVCar[i]) return 1;
  8396. }
  8397. return 0;
  8398. }
  8399. //==============================================================================
  8400. stock IsABronzeCar(vehicleid)
  8401. {
  8402. switch(GetVehicleModel(vehicleid))
  8403. {
  8404. case 559, 560, 581:
  8405. return 1;
  8406. }
  8407. return 0;
  8408. }
  8409. stock IsASilverCar(vehicleid)
  8410. {
  8411. switch(GetVehicleModel(vehicleid))
  8412. {
  8413. case 522, 451, 603:
  8414. return 1;
  8415. }
  8416. return 0;
  8417. }
  8418. stock IsAGoldCar(vehicleid)
  8419. {
  8420. switch(GetVehicleModel(vehicleid))
  8421. {
  8422. case 541, 411:
  8423. return 1;
  8424. }
  8425. return 0;
  8426. }
  8427. stock IsADiamondCar(vehicleid)
  8428. {
  8429. switch(GetVehicleModel(vehicleid))
  8430. {
  8431. case 562, 415, 434, 535, 495, 515, 487:
  8432. return 1;
  8433. }
  8434. return 0;
  8435. }
  8436. //==============================================================================
  8437. stock IsAVipCar(vehicleid)
  8438. {
  8439. for(new i = 0; i < sizeof(VipCars); i++) {
  8440. if(vehicleid == VipCars[i])
  8441. return 1;
  8442. }
  8443. return 0;
  8444. }
  8445. //==============================================================================
  8446. stock IsATaxiCar(vehicleid)
  8447. {
  8448. switch(GetVehicleModel(vehicleid))
  8449. {
  8450. case 420, 438:
  8451. return 1;
  8452. }
  8453. return 0;
  8454. }
  8455. //==============================================================================
  8456. stock IsANewsCar(vehicleid)
  8457. {
  8458. switch(GetVehicleModel(vehicleid))
  8459. {
  8460. case 582, 488:
  8461. return 1;
  8462. }
  8463. return 0;
  8464. }
  8465. //==============================================================================
  8466. stock IsABus(vehicleid)
  8467. {
  8468. switch(GetVehicleModel(vehicleid))
  8469. {
  8470. case 431, 437:
  8471. return 1;
  8472. }
  8473. return 0;
  8474. }
  8475. stock IsASenateCar(veh)
  8476. {
  8477. for(new v = 0; v < sizeof(SenateCar); v++)
  8478. {
  8479. if(v == veh) return 1;
  8480. }
  8481. return 0;
  8482. }
  8483. //==============================================================================
  8484. stock TakePlayerWeapon(playerid, pgun)
  8485. {
  8486. if(IsPlayerConnected(playerid))
  8487. {
  8488. new weapons[13];
  8489. new aweapons[13];
  8490. for(new i = 0; i < 13; i++)
  8491. {
  8492. aweapons[i] = aGun[playerid][i];
  8493. }
  8494. weapons[12] = PlayerInfo[playerid][pGun12];
  8495. weapons[11] = PlayerInfo[playerid][pGun11];
  8496. weapons[10] = PlayerInfo[playerid][pGun10];
  8497. weapons[9] = PlayerInfo[playerid][pGun9];
  8498. weapons[8] = PlayerInfo[playerid][pGun8];
  8499. weapons[7] = PlayerInfo[playerid][pGun7];
  8500. weapons[6] = PlayerInfo[playerid][pGun6];
  8501. weapons[5] = PlayerInfo[playerid][pGun5];
  8502. weapons[4] = PlayerInfo[playerid][pGun4];
  8503. weapons[3] = PlayerInfo[playerid][pGun3];
  8504. weapons[2] = PlayerInfo[playerid][pGun2];
  8505. weapons[1] = PlayerInfo[playerid][pGun1];
  8506. weapons[0] = PlayerInfo[playerid][pGun0];
  8507. ClearGuns(playerid);
  8508. for(new i = 0; i < 13; i++)
  8509. {
  8510. if(pgun != aweapons[i]) GivePlayerAdminGun(playerid, aweapons[i]);
  8511. if(pgun != weapons[i]) GivePlayerGun(playerid, weapons[i]);
  8512. }
  8513. }
  8514. return 1;
  8515. }
  8516. //==============================================================================
  8517. stock SetPlayerFacingPlayer(playerid, giveplayerid)
  8518. {
  8519. new Float:angle;
  8520. new Float:misc = 5.0;
  8521. new Float:x, Float:y, Float:z;
  8522. new Float:ix, Float:iy, Float:iz;
  8523. GetPlayerPos(giveplayerid, x, y, z);
  8524. GetPlayerPos(playerid, ix, iy, iz);
  8525. angle = 180.0 -atan2(ix -x, iy -y);
  8526. angle += misc;
  8527. misc *= -1;
  8528. SetPlayerFacingAngle(playerid, angle +misc);
  8529. }
  8530. //==============================================================================
  8531. stock SetPlayerFacingObject(playerid, objectid)
  8532. {
  8533. new Float:angle;
  8534. new Float:misc = 5.0;
  8535. new Float:X, Float:Y, Float:Z;
  8536. new Float:plX, Float:plY, Float:plZ;
  8537. GetDynamicObjectPos(objectid, X, Y, Z);
  8538. GetPlayerPos(playerid, plX, plY, plZ);
  8539. angle = 180.0 -atan2(plX -X, plY -Y);
  8540. angle += misc;
  8541. misc *= -1;
  8542. SetPlayerFacingAngle(playerid, angle +misc);
  8543. }
  8544. //==============================================================================
  8545. stock GetPlayerSpeed(playerid, bool:kmh)
  8546. {
  8547. new Float:Vx, Float:Vy, Float:Vz, Float:rtn;
  8548. if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), Vx, Vy, Vz);
  8549. else GetPlayerVelocity(playerid, Vx, Vy, Vz);
  8550. rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz, 2)));
  8551. return kmh ?floatround(rtn * 100 * 1.61) :floatround(rtn * 100);
  8552. }
  8553. //==============================================================================
  8554. stock GetPlayerSpeed2(playerid, get3d)
  8555. {
  8556. new Float:x, Float:y, Float:z;
  8557. if(IsPlayerInAnyVehicle(playerid))
  8558. GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
  8559. else
  8560. GetPlayerVelocity(playerid, x, y, z);
  8561. return JB_Speed(x, y, z, 100.0, get3d);
  8562. }
  8563. //==============================================================================
  8564. stock GetSquareDistance(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
  8565. {
  8566. x1 -=x2;
  8567. y1 -=y2;
  8568. z1 -=z2;
  8569. x1 *=x1;
  8570. y1 *=y1;
  8571. z1 *=z1;
  8572. return floatround(x1 +y1 +z1);
  8573. }
  8574. //==============================================================================
  8575. stock GetClosestPlayer(p1)
  8576. {
  8577. new Float:dis, Float:dis2, player2;
  8578. player2 = -1;
  8579. dis = 99999.99;
  8580. foreach( new i: Player )
  8581. {
  8582. if(GetPlayerState(i) != PLAYER_STATE_SPECTATING)
  8583. {
  8584. if(i != p1)
  8585. {
  8586. dis2 = GetDistanceBetweenPlayers(i, p1);
  8587. if(dis2 < dis && dis2 != -1.00)
  8588. {
  8589. dis = dis2;
  8590. player2 = i;
  8591. }
  8592. }
  8593. }
  8594. }
  8595. return player2;
  8596. }
  8597. //==============================================================================
  8598. //==============================================================================
  8599. IsPlayerNearWeed(playerid)
  8600. {
  8601. for(new i = 0; i < MAX_WEED; i++)
  8602. {
  8603. if(WeedInfo[i][WeedPlanted] == 1)
  8604. {
  8605. if(IsPlayerInRangeOfPoint(playerid, 2.0, WeedInfo[i][WeedX], WeedInfo[i][WeedY], WeedInfo[i][WeedZ]))
  8606. {
  8607. return i;
  8608. }
  8609. }
  8610. }
  8611. return -1;
  8612. }
  8613. //==============================================================================
  8614. Timer:SlipOffFix(playerid){
  8615. slipOff[playerid] = false;
  8616. return 1;
  8617. }
  8618. //==============================================================================
  8619. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  8620. {
  8621. new str[128];
  8622. if(pDeathState[playerid] != PLAYER_STATE_NORMAL)
  8623. {
  8624. ClearAnimationsEx(playerid);
  8625. return 1;
  8626. }
  8627. //if(PlayerInfo[playerid][pLevel] <= 1 && (IsAPlane(vehicleid) || IsAHelicopter(vehicleid) ) )
  8628. if(IsAPlane(vehicleid) || IsAHelicopter(vehicleid))
  8629. {
  8630. if(PlayerInfo[playerid][pConnectTime] < 1) {
  8631. ClearAnimationsEx(playerid);
  8632. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8633. SendClientMessage(playerid, COLOR_GREY, "You must play for at least 1 hour before you can fly this.");
  8634. return 1;
  8635. }
  8636. }
  8637. new
  8638. dynvehID = GetDynamicVehicleID(vehicleid);
  8639. new bool:skip = false;
  8640. if(sVehicleInfo[dynvehID][v_lock] == 1)
  8641. {
  8642. ClearAnimationsEx(playerid);
  8643. return 1;
  8644. }
  8645. if(sVehicleInfo[dynvehID][v_faction] != 0 || sVehicleInfo[dynvehID][v_group] != 0)
  8646. {
  8647. if(!ispassenger)
  8648. {
  8649. if(PlayerInfo[playerid][pMember] == 3 && sVehicleInfo[dynvehID][v_faction] == 1) skip = true; // SASD can drive SAPD
  8650. if(PlayerInfo[playerid][pMember] == 1 && sVehicleInfo[dynvehID][v_faction] == 3) skip = true; // SAPD can drive SASD
  8651. if(PlayerInfo[playerid][pMember] == 2 && sVehicleInfo[dynvehID][v_faction] == 1) skip = true; // fbi | DEAcan drive SAPD
  8652. if(PlayerInfo[playerid][pMember] == 2 && sVehicleInfo[dynvehID][v_faction] == 3) skip = true; // fbi | DEA can drive SASD
  8653. if(PlayerInfo[playerid][pGroup] == GROUP_S9) skip = true; // s9 can drive all locked vehicles
  8654. if(PlayerInfo[playerid][pGroup] != 0 && PlayerInfo[playerid][pGroup] == sVehicleInfo[dynvehID][v_group]) skip = true;
  8655. if((PlayerInfo[playerid][pMember] != sVehicleInfo[dynvehID][v_faction]) && (skip == false))
  8656. {
  8657. if(!(sVehicleInfo[dynvehID][v_faction] == 10 && PlayerInfo[playerid][pJob] == 14))
  8658. {
  8659. displayCenterHUDInfo(playerid, "You do not have keys for this vehicle.", 8);
  8660. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8661. ClearAnimationsEx(playerid);
  8662. }
  8663. }
  8664. }
  8665. }
  8666. //if( JobOnPlayerEnterVehicle( playerid, vehicleid, ispassenger ) == 1 ) return 1;
  8667. new Float:x, Float:y, Float:z;
  8668. if(GetPlayerSurfingVehicleID(playerid) == vehicleid)
  8669. {
  8670. if(!IsABoat(vehicleid))
  8671. {
  8672. if(slipOff[playerid] == false){
  8673. new Float:hp;
  8674. GetPlayerHealth(playerid, hp);
  8675. GetPlayerPos(playerid, x, y, z);
  8676. format(str, sizeof(str), "* %s slipped off the top of the vehicle and fell.", PlayerICName(playerid));
  8677. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  8678. SetPlayerPos(playerid, x +3, y +3, z +1);
  8679. SetPlayerHealth(playerid, hp -3);
  8680. slipOff[playerid] = true;
  8681. PlayerPlaySound(playerid, 1130, 0.0, 0.0, 0.0);
  8682. LoopingAnim(playerid, "PED", "BIKE_fallR", 4.0, 0, 1, 1, 1, 0);
  8683. SetTimerEx("Timer_SlipOffFix", 5000, false, "i", playerid);
  8684. }
  8685. }
  8686. }
  8687. else if(IsAVipCar(vehicleid) && !ispassenger && !IsAtEvent[playerid])
  8688. {
  8689. if(IsAVipCar(vehicleid))
  8690. {
  8691. if(IsABronzeCar(vehicleid) && PlayerInfo[playerid][pDonateRank] <= 0)
  8692. {
  8693. displayCenterHUDInfo(playerid, "~w~You are not a~n~~y~Bronze ~p~VIP~w~.", 8); //display for 8 seconds
  8694. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8695. ClearAnimationsEx(playerid);
  8696. }
  8697. if(IsASilverCar(vehicleid) && PlayerInfo[playerid][pDonateRank] <= 1)
  8698. {
  8699. displayCenterHUDInfo(playerid, "~w~You are not a ~b~~h~~h~~h~Silver ~p~VIP~w~.", 8); //display for 8 seconds
  8700. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8701. ClearAnimationsEx(playerid);
  8702. }
  8703. if(IsAGoldCar(vehicleid) && PlayerInfo[playerid][pDonateRank] <= 2)
  8704. {
  8705. displayCenterHUDInfo(playerid, "~w~You are not a~n~~y~Gold ~p~VIP~w~.", 8); //display for 8 seconds
  8706. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8707. ClearAnimationsEx(playerid);
  8708. }
  8709. if(IsADiamondCar(vehicleid) && PlayerInfo[playerid][pDonateRank] <= 3)
  8710. {
  8711. displayCenterHUDInfo(playerid, "~w~You are not a~n~~y~Diamond ~p~VIP~w~.", 8); //display for 8 seconds
  8712. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8713. ClearAnimationsEx(playerid);
  8714. }
  8715. }
  8716. }
  8717. else if(isRepairing[playerid] == true)
  8718. {
  8719. SendClientMessage(playerid, COLOR_YELLOW, "You can't use any vehicles until you've finished the repair.");
  8720. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8721. ClearAnimationsEx(playerid);
  8722. }
  8723. else if(RapidResKitActive[playerid] == 1)
  8724. {
  8725. if(!ispassenger || ispassenger)
  8726. {
  8727. SendClientMessage(playerid, COLOR_GREY, "You can't enter a vehicle while using a rapid response kit, '/droprrk' in order to drop it.");
  8728. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  8729. ClearAnimationsEx(playerid);
  8730. }
  8731. }
  8732. if(PlayerTied[playerid] != 0)
  8733. {
  8734. ClearAnimationsEx(playerid);
  8735. }
  8736. if(PlayerCuffed[playerid] != 0)
  8737. {
  8738. ClearAnimationsEx(playerid);
  8739. }
  8740. if(PlayerFrozen[playerid] != 0)
  8741. {
  8742. ClearAnimationsEx(playerid);
  8743. }
  8744. if(RapidResKitActive[playerid] != 0)
  8745. {
  8746. ClearAnimationsEx(playerid);
  8747. }
  8748. if(pDeathState[playerid] != PLAYER_STATE_NORMAL)
  8749. {
  8750. ClearAnimationsEx(playerid);
  8751. }
  8752. return 1;
  8753. }
  8754. //==============================================================================
  8755. stock IsANG(playerid)
  8756. {
  8757. if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8758. return 0;
  8759. }
  8760. //==============================================================================
  8761. stock IsASANG(playerid)
  8762. {
  8763. if(PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pMember] == GROUP_S9) return 1;
  8764. return 0;
  8765. }
  8766. //==============================================================================
  8767. stock IsAMedic(playerid)
  8768. {
  8769. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8770. return 0;
  8771. }
  8772. //==============================================================================
  8773. stock IsACop(playerid)
  8774. {
  8775. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8776. return 0;
  8777. }
  8778. //==============================================================================
  8779. stock IsAGovernor(playerid)
  8780. {
  8781. if(PlayerInfo[playerid][pLeader] == 6 && PlayerInfo[playerid][pMember] == 6 && PlayerInfo[playerid][pRank] == 4) return 1;
  8782. return 0;
  8783. }
  8784. //==============================================================================
  8785. stock IsASAPD(playerid)
  8786. {
  8787. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 ||PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8788. return 0;
  8789. }
  8790. //==============================================================================
  8791. stock IsASenate(playerid)
  8792. {
  8793. if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8794. return 0;
  8795. }
  8796. //==============================================================================
  8797. stock IsAJudge(playerid)
  8798. {
  8799. if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8800. return 0;
  8801. }
  8802. //==============================================================================
  8803. stock IsAFBI(playerid)
  8804. {
  8805. if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pGroup] == GROUP_S9) return 1;
  8806. return 0;
  8807. }
  8808. //==============================================================================
  8809. stock DisplaySafeInfo(houseid, playerid)
  8810. {
  8811. new str[128];
  8812. new WeaponName[65];
  8813. if(HouseInfo[houseid][hCreated] == 1)
  8814. {
  8815. SendClientMessage(playerid, COLOR_WHITE, "Guns: ");
  8816. if(HouseInfo[houseid][hGun1] != 0)
  8817. {
  8818. GetWeaponName(HouseInfo[houseid][hGun1], WeaponName, 64);
  8819. format(str, sizeof(str), "Slot 1: %s", WeaponName);
  8820. SendClientMessage(playerid, COLOR_BITEM, str);
  8821. }
  8822. else
  8823. {
  8824. SendClientMessage(playerid, COLOR_BITEM, "Slot 1: None");
  8825. }
  8826. if(HouseInfo[houseid][hGun2] != 0)
  8827. {
  8828. GetWeaponName(HouseInfo[houseid][hGun2], WeaponName, 64);
  8829. format(str, sizeof(str), "Slot 2: %s", WeaponName);
  8830. SendClientMessage(playerid, COLOR_BITEM, str);
  8831. }
  8832. else
  8833. {
  8834. SendClientMessage(playerid, COLOR_BITEM, "Slot 2: None");
  8835. }
  8836. if(HouseInfo[houseid][hGun3] != 0)
  8837. {
  8838. GetWeaponName(HouseInfo[houseid][hGun3], WeaponName, 64);
  8839. format(str, sizeof(str), "Slot 3: %s", WeaponName);
  8840. SendClientMessage(playerid, COLOR_BITEM, str);
  8841. }
  8842. else
  8843. {
  8844. SendClientMessage(playerid, COLOR_BITEM, "Slot 3: None");
  8845. }
  8846. if(HouseInfo[houseid][hGun4] != 0)
  8847. {
  8848. GetWeaponName(HouseInfo[houseid][hGun4], WeaponName, 64);
  8849. format(str, sizeof(str), "Slot 4: %s", WeaponName);
  8850. SendClientMessage(playerid, COLOR_BITEM, str);
  8851. }
  8852. else
  8853. {
  8854. SendClientMessage(playerid, COLOR_BITEM, "Slot 4: None");
  8855. }
  8856. if(HouseInfo[houseid][hGun5] != 0)
  8857. {
  8858. GetWeaponName(HouseInfo[houseid][hGun5], WeaponName, 64);
  8859. format(str, sizeof(str), "Slot 5: %s", WeaponName);
  8860. SendClientMessage(playerid, COLOR_BITEM, str);
  8861. }
  8862. else
  8863. {
  8864. SendClientMessage(playerid, COLOR_BITEM, "Slot 5: None");
  8865. }
  8866. if(HouseInfo[houseid][hGun6] != 0)
  8867. {
  8868. GetWeaponName(HouseInfo[houseid][hGun6], WeaponName, 64);
  8869. format(str, sizeof(str), "Slot 6: %s", WeaponName);
  8870. SendClientMessage(playerid, COLOR_BITEM, str);
  8871. }
  8872. else
  8873. {
  8874. SendClientMessage(playerid, COLOR_BITEM, "Slot 6: None");
  8875. }
  8876. if(HouseInfo[houseid][hGun7] != 0)
  8877. {
  8878. GetWeaponName(HouseInfo[houseid][hGun7], WeaponName, 64);
  8879. format(str, sizeof(str), "Slot 7: %s", WeaponName);
  8880. SendClientMessage(playerid, COLOR_BITEM, str);
  8881. }
  8882. else
  8883. {
  8884. SendClientMessage(playerid, COLOR_BITEM, "Slot 7: None");
  8885. }
  8886. format(str, sizeof(str), "Cannabis: %d.0 grams", HouseInfo[houseid][hCannabis]);
  8887. SendClientMessage(playerid, COLOR_WHITE, str);
  8888. format(str, sizeof(str), "Cocaine: %d.0 grams", HouseInfo[houseid][hCocaine]);
  8889. SendClientMessage(playerid, COLOR_WHITE, str);
  8890. format(str, sizeof(str), "Meth: %d.0 grams", HouseInfo[houseid][hMeth]);
  8891. SendClientMessage(playerid, COLOR_WHITE, str);
  8892. format(str, sizeof(str), "Xanax: %d.0 tabs", HouseInfo[houseid][hXanax]);
  8893. SendClientMessage(playerid, COLOR_WHITE, str);
  8894. format(str, sizeof(str), "Promethazine: %d fl oz", HouseInfo[houseid][hPromethazine]);
  8895. SendClientMessage(playerid, COLOR_WHITE, str);
  8896. format(str, sizeof(str), "Codeine: %d fl oz", HouseInfo[houseid][hCodeine]);
  8897. SendClientMessage(playerid, COLOR_WHITE, str);
  8898. format(str, sizeof(str), "Lean: %d fl oz", HouseInfo[houseid][hLean]);
  8899. SendClientMessage(playerid, COLOR_WHITE, str);
  8900. format(str, sizeof(str), "Cash: $%d", HouseInfo[houseid][hCash]);
  8901. SendClientMessage(playerid, COLOR_WHITE, str);
  8902. format(str, sizeof(str), "Materials: %d", HouseInfo[houseid][hMaterials]);
  8903. SendClientMessage(playerid, COLOR_WHITE, str);
  8904. }
  8905. return 0;
  8906. }
  8907. //==============================================================================
  8908. stock IsAtArrestPoint(playerid)
  8909. {
  8910. //if( IsPlayerInRangeOfPoint(playerid, 10.0, 2753.2041,-2465.5845,13.6484) ) return 1; //prison LS
  8911. if(IsPlayerInRangeOfPoint(playerid, 10.0, 254.9178, 83.7195, 1002.4453) ) return 1; //old PD int lobby
  8912. if(IsPlayerInRangeOfPoint(playerid, 6.0, -1133.30, -973.83, 9999.25)) return 1; //SAPD mugshot room
  8913. if(IsPlayerInRangeOfPoint(playerid, 8.0, 1565.1511, -1658.2452, 28.3956)) return 1; //SAPD Roof
  8914. if(IsPlayerInRangeOfPoint(playerid, 8.0, 615.2274, -584.8245, 17.2266)) return 1; //SASD
  8915. if(IsPlayerInRangeOfPoint(playerid, 8.0, -2595.86, -104.28, 6001.08)) return 1;
  8916. return 0;
  8917. }
  8918. //==============================================================================
  8919. stock IsAtGasStation(playerid)
  8920. {
  8921. if(IsPlayerInRangeOfPoint(playerid, 17.0, 1004.0070, -939.3102, 42.1797) || IsPlayerInRangeOfPoint(playerid, 17.0, 1944.3260, -1772.9254, 13.3906)) return 1;
  8922. if(IsPlayerInRangeOfPoint(playerid, 17.0, -90.5515, -1169.4578, 2.4079) || IsPlayerInRangeOfPoint(playerid, 17.0, -1609.7958, -2718.2048, 48.5391)) return 1;
  8923. if(IsPlayerInRangeOfPoint(playerid, 17.0, -2029.4968, 156.4366, 28.9498) || IsPlayerInRangeOfPoint(playerid, 17.0, -2408.7590, 976.0934, 45.4175)) return 1;
  8924. if(IsPlayerInRangeOfPoint(playerid, 17.0, -2243.9629, -2560.6477, 31.8841) || IsPlayerInRangeOfPoint(playerid, 17.0, -1676.6323, 414.0262, 6.9484)) return 1;
  8925. if(IsPlayerInRangeOfPoint(playerid, 17.0, 2202.2349, 2474.3494, 10.5258) || IsPlayerInRangeOfPoint(playerid, 17.0, 614.9333, 1689.7418, 6.6968) || IsPlayerInRangeOfPoint(playerid, 17.0, 2114.7346, 920.6039, 10.4790)) //LV
  8926. if(IsPlayerInRangeOfPoint(playerid, 17.0, -1328.8250, 2677.2173, 49.7665) || IsPlayerInRangeOfPoint(playerid, 17.0, 70.3882, 1218.6783, 18.5165)) return 1; //LV
  8927. if(IsPlayerInRangeOfPoint(playerid, 17.0, 654.9641, -559.7485, 16.5015) || IsPlayerInRangeOfPoint(playerid, 17.0, 654.9617, -570.4176, 16.5015)) return 1; //Dillimore
  8928. if(IsPlayerInRangeOfPoint(playerid, 17.0, 1382.9899, 461.9903, 20.1245) || IsPlayerInRangeOfPoint(playerid, 17.0, 1380.9395, 457.2494, 19.9260)) return 1; //Montgomery
  8929. if(IsPlayerInRangeOfPoint(playerid, 17.0, 1109.4098, -1184.4089, 19.4198)) return 1; //Jenkins gas station
  8930. if(IsPlayerInRangeOfPoint(playerid, 17.0, 52.4320,1218.8826,18.9057)) return 1; // Fort Cartson Gas Station (Requested by Eric_Daxano)
  8931. if(IsPlayerInRangeOfPoint(playerid, 10.0, 183.8788, 1923.7286, 17.8864 )) return 1; //DoC
  8932. //Newly added
  8933. if(IsPlayerInRangeOfPoint(playerid, 10.0, -1327.5477, 2682.9692, 50.0625) || IsPlayerInRangeOfPoint(playerid, 10.0, -1329.0247, 2671.5679, 50.0625)) return 1;
  8934. if(IsPlayerInRangeOfPoint(playerid, 10.0, -1476.9545, 1863.3793, 32.6328) || IsPlayerInRangeOfPoint(playerid, 10.0, -1465.1136, 1864.2327, 32.6328)) return 1;
  8935. if(IsPlayerInRangeOfPoint(playerid, 10.0, 51.8902, 1213.4871, 18.9063) || IsPlayerInRangeOfPoint(playerid, 10.0, 51.6325, 1224.8524, 18.9167)) return 1;
  8936. if(IsPlayerInRangeOfPoint(playerid, 10.0, 2640.9182, 1106.4493, 10.820)) return 1;
  8937. return 0;
  8938. }
  8939. //==============================================================================
  8940. stock IsNotAtFishPlace(playerid)
  8941. {
  8942. new Float:x, Float:y, Float:z;
  8943. GetPlayerPos(playerid, x, y, z);
  8944. if(x <= 348.0 || x >= 410.0) return 1;
  8945. if(y <= -2089.0 || y >= -2087.0) return 1;
  8946. if(z >= 9.0 || z <= 6.0) return 1;
  8947. return 0;
  8948. }
  8949. //==============================================================================
  8950. //==============================================================================
  8951. stock IsAtATM(playerid)
  8952. {
  8953. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1008.0930, -929.5586, 42.3281) ||
  8954. IsPlayerInRangeOfPoint(playerid, 2.0, 2227.61, -1710.96, 13.59) ||
  8955. IsPlayerInRangeOfPoint(playerid, 2.0, 1929.5021, -1783.4802, 13.5469) ||
  8956. IsPlayerInRangeOfPoint(playerid, 2.0, 1547.49, -1472.09, 1037.01) ||
  8957. IsPlayerInRangeOfPoint(playerid, 2.0, 1422.3619, -981.2112, 1639.7843) ||
  8958. IsPlayerInRangeOfPoint(playerid, 2.0, 1424.2430, -981.1600, 1639.7843) ||
  8959. IsPlayerInRangeOfPoint(playerid, 2.0, 1426.0094, -981.1601, 1639.7843) ||
  8960. IsPlayerInRangeOfPoint(playerid, 2.0, 651.20215, -520.47241, 15.95219) ||
  8961. IsPlayerInRangeOfPoint( playerid, 2.0, 2679.3413, -2450.9971, 1299.4320 ) || //prison atm
  8962. IsPlayerInRangeOfPoint(playerid, 2.0, 1344.0891,-1586.4590,13.5099) || //Donation scripting for /atm
  8963. IsPlayerInRangeOfPoint(playerid, 2.0, 1793.7021,-1442.5446,995.0460) || //Donation scripting for /atm
  8964. GetPlayerVirtualWorld(playerid) == 23 && IsPlayerInRangeOfPoint(playerid, 2.0, 1124.53015, 4.01472, 1000.14783) || // Donation scripting for /atm - Desmond DeSantos (Code confirmed by Donor scripter DwayneD)
  8965. IsPlayerInRangeOfPoint(playerid, 2.0, 251.26659, -189.68741, 1.16737)) return 1; //vinwood station & other in gym & bank
  8966. return 0;
  8967. }
  8968. //==============================================================================
  8969. stock UpdateWeed()
  8970. {
  8971. for(new b = 0; b < sizeof(WeedInfo); b++)
  8972. {
  8973. if(WeedInfo[b][WeedPlanted] == 1)
  8974. {
  8975. WeedInfo[b][WeedTime] += 1;
  8976. new w = WeedInfo[b][WeedTime];
  8977. if(w == 2 ||w == 4 ||w == 6 ||w == 8 ||w == 10 ||w == 12 ||w == 14 ||w == 16 ||w == 18 ||w == 20 ||w == 22 ||w == 24 ||w == 26 ||w == 28 ||w == 30 ||w == 32 ||w == 34 ||w == 36 ||w == 38 ||w == 40 ||w == 42 ||w == 44 ||w == 46 ||w == 48 ||w == 50 ||w == 52 ||w == 54 ||w == 56 ||w == 58 ||w == 60)
  8978. {
  8979. WeedInfo[b][WeedGrams] += 1; //all even numbers = 1gram of weed. that means 0.5grams per minute.
  8980. }
  8981. if(WeedInfo[b][WeedTime] > 60) WeedInfo[b][WeedGrams] += 1;
  8982. if(WeedInfo[b][WeedTime] == 70)
  8983. {
  8984. if(weedObject[b]) { DestroyDynamicObjectEx(weedObject[b]); }
  8985. weedObject[b] = 0;
  8986. WeedInfo[b][WeedX] = 0.0;
  8987. WeedInfo[b][WeedY] = 0.0;
  8988. WeedInfo[b][WeedZ] = 0.0;
  8989. WeedInfo[b][WeedTime] = 0;
  8990. WeedInfo[b][WeedPlanted] = 0;
  8991. WeedInfo[b][WeedGrams] = 0;
  8992. strmid(WeedInfo[b][WeedPlanter], "[NONE]", 0, strlen("[NONE]"));
  8993. }
  8994. }
  8995. }
  8996. return 1;
  8997. }
  8998. //==============================================================================
  8999. forward resetPlayerVars(playerid);
  9000. public resetPlayerVars(playerid)
  9001. {
  9002. lastPMedID[playerid] = INVALID_PLAYER_ID;
  9003. PlayerInfo[playerid][pHasLockPick] = 0;
  9004. PlayerInfo[playerid][pHidingBadge] = false;
  9005. PlayerInfo[playerid][pHidingStatus] = 0;
  9006. PlayerInfo[playerid][pFirework] = 0;
  9007. fallingSeconds[playerid] = 0;
  9008. RadioFrequency[playerid] = 0;
  9009. //IsDead[playerid] = false;
  9010. hitmanUndercover[playerid] = false;
  9011. hasListening[playerid] = false;
  9012. watchingPDCCTV[playerid] = false;
  9013. PlayerInfo[playerid][pFactionDirector] = 0;
  9014. gagExpire[playerid] = 0;
  9015. gagRequester[playerid] = INVALID_PLAYER_ID;
  9016. checkingBackground[playerid] = 0;
  9017. checkingID[playerid] = -1;
  9018. if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID)
  9019. {
  9020. DestroyDynamic3DTextLabel(nametagText[playerid]);
  9021. nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
  9022. }
  9023. inAndromadaID[playerid] = INVALID_VEHICLE_ID;
  9024. FakeFaction[playerid] = 0;
  9025. FakeRank[playerid] = 0;
  9026. PlayerInfo[playerid][lastCarID] = -1;
  9027. PlayerInfo[playerid][pMaxCarSlots] = -1;
  9028. hoskperm[playerid] = false;
  9029. areported[playerid] = false;
  9030. ExitTimer[playerid] = 0;
  9031. ADuty[playerid] = false;
  9032. HDuty[playerid] = false;
  9033. // bul[playerid] = 0;
  9034. ADutyTimer[playerid] = false;
  9035. turningengine[playerid] = 0;
  9036. ReplyTo[playerid] = 0;
  9037. // bulT[playerid] = 0;
  9038. beingCalled[playerid] = false;
  9039. PayDayAccount[playerid] = 0;
  9040. slipOff[playerid] = false;
  9041. inBarracksID[playerid] = INVALID_VEHICLE_ID;
  9042. PlayerHasLaserOn[playerid] = 0;
  9043. format(PlayerInfo[playerid][pVIPJoinDate], 128, "0/0/0");
  9044. format(PlayerInfo[playerid][pVIPExpDate], 128, "0/0/0");
  9045. format(PlayerInfo[playerid][pOrigin], 128, "None");
  9046. PlayerInfo[playerid][pTag] = NTAG_CUSTOM;
  9047. customRankName[playerid] = true;
  9048. format(PlayerInfo[playerid][pPrisonReason], 128, "None");
  9049. format(PlayerInfo[playerid][pPrisonedBy], 24, "Nobody");
  9050. inHouse[playerid] = false;
  9051. strmid(PlayerInfo[playerid][pLastLogin], "None", 0, strlen("None"), 255);
  9052. strmid(PlayerInfo[playerid][pPropExp], "None", 0, strlen("None"), 255);
  9053. Blocked[playerid][Number1] = -420;
  9054. Blocked[playerid][Number2] = -420;
  9055. Blocked[playerid][Number3] = -420;
  9056. Blocked[playerid][Number4] = -420;
  9057. Blocked[playerid][Number5] = -420;
  9058. toggledHotlined[playerid] = false;
  9059. playerDMVCar[playerid] = INVALID_VEHICLE_ID;
  9060. plNCData[playerid][ncCameraMode] = 0;
  9061. plNCData[playerid][ncLRold] = 0;
  9062. plNCData[playerid][ncUDold] = 0;
  9063. plNCData[playerid][ncMode] = 0;
  9064. plNCData[playerid][ncLastMove] = 0;
  9065. plNCData[playerid][ncAccelMul] = 0.0;
  9066. Fly_X[playerid] = 0.0;
  9067. Fly_Y[playerid] = 0.0;
  9068. Fly_Z[playerid] = 0.0;
  9069. Fly_A[playerid] = 0.0;
  9070. pbArmor[playerid] = 0;
  9071. playerMoveSpeed[playerid] = 100.0;
  9072. flyingUsed[playerid] = false;
  9073. hasFlashlight[playerid] = false;
  9074. oldWeapon[playerid] = -1;
  9075. cellMuted[playerid] = false;
  9076. //wasonBike[playerid] = false;
  9077. dmvSlot[playerid] = 0;
  9078. autoFailed[playerid] = false;
  9079. backupType[playerid] = 0;
  9080. hasRubberBullets[playerid] = 0;
  9081. loadedRubberBullets[playerid] = false;
  9082. toggedDept[playerid] = false;
  9083. toggedRadio[playerid] = false;
  9084. csCount[playerid] = 0;
  9085. adminDuty[playerid] = false;
  9086. isBOLO[playerid] = 0;
  9087. format(boloBy[playerid], 24, "None");
  9088. KillTimer(callCPFix[playerid]);
  9089. KillTimer(fixGPSTimer[playerid]);
  9090. callCPSpot[playerid] = 0;
  9091. usingFakeBadge[playerid] = false;
  9092. callerID[playerid] = false;
  9093. ToggedOR[playerid] = false;
  9094. boxToggled[playerid] = false;
  9095. HelpingNewbie[playerid] = false;
  9096. HelperVeh2[playerid] = false;
  9097. goingJob[playerid] = false;
  9098. pInHospital[playerid] = 0;
  9099. onCellPhone[playerid] = false;
  9100. repairVeh[playerid] = INVALID_VEHICLE_ID;
  9101. isRepairing[playerid] = false;
  9102. towingCar[playerid] = false;
  9103. KillTimer(towTimer[playerid]);
  9104. ToggedWarns[playerid] = false;
  9105. LoginAttempts[playerid] = 0;
  9106. mcTog[playerid] = false;
  9107. hideCenterHUDTimerID[playerid] = 0;
  9108. displayingText[playerid] = 0;
  9109. firstSpawned[playerid] = 0;
  9110. usingNameTag[playerid] = 0;
  9111. nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
  9112. ThiefText[playerid] = Text3D:INVALID_3DTEXT_ID;
  9113. HidePM[playerid] = 0;
  9114. PhoneOffline[playerid] = 0;
  9115. KillTimer(cpTimerFix[playerid]);
  9116. WTOnline[playerid] = 0;
  9117. AlarmOnline[playerid] = 0;
  9118. WatchingTV[playerid] = false;
  9119. FriskOffer[playerid] = 999;
  9120. toggedDevChat[playerid] = false;
  9121. GettingJob[playerid] = 0;
  9122. VestOffer[playerid] = 999;
  9123. VestPrice[playerid] = 0;
  9124. CheckNumber[playerid] = 0;
  9125. DefenseOffer[playerid] = 999;
  9126. DefensePrice[playerid] = 0;
  9127. InviteOffer[playerid] = 999;
  9128. FamilyOffer[playerid] = 999;
  9129. CallLawyer[playerid] = 0;
  9130. WantLawyer[playerid] = 0;
  9131. CP[playerid] = CHECKPOINT_NONE;
  9132. PlayerFrozen[playerid] = 0;
  9133. HoldingDetonator[playerid] = 0;
  9134. UsedFind[playerid] = 0;
  9135. FReloadTime[playerid] = 0;
  9136. GotMats[playerid] = 0;
  9137. GotPlant[playerid] = 0;
  9138. GotDrugs[playerid] = 0;
  9139. TazerTime[playerid] = 0;
  9140. MoneyMessage[playerid] = 0;
  9141. Condom[playerid] = 0;
  9142. HasBoughtMask[playerid] = 0;
  9143. UsingSate[playerid] = 0;
  9144. ZOOM[playerid] = 0;
  9145. LoadObjects[playerid] = 0;
  9146. RepairOffer[playerid] = 999;
  9147. RepairPrice[playerid] = 0;
  9148. RepairCar[playerid] = 0;
  9149. GuardedBy[playerid] = 999;
  9150. GuardingPrice[playerid] = 0;
  9151. TalkingLive[playerid] = 255;
  9152. LiveOffer[playerid] = 999;
  9153. RefillOffer[playerid] = INVALID_PLAYER_ID;
  9154. RefillPrice[playerid] = 0;
  9155. Guarding[playerid] = 999;
  9156. PotOffer[playerid] = 999;
  9157. PotPrice[playerid] = 0;
  9158. PotGram[playerid] = 0;
  9159. Packages[playerid] = 0;
  9160. Crates[playerid] = 0;
  9161. PlayerCuffed[playerid] = 0;
  9162. PlayerTazed[playerid] = 0;
  9163. PlayerCuffedTime[playerid] = 0;
  9164. PlayerTazedTime[playerid] = 0;
  9165. LastFriskedPlayer[playerid] = 999;
  9166. JustReported[playerid] = 0;
  9167. JustBugReported[playerid] = 0;
  9168. HasActiveBugReport[playerid] = 0;
  9169. FactionOffer[playerid] = 999;
  9170. GroupOffer[playerid] = 999;
  9171. SpectatingID[playerid] = 999;
  9172. Spectated[playerid] = 0;
  9173. beingSpectatedID[playerid] = INVALID_PLAYER_ID;
  9174. breakingpcuffs[playerid] = INVALID_PLAYER_ID;
  9175. SAPDClearing[playerid] = 0;
  9176. HospitalTime[playerid] = 0;
  9177. HospitalSpawnID[playerid] = 0;
  9178. JailPrice[playerid] = 0;
  9179. GoChase[playerid] = 999;
  9180. BoxWaitTime[playerid] = 0;
  9181. TransportDuty[playerid] = 0;
  9182. PlayerTied[playerid] = 0;
  9183. PlayerTiedTime[playerid] = 0;
  9184. PlayerBlinded[playerid] = 0;
  9185. oldindex[playerid] = 0;
  9186. BusCallTime[playerid] = 0;
  9187. TaxiCallTime[playerid] = 0;
  9188. MedicCallTime[playerid] = 0;
  9189. LawyerCallTime[playerid] = 0;
  9190. MechanicCallTime[playerid] = 0;
  9191. FindTimePoints[playerid] = 0;
  9192. FindTime[playerid] = 0;
  9193. FindingID[playerid] = 0;
  9194. JobDuty[playerid] = 0;
  9195. Mobile[playerid] = 999;
  9196. BoxOffer[playerid] = 999;
  9197. PlayerBoxing[playerid] = 0;
  9198. PlayerKevBox[playerid] = 0;
  9199. gLastCar[playerid] = 0;
  9200. FishCount[playerid] = 0;
  9201. gOoc[playerid] = 0;
  9202. gNews[playerid] = 0;
  9203. BigEar[playerid] = 0;
  9204. PlayerInfo[playerid][pShadowON] = 0;
  9205. PlayerInfo[playerid][pMaryON] = 0;
  9206. gFam[playerid] = 0;
  9207. ToggedSpeedo[playerid] = false;
  9208. ToggedFuel[playerid] = false;
  9209. ToggedVHealth[playerid] = false;
  9210. gVehicleLock[playerid] = 0;
  9211. Language[playerid] = 0;
  9212. playerHoldingTazer[playerid] = 0;
  9213. GPSOn[playerid] = 0;
  9214. AdminHelp[playerid] = 0;
  9215. HelpMeTimer[playerid] = 0;
  9216. Robbing[playerid] = 999;
  9217. playerDisconnecting[playerid] = 0;
  9218. RobbingX[playerid] = 0.0;
  9219. RobbingY[playerid] = 0.0;
  9220. RobbingZ[playerid] = 0.0;
  9221. gPlayerLogged[playerid] = 0;
  9222. startSpawnLoc[playerid] = 0;
  9223. gAdminAuthorized[playerid] = 0;
  9224. viewingStatsOf[playerid] = 999;
  9225. MatsOffer[playerid] = 999;
  9226. MatsPrice[playerid] = 0;
  9227. MatsGram[playerid] = 0;
  9228. MatsGram2[playerid] = 0;
  9229. IsFishing[playerid] = 0;
  9230. PlayerHasRod[playerid] = 0;
  9231. usingRadio[playerid] = 0;
  9232. FishingTimer[playerid] = 0;
  9233. CatchingTimer[playerid] = 0;
  9234. LineTension[playerid] = 0;
  9235. FishDist[playerid] = 0;
  9236. Caught[playerid] = 0;
  9237. TextDrawTimer[playerid] = 0;
  9238. PlayerStoned[playerid] = 0;
  9239. BMPurchased[playerid] = 0;
  9240. Called911[playerid] = 0;
  9241. calledTaxi[playerid] = 0;
  9242. PrisonCell[playerid] = 0;
  9243. GuardOffer[playerid] = 999;
  9244. GuardPrice[playerid] = 0;
  9245. healOffer[playerid] = 999;
  9246. healPrice[playerid] = 0;
  9247. VoodooSpell[playerid] = 0; // Tiki
  9248. HSHAKEOFFER[playerid] = 999;
  9249. HShakeType[playerid] = 0;
  9250. KissOffer[playerid] = 999;
  9251. KissType[playerid] = 0;
  9252. BeingRobbed[playerid] = 999;
  9253. ContractOffer[playerid] = 999;
  9254. ContractID[playerid] = 999;
  9255. TaxiAccepted[playerid] = 999;
  9256. BusAccepted[playerid] = 999;
  9257. OldWeedX[playerid] = 0.0;
  9258. OldWeedY[playerid] = 0.0;
  9259. OldWeedZ[playerid] = 0.0;
  9260. BizOffer[playerid] = 999;
  9261. BizPrice[playerid] = 0;
  9262. BizID[playerid] = 0;
  9263. PlayersChannel[playerid] = 999;
  9264. WeedPickTimer[playerid] = 0;
  9265. gPlayerSpawned[playerid] = 0;
  9266. OldHealth[playerid] = 0.0;
  9267. OldArmour[playerid] = 0.0;
  9268. LockPickTime[playerid] = 0;
  9269. TransportValue[playerid] = 0;
  9270. TransportMoney[playerid] = 0;
  9271. TransportTime[playerid] = 0;
  9272. TransportCost[playerid] = 0;
  9273. TransportDriver[playerid] = 999;
  9274. usingVendingMachine[playerid] = 0;
  9275. LockPickingBiz[playerid] = 999;
  9276. LockPickingHouse[playerid] = 999;
  9277. LockPickingCar[playerid] = -1;
  9278. Fishes[playerid][pLastFish] = 0;
  9279. ProposeOffer[playerid] = 999;
  9280. MarryWitness[playerid] = 999;
  9281. MarryWitnessOffer[playerid] = 999;
  9282. MarriageCeremoney[playerid] = 0;
  9283. ProposedTo[playerid] = 999;
  9284. GotProposedBy[playerid] = 999;
  9285. DivorceOffer[playerid] = 999;
  9286. RefundingNumber[playerid] = 999;
  9287. RefundingID[playerid] = 999;
  9288. viewingGuide[playerid] = 0;
  9289. SellCarTimer[playerid] = 0;
  9290. StopAniTimer[playerid] = 0;
  9291. UseDrugsTimer[playerid] = 0;
  9292. PaintballDieTimer[playerid] = 0;
  9293. UseHYDTimer[playerid] = 0;
  9294. LockSpam[playerid] = 0;
  9295. UseBMTimer[playerid] = 0;
  9296. UseAcceptTimer[playerid] = 0;
  9297. SellGunTimer[playerid] = 0;
  9298. DropWeaponTimer[playerid] = 0;
  9299. UseDrinkTimer[playerid] = 0;
  9300. UseNewbieTimer[playerid] = 0;
  9301. UseAdmCmdTimer[playerid] = 0;
  9302. CapturingTimer[playerid] = 0;
  9303. BombID[playerid] = -1;
  9304. UseFareTimer[playerid] = 0;
  9305. ProdOffer[playerid] = 999;
  9306. ProdPrice[playerid] = 0;
  9307. ProdAmount[playerid] = 0;
  9308. oldsposx[playerid] = 0.0;
  9309. oldsposy[playerid] = 0.0;
  9310. oldsposz[playerid] = 0.0;
  9311. oldfacingangle[playerid] = 0.0;
  9312. oldint[playerid] = 0;
  9313. oldvw[playerid] = 0;
  9314. newsposx[playerid] = 0.0;
  9315. newsposy[playerid] = 0.0;
  9316. newsposz[playerid] = 0.0;
  9317. BombInCar[playerid] = 0;
  9318. vipRepairTime[playerid] = 0;
  9319. usingFC[playerid] = 0;
  9320. PlayerPaused[playerid] = false;
  9321. playerDesynced[playerid] = 0;
  9322. //KillTimer(HelpMeHelperTimer[playerid]);
  9323. Filling[playerid] = 0;
  9324. OnABugReport[playerid] = 0;
  9325. gHelperCh[playerid] = 1;
  9326. gTesterCh[playerid] = 0;
  9327. //autoChat[playerid] = 0;
  9328. disabledRadios[playerid] = 0;
  9329. namesOff[playerid] = 0;
  9330. autoChatTime[playerid] = 0;
  9331. EditingGate[playerid] = 0;
  9332. EditingGarage[playerid] = 0;
  9333. GateAction[playerid] = EDITING_GATE_NONE;
  9334. // WarningsHad[playerid] = 0;
  9335. strmid(NameChangeRequest[playerid], "0", 0, 24);
  9336. OfferedSellHouse[playerid][0] = -1;
  9337. OfferedSellHouse[playerid][1] = -1;
  9338. OfferedSellHouse[playerid][2] = -1;
  9339. OfferedSellVehicle[playerid][0] = -1;
  9340. OfferedSellVehicle[playerid][1] = -1;
  9341. OfferedSellVehicle[playerid][2] = -1;
  9342. KeysOfferTo[playerid] = -1;
  9343. KeysOfferFrom[playerid] = -1;
  9344. KeysOfferIndex[playerid] = 0;
  9345. CSDisable[playerid] = 0;
  9346. CanDrop[playerid] = 1;
  9347. aGun[playerid][0] = 0;
  9348. aGun[playerid][1] = 0;
  9349. aGun[playerid][2] = 0;
  9350. aGun[playerid][3] = 0;
  9351. aGun[playerid][4] = 0;
  9352. aGun[playerid][5] = 0;
  9353. aGun[playerid][6] = 0;
  9354. aGun[playerid][7] = 0;
  9355. aGun[playerid][8] = 0;
  9356. aGun[playerid][9] = 0;
  9357. aGun[playerid][10] = 0;
  9358. aGun[playerid][11] = 0;
  9359. aGun[playerid][12] = 0;
  9360. CardsHave[playerid] = 0;
  9361. VIPChatTog[playerid] = 0;
  9362. usePayphone[playerid] = -1;
  9363. GottenGift[playerid] = 0;
  9364. PlayerHasMP5Laser[playerid] = 0;
  9365. PlayerHasM4Laser[playerid] = 0;
  9366. PlayerHasAKLaser[playerid] = 0;
  9367. PlayerHasSpasLaser[playerid] = 0;
  9368. PlayerHasDeagleLaser[playerid] = 0;
  9369. GottenTimeLeft[playerid] = 0;
  9370. Lockpicking[playerid] = 0;
  9371. CLockpicking[playerid] = 0;
  9372. OfferedGunTo[playerid] = -1;
  9373. format(PlayerInfo[playerid][pMDCSearchName], 128, "None");
  9374. OfferedGunFrom[playerid] = -1;
  9375. hotWireTime[playerid] = 0;
  9376. hotWireVeh[playerid] = -1;
  9377. GunOffered[playerid] = 0;
  9378. PlayerCalledEMS[playerid] = 0;
  9379. PlayerCalledPD[playerid] = 0;
  9380. ParaOnACall[playerid] = 0;
  9381. CallAccepted[playerid] = 0;
  9382. EMSArrived[playerid] = 0;
  9383. RapidResKitActive[playerid] = 0;
  9384. HasARapidResKit[playerid] = 0;
  9385. WireOfferID[playerid] = INVALID_PLAYER_ID;
  9386. //reset autogenerated name
  9387. // usingGeneratedName[playerid] = 0;
  9388. iCurrentWeapon[playerid] = 0;
  9389. lastAnimIndex[playerid] = 0;
  9390. //havent tested if this method will clear the vars, just copied what someone did below with pinfo
  9391. new cleartip[MAX_NEWBIE_TIPS];
  9392. displayedTip[playerid] = cleartip;
  9393. // Completely clear out PlayerInfo.
  9394. new clearpinfo[pInfo] = { 0 };
  9395. PlayerInfo[playerid] = clearpinfo;
  9396. // Set the other default variables.
  9397. PlayerInfo[playerid][pFMember] = 255;
  9398. PlayerInfo[playerid][pFightingStyle] = 4;
  9399. PlayerInfo[playerid][pInt] = 15;
  9400. PlayerInfo[playerid][pLocal] = 999;
  9401. PlayerInfo[playerid][pModel] = 20;
  9402. PlayerInfo[playerid][pBizKey] = -1;
  9403. PlayerInfo[playerid][pCarLicense] = 0;
  9404. PlayerInfo[playerid][pSueUnix] = 0;
  9405. PlayerInfo[playerid][pSueNotice] = 0;
  9406. PlayerInfo[playerid][pAllowedArmory] = 1;
  9407. PlayerInfo[playerid][pBoatLicense] = 0;
  9408. PlayerInfo[playerid][pFishLic] = 1;
  9409. PlayerInfo[playerid][pWeaponLicense] = 0;
  9410. PlayerInfo[playerid][pMarijuanaLicense] = 0;
  9411. PlayerInfo[playerid][pLevel] = 1;
  9412. PlayerInfo[playerid][pReg] = 0;
  9413. PlayerInfo[playerid][pHospital] = 0;
  9414. PlayerInfo[playerid][pPoison] = 0;
  9415. PlayerInfo[playerid][pCash] = 20000; // Newb start money
  9416. PlayerInfo[playerid][pAccount] = 100000; // Newb start money.
  9417. PlayerInfo[playerid][pRadioStation] = 255;
  9418. PlayerInfo[playerid][pDonateRank] = 1;
  9419. //new pvars
  9420. PlayerInfo[playerid][pAdminJailed] = 0;
  9421. //radio vars
  9422. editingBoomboxID[playerid] = -1;
  9423. streamingFromBoombox[playerid] = -1;
  9424. streamingFromVehicle[playerid] = -1;
  9425. EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
  9426. listItemGenre[playerid] = -1;
  9427. //clothing menus
  9428. listItemClothes[playerid] = -1;
  9429. //hitman badges
  9430. PlayerInfo[playerid][pHAFakeBadge] = 0;
  9431. PlayerInfo[playerid][pBadge] = 0;
  9432. PlayerInfo[playerid][pBuggedTog] = 0;
  9433. ShuffleDeck(playerid);
  9434. ClearDamageInfo(playerid);
  9435. ClearFishes(playerid);
  9436. ClearGuns(playerid);
  9437. ClearMarriage(playerid);
  9438. ClearAccent(playerid);
  9439. ClearCustomTag(playerid);
  9440. ClearCustomRank(playerid);
  9441. ClearIP(playerid);
  9442. ClearContract(playerid);
  9443. ClearBanreason(playerid);
  9444. ClearAppearance(playerid);
  9445. ClearPrisonreason(playerid);
  9446. ClearVIP(playerid);
  9447. clearObjectViewerTD(playerid); //model viewer
  9448. clearObjectViewerTD(playerid); //model viewer
  9449. resetCheckpointInfo(playerid);
  9450. strdel(LastPaid[playerid], 0, MAX_PLAYER_NAME);
  9451. SetPlayerColor(playerid, TCOLOR_GREY);
  9452. //trays
  9453. finishedEatingTimer[playerid] = 0;
  9454. boughtFoodTimer[playerid] = 0;
  9455. hasFoodTray[playerid] = 0;
  9456. beingPoisonedTimer[playerid] = 0;
  9457. playerPoisoned[playerid] = 0;
  9458. //map
  9459. usingMap[playerid] = 0;
  9460. //combine
  9461. deathByCombine[playerid] = 0;
  9462. //event notice
  9463. displayingEventHUD[playerid] = 0;
  9464. hidingMOTDTimer[playerid] = 0;
  9465. //garbage job variables
  9466. hasTruckCheckpoint[playerid] = -1;
  9467. unloadingTrashTimer[playerid] = 0;
  9468. for(new i = 0; i < 7; i++)
  9469. {
  9470. Accessories[playerid][i] = 0;
  9471. AccessoriesX[playerid][i] = 0.0;
  9472. AccessoriesY[playerid][i] = 0.0;
  9473. AccessoriesZ[playerid][i] = 0.0;
  9474. AccessoriesrX[playerid][i] = 0.0;
  9475. AccessoriesrY[playerid][i] = 0.0;
  9476. AccessoriesrZ[playerid][i] = 0.0;
  9477. AccessoriessX[playerid][i] = 0.0;
  9478. AccessoriessY[playerid][i] = 0.0;
  9479. AccessoriessZ[playerid][i] = 0.0;
  9480. Accessoriesc1[playerid][i] = 0;
  9481. }
  9482. inPaintball[playerid] = 0;
  9483. pbKills[playerid] = 0;
  9484. ClearPaintballGuns(playerid);
  9485. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  9486. KillTimer(dPosGet[playerid]);
  9487. CanRepair[playerid] = true;
  9488. hasPassed[playerid] = false;
  9489. isPlayerFlying[playerid] = false;
  9490. KillTimer(canRepairTimer[playerid]);
  9491. pCommandUsed[playerid] = false;
  9492. customRankName[playerid] = false;
  9493. canReportAgain[playerid] = true;
  9494. customRank[playerid] = "None";
  9495. hasTempRRK[playerid] = 0;
  9496. pMutedA[playerid] = false;
  9497. Reported[playerid] = false;
  9498. //Reported[playerid] = false;
  9499. LastPM[playerid] = false;
  9500. TogPM[playerid] = false;
  9501. format(reportText[playerid], 80, "None");
  9502. for(new i = 0; i < 13; i++)
  9503. {
  9504. antiLoseWeapon[playerid][i] = 0;
  9505. }
  9506. famMuted[playerid] = false;
  9507. famMutedTime[playerid] = 0;
  9508. KillTimer(muteTimer[playerid]);
  9509. dialogPage[playerid] = 0;
  9510. TextDrawHideForPlayer(playerid, PaintballLeaderTD);
  9511. TextDrawHideForPlayer(playerid, PaintballLeaderTD2);
  9512. if(Security != 0)
  9513. {
  9514. SendClientMessage(playerid, COLOR_YELLOW, "You should not be seeing this message.");
  9515. //Kick(playerid);
  9516. //return 1;
  9517. }
  9518. EditingCamera[playerid] = false;
  9519. CameraID[playerid] = -1;
  9520. CameraX[playerid] = 0.0;
  9521. CameraY[playerid] = 0.0;
  9522. CameraZ[playerid] = 0.0;
  9523. CameraInt[playerid] = 0;
  9524. CameraWorld[playerid] = 0;
  9525. OnCCTV[playerid] = -1;
  9526. newbiePrice[playerid] = 0;
  9527. newbieRequest[playerid] = false;
  9528. adRequest[playerid] = false;
  9529. adPrice[playerid] = 0;
  9530. checkedAccount[playerid] = 0;
  9531. minutesOnline[playerid] = 0;
  9532. PlayerInfo[playerid][pUnit] = -1;
  9533. findingunit[playerid] = -1;
  9534. lastShotByWeaponID[playerid] = -1;
  9535. lastShotByPlayerID[playerid] = -1;
  9536. lastShotBodyPart[playerid] = -1;
  9537. format(tempPassword[playerid], 64, "");
  9538. format(tempHash[playerid], 65, "");
  9539. format(tempSalt[playerid], 33, "");
  9540. format(NewPassword[playerid], 129, "");
  9541. format(NewSalt[playerid], 33, "");
  9542. format(PlayerInfo[playerid][pS9BadgeName], 24, "");
  9543. //Fuel/Speedo (iGetty)
  9544. FuelTextdraw[playerid] = CreatePlayerTextDraw(playerid, 546.000000, 418.000000, "");
  9545. PlayerTextDrawBackgroundColor(playerid, FuelTextdraw[playerid], 255);
  9546. PlayerTextDrawFont(playerid, FuelTextdraw[playerid], 2);
  9547. PlayerTextDrawLetterSize(playerid, FuelTextdraw[playerid], 0.280000, 1.000000);
  9548. PlayerTextDrawColor(playerid, FuelTextdraw[playerid], -1);
  9549. PlayerTextDrawSetOutline(playerid, FuelTextdraw[playerid], 1);
  9550. PlayerTextDrawSetProportional(playerid, FuelTextdraw[playerid], 1);
  9551. VHealthTextDraw[playerid] = CreatePlayerTextDraw(playerid, 546.000000, 407.000000, "");
  9552. PlayerTextDrawBackgroundColor(playerid, VHealthTextDraw[playerid], 255);
  9553. PlayerTextDrawFont(playerid, VHealthTextDraw[playerid], 2);
  9554. PlayerTextDrawLetterSize(playerid, VHealthTextDraw[playerid], 0.280000, 1.000000);
  9555. PlayerTextDrawColor(playerid, VHealthTextDraw[playerid], -1);
  9556. PlayerTextDrawSetOutline(playerid, VHealthTextDraw[playerid], 1);
  9557. PlayerTextDrawSetProportional(playerid, VHealthTextDraw[playerid], 1);
  9558. SpeedoTextdraw[playerid] = CreatePlayerTextDraw(playerid, 546.000000, 429.000000, "");
  9559. PlayerTextDrawBackgroundColor(playerid, SpeedoTextdraw[playerid], 255);
  9560. PlayerTextDrawFont(playerid, SpeedoTextdraw[playerid], 2);
  9561. PlayerTextDrawLetterSize(playerid, SpeedoTextdraw[playerid], 0.280000, 1.000000);
  9562. PlayerTextDrawColor(playerid, SpeedoTextdraw[playerid], -1);
  9563. PlayerTextDrawSetOutline(playerid, SpeedoTextdraw[playerid], 1);
  9564. PlayerTextDrawSetProportional(playerid, SpeedoTextdraw[playerid], 1);
  9565. PlayerTextDrawHide(playerid, FuelTextdraw[playerid]);
  9566. PlayerTextDrawHide(playerid, VHealthTextDraw[playerid]);
  9567. PlayerTextDrawHide(playerid, SpeedoTextdraw[playerid]);
  9568. if(IsPlayerNPC(playerid))
  9569. {
  9570. gPlayerLogged[playerid] = 1;
  9571. PlayerInfo[playerid][pTut] = 1;
  9572. }
  9573. CINC[playerid]++; // invalidate all that came before
  9574. DisablePlayerCheckpointEx(playerid);
  9575. if(usingNameTag[playerid])
  9576. {
  9577. DestroyDynamic3DTextLabel(nametagText[playerid]);
  9578. nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
  9579. }
  9580. PlayerInfo[playerid][pFMDListen] = 0;
  9581. PlayerInfo[playerid][pFBIListen] = 0;
  9582. PlayerInfo[playerid][pSANListen] = 0;
  9583. PlayerInfo[playerid][pGOVListen] = 0;
  9584. PlayerInfo[playerid][pSANGListen] = 0;
  9585. PlayerInfo[playerid][pLSSDListen] = 0;
  9586. PlayerInfo[playerid][pSAPDListen] = 0;
  9587. PlayerInfo[playerid][pSAPDListen] = 0;
  9588. return 1;
  9589. }
  9590. public OnPlayerConnect(playerid)
  9591. {
  9592. //By Zimovskiy
  9593. //My VK - https://vk.com/andrey_zimovskiy
  9594. //YouTube Channel - https://www.youtube.com/channel/UCzkRAIS0JiXSiUV_vQ7GxEg?view_as=subscriber
  9595. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9596. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9597. //Objects////////////////////////////////////////////////////////////////////////////////////////////////////////
  9598. new tmpobjid;
  9599. tmpobjid = CreateDynamicObject(19376,607.872,-565.220,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9600. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9601. tmpobjid = CreateDynamicObject(19383,615.953,-571.369,1930.329,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9602. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9603. tmpobjid = CreateDynamicObject(1495,623.657,-569.609,1928.599,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9604. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  9605. tmpobjid = CreateDynamicObject(19445,622.368,-563.352,1930.329,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9606. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9607. tmpobjid = CreateDynamicObject(19376,618.374,-565.220,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9608. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9609. tmpobjid = CreateDynamicObject(19376,615.033,-548.661,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9610. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9611. tmpobjid = CreateDynamicObject(19376,618.374,-565.220,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9612. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9613. tmpobjid = CreateDynamicObject(19376,622.925,-574.851,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9614. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9615. tmpobjid = CreateDynamicObject(19376,622.925,-574.851,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9616. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9617. tmpobjid = CreateDynamicObject(19376,612.424,-574.851,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9618. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9619. tmpobjid = CreateDynamicObject(19383,615.953,-563.348,1930.329,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9620. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9621. tmpobjid = CreateDynamicObject(2645,623.543,-565.070,1931.135,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  9622. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9623. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  9624. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9625. tmpobjid = CreateDynamicObject(2645,623.534,-565.840,1931.135,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  9626. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9627. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  9628. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9629. tmpobjid = CreateDynamicObject(19353,620.219,-561.689,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9630. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9631. tmpobjid = CreateDynamicObject(19445,609.547,-571.382,1930.329,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9632. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9633. tmpobjid = CreateDynamicObject(19353,623.628,-571.198,1930.335,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9634. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9635. tmpobjid = CreateDynamicObject(1495,623.627,-566.609,1928.599,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9636. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  9637. tmpobjid = CreateDynamicObject(19353,623.628,-565.007,1930.335,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9638. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9639. tmpobjid = CreateDynamicObject(19353,623.638,-568.087,1932.835,0.000,-179.999,179.999,-1,-1,-1,350.000,350.000);
  9640. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9641. tmpobjid = CreateDynamicObject(19353,625.158,-572.729,1930.335,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9642. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9643. tmpobjid = CreateDynamicObject(19353,626.570,-572.719,1930.335,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9644. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9645. tmpobjid = CreateDynamicObject(19353,628.070,-572.719,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9646. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9647. tmpobjid = CreateDynamicObject(19376,622.925,-584.482,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9648. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9649. tmpobjid = CreateDynamicObject(19399,628.071,-575.924,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9650. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9651. tmpobjid = CreateDynamicObject(19399,628.071,-579.125,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9652. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9653. tmpobjid = CreateDynamicObject(19399,628.071,-582.335,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9654. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9655. tmpobjid = CreateDynamicObject(19445,623.226,-585.571,1930.339,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9656. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9657. tmpobjid = CreateDynamicObject(19445,628.066,-588.752,1930.339,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9658. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9659. tmpobjid = CreateDynamicObject(3077,625.725,-572.871,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9660. SetDynamicObjectMaterial(tmpobjid, 0, 14853, "gen_pol_vegas", "mp_cop_pinboard", 0);
  9661. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9662. tmpobjid = CreateDynamicObject(19376,622.583,-556.811,1932.149,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9663. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9664. tmpobjid = CreateDynamicObject(19376,604.533,-548.661,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9665. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9666. tmpobjid = CreateDynamicObject(2276,621.179,-563.964,1930.665,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9667. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9668. SetDynamicObjectMaterial(tmpobjid, 1, 15040, "cuntcuts", "csnewspaper02", 0);
  9669. tmpobjid = CreateDynamicObject(19376,618.374,-555.590,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9670. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9671. tmpobjid = CreateDynamicObject(19376,607.873,-555.590,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9672. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9673. tmpobjid = CreateDynamicObject(19466,628.117,-582.519,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9674. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9675. tmpobjid = CreateDynamicObject(19466,628.107,-584.149,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9676. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9677. tmpobjid = CreateDynamicObject(19466,628.107,-578.939,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9678. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9679. tmpobjid = CreateDynamicObject(19466,628.097,-577.349,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9680. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9681. tmpobjid = CreateDynamicObject(19466,628.087,-575.739,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9682. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9683. tmpobjid = CreateDynamicObject(19466,628.077,-574.129,1930.645,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9684. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  9685. tmpobjid = CreateDynamicObject(19873,614.187,-566.102,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9686. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9687. tmpobjid = CreateDynamicObject(2199,609.611,-564.398,1929.155,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9688. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9689. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  9690. tmpobjid = CreateDynamicObject(19445,609.539,-563.352,1930.329,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9691. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9692. tmpobjid = CreateDynamicObject(19383,620.224,-558.479,1930.329,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9693. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9694. tmpobjid = CreateDynamicObject(1495,620.227,-559.239,1928.599,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9695. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  9696. tmpobjid = CreateDynamicObject(19376,612.424,-584.482,1928.529,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9697. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -1);
  9698. tmpobjid = CreateDynamicObject(19445,622.368,-571.382,1930.329,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9699. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9700. tmpobjid = CreateDynamicObject(19445,628.385,-566.253,1930.329,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  9701. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  9702. tmpobjid = CreateDynamicObject(19445,610.966,-576.271,1930.339,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9703. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9704. tmpobjid = CreateDynamicObject(19445,609.537,-568.211,1930.329,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9705. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9706. tmpobjid = CreateDynamicObject(19445,618.775,-571.330,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9707. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9708. tmpobjid = CreateDynamicObject(19376,622.925,-584.482,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9709. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9710. tmpobjid = CreateDynamicObject(19376,612.424,-584.482,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9711. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9712. tmpobjid = CreateDynamicObject(19445,623.226,-585.561,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9713. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9714. tmpobjid = CreateDynamicObject(19445,628.036,-577.381,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9715. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9716. tmpobjid = CreateDynamicObject(19445,628.036,-587.000,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9717. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9718. tmpobjid = CreateDynamicObject(19445,613.596,-585.571,1930.339,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9719. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9720. tmpobjid = CreateDynamicObject(19445,613.606,-585.561,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9721. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9722. tmpobjid = CreateDynamicObject(19376,612.424,-574.853,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9723. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9724. tmpobjid = CreateDynamicObject(19926,612.785,-570.336,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9725. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", 0);
  9726. SetDynamicObjectMaterial(tmpobjid, 1, 14415, "carter_block_2", "mp_gs_woodpanel", -1);
  9727. tmpobjid = CreateDynamicObject(19399,623.191,-577.525,1930.335,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9728. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9729. tmpobjid = CreateDynamicObject(19999,626.852,-583.562,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9730. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9731. tmpobjid = CreateDynamicObject(19399,612.622,-580.734,1930.335,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9732. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9733. tmpobjid = CreateDynamicObject(19445,618.719,-563.392,1933.699,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9734. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9735. tmpobjid = CreateDynamicObject(19376,607.874,-565.220,1932.139,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9736. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9737. tmpobjid = CreateDynamicObject(19926,612.785,-568.417,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9738. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", 0);
  9739. SetDynamicObjectMaterial(tmpobjid, 1, 14415, "carter_block_2", "mp_gs_woodpanel", -1);
  9740. tmpobjid = CreateDynamicObject(19445,609.089,-563.392,1933.699,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9741. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9742. tmpobjid = CreateDynamicObject(19926,612.785,-564.387,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9743. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", 0);
  9744. SetDynamicObjectMaterial(tmpobjid, 1, 14415, "carter_block_2", "mp_gs_woodpanel", -1);
  9745. tmpobjid = CreateDynamicObject(2165,612.763,-567.735,1928.755,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9746. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  9747. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  9748. SetDynamicObjectMaterial(tmpobjid, 4, 19297, "matlights", "invisible", 0);
  9749. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  9750. tmpobjid = CreateDynamicObject(2165,612.803,-570.016,1928.755,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9751. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  9752. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  9753. SetDynamicObjectMaterial(tmpobjid, 4, 19297, "matlights", "invisible", 0);
  9754. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  9755. tmpobjid = CreateDynamicObject(2645,609.663,-565.670,1931.135,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9756. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9757. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  9758. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9759. tmpobjid = CreateDynamicObject(2645,609.663,-566.460,1931.135,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9760. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9761. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  9762. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9763. tmpobjid = CreateDynamicObject(2645,609.663,-564.880,1931.135,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9764. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9765. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  9766. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9767. tmpobjid = CreateDynamicObject(19445,627.429,-565.423,1933.699,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9768. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  9769. tmpobjid = CreateDynamicObject(19445,628.440,-566.273,1933.699,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9770. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  9771. tmpobjid = CreateDynamicObject(19445,628.440,-570.264,1933.699,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9772. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  9773. tmpobjid = CreateDynamicObject(1759,618.373,-563.975,1928.615,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  9774. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9775. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9776. tmpobjid = CreateDynamicObject(1759,619.763,-563.975,1928.615,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  9777. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9778. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9779. tmpobjid = CreateDynamicObject(19445,620.368,-555.141,1930.329,0.000,0.000,-0.000,-1,-1,-1,350.000,350.000);
  9780. SetDynamicObjectMaterial(tmpobjid, 0, 3899, "hospital2", "black", -1);
  9781. tmpobjid = CreateDynamicObject(19476,620.124,-558.470,1931.355,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9782. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9783. tmpobjid = CreateDynamicObject(19476,620.114,-558.470,1931.355,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  9784. SetDynamicObjectMaterialText(tmpobjid, 0, "ARMORY ROOM", 120, "Ariel", 60, 1, -1, 0, 1);
  9785. tmpobjid = CreateDynamicObject(19353,620.219,-555.269,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9786. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9787. tmpobjid = CreateDynamicObject(19383,620.214,-552.400,1930.329,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  9788. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9789. tmpobjid = CreateDynamicObject(1495,620.227,-553.139,1928.599,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9790. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  9791. tmpobjid = CreateDynamicObject(19476,620.124,-552.369,1931.355,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  9792. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9793. tmpobjid = CreateDynamicObject(19476,620.114,-552.369,1931.355,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9794. SetDynamicObjectMaterialText(tmpobjid, 0, "HOLDING CELLS", 120, "Ariel", 60, 1, -1, 0, 1);
  9795. tmpobjid = CreateDynamicObject(2645,620.093,-554.620,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9796. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9797. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  9798. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9799. tmpobjid = CreateDynamicObject(2645,620.093,-555.390,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9800. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9801. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  9802. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9803. tmpobjid = CreateDynamicObject(2645,620.093,-556.160,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9804. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9805. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  9806. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9807. tmpobjid = CreateDynamicObject(19445,620.196,-558.460,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9808. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9809. tmpobjid = CreateDynamicObject(19445,620.196,-548.831,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9810. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9811. tmpobjid = CreateDynamicObject(19445,621.750,-550.781,1930.329,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9812. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9813. tmpobjid = CreateDynamicObject(19445,602.500,-550.781,1930.329,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9814. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9815. tmpobjid = CreateDynamicObject(19445,604.729,-558.462,1930.329,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9816. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9817. tmpobjid = CreateDynamicObject(19445,604.729,-548.832,1930.329,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9818. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9819. tmpobjid = CreateDynamicObject(19376,602.414,-556.811,1932.149,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9820. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9821. tmpobjid = CreateDynamicObject(19445,612.516,-553.420,1933.819,180.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9822. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9823. tmpobjid = CreateDynamicObject(19445,607.625,-555.930,1933.819,180.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9824. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9825. tmpobjid = CreateDynamicObject(19445,617.406,-555.930,1933.819,180.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9826. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9827. tmpobjid = CreateDynamicObject(19445,612.526,-560.471,1933.819,180.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9828. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9829. tmpobjid = CreateDynamicObject(18980,607.851,-556.938,1932.565,90.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9830. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9831. tmpobjid = CreateDynamicObject(19445,612.516,-556.501,1933.819,180.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9832. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9833. tmpobjid = CreateDynamicObject(19999,610.676,-567.846,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9834. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9835. tmpobjid = CreateDynamicObject(19999,610.676,-570.477,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9836. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9837. tmpobjid = CreateDynamicObject(19445,609.527,-574.351,1930.329,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9838. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9839. tmpobjid = CreateDynamicObject(19445,612.516,-557.381,1933.819,180.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9840. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9841. tmpobjid = CreateDynamicObject(19445,612.500,-556.472,1933.879,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9842. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9843. tmpobjid = CreateDynamicObject(1499,616.732,-571.361,1928.565,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9844. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  9845. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "barbersmir1", -1);
  9846. tmpobjid = CreateDynamicObject(19445,612.500,-557.412,1933.889,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9847. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9848. tmpobjid = CreateDynamicObject(19445,615.429,-563.312,1933.699,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9849. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9850. tmpobjid = CreateDynamicObject(19445,605.799,-563.312,1933.699,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9851. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9852. tmpobjid = CreateDynamicObject(19445,604.779,-558.522,1933.699,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9853. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9854. tmpobjid = CreateDynamicObject(19445,604.779,-548.892,1933.699,0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  9855. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9856. tmpobjid = CreateDynamicObject(19445,615.290,-550.821,1933.699,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9857. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9858. tmpobjid = CreateDynamicObject(19445,605.659,-550.821,1933.699,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9859. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9860. tmpobjid = CreateDynamicObject(19445,612.500,-553.442,1933.889,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9861. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9862. tmpobjid = CreateDynamicObject(19376,612.453,-556.251,1932.279,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  9863. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -1);
  9864. tmpobjid = CreateDynamicObject(19445,612.500,-560.432,1933.889,0.000,-0.000,269.999,-1,-1,-1,350.000,350.000);
  9865. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9866. tmpobjid = CreateDynamicObject(3077,605.614,-559.010,1928.615,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  9867. SetDynamicObjectMaterial(tmpobjid, 0, 14853, "gen_pol_vegas", "mp_cop_pinboard", 0);
  9868. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9869. tmpobjid = CreateDynamicObject(19445,617.360,-557.662,1933.889,0.000,-0.000,359.999,-1,-1,-1,350.000,350.000);
  9870. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9871. tmpobjid = CreateDynamicObject(19445,607.650,-557.662,1933.879,0.000,-0.000,359.999,-1,-1,-1,350.000,350.000);
  9872. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9873. tmpobjid = CreateDynamicObject(630,609.896,-566.124,1929.510,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9874. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9875. tmpobjid = CreateDynamicObject(2242,609.981,-566.104,1928.760,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9876. SetDynamicObjectMaterial(tmpobjid, 0, 18058, "mp_diner2", "mp_diner_slats", 0);
  9877. tmpobjid = CreateDynamicObject(630,609.896,-566.124,1929.590,-0.000,0.000,154.799,-1,-1,-1,350.000,350.000);
  9878. SetDynamicObjectMaterial(tmpobjid, 0, 1597, "centralresac1", "kbtree4_test", -1);
  9879. tmpobjid = CreateDynamicObject(19399,617.362,-582.415,1930.335,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9880. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9881. tmpobjid = CreateDynamicObject(19445,610.966,-585.890,1930.339,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9882. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9883. tmpobjid = CreateDynamicObject(2199,604.950,-553.727,1929.525,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9884. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9885. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  9886. tmpobjid = CreateDynamicObject(2199,604.950,-551.507,1929.525,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9887. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9888. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  9889. tmpobjid = CreateDynamicObject(2637,615.864,-558.875,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9890. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9891. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9892. tmpobjid = CreateDynamicObject(2637,615.864,-554.965,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9893. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9894. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9895. tmpobjid = CreateDynamicObject(2637,609.103,-558.875,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9896. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9897. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9898. tmpobjid = CreateDynamicObject(2637,609.103,-554.965,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9899. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9900. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9901. tmpobjid = CreateDynamicObject(2637,612.533,-558.875,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9902. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9903. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9904. tmpobjid = CreateDynamicObject(2637,612.533,-554.965,1932.565,0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  9905. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  9906. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  9907. tmpobjid = CreateDynamicObject(1721,611.217,-552.670,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9908. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9909. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9910. tmpobjid = CreateDynamicObject(1721,611.217,-553.299,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9911. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9912. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9913. tmpobjid = CreateDynamicObject(1721,611.217,-553.929,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9914. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9915. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9916. tmpobjid = CreateDynamicObject(1721,611.217,-560.729,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9917. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9918. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9919. tmpobjid = CreateDynamicObject(1721,611.217,-560.099,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9920. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9921. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9922. tmpobjid = CreateDynamicObject(1721,611.217,-559.469,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9923. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9924. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9925. tmpobjid = CreateDynamicObject(1721,611.217,-557.309,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9926. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9927. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9928. tmpobjid = CreateDynamicObject(1721,611.217,-556.689,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9929. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9930. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9931. tmpobjid = CreateDynamicObject(1721,611.217,-556.069,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9932. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9933. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9934. tmpobjid = CreateDynamicObject(1721,612.988,-552.670,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9935. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9936. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9937. tmpobjid = CreateDynamicObject(1721,612.988,-553.299,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9938. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9939. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9940. tmpobjid = CreateDynamicObject(1721,612.988,-553.929,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9941. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9942. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9943. tmpobjid = CreateDynamicObject(1721,612.988,-560.729,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9944. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9945. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9946. tmpobjid = CreateDynamicObject(1721,612.988,-560.099,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9947. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9948. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9949. tmpobjid = CreateDynamicObject(1721,612.988,-559.469,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9950. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9951. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9952. tmpobjid = CreateDynamicObject(1721,612.988,-557.309,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9953. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9954. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9955. tmpobjid = CreateDynamicObject(1721,612.988,-556.689,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9956. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  9957. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  9958. tmpobjid = CreateDynamicObject(19445,627.466,-565.453,1930.329,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  9959. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  9960. tmpobjid = CreateDynamicObject(19383,615.833,-580.739,1930.329,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9961. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9962. tmpobjid = CreateDynamicObject(19353,617.361,-585.619,1930.335,-0.000,0.000,-179.999,-1,-1,-1,350.000,350.000);
  9963. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9964. tmpobjid = CreateDynamicObject(19869,617.362,-581.151,1932.625,0.000,90.000,-90.000,-1,-1,-1,350.000,350.000);
  9965. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9966. SetDynamicObjectMaterial(tmpobjid, 1, 10973, "mall_sfse", "ws_grilleshade", 0);
  9967. tmpobjid = CreateDynamicObject(19999,626.852,-578.930,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9968. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9969. tmpobjid = CreateDynamicObject(19999,619.240,-583.562,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9970. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9971. tmpobjid = CreateDynamicObject(1897,617.358,-582.485,1931.085,89.999,-0.098,0.098,-1,-1,-1,350.000,350.000);
  9972. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  9973. tmpobjid = CreateDynamicObject(1897,617.358,-582.485,1929.715,89.999,-0.098,0.098,-1,-1,-1,350.000,350.000);
  9974. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  9975. tmpobjid = CreateDynamicObject(1897,617.348,-581.454,1930.095,0.000,-179.999,179.999,-1,-1,-1,350.000,350.000);
  9976. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  9977. tmpobjid = CreateDynamicObject(1897,617.348,-583.175,1930.095,0.000,-179.999,179.999,-1,-1,-1,350.000,350.000);
  9978. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  9979. tmpobjid = CreateDynamicObject(1897,617.348,-582.314,1930.095,0.000,-179.999,179.999,-1,-1,-1,350.000,350.000);
  9980. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  9981. tmpobjid = CreateDynamicObject(19999,612.799,-583.562,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  9982. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  9983. tmpobjid = CreateDynamicObject(19869,611.383,-580.732,1932.625,0.000,89.999,-0.000,-1,-1,-1,350.000,350.000);
  9984. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  9985. SetDynamicObjectMaterial(tmpobjid, 1, 10973, "mall_sfse", "ws_grilleshade", 0);
  9986. tmpobjid = CreateDynamicObject(19445,619.216,-571.431,1933.699,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9987. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9988. tmpobjid = CreateDynamicObject(19445,609.595,-571.431,1933.699,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  9989. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9990. tmpobjid = CreateDynamicObject(19445,610.995,-576.312,1933.699,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9991. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9992. tmpobjid = CreateDynamicObject(19445,610.995,-585.941,1933.699,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  9993. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9994. tmpobjid = CreateDynamicObject(19445,612.636,-580.721,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9995. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9996. tmpobjid = CreateDynamicObject(19445,612.586,-580.761,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  9997. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  9998. tmpobjid = CreateDynamicObject(1721,612.988,-556.069,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  9999. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10000. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10001. tmpobjid = CreateDynamicObject(1721,614.749,-552.670,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10002. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10003. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10004. tmpobjid = CreateDynamicObject(1721,614.749,-553.299,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10005. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10006. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10007. tmpobjid = CreateDynamicObject(1721,614.749,-553.929,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10008. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10009. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10010. tmpobjid = CreateDynamicObject(19445,609.156,-571.330,1933.699,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10011. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10012. tmpobjid = CreateDynamicObject(19445,623.606,-564.830,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10013. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10014. tmpobjid = CreateDynamicObject(1721,614.749,-560.729,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10015. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10016. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10017. tmpobjid = CreateDynamicObject(1721,614.749,-560.099,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10018. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10019. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10020. tmpobjid = CreateDynamicObject(19445,609.586,-568.168,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10021. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10022. tmpobjid = CreateDynamicObject(19445,609.566,-574.408,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10023. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10024. tmpobjid = CreateDynamicObject(1721,614.749,-559.469,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10025. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10026. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10027. tmpobjid = CreateDynamicObject(1721,614.749,-557.309,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10028. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10029. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10030. tmpobjid = CreateDynamicObject(1721,614.749,-556.689,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10031. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10032. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10033. tmpobjid = CreateDynamicObject(19383,621.674,-575.849,1930.329,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10034. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10035. tmpobjid = CreateDynamicObject(19353,621.669,-573.019,1930.335,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10036. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10037. tmpobjid = CreateDynamicObject(2606,610.825,-583.301,1931.125,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10038. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10039. tmpobjid = CreateDynamicObject(1721,614.749,-556.069,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10040. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10041. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10042. tmpobjid = CreateDynamicObject(19353,621.649,-573.019,1933.695,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10043. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10044. tmpobjid = CreateDynamicObject(2606,610.825,-583.301,1931.585,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10045. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10046. tmpobjid = CreateDynamicObject(1499,615.212,-563.369,1928.565,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  10047. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  10048. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "barbersmir1", -1);
  10049. tmpobjid = CreateDynamicObject(2725,619.712,-560.758,1928.943,-0.000,-0.000,-90.000,-1,-1,-1,350.000,350.000);
  10050. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10051. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10052. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10053. tmpobjid = CreateDynamicObject(2725,619.712,-561.923,1928.943,-0.000,-0.000,-90.000,-1,-1,-1,350.000,350.000);
  10054. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10055. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10056. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10057. tmpobjid = CreateDynamicObject(14834,619.474,-561.279,1928.646,-0.000,-0.000,-170.340,-1,-1,-1,350.000,350.000);
  10058. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", -1);
  10059. tmpobjid = CreateDynamicObject(2199,609.611,-567.557,1929.155,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10060. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10061. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  10062. tmpobjid = CreateDynamicObject(2199,609.611,-568.728,1929.155,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10063. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10064. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  10065. tmpobjid = CreateDynamicObject(2725,623.175,-570.890,1928.943,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10066. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10067. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10068. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10069. tmpobjid = CreateDynamicObject(2199,609.611,-570.828,1928.635,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10070. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10071. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  10072. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10073. tmpobjid = CreateDynamicObject(2199,609.611,-570.558,1928.635,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10074. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10075. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  10076. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10077. tmpobjid = CreateDynamicObject(2725,622.010,-570.890,1928.943,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10078. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10079. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10080. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10081. tmpobjid = CreateDynamicObject(14834,622.654,-570.652,1928.646,-0.000,-0.000,134.459,-1,-1,-1,350.000,350.000);
  10082. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", -1);
  10083. tmpobjid = CreateDynamicObject(2725,619.515,-570.890,1928.943,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10084. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10085. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10086. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10087. tmpobjid = CreateDynamicObject(1495,627.328,-569.609,1928.599,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10088. SetDynamicObjectMaterial(tmpobjid, 1, 3899, "hospital2", "black", 0);
  10089. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -13421773);
  10090. tmpobjid = CreateDynamicObject(1495,627.328,-566.599,1928.599,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10091. SetDynamicObjectMaterial(tmpobjid, 1, 3899, "hospital2", "black", 0);
  10092. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -13421773);
  10093. tmpobjid = CreateDynamicObject(19376,628.814,-565.401,1932.119,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  10094. SetDynamicObjectMaterial(tmpobjid, 0, 14859, "gf1", "mp_cop_ceiling", -13421773);
  10095. tmpobjid = CreateDynamicObject(19376,628.854,-565.451,1928.549,0.000,90.000,179.999,-1,-1,-1,350.000,350.000);
  10096. SetDynamicObjectMaterial(tmpobjid, 0, 14777, "int_casinoint3", "GB_midbar05", -13421773);
  10097. tmpobjid = CreateDynamicObject(2725,618.350,-570.890,1928.943,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10098. SetDynamicObjectMaterial(tmpobjid, 0, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10099. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10100. SetDynamicObjectMaterial(tmpobjid, 2, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10101. tmpobjid = CreateDynamicObject(14834,618.993,-570.652,1928.646,0.000,-0.000,134.459,-1,-1,-1,350.000,350.000);
  10102. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", -1);
  10103. tmpobjid = CreateDynamicObject(19873,620.137,-568.403,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10104. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10105. tmpobjid = CreateDynamicObject(2199,622.491,-571.517,1929.535,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10106. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10107. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", 0);
  10108. tmpobjid = CreateDynamicObject(1234,619.645,-571.258,1929.905,0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10109. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10110. tmpobjid = CreateDynamicObject(14834,605.171,-555.953,1928.646,0.000,-0.000,18.859,-1,-1,-1,350.000,350.000);
  10111. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", -1);
  10112. tmpobjid = CreateDynamicObject(1721,619.978,-560.080,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10113. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10114. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10115. tmpobjid = CreateDynamicObject(1721,619.978,-562.650,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10116. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10117. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10118. tmpobjid = CreateDynamicObject(2606,610.825,-583.301,1930.665,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10119. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10120. tmpobjid = CreateDynamicObject(19445,617.376,-585.572,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10121. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10122. tmpobjid = CreateDynamicObject(19445,617.336,-585.572,1933.699,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10123. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10124. tmpobjid = CreateDynamicObject(19999,622.881,-583.562,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10125. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10126. tmpobjid = CreateDynamicObject(1897,611.657,-580.744,1930.095,0.000,-179.999,-90.000,-1,-1,-1,350.000,350.000);
  10127. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10128. tmpobjid = CreateDynamicObject(1897,613.398,-580.744,1930.095,0.000,-179.999,-90.000,-1,-1,-1,350.000,350.000);
  10129. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10130. tmpobjid = CreateDynamicObject(1897,612.537,-580.744,1930.095,0.000,-179.999,-90.000,-1,-1,-1,350.000,350.000);
  10131. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10132. tmpobjid = CreateDynamicObject(1897,612.537,-580.764,1929.895,-89.999,-269.900,-179.901,-1,-1,-1,350.000,350.000);
  10133. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10134. tmpobjid = CreateDynamicObject(1897,612.537,-580.764,1931.275,-89.999,-269.900,-179.901,-1,-1,-1,350.000,350.000);
  10135. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10136. tmpobjid = CreateDynamicObject(19353,626.399,-577.519,1930.335,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10137. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10138. tmpobjid = CreateDynamicObject(19353,621.639,-576.020,1933.695,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10139. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10140. tmpobjid = CreateDynamicObject(19353,626.379,-577.551,1933.695,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10141. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10142. tmpobjid = CreateDynamicObject(19353,623.179,-577.551,1933.695,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10143. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10144. tmpobjid = CreateDynamicObject(19999,622.881,-578.891,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10145. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10146. tmpobjid = CreateDynamicObject(19999,612.957,-573.207,1928.615,0.000,-0.000,-90.000,-1,-1,-1,350.000,350.000);
  10147. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10148. tmpobjid = CreateDynamicObject(19353,623.608,-571.238,1933.695,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10149. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10150. tmpobjid = CreateDynamicObject(19981,613.133,-569.729,1933.375,-0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  10151. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10152. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10153. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10154. tmpobjid = CreateDynamicObject(19981,613.133,-568.958,1933.375,-0.000,179.999,90.000,-1,-1,-1,350.000,350.000);
  10155. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10156. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10157. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10158. tmpobjid = CreateDynamicObject(19873,613.119,-569.723,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10159. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  10160. tmpobjid = CreateDynamicObject(19873,613.119,-568.952,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10161. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  10162. tmpobjid = CreateDynamicObject(19476,613.169,-569.344,1930.695,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10163. SetDynamicObjectMaterialText(tmpobjid, 0, "INFORMATION", 120, "Ariel", 80, 1, -1, 0, 1);
  10164. tmpobjid = CreateDynamicObject(19999,612.957,-577.589,1928.615,0.000,-0.000,-90.000,-1,-1,-1,350.000,350.000);
  10165. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10166. tmpobjid = CreateDynamicObject(19999,619.810,-573.405,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10167. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10168. tmpobjid = CreateDynamicObject(19869,621.913,-577.523,1932.625,0.000,89.999,-0.000,-1,-1,-1,350.000,350.000);
  10169. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10170. SetDynamicObjectMaterial(tmpobjid, 1, 10973, "mall_sfse", "ws_grilleshade", 0);
  10171. tmpobjid = CreateDynamicObject(1897,624.150,-577.534,1930.625,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10172. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10173. tmpobjid = CreateDynamicObject(1897,622.410,-577.534,1930.625,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10174. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10175. tmpobjid = CreateDynamicObject(1897,623.340,-577.544,1931.085,89.999,89.901,0.098,-1,-1,-1,350.000,350.000);
  10176. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10177. tmpobjid = CreateDynamicObject(1897,623.340,-577.544,1929.715,89.999,89.901,0.098,-1,-1,-1,350.000,350.000);
  10178. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10179. tmpobjid = CreateDynamicObject(1897,623.289,-577.534,1930.625,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10180. SetDynamicObjectMaterial(tmpobjid, 0, 14385, "trailerkb", "tr_wood1", 0);
  10181. tmpobjid = CreateDynamicObject(2645,621.542,-573.182,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10182. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10183. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  10184. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10185. tmpobjid = CreateDynamicObject(2645,621.542,-572.391,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10186. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10187. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  10188. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10189. tmpobjid = CreateDynamicObject(2645,621.542,-573.971,1931.135,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10190. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10191. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  10192. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10193. tmpobjid = CreateDynamicObject(2645,619.030,-585.443,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10194. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10195. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  10196. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10197. tmpobjid = CreateDynamicObject(2645,619.821,-585.443,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10198. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10199. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  10200. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10201. tmpobjid = CreateDynamicObject(2645,618.241,-585.443,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10202. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10203. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  10204. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10205. tmpobjid = CreateDynamicObject(1763,613.237,-580.086,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10206. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10207. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10208. tmpobjid = CreateDynamicObject(1721,619.978,-554.250,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10209. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10210. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10211. tmpobjid = CreateDynamicObject(1721,619.978,-554.880,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10212. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10213. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10214. tmpobjid = CreateDynamicObject(1759,621.183,-563.975,1928.615,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  10215. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10216. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10217. tmpobjid = CreateDynamicObject(1759,615.063,-584.925,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10218. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10219. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10220. tmpobjid = CreateDynamicObject(1759,617.074,-584.925,1928.615,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10221. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10222. SetDynamicObjectMaterial(tmpobjid, 1, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10223. tmpobjid = CreateDynamicObject(19873,616.029,-576.413,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10224. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10225. tmpobjid = CreateDynamicObject(19873,622.529,-581.652,1932.055,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10226. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10227. tmpobjid = CreateDynamicObject(19999,626.894,-575.502,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10228. SetDynamicObjectMaterial(tmpobjid, 0, 2562, "cj_hotel_sw", "CJ-COUCHL1", 0);
  10229. tmpobjid = CreateDynamicObject(1721,619.978,-555.501,1928.615,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10230. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10231. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10232. tmpobjid = CreateDynamicObject(1721,620.318,-571.101,1928.615,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  10233. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10234. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10235. tmpobjid = CreateDynamicObject(1721,617.608,-571.101,1928.615,0.000,0.000,359.999,-1,-1,-1,350.000,350.000);
  10236. SetDynamicObjectMaterial(tmpobjid, 0, 14479, "skuzzy_motelmain", "mp_CJ_Laminate1", 0);
  10237. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10238. tmpobjid = CreateDynamicObject(2645,609.434,-563.239,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10239. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10240. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart2", 0);
  10241. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10242. tmpobjid = CreateDynamicObject(2637,614.354,-583.265,1932.415,0.000,179.999,0.000,-1,-1,-1,350.000,350.000);
  10243. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  10244. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  10245. tmpobjid = CreateDynamicObject(2637,624.704,-575.145,1932.415,0.000,179.999,0.000,-1,-1,-1,350.000,350.000);
  10246. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  10247. SetDynamicObjectMaterial(tmpobjid, 1, 10778, "airportcpark_sfse", "ws_fluorescent2", 0);
  10248. tmpobjid = CreateDynamicObject(19353,625.299,-572.749,1933.695,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10249. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10250. tmpobjid = CreateDynamicObject(19353,626.379,-572.739,1933.695,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10251. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10252. tmpobjid = CreateDynamicObject(19353,621.698,-575.909,1933.695,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10253. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10254. tmpobjid = CreateDynamicObject(19353,621.688,-573.078,1933.695,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10255. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10256. tmpobjid = CreateDynamicObject(19353,623.378,-577.489,1933.695,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10257. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10258. tmpobjid = CreateDynamicObject(19353,626.389,-577.499,1933.695,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10259. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10260. tmpobjid = CreateDynamicObject(1499,621.683,-575.103,1928.565,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10261. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  10262. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "barbersmir1", -1);
  10263. tmpobjid = CreateDynamicObject(1499,616.572,-580.752,1928.565,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10264. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", -1);
  10265. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "barbersmir1", -1);
  10266. tmpobjid = CreateDynamicObject(2645,608.664,-563.239,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10267. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10268. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart3", 0);
  10269. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10270. tmpobjid = CreateDynamicObject(2645,607.893,-563.239,1931.135,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10271. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10272. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  10273. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10274. tmpobjid = CreateDynamicObject(14834,619.776,-556.759,1928.646,-0.000,-0.000,-149.539,-1,-1,-1,350.000,350.000);
  10275. SetDynamicObjectMaterial(tmpobjid, 2, 19297, "matlights", "invisible", -1);
  10276. tmpobjid = CreateDynamicObject(630,611.505,-581.409,1929.520,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10277. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  10278. tmpobjid = CreateDynamicObject(2242,611.590,-581.390,1928.770,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10279. SetDynamicObjectMaterial(tmpobjid, 0, 18058, "mp_diner2", "mp_diner_slats", 0);
  10280. tmpobjid = CreateDynamicObject(630,611.505,-581.409,1929.600,-0.000,0.000,154.799,-1,-1,-1,350.000,350.000);
  10281. SetDynamicObjectMaterial(tmpobjid, 0, 1597, "centralresac1", "kbtree4_test", -1);
  10282. tmpobjid = CreateDynamicObject(630,611.505,-575.058,1929.520,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10283. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -1);
  10284. tmpobjid = CreateDynamicObject(2242,611.590,-575.039,1928.770,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10285. SetDynamicObjectMaterial(tmpobjid, 0, 18058, "mp_diner2", "mp_diner_slats", 0);
  10286. tmpobjid = CreateDynamicObject(630,611.505,-575.058,1929.600,-0.000,0.000,154.799,-1,-1,-1,350.000,350.000);
  10287. SetDynamicObjectMaterial(tmpobjid, 0, 1597, "centralresac1", "kbtree4_test", -1);
  10288. tmpobjid = CreateDynamicObject(2276,620.439,-563.964,1930.765,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10289. SetDynamicObjectMaterial(tmpobjid, 0, 19297, "matlights", "invisible", 0);
  10290. SetDynamicObjectMaterial(tmpobjid, 1, 15040, "cuntcuts", "csnewspaper02", 0);
  10291. tmpobjid = CreateDynamicObject(19445,628.385,-570.293,1930.329,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  10292. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -13421773);
  10293. tmpobjid = CreateDynamicObject(11711,627.352,-568.108,1931.505,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10294. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", -13421773);
  10295. tmpobjid = CreateDynamicObject(2608,611.288,-576.678,1931.125,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10296. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10297. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10298. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10299. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10300. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10301. tmpobjid = CreateDynamicObject(2855,622.009,-570.855,1929.355,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10302. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10303. tmpobjid = CreateDynamicObject(2855,618.369,-570.855,1929.355,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10304. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10305. tmpobjid = CreateDynamicObject(2855,619.729,-561.935,1929.355,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10306. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10307. tmpobjid = CreateDynamicObject(2855,619.729,-560.775,1929.355,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10308. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10309. tmpobjid = CreateDynamicObject(2855,612.889,-568.975,1929.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10310. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10311. tmpobjid = CreateDynamicObject(2855,612.739,-563.874,1929.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10312. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10313. tmpobjid = CreateDynamicObject(2855,612.739,-564.375,1929.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10314. SetDynamicObjectMaterial(tmpobjid, 4, 15040, "cuntcuts", "csnewspaper", 0);
  10315. tmpobjid = CreateDynamicObject(2645,623.533,-564.300,1931.135,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  10316. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10317. SetDynamicObjectMaterial(tmpobjid, 1, 10377, "cityhall_sfs", "ws_copart1", 0);
  10318. SetDynamicObjectMaterial(tmpobjid, 2, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10319. tmpobjid = CreateDynamicObject(1738,612.707,-563.079,1929.214,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  10320. SetDynamicObjectMaterial(tmpobjid, 1, 1560, "7_11_door", "cj_sheetmetal2", 0);
  10321. tmpobjid = CreateDynamicObject(2608,612.798,-563.067,1931.125,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10322. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10323. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10324. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10325. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10326. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10327. tmpobjid = CreateDynamicObject(2608,611.518,-551.097,1931.125,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  10328. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10329. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10330. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10331. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10332. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10333. tmpobjid = CreateDynamicObject(2608,612.968,-571.707,1931.125,0.000,0.000,360.000,-1,-1,-1,350.000,350.000);
  10334. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10335. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10336. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10337. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10338. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10339. tmpobjid = CreateDynamicObject(2608,619.779,-571.707,1931.125,0.000,0.000,360.000,-1,-1,-1,350.000,350.000);
  10340. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10341. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10342. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10343. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10344. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10345. tmpobjid = CreateDynamicObject(2608,623.769,-585.247,1931.125,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10346. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10347. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10348. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10349. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10350. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10351. tmpobjid = CreateDynamicObject(2608,621.889,-585.247,1931.125,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10352. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10353. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10354. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10355. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10356. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10357. tmpobjid = CreateDynamicObject(2608,617.709,-551.097,1931.125,0.000,0.000,360.000,-1,-1,-1,350.000,350.000);
  10358. SetDynamicObjectMaterial(tmpobjid, 0, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10359. SetDynamicObjectMaterial(tmpobjid, 1, 19297, "matlights", "invisible", 0);
  10360. SetDynamicObjectMaterial(tmpobjid, 3, 19297, "matlights", "invisible", 0);
  10361. SetDynamicObjectMaterial(tmpobjid, 4, 14650, "ab_trukstpc", "mp_CJ_WOOD5", 0);
  10362. SetDynamicObjectMaterial(tmpobjid, 5, 19297, "matlights", "invisible", 0);
  10363. tmpobjid = CreateDynamicObject(19399,615.331,-550.784,1930.335,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  10364. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10365. tmpobjid = CreateDynamicObject(19353,612.130,-550.778,1930.335,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10366. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10367. tmpobjid = CreateDynamicObject(19399,608.921,-550.784,1930.335,0.000,0.000,269.999,-1,-1,-1,350.000,350.000);
  10368. SetDynamicObjectMaterial(tmpobjid, 0, 17566, "contachou1_lae2", "mp_apt1_woodpanel", -1);
  10369. tmpobjid = CreateDynamicObject(19466,615.508,-550.819,1930.735,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10370. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  10371. tmpobjid = CreateDynamicObject(19466,609.097,-550.819,1930.735,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10372. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  10373. tmpobjid = CreateDynamicObject(19466,610.717,-550.829,1930.735,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10374. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  10375. tmpobjid = CreateDynamicObject(19466,617.138,-550.829,1930.735,0.000,0.000,89.999,-1,-1,-1,350.000,350.000);
  10376. SetDynamicObjectMaterial(tmpobjid, 0, 14593, "papaerchaseoffice", "ab_blinds", 0);
  10377. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10378. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10379. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10380. tmpobjid = CreateDynamicObject(16780,614.201,-566.101,1932.205,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10381. tmpobjid = CreateDynamicObject(2111,614.185,-566.134,1932.435,0.000,180.000,179.999,-1,-1,-1,350.000,350.000);
  10382. tmpobjid = CreateDynamicObject(11711,623.542,-568.108,1931.505,0.000,0.000,-90.000,-1,-1,-1,350.000,350.000);
  10383. tmpobjid = CreateDynamicObject(2164,609.648,-570.815,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10384. tmpobjid = CreateDynamicObject(2165,627.456,-584.960,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10385. tmpobjid = CreateDynamicObject(2166,626.588,-584.996,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10386. tmpobjid = CreateDynamicObject(2165,627.456,-580.328,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10387. tmpobjid = CreateDynamicObject(2190,613.131,-568.567,1929.515,0.000,0.000,-100.099,-1,-1,-1,350.000,350.000);
  10388. tmpobjid = CreateDynamicObject(2167,609.643,-563.886,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10389. tmpobjid = CreateDynamicObject(2167,609.643,-564.806,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10390. tmpobjid = CreateDynamicObject(2190,613.131,-570.868,1929.515,-0.000,-0.000,-100.099,-1,-1,-1,350.000,350.000);
  10391. tmpobjid = CreateDynamicObject(2167,609.643,-569.038,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10392. tmpobjid = CreateDynamicObject(2167,609.643,-568.127,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10393. tmpobjid = CreateDynamicObject(2167,609.643,-567.206,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10394. tmpobjid = CreateDynamicObject(2200,604.967,-552.627,1928.615,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  10395. tmpobjid = CreateDynamicObject(2200,604.967,-554.857,1928.615,0.000,-0.000,89.999,-1,-1,-1,350.000,350.000);
  10396. tmpobjid = CreateDynamicObject(2166,626.588,-580.364,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10397. tmpobjid = CreateDynamicObject(2165,619.844,-584.960,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10398. tmpobjid = CreateDynamicObject(2166,618.976,-584.996,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10399. tmpobjid = CreateDynamicObject(2165,623.485,-584.960,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10400. tmpobjid = CreateDynamicObject(2165,613.403,-584.960,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10401. tmpobjid = CreateDynamicObject(2166,612.535,-584.996,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10402. tmpobjid = CreateDynamicObject(19825,604.848,-552.503,1931.195,0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10403. tmpobjid = CreateDynamicObject(2200,622.318,-571.617,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10404. tmpobjid = CreateDynamicObject(2200,623.989,-571.637,1928.615,0.000,-0.000,-0.000,-1,-1,-1,350.000,350.000);
  10405. tmpobjid = CreateDynamicObject(2203,619.473,-561.294,1928.760,-0.000,-0.000,-90.000,-1,-1,-1,350.000,350.000);
  10406. tmpobjid = CreateDynamicObject(2203,622.639,-570.651,1928.760,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10407. tmpobjid = CreateDynamicObject(16780,620.151,-568.401,1932.205,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10408. tmpobjid = CreateDynamicObject(2203,618.979,-570.651,1928.760,-0.000,-0.000,179.999,-1,-1,-1,350.000,350.000);
  10409. tmpobjid = CreateDynamicObject(2111,620.135,-568.434,1932.435,0.000,180.000,179.999,-1,-1,-1,350.000,350.000);
  10410. tmpobjid = CreateDynamicObject(19807,619.519,-570.821,1929.454,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10411. tmpobjid = CreateDynamicObject(2203,605.174,-555.939,1928.760,-0.000,-0.000,78.899,-1,-1,-1,350.000,350.000);
  10412. tmpobjid = CreateDynamicObject(2002,621.108,-570.783,1928.615,0.000,0.000,180.000,-1,-1,-1,350.000,350.000);
  10413. tmpobjid = CreateDynamicObject(2166,622.617,-584.996,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10414. tmpobjid = CreateDynamicObject(2165,623.485,-580.289,1928.605,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10415. tmpobjid = CreateDynamicObject(2166,622.617,-580.325,1928.615,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10416. tmpobjid = CreateDynamicObject(2165,611.559,-573.811,1928.605,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10417. tmpobjid = CreateDynamicObject(2166,611.523,-572.943,1928.615,-0.000,-0.000,0.000,-1,-1,-1,350.000,350.000);
  10418. tmpobjid = CreateDynamicObject(2165,611.559,-578.192,1928.605,-0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10419. tmpobjid = CreateDynamicObject(2166,611.523,-577.324,1928.615,-0.000,-0.000,0.000,-1,-1,-1,350.000,350.000);
  10420. tmpobjid = CreateDynamicObject(2165,619.206,-572.007,1928.605,-0.000,-0.000,0.000,-1,-1,-1,350.000,350.000);
  10421. tmpobjid = CreateDynamicObject(2166,620.075,-571.971,1928.615,0.000,-0.000,-89.999,-1,-1,-1,350.000,350.000);
  10422. tmpobjid = CreateDynamicObject(19825,609.678,-568.643,1931.195,0.000,0.000,90.000,-1,-1,-1,350.000,350.000);
  10423. tmpobjid = CreateDynamicObject(2986,616.554,-585.451,1931.726,180.000,90.000,270.000,-1,-1,-1,350.000,350.000);
  10424. tmpobjid = CreateDynamicObject(2986,627.215,-585.451,1931.726,180.000,90.000,270.000,-1,-1,-1,350.000,350.000);
  10425. tmpobjid = CreateDynamicObject(16780,616.043,-576.411,1932.205,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10426. tmpobjid = CreateDynamicObject(2111,616.027,-576.444,1932.435,0.000,180.000,179.999,-1,-1,-1,350.000,350.000);
  10427. tmpobjid = CreateDynamicObject(16780,622.543,-581.650,1932.205,0.000,0.000,179.999,-1,-1,-1,350.000,350.000);
  10428. tmpobjid = CreateDynamicObject(2111,622.527,-581.683,1932.435,0.000,180.000,179.999,-1,-1,-1,350.000,350.000);
  10429. tmpobjid = CreateDynamicObject(2165,627.498,-576.900,1928.605,-0.000,0.000,-179.999,-1,-1,-1,350.000,350.000);
  10430. tmpobjid = CreateDynamicObject(2166,626.630,-576.936,1928.615,-0.000,-0.000,90.000,-1,-1,-1,350.000,350.000);
  10431. tmpobjid = CreateDynamicObject(2986,619.315,-563.241,1931.726,180.000,90.000,270.000,-1,-1,-1,350.000,350.000);
  10432. tmpobjid = CreateDynamicObject(2203,619.771,-556.773,1928.760,-0.000,-0.000,-104.000,-1,-1,-1,350.000,350.000);
  10433. tmpobjid = CreateDynamicObject(19813,620.115,-560.202,1930.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10434. tmpobjid = CreateDynamicObject(19813,620.115,-560.482,1930.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10435. tmpobjid = CreateDynamicObject(19813,620.115,-554.112,1930.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10436. tmpobjid = CreateDynamicObject(19813,620.115,-553.822,1930.535,0.000,0.000,270.000,-1,-1,-1,350.000,350.000);
  10437. tmpobjid = CreateDynamicObject(19813,604.835,-556.692,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10438. tmpobjid = CreateDynamicObject(19813,604.835,-556.402,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10439. tmpobjid = CreateDynamicObject(19813,609.645,-569.402,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10440. tmpobjid = CreateDynamicObject(19813,611.074,-574.553,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10441. tmpobjid = CreateDynamicObject(19813,611.074,-574.273,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10442. tmpobjid = CreateDynamicObject(19813,621.774,-574.133,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10443. tmpobjid = CreateDynamicObject(19813,621.774,-573.853,1930.535,0.000,0.000,450.000,-1,-1,-1,350.000,350.000);
  10444. tmpobjid = CreateDynamicObject(19813,620.334,-585.473,1930.535,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10445. tmpobjid = CreateDynamicObject(19813,624.955,-585.473,1930.535,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10446. tmpobjid = CreateDynamicObject(19813,625.235,-585.473,1930.535,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10447. tmpobjid = CreateDynamicObject(2986,619.315,-563.471,1931.726,180.000,90.000,450.000,-1,-1,-1,350.000,350.000);
  10448. tmpobjid = CreateDynamicObject(2986,613.415,-550.890,1931.726,180.000,90.000,450.000,-1,-1,-1,350.000,350.000);
  10449. tmpobjid = CreateDynamicObject(2986,606.884,-550.890,1931.726,180.000,90.000,450.000,-1,-1,-1,350.000,350.000);
  10450. tmpobjid = CreateDynamicObject(19813,611.265,-563.253,1930.535,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10451. tmpobjid = CreateDynamicObject(19813,610.945,-563.253,1930.535,0.000,0.000,540.000,-1,-1,-1,350.000,350.000);
  10452. tmpobjid = CreateDynamicObject(19536,618.167,-568.066,1928.595,0.000,0.000,0.000,-1,-1,-1,350.000,350.000);
  10453. ////////////////////////////MAPPINGS MAPPINGS MAPPINGS MAPPINGS/////////////////////////////////////////////////////////////////////////////////////
  10454. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10455. //Map Exported with Texture Studio By: [uL]Pottus////////////////////////////////////////////////////////////////
  10456. //////////////////////////////////////////////and Crayder////////////////////////////////////////////////////////
  10457. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10458. //Map Information////////////////////////////////////////////////////////////////////////////////////////////////
  10459. /*
  10460. Exported on "2019-10-19 10:38:19" by "kova"
  10461. Created by "kova"
  10462. */
  10463. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  10464. //Objects////////////////////////////////////////////////////////////////////////////////////////////////////////
  10465. tmpobjid = CreateDynamicObjectEx(19377, 883.938720, 1913.583984, -90.078689, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10466. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10467. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10468. tmpobjid = CreateDynamicObjectEx(19377, 883.938537, 1923.212768, -90.078697, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10469. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10470. tmpobjid = CreateDynamicObjectEx(14411, 876.425048, 1918.392944, -93.183601, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10471. SetDynamicObjectMaterial(tmpobjid, 1, 10806, "airfence_sfse", "ws_oldpainted", 0x00000000);
  10472. tmpobjid = CreateDynamicObjectEx(19377, 872.116088, 1929.994384, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10473. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10474. tmpobjid = CreateDynamicObjectEx(19377, 870.527038, 1895.874511, -90.350799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10475. SetDynamicObjectMaterial(tmpobjid, 0, 915, "airconext", "CJ_plating", 0x00000000);
  10476. tmpobjid = CreateDynamicObjectEx(18762, 877.767272, 1920.379516, -88.508590, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10477. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10478. tmpobjid = CreateDynamicObjectEx(18762, 878.195800, 1920.386596, -88.508590, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10479. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10480. tmpobjid = CreateDynamicObjectEx(18762, 877.770019, 1915.878051, -88.508590, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10481. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10482. tmpobjid = CreateDynamicObjectEx(18762, 878.196960, 1915.875854, -88.508590, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10483. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10484. tmpobjid = CreateDynamicObjectEx(19376, 878.606872, 1910.585327, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10485. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  10486. tmpobjid = CreateDynamicObjectEx(19376, 878.607666, 1925.694213, -89.893028, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10487. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  10488. tmpobjid = CreateDynamicObjectEx(19376, 883.508605, 1908.991210, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10489. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  10490. tmpobjid = CreateDynamicObjectEx(19376, 883.511474, 1927.801757, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10491. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  10492. tmpobjid = CreateDynamicObjectEx(19376, 888.230224, 1913.897583, -94.476509, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10493. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  10494. tmpobjid = CreateDynamicObjectEx(19376, 888.233825, 1923.527221, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10495. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  10496. tmpobjid = CreateDynamicObjectEx(19377, 861.943786, 1923.103027, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10497. SetDynamicObjectMaterial(tmpobjid, 0, 14756, "smallsfhs", "AH_flroortiledirt1", 0x00000000);
  10498. tmpobjid = CreateDynamicObjectEx(19377, 861.943725, 1913.468383, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10499. SetDynamicObjectMaterial(tmpobjid, 0, 14756, "smallsfhs", "AH_flroortiledirt1", 0x00000000);
  10500. tmpobjid = CreateDynamicObjectEx(19376, 877.358337, 1910.565795, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10501. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10502. tmpobjid = CreateDynamicObjectEx(18762, 878.197326, 1917.876464, -85.511001, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10503. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10504. tmpobjid = CreateDynamicObjectEx(18762, 878.196472, 1922.856567, -85.521003, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10505. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10506. tmpobjid = CreateDynamicObjectEx(18762, 877.771911, 1917.867187, -85.521003, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10507. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10508. tmpobjid = CreateDynamicObjectEx(18762, 877.772766, 1922.848632, -85.521003, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10509. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10510. tmpobjid = CreateDynamicObjectEx(19376, 877.356384, 1925.694335, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10511. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10512. tmpobjid = CreateDynamicObjectEx(19360, 870.232055, 1908.741455, -85.278297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10513. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10514. tmpobjid = CreateDynamicObjectEx(19376, 876.650390, 1908.740844, -86.473014, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10515. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10516. tmpobjid = CreateDynamicObjectEx(19376, 863.812927, 1908.742187, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10517. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10518. tmpobjid = CreateDynamicObjectEx(19376, 872.488952, 1927.632324, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10519. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10520. tmpobjid = CreateDynamicObjectEx(19360, 870.198730, 1927.833007, -85.280296, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10521. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10522. tmpobjid = CreateDynamicObjectEx(19376, 863.783325, 1927.831787, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10523. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10524. tmpobjid = CreateDynamicObjectEx(19377, 872.444458, 1923.093627, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10525. SetDynamicObjectMaterial(tmpobjid, 0, 14756, "smallsfhs", "AH_flroortiledirt1", 0x00000000);
  10526. tmpobjid = CreateDynamicObjectEx(19377, 861.616882, 1929.995727, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10527. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10528. tmpobjid = CreateDynamicObjectEx(19376, 876.619567, 1927.832885, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10529. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10530. tmpobjid = CreateDynamicObjectEx(19360, 856.767211, 1918.123168, -85.280097, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10531. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10532. tmpobjid = CreateDynamicObjectEx(19376, 854.157592, 1927.830932, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10533. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10534. tmpobjid = CreateDynamicObjectEx(19376, 856.765441, 1924.546264, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10535. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10536. tmpobjid = CreateDynamicObjectEx(19376, 856.769470, 1911.703247, -95.261192, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10537. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  10538. tmpobjid = CreateDynamicObjectEx(19376, 854.185241, 1908.744750, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10539. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  10540. tmpobjid = CreateDynamicObjectEx(19377, 854.817382, 1920.367431, -85.084663, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10541. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10542. tmpobjid = CreateDynamicObjectEx(19377, 854.816833, 1910.804199, -85.082702, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10543. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10544. tmpobjid = CreateDynamicObjectEx(19377, 861.969909, 1906.630981, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10545. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10546. tmpobjid = CreateDynamicObjectEx(19377, 872.467346, 1906.629150, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10547. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10548. tmpobjid = CreateDynamicObjectEx(19376, 862.857116, 1927.654174, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10549. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10550. tmpobjid = CreateDynamicObjectEx(19376, 872.479553, 1908.849365, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10551. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10552. tmpobjid = CreateDynamicObjectEx(19376, 862.852050, 1908.848144, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10553. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10554. tmpobjid = CreateDynamicObjectEx(19376, 853.219421, 1908.848266, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10555. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10556. tmpobjid = CreateDynamicObjectEx(19376, 853.225524, 1927.655395, -79.788597, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10557. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10558. tmpobjid = CreateDynamicObjectEx(19376, 856.848571, 1922.810180, -79.788597, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10559. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10560. tmpobjid = CreateDynamicObjectEx(19376, 856.849548, 1913.177978, -79.788597, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10561. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10562. tmpobjid = CreateDynamicObjectEx(19376, 877.322998, 1922.735229, -79.788597, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10563. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10564. tmpobjid = CreateDynamicObjectEx(19377, 883.880371, 1927.698120, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10565. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  10566. tmpobjid = CreateDynamicObjectEx(18980, 877.492553, 1916.270141, -84.732452, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10567. SetDynamicObjectMaterial(tmpobjid, 0, 10351, "beach_sfs", "rocktb128", 0x00000000);
  10568. tmpobjid = CreateDynamicObjectEx(19376, 877.323608, 1913.102050, -79.788597, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10569. SetDynamicObjectMaterial(tmpobjid, 0, 14735, "newcrak", "carp21S", 0x00000000);
  10570. tmpobjid = CreateDynamicObjectEx(19443, 875.580627, 1911.348754, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10571. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10572. tmpobjid = CreateDynamicObjectEx(19443, 872.085327, 1911.348510, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10573. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10574. tmpobjid = CreateDynamicObjectEx(19443, 868.586608, 1911.348876, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10575. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10576. tmpobjid = CreateDynamicObjectEx(19443, 865.088439, 1911.348754, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10577. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10578. tmpobjid = CreateDynamicObjectEx(19443, 861.591979, 1911.349121, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10579. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10580. tmpobjid = CreateDynamicObjectEx(19443, 859.967407, 1913.126586, -84.361503, 90.000000, 0.006300, 0.000000, 150.00, 150.00);
  10581. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10582. tmpobjid = CreateDynamicObjectEx(19443, 859.966796, 1916.624511, -84.361503, 90.000000, 0.006300, 0.000000, 150.00, 150.00);
  10583. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10584. tmpobjid = CreateDynamicObjectEx(19443, 859.966003, 1920.121337, -84.361503, 90.000000, 0.006300, 0.000000, 150.00, 150.00);
  10585. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10586. tmpobjid = CreateDynamicObjectEx(19443, 859.965515, 1923.546264, -84.361503, 90.000000, 0.006300, 0.000000, 150.00, 150.00);
  10587. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10588. tmpobjid = CreateDynamicObjectEx(19443, 861.773315, 1925.289916, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10589. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10590. tmpobjid = CreateDynamicObjectEx(19443, 865.273620, 1925.291259, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10591. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10592. tmpobjid = CreateDynamicObjectEx(19443, 868.767578, 1925.292236, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10593. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10594. tmpobjid = CreateDynamicObjectEx(19443, 872.259216, 1925.293212, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10595. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10596. tmpobjid = CreateDynamicObjectEx(19443, 875.754150, 1925.293212, -84.361503, 90.000000, 0.006300, 90.000000, 150.00, 150.00);
  10597. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10598. tmpobjid = CreateDynamicObjectEx(19378, 872.078247, 1913.761718, -79.585372, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10599. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10600. tmpobjid = CreateDynamicObjectEx(19378, 872.077209, 1923.396118, -79.585372, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10601. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10602. tmpobjid = CreateDynamicObjectEx(19378, 861.581176, 1923.391967, -79.585372, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10603. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10604. tmpobjid = CreateDynamicObjectEx(19378, 861.579895, 1913.760131, -79.585372, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10605. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10606. tmpobjid = CreateDynamicObjectEx(18762, 856.354370, 1920.227783, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10607. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10608. tmpobjid = CreateDynamicObjectEx(18762, 856.355712, 1916.022338, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10609. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10610. tmpobjid = CreateDynamicObjectEx(18762, 856.354370, 1918.179687, -91.299797, 90.000000, 0.000000, 0.000000, 150.00, 150.00);
  10611. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10612. tmpobjid = CreateDynamicObjectEx(18762, 872.331115, 1908.326904, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10613. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10614. tmpobjid = CreateDynamicObjectEx(18762, 868.133300, 1908.329223, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10615. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10616. tmpobjid = CreateDynamicObjectEx(18762, 868.101562, 1928.243774, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10617. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10618. tmpobjid = CreateDynamicObjectEx(18762, 870.461914, 1928.244506, -86.532600, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10619. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10620. tmpobjid = CreateDynamicObjectEx(18762, 872.301879, 1928.245361, -89.420646, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10621. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10622. tmpobjid = CreateDynamicObjectEx(18762, 856.354370, 1918.179687, -86.530601, 90.000000, 0.000000, 0.000000, 150.00, 150.00);
  10623. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10624. tmpobjid = CreateDynamicObjectEx(18762, 870.461914, 1928.244506, -91.299797, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10625. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10626. tmpobjid = CreateDynamicObjectEx(18762, 870.134826, 1908.334472, -91.299797, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10627. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10628. tmpobjid = CreateDynamicObjectEx(19377, 850.782287, 1918.157470, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10629. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "woodfloor1", 0x00000000);
  10630. tmpobjid = CreateDynamicObjectEx(19376, 855.941345, 1924.546020, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10631. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10632. tmpobjid = CreateDynamicObjectEx(19376, 855.942993, 1911.703247, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10633. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10634. tmpobjid = CreateDynamicObjectEx(19360, 855.941284, 1918.124633, -83.804100, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10635. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  10636. tmpobjid = CreateDynamicObjectEx(19376, 851.084472, 1922.981567, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10637. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10638. tmpobjid = CreateDynamicObjectEx(19376, 843.128784, 1922.984985, -90.622993, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10639. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10640. tmpobjid = CreateDynamicObjectEx(19376, 851.047973, 1913.256591, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10641. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10642. tmpobjid = CreateDynamicObjectEx(19376, 841.418273, 1913.256591, -80.306388, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10643. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  10644. tmpobjid = CreateDynamicObjectEx(19376, 836.585815, 1918.095214, -93.805557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10645. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10646. tmpobjid = CreateDynamicObjectEx(19377, 870.471008, 1939.123413, -94.395202, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10647. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10648. tmpobjid = CreateDynamicObjectEx(19377, 883.808349, 1908.670043, -85.084701, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10649. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  10650. tmpobjid = CreateDynamicObjectEx(19377, 883.004333, 1918.103759, -84.963699, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10651. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall2", 0x00000000);
  10652. tmpobjid = CreateDynamicObjectEx(19376, 883.404907, 1913.426269, -79.926200, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10653. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  10654. tmpobjid = CreateDynamicObjectEx(19376, 883.387084, 1922.825439, -79.926200, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10655. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  10656. tmpobjid = CreateDynamicObjectEx(14411, 870.112976, 1905.357788, -94.016853, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10657. SetDynamicObjectMaterial(tmpobjid, 1, 10806, "airfence_sfse", "ws_oldpainted", 0x00000000);
  10658. tmpobjid = CreateDynamicObjectEx(19376, 872.250915, 1932.624877, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10659. SetDynamicObjectMaterial(tmpobjid, 0, 4550, "skyscr1_lan2", "sl_librarycolmn2", 0x00000000);
  10660. tmpobjid = CreateDynamicObjectEx(19376, 868.082092, 1932.573486, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10661. SetDynamicObjectMaterial(tmpobjid, 0, 4550, "skyscr1_lan2", "sl_librarycolmn2", 0x00000000);
  10662. tmpobjid = CreateDynamicObjectEx(18762, 872.658020, 1936.959472, -91.814651, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10663. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10664. tmpobjid = CreateDynamicObjectEx(18762, 867.674072, 1936.960571, -91.814651, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  10665. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10666. tmpobjid = CreateDynamicObjectEx(19377, 869.474182, 1932.507568, -86.808578, -34.000000, 90.000000, 0.000000, 150.00, 150.00);
  10667. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  10668. tmpobjid = CreateDynamicObjectEx(19376, 872.056579, 1928.656982, -81.311630, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10669. SetDynamicObjectMaterial(tmpobjid, 0, 4550, "skyscr1_lan2", "sl_librarycolmn2", 0x00000000);
  10670. tmpobjid = CreateDynamicObjectEx(19377, 870.466430, 1947.658447, -85.019203, 70.000000, 90.000000, 0.000000, 150.00, 150.00);
  10671. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  10672. tmpobjid = CreateDynamicObjectEx(19377, 870.377075, 1954.475952, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10673. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10674. tmpobjid = CreateDynamicObjectEx(19376, 876.976440, 1937.372924, -92.572990, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10675. SetDynamicObjectMaterial(tmpobjid, 0, 14533, "pleas_dome", "club_zeb_SFW2", 0x00000000);
  10676. tmpobjid = CreateDynamicObjectEx(19376, 863.356262, 1937.371948, -92.592948, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10677. SetDynamicObjectMaterial(tmpobjid, 0, 14533, "pleas_dome", "club_zeb_SFW2", 0x00000000);
  10678. tmpobjid = CreateDynamicObjectEx(19376, 875.794189, 1941.295043, -92.572959, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10679. SetDynamicObjectMaterial(tmpobjid, 0, 14533, "pleas_dome", "club_zeb_SFW2", 0x00000000);
  10680. tmpobjid = CreateDynamicObjectEx(19376, 865.140930, 1941.294799, -92.582977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10681. SetDynamicObjectMaterial(tmpobjid, 0, 14533, "pleas_dome", "club_zeb_SFW2", 0x00000000);
  10682. tmpobjid = CreateDynamicObjectEx(18762, 870.578674, 1936.957885, -89.080497, 0.000000, 90.000000, -180.000000, 150.00, 150.00);
  10683. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10684. tmpobjid = CreateDynamicObjectEx(19370, 875.692016, 1950.232421, -94.360702, 0.000000, 90.000000, 50.000000, 150.00, 150.00);
  10685. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10686. tmpobjid = CreateDynamicObjectEx(19370, 876.890930, 1952.115966, -94.362701, 0.000000, 90.000000, 70.000000, 150.00, 150.00);
  10687. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10688. tmpobjid = CreateDynamicObjectEx(19370, 877.444885, 1954.501953, -94.360702, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10689. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10690. tmpobjid = CreateDynamicObjectEx(19370, 877.172729, 1956.861206, -94.362701, 0.000000, 90.000000, 110.000000, 150.00, 150.00);
  10691. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10692. tmpobjid = CreateDynamicObjectEx(19370, 875.778808, 1959.354492, -94.360702, 0.000000, 90.000000, 130.000000, 150.00, 150.00);
  10693. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10694. tmpobjid = CreateDynamicObjectEx(19370, 873.850952, 1960.975708, -94.362701, 0.000000, 90.000000, 150.000000, 150.00, 150.00);
  10695. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10696. tmpobjid = CreateDynamicObjectEx(19370, 866.746276, 1960.786010, -94.360702, 0.000000, 90.000000, 210.000000, 150.00, 150.00);
  10697. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10698. tmpobjid = CreateDynamicObjectEx(19370, 864.959838, 1959.166503, -94.362701, 0.000000, 90.000000, 230.000000, 150.00, 150.00);
  10699. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10700. tmpobjid = CreateDynamicObjectEx(19370, 863.778625, 1956.889404, -94.360702, 0.000000, 90.000000, 250.000000, 150.00, 150.00);
  10701. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10702. tmpobjid = CreateDynamicObjectEx(19370, 863.478881, 1954.286499, -94.362701, 0.000000, 90.000000, 270.000000, 150.00, 150.00);
  10703. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10704. tmpobjid = CreateDynamicObjectEx(19370, 864.225524, 1951.725830, -94.360702, 0.000000, 90.000000, 290.000000, 150.00, 150.00);
  10705. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10706. tmpobjid = CreateDynamicObjectEx(19370, 865.705566, 1949.746948, -94.362701, 0.000000, 90.000000, 310.000000, 150.00, 150.00);
  10707. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10708. tmpobjid = CreateDynamicObjectEx(19370, 867.637817, 1948.438354, -94.360702, 0.000000, 90.000000, 330.000000, 150.00, 150.00);
  10709. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10710. tmpobjid = CreateDynamicObjectEx(19370, 869.885009, 1947.877197, -94.362701, 0.000000, 90.000000, 350.000000, 150.00, 150.00);
  10711. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10712. tmpobjid = CreateDynamicObjectEx(19370, 871.969482, 1948.042968, -94.360702, 0.000000, 90.000000, 370.000000, 150.00, 150.00);
  10713. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10714. tmpobjid = CreateDynamicObjectEx(19370, 874.029785, 1948.953735, -94.362701, 0.000000, 90.000000, 390.000000, 150.00, 150.00);
  10715. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "scratchedmetal", 0x00000000);
  10716. tmpobjid = CreateDynamicObjectEx(19376, 865.139892, 1944.064819, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10717. SetDynamicObjectMaterial(tmpobjid, 0, 4550, "skyscr1_lan2", "sl_librarycolmn2", 0x00000000);
  10718. tmpobjid = CreateDynamicObjectEx(19376, 862.222717, 1952.645385, -89.992996, 0.000000, 0.000000, 37.554321, 150.00, 150.00);
  10719. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10720. tmpobjid = CreateDynamicObjectEx(19376, 862.370544, 1956.755371, -89.992996, 0.000000, 0.000000, 358.902587, 150.00, 150.00);
  10721. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10722. tmpobjid = CreateDynamicObjectEx(19376, 864.130310, 1960.204467, -89.992996, 0.000000, 0.000000, 332.902679, 150.00, 150.00);
  10723. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10724. tmpobjid = CreateDynamicObjectEx(19376, 866.477478, 1962.040161, -89.992996, 0.000000, 0.000000, 314.474731, 150.00, 150.00);
  10725. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10726. tmpobjid = CreateDynamicObjectEx(19377, 872.341125, 1954.408691, -96.067947, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10727. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  10728. tmpobjid = CreateDynamicObjectEx(19376, 862.011108, 1959.064086, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10729. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10730. tmpobjid = CreateDynamicObjectEx(19376, 878.867919, 1959.069213, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10731. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10732. tmpobjid = CreateDynamicObjectEx(19376, 878.714050, 1952.622070, -89.992996, 0.000000, 0.000000, -37.554298, 150.00, 150.00);
  10733. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10734. tmpobjid = CreateDynamicObjectEx(19376, 875.804382, 1944.042846, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10735. SetDynamicObjectMaterial(tmpobjid, 0, 4550, "skyscr1_lan2", "sl_librarycolmn2", 0x00000000);
  10736. tmpobjid = CreateDynamicObjectEx(19376, 878.724182, 1957.400390, -89.992996, 0.000000, 0.000000, -358.902587, 150.00, 150.00);
  10737. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10738. tmpobjid = CreateDynamicObjectEx(19376, 877.123840, 1959.497070, -89.992996, 0.000000, 0.000000, -332.902709, 150.00, 150.00);
  10739. SetDynamicObjectMaterial(tmpobjid, 0, 6866, "vgncnstrct1", "Circus_gls_05", 0x00000000);
  10740. tmpobjid = CreateDynamicObjectEx(19377, 870.458923, 1959.187011, -91.285873, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10741. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  10742. tmpobjid = CreateDynamicObjectEx(19381, 870.350830, 1959.102905, -82.429916, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10743. SetDynamicObjectMaterial(tmpobjid, 0, 1414, "break_street1", "CJ_TV_SCREEN", 0x00000000);
  10744. tmpobjid = CreateDynamicObjectEx(19377, 870.470520, 1944.951660, -94.397201, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10745. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10746. tmpobjid = CreateDynamicObjectEx(19377, 880.874633, 1954.467773, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10747. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10748. tmpobjid = CreateDynamicObjectEx(19377, 859.885314, 1954.476806, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10749. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10750. tmpobjid = CreateDynamicObjectEx(19377, 870.382202, 1944.840820, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10751. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10752. tmpobjid = CreateDynamicObjectEx(19377, 880.867797, 1944.832763, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10753. SetDynamicObjectMaterial(tmpobjid, 0, 16639, "a51_labs", "ws_trainstationwin1", 0x00000000);
  10754. tmpobjid = CreateDynamicObjectEx(19377, 870.467773, 1941.275756, -89.487998, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10755. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  10756. tmpobjid = CreateDynamicObjectEx(18762, 870.134826, 1908.328613, -86.530601, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10757. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10758. tmpobjid = CreateDynamicObjectEx(18809, 870.432922, 1954.866088, -119.140869, 0.000000, 0.000000, 10.338688, 150.00, 150.00);
  10759. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  10760. tmpobjid = CreateDynamicObjectEx(14411, 870.234436, 1931.825317, -94.016868, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10761. SetDynamicObjectMaterial(tmpobjid, 1, 10806, "airfence_sfse", "ws_oldpainted", 0x00000000);
  10762. tmpobjid = CreateDynamicObjectEx(19376, 868.106018, 1903.885253, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10763. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10764. tmpobjid = CreateDynamicObjectEx(19376, 872.248291, 1903.961059, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10765. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10766. tmpobjid = CreateDynamicObjectEx(19377, 872.444396, 1913.465820, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10767. SetDynamicObjectMaterial(tmpobjid, 0, 14756, "smallsfhs", "AH_flroortiledirt1", 0x00000000);
  10768. tmpobjid = CreateDynamicObjectEx(19376, 868.105224, 1894.255615, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10769. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10770. tmpobjid = CreateDynamicObjectEx(19377, 879.694702, 1888.511352, -92.276298, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10771. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "sl_metalwalk", 0x00000000);
  10772. tmpobjid = CreateDynamicObjectEx(19376, 876.976562, 1899.232910, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10773. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10774. tmpobjid = CreateDynamicObjectEx(19376, 872.989807, 1891.868164, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10775. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10776. tmpobjid = CreateDynamicObjectEx(19376, 882.621887, 1891.868041, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10777. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10778. tmpobjid = CreateDynamicObjectEx(19376, 879.166809, 1899.234619, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10779. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10780. tmpobjid = CreateDynamicObjectEx(19376, 885.025451, 1894.908447, -89.992996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10781. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10782. tmpobjid = CreateDynamicObjectEx(1649, 836.624633, 1920.291625, -86.935699, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10783. SetDynamicObjectMaterial(tmpobjid, 0, 15046, "svcunthoose", "csGarageTrolley01psd", 0xFA000000);
  10784. tmpobjid = CreateDynamicObjectEx(19377, 831.377014, 1918.122314, -88.642196, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10785. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "woodfloor1", 0x00000000);
  10786. tmpobjid = CreateDynamicObjectEx(19377, 850.662536, 1918.098876, -85.184646, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10787. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall2", 0x00000000);
  10788. tmpobjid = CreateDynamicObjectEx(19377, 840.160095, 1918.099121, -85.184646, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10789. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall2", 0x00000000);
  10790. tmpobjid = CreateDynamicObjectEx(19377, 840.281127, 1918.160522, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10791. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "woodfloor1", 0x00000000);
  10792. tmpobjid = CreateDynamicObjectEx(1649, 836.628540, 1920.291748, -86.935699, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10793. SetDynamicObjectMaterial(tmpobjid, 0, 15046, "svcunthoose", "csGarageTrolley01psd", 0xB4000000);
  10794. tmpobjid = CreateDynamicObjectEx(1649, 836.624206, 1915.916137, -86.935699, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10795. SetDynamicObjectMaterial(tmpobjid, 0, 15046, "svcunthoose", "csGarageTrolley01psd", 0xFA000000);
  10796. tmpobjid = CreateDynamicObjectEx(14411, 835.439208, 1924.827148, -91.784126, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10797. SetDynamicObjectMaterial(tmpobjid, 0, 14476, "carlslounge", "AH_cheapredcarpet", 0x00000000);
  10798. SetDynamicObjectMaterial(tmpobjid, 1, 9507, "boxybld2_sfw", "boxybox_sf3z", 0x00000000);
  10799. tmpobjid = CreateDynamicObjectEx(18980, 836.318176, 1922.762817, -90.807792, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10800. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10801. SetDynamicObjectMaterial(tmpobjid, 1, 18835, "mickytextures", "wood051", 0x00000000);
  10802. tmpobjid = CreateDynamicObjectEx(18980, 836.319030, 1913.590698, -90.807792, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10803. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10804. tmpobjid = CreateDynamicObjectEx(1649, 836.628723, 1915.854614, -86.935699, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10805. SetDynamicObjectMaterial(tmpobjid, 0, 15046, "svcunthoose", "csGarageTrolley01psd", 0xB4000000);
  10806. tmpobjid = CreateDynamicObjectEx(18980, 836.317749, 1910.377929, -84.857200, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10807. SetDynamicObjectMaterial(tmpobjid, 0, 3676, "lawnxref", "lasthoose6", 0x00000000);
  10808. tmpobjid = CreateDynamicObjectEx(19377, 839.483276, 1927.794677, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10809. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "woodfloor1", 0x00000000);
  10810. tmpobjid = CreateDynamicObjectEx(1499, 838.317810, 1922.977539, -90.805702, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10811. SetDynamicObjectMaterial(tmpobjid, 0, 10101, "2notherbuildsfe", "Bow_Abpave_Gen", 0x00000000);
  10812. SetDynamicObjectMaterial(tmpobjid, 1, 14650, "ab_trukstpc", "sa_wood08_128", 0x00000000);
  10813. tmpobjid = CreateDynamicObjectEx(19376, 838.842041, 1927.780395, -87.122962, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10814. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10815. tmpobjid = CreateDynamicObjectEx(19376, 834.068847, 1925.260131, -90.622978, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10816. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10817. tmpobjid = CreateDynamicObjectEx(19376, 841.549255, 1922.988647, -83.051498, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10818. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10819. tmpobjid = CreateDynamicObjectEx(19376, 831.681762, 1927.585327, -90.622993, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10820. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10821. tmpobjid = CreateDynamicObjectEx(19376, 826.952392, 1922.855957, -90.632972, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10822. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10823. tmpobjid = CreateDynamicObjectEx(19376, 831.216064, 1922.857788, -93.802803, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10824. SetDynamicObjectMaterial(tmpobjid, 0, 9507, "boxybld2_sfw", "hospital3_sfw", 0x00000000);
  10825. tmpobjid = CreateDynamicObjectEx(19376, 831.196716, 1913.293334, -90.662971, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10826. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10827. tmpobjid = CreateDynamicObjectEx(19376, 826.335876, 1918.029418, -90.642974, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10828. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10829. tmpobjid = CreateDynamicObjectEx(19377, 829.659240, 1918.100097, -85.184646, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10830. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall2", 0x00000000);
  10831. tmpobjid = CreateDynamicObjectEx(19377, 834.330078, 1927.732788, -85.184646, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10832. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall2", 0x00000000);
  10833. tmpobjid = CreateDynamicObjectEx(19376, 843.126831, 1922.982910, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10834. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  10835. tmpobjid = CreateDynamicObjectEx(19376, 841.551391, 1922.984863, -80.303298, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10836. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  10837. tmpobjid = CreateDynamicObjectEx(1569, 888.144409, 1919.679931, -89.990798, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10838. SetDynamicObjectMaterial(tmpobjid, 1, 8391, "ballys01", "vgncorpdoor1_512", 0x00000000);
  10839. tmpobjid = CreateDynamicObjectEx(18075, 846.980895, 1918.067871, -85.259300, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10840. SetDynamicObjectMaterial(tmpobjid, 0, 19595, "lsappartments1", "ceilingtiles3-128x128", 0x00000000);
  10841. tmpobjid = CreateDynamicObjectEx(2370, 882.979370, 1913.127563, -90.194206, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10842. SetDynamicObjectMaterial(tmpobjid, 0, 14652, "ab_trukstpa", "CJ_WOOD6", 0x00000000);
  10843. SetDynamicObjectMaterial(tmpobjid, 1, 14652, "ab_trukstpa", "CJ_WOOD6", 0x00000000);
  10844. tmpobjid = CreateDynamicObjectEx(2370, 883.468017, 1922.822021, -90.194206, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10845. SetDynamicObjectMaterial(tmpobjid, 0, 14581, "ab_mafiasuitea", "cof_wood2", 0x00000000);
  10846. tmpobjid = CreateDynamicObjectEx(631, 879.211853, 1927.179687, -89.090171, 0.000000, 0.000000, 56.893260, 150.00, 150.00);
  10847. SetDynamicObjectMaterial(tmpobjid, 0, 17958, "burnsalpha", "plantb256", 0xFFCCFF33);
  10848. tmpobjid = CreateDynamicObjectEx(631, 879.104736, 1909.546264, -89.090171, 0.000000, 0.000000, 56.893260, 150.00, 150.00);
  10849. SetDynamicObjectMaterial(tmpobjid, 0, 17958, "burnsalpha", "plantb256", 0xFFCCFF33);
  10850. tmpobjid = CreateDynamicObjectEx(19443, 876.708679, 1919.769409, -90.888496, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10851. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10852. tmpobjid = CreateDynamicObjectEx(19458, 883.493713, 1918.130493, -90.076599, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10853. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10854. tmpobjid = CreateDynamicObjectEx(19443, 887.696655, 1917.461547, -90.062301, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  10855. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  10856. tmpobjid = CreateDynamicObjectEx(638, 879.117919, 1914.015136, -89.385971, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10857. SetDynamicObjectMaterial(tmpobjid, 0, 13691, "bevcunto2_lahills", "adeta", 0x00000000);
  10858. tmpobjid = CreateDynamicObjectEx(638, 879.135009, 1922.234619, -89.385971, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10859. SetDynamicObjectMaterial(tmpobjid, 0, 13691, "bevcunto2_lahills", "adeta", 0x00000000);
  10860. tmpobjid = CreateDynamicObjectEx(19172, 888.147155, 1923.530883, -87.271766, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10861. SetDynamicObjectMaterial(tmpobjid, 0, 14489, "carlspics", "AH_picture3", 0x00000000);
  10862. tmpobjid = CreateDynamicObjectEx(2262, 887.664245, 1921.426391, -86.801803, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10863. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture2", 0x00000000);
  10864. tmpobjid = CreateDynamicObjectEx(2266, 887.630432, 1911.380493, -88.248008, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10865. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture4", 0x00000000);
  10866. tmpobjid = CreateDynamicObjectEx(631, 887.647399, 1921.109863, -89.090171, 0.000000, 0.000000, 56.893260, 150.00, 150.00);
  10867. SetDynamicObjectMaterial(tmpobjid, 0, 4830, "airport2", "kbplanter_plants1", 0xFFCCFF33);
  10868. tmpobjid = CreateDynamicObjectEx(631, 887.751342, 1915.322265, -89.090171, 0.000000, 0.000000, 56.893260, 150.00, 150.00);
  10869. SetDynamicObjectMaterial(tmpobjid, 0, 4830, "airport2", "kbplanter_plants1", 0xFFCCFF33);
  10870. tmpobjid = CreateDynamicObjectEx(19089, 864.200073, 1918.067504, -76.544853, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10871. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10872. tmpobjid = CreateDynamicObjectEx(19089, 870.590270, 1918.035278, -76.544853, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10873. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  10874. tmpobjid = CreateDynamicObjectEx(19929, 866.466918, 1940.129028, -93.959800, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10875. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "ab_wood01", 0x00000000);
  10876. tmpobjid = CreateDynamicObjectEx(19929, 866.466857, 1937.269531, -94.765823, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10877. SetDynamicObjectMaterial(tmpobjid, 1, 4835, "airoads_las", "aarprt8LAS", 0x00000000);
  10878. tmpobjid = CreateDynamicObjectEx(19929, 866.464904, 1937.269165, -93.959800, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10879. SetDynamicObjectMaterial(tmpobjid, 1, 14581, "ab_mafiasuitea", "ab_wood01", 0x00000000);
  10880. tmpobjid = CreateDynamicObjectEx(19929, 866.468383, 1940.130737, -94.765800, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10881. SetDynamicObjectMaterial(tmpobjid, 1, 4835, "airoads_las", "aarprt8LAS", 0x00000000);
  10882. tmpobjid = CreateDynamicObjectEx(14793, 870.623107, 1953.542358, -86.314201, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10883. SetDynamicObjectMaterial(tmpobjid, 0, 14634, "blindinglite", "ws_volumetriclight", 0x00000000);
  10884. tmpobjid = CreateDynamicObjectEx(18809, 870.432922, 1954.866088, -119.150901, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10885. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  10886. tmpobjid = CreateDynamicObjectEx(1762, 826.999328, 1917.626342, -88.554702, 0.000000, 0.000000, 90.916130, 150.00, 150.00);
  10887. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10888. SetDynamicObjectMaterial(tmpobjid, 1, 1730, "cj_furniture", "CJ-COUCHL2", 0x00000000);
  10889. tmpobjid = CreateDynamicObjectEx(631, 836.023437, 1921.642089, -87.661300, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10890. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", 0xFFCCFF33);
  10891. tmpobjid = CreateDynamicObjectEx(631, 836.057067, 1914.610229, -87.661300, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10892. SetDynamicObjectMaterial(tmpobjid, 0, -1, "none", "none", 0xFFCCFF33);
  10893. tmpobjid = CreateDynamicObjectEx(19376, 827.340515, 1909.616577, -90.662933, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10894. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_gs_wall", 0x00000000);
  10895. tmpobjid = CreateDynamicObjectEx(19376, 822.496765, 1914.342285, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10896. SetDynamicObjectMaterial(tmpobjid, 0, 9507, "boxybld2_sfw", "hospital3_sfw", 0x00000000);
  10897. tmpobjid = CreateDynamicObjectEx(631, 827.840942, 1913.820922, -87.661300, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10898. SetDynamicObjectMaterial(tmpobjid, 0, 1597, "centralresac1", "fuzzyplant256", 0xFFCCFF33);
  10899. tmpobjid = CreateDynamicObjectEx(638, 855.366577, 1914.898559, -90.196998, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10900. SetDynamicObjectMaterial(tmpobjid, 0, 4835, "airoads_las", "aarprt8LAS", 0x00000000);
  10901. tmpobjid = CreateDynamicObjectEx(638, 855.430725, 1921.339599, -90.196998, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10902. SetDynamicObjectMaterial(tmpobjid, 0, 4835, "airoads_las", "aarprt8LAS", 0x00000000);
  10903. tmpobjid = CreateDynamicObjectEx(1704, 851.926025, 1916.222534, -90.804702, 0.000000, 0.000000, 177.552810, 150.00, 150.00);
  10904. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10905. tmpobjid = CreateDynamicObjectEx(1704, 851.094543, 1920.005249, -90.804702, 0.000000, 0.000000, 2.201900, 150.00, 150.00);
  10906. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10907. tmpobjid = CreateDynamicObjectEx(1704, 849.742858, 1916.184692, -90.804702, 0.000000, 0.000000, 177.302627, 150.00, 150.00);
  10908. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10909. tmpobjid = CreateDynamicObjectEx(1704, 847.604125, 1916.287475, -90.804702, 0.000000, 0.000000, 181.268264, 150.00, 150.00);
  10910. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10911. tmpobjid = CreateDynamicObjectEx(1704, 845.403259, 1916.239990, -90.804702, 0.000000, 0.000000, 178.953765, 150.00, 150.00);
  10912. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10913. tmpobjid = CreateDynamicObjectEx(1704, 843.163879, 1916.270874, -90.804702, 0.000000, 0.000000, 182.697372, 150.00, 150.00);
  10914. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10915. tmpobjid = CreateDynamicObjectEx(1704, 841.023376, 1916.303344, -90.804702, 0.000000, 0.000000, 182.201919, 150.00, 150.00);
  10916. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10917. tmpobjid = CreateDynamicObjectEx(1704, 838.378417, 1917.702270, -90.804702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10918. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10919. tmpobjid = CreateDynamicObjectEx(1704, 848.762817, 1920.002197, -90.804702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10920. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10921. tmpobjid = CreateDynamicObjectEx(1704, 846.728515, 1920.065551, -90.804702, 0.000000, 0.000000, 2.323920, 150.00, 150.00);
  10922. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10923. tmpobjid = CreateDynamicObjectEx(1704, 844.535827, 1920.031005, -90.804702, 0.000000, 0.000000, 358.038513, 150.00, 150.00);
  10924. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10925. tmpobjid = CreateDynamicObjectEx(1704, 842.260742, 1920.030395, -90.804702, 0.000000, 0.000000, 2.081089, 150.00, 150.00);
  10926. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10927. tmpobjid = CreateDynamicObjectEx(1704, 840.102783, 1920.002563, -90.804702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10928. SetDynamicObjectMaterial(tmpobjid, 1, 14789, "ab_sfgymmain", "ab_wood02", 0x00000000);
  10929. tmpobjid = CreateDynamicObjectEx(9093, 846.699096, 1913.332641, -87.774543, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  10930. SetDynamicObjectMaterial(tmpobjid, 0, 2266, "picture_frame", "CJ_PAINTING30", 0x00000000);
  10931. tmpobjid = CreateDynamicObjectEx(9093, 846.643676, 1922.902343, -87.774497, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10932. SetDynamicObjectMaterial(tmpobjid, 0, 14489, "carlspics", "AH_landscap1", 0x00000000);
  10933. tmpobjid = CreateDynamicObjectEx(14793, 863.237243, 1918.238403, -79.884498, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10934. SetDynamicObjectMaterial(tmpobjid, 0, 14634, "blindinglite", "ws_volumetriclight", 0x00000000);
  10935. tmpobjid = CreateDynamicObjectEx(14793, 831.018310, 1917.947143, -85.359497, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  10936. SetDynamicObjectMaterial(tmpobjid, 0, 14634, "blindinglite", "ws_volumetriclight", 0x00000000);
  10937. tmpobjid = CreateDynamicObjectEx(19377, 883.731201, 1894.907714, -94.984649, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10938. SetDynamicObjectMaterial(tmpobjid, 0, 13724, "docg01_lahills", "marbletile8b", 0x00000000);
  10939. tmpobjid = CreateDynamicObjectEx(19377, 874.486206, 1888.520141, -97.425827, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10940. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "sl_metalwalk", 0x00000000);
  10941. tmpobjid = CreateDynamicObjectEx(19377, 884.858825, 1888.510986, -97.425827, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10942. SetDynamicObjectMaterial(tmpobjid, 0, 16640, "a51", "sl_metalwalk", 0x00000000);
  10943. tmpobjid = CreateDynamicObjectEx(19377, 879.740844, 1891.870727, -97.072570, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10944. SetDynamicObjectMaterial(tmpobjid, 0, 16093, "a51_ext", "BLOCK2", 0x00000000);
  10945. tmpobjid = CreateDynamicObjectEx(19360, 870.746337, 1907.915039, -85.278297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10946. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10947. tmpobjid = CreateDynamicObjectEx(19360, 867.540466, 1907.915161, -85.278297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10948. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10949. tmpobjid = CreateDynamicObjectEx(925, 878.017272, 1898.195312, -93.869766, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10950. SetDynamicObjectMaterial(tmpobjid, 0, 3095, "a51jdrx", "sam_camo", 0x00000000);
  10951. tmpobjid = CreateDynamicObjectEx(19377, 873.231750, 1894.910156, -94.984649, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10952. SetDynamicObjectMaterial(tmpobjid, 0, 13724, "docg01_lahills", "marbletile8b", 0x00000000);
  10953. tmpobjid = CreateDynamicObjectEx(19377, 870.176757, 1904.611083, -87.636306, 34.500000, 90.000000, -0.009100, 150.00, 150.00);
  10954. SetDynamicObjectMaterial(tmpobjid, 0, 915, "airconext", "CJ_plating", 0x00000000);
  10955. tmpobjid = CreateDynamicObjectEx(19377, 881.024902, 1895.873535, -90.350799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10956. SetDynamicObjectMaterial(tmpobjid, 0, 915, "airconext", "CJ_plating", 0x00000000);
  10957. tmpobjid = CreateDynamicObjectEx(19376, 883.895874, 1903.963989, -94.007499, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10958. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10959. tmpobjid = CreateDynamicObjectEx(19376, 889.755187, 1899.636718, -94.007499, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10960. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10961. tmpobjid = CreateDynamicObjectEx(19376, 885.070312, 1900.910034, -94.007553, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10962. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10963. tmpobjid = CreateDynamicObjectEx(19377, 895.079467, 1904.090209, -95.076286, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10964. SetDynamicObjectMaterial(tmpobjid, 0, 14584, "ab_abbatoir01", "ab_tiles", 0x00000000);
  10965. tmpobjid = CreateDynamicObjectEx(19377, 873.233642, 1904.543945, -94.984649, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  10966. SetDynamicObjectMaterial(tmpobjid, 0, 13724, "docg01_lahills", "marbletile8b", 0x00000000);
  10967. tmpobjid = CreateDynamicObjectEx(19360, 885.581604, 1899.236450, -91.095397, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10968. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10969. tmpobjid = CreateDynamicObjectEx(19376, 889.799133, 1905.640625, -94.007499, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10970. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10971. tmpobjid = CreateDynamicObjectEx(19376, 893.492309, 1904.311523, -94.007499, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10972. SetDynamicObjectMaterial(tmpobjid, 0, 14387, "dr_gsnew", "mp_stonefloor", 0x00000000);
  10973. tmpobjid = CreateDynamicObjectEx(19376, 895.822570, 1905.199096, -93.297500, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10974. SetDynamicObjectMaterial(tmpobjid, 0, 17504, "eastlstr_lae2", "compfence4_LAe", 0x00000000);
  10975. tmpobjid = CreateDynamicObjectEx(19406, 891.642761, 1908.858764, -96.503112, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10976. SetDynamicObjectMaterial(tmpobjid, 0, 12850, "cunte_block1", "ws_redbrickold", 0x00000000);
  10977. tmpobjid = CreateDynamicObjectEx(18762, 889.589294, 1909.226562, -95.857498, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10978. SetDynamicObjectMaterial(tmpobjid, 0, 915, "airconext", "cj_sheet2", 0x00000000);
  10979. tmpobjid = CreateDynamicObjectEx(18762, 893.685180, 1909.242309, -95.857498, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  10980. SetDynamicObjectMaterial(tmpobjid, 0, 915, "airconext", "cj_sheet2", 0x00000000);
  10981. tmpobjid = CreateDynamicObjectEx(19428, 891.758911, 1909.690673, -95.526397, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10982. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10983. tmpobjid = CreateDynamicObjectEx(19428, 891.758850, 1909.690673, -97.168403, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10984. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10985. tmpobjid = CreateDynamicObjectEx(19428, 891.756713, 1911.294067, -95.526397, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10986. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10987. tmpobjid = CreateDynamicObjectEx(19428, 891.759338, 1911.294433, -97.168403, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  10988. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10989. tmpobjid = CreateDynamicObjectEx(19428, 892.680297, 1910.694458, -96.358352, 90.000000, 0.000000, 0.000000, 150.00, 150.00);
  10990. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10991. tmpobjid = CreateDynamicObjectEx(19428, 890.651672, 1910.674438, -96.358352, 90.000000, 0.000000, 0.000000, 150.00, 150.00);
  10992. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10993. tmpobjid = CreateDynamicObjectEx(19428, 891.487182, 1912.108276, -96.358398, 90.000000, 0.000000, 90.000000, 150.00, 150.00);
  10994. SetDynamicObjectMaterial(tmpobjid, 0, 3355, "cxref_savhus", "des_brick1", 0x00000000);
  10995. tmpobjid = CreateDynamicObjectEx(19376, 836.594421, 1917.479003, -95.235076, 0.000000, 0.000000, 179.999954, 150.00, 150.00);
  10996. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  10997. tmpobjid = CreateDynamicObjectEx(19376, 831.196716, 1913.303344, -80.212989, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  10998. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  10999. tmpobjid = CreateDynamicObjectEx(19376, 835.366760, 1925.253540, -80.212989, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11000. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11001. tmpobjid = CreateDynamicObjectEx(19376, 826.966979, 1922.853149, -80.212989, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11002. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11003. tmpobjid = CreateDynamicObjectEx(19376, 826.352844, 1919.150634, -80.212989, 0.000000, 0.000000, 0.000007, 150.00, 150.00);
  11004. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11005. tmpobjid = CreateDynamicObjectEx(19376, 831.722656, 1927.580566, -80.212989, 0.000000, 0.000000, 0.000007, 150.00, 150.00);
  11006. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11007. tmpobjid = CreateDynamicObjectEx(19377, 888.480102, 1904.086181, -92.663566, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11008. SetDynamicObjectMaterial(tmpobjid, 0, 14584, "ab_abbatoir01", "ab_tiles", 0x00000000);
  11009. tmpobjid = CreateDynamicObjectEx(19377, 885.578125, 1904.088378, -92.076698, 0.000000, 55.000000, 180.000000, 150.00, 150.00);
  11010. SetDynamicObjectMaterial(tmpobjid, 0, 14584, "ab_abbatoir01", "ab_tiles", 0x00000000);
  11011. tmpobjid = CreateDynamicObjectEx(19377, 890.248107, 1904.130004, -98.110687, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11012. SetDynamicObjectMaterial(tmpobjid, 0, 13724, "docg01_lahills", "marbletile8b", 0x00000000);
  11013. tmpobjid = CreateDynamicObjectEx(638, 876.807617, 1925.221435, -90.100852, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11014. SetDynamicObjectMaterial(tmpobjid, 0, 6282, "beafron2_law2", "boardwalk2_la", 0x00000000);
  11015. tmpobjid = CreateDynamicObjectEx(631, 876.638427, 1927.138549, -89.898628, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11016. SetDynamicObjectMaterial(tmpobjid, 0, 17958, "burnsalpha", "plantb256", 0xFFCCFF33);
  11017. tmpobjid = CreateDynamicObjectEx(638, 874.770080, 1927.231933, -90.100799, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11018. SetDynamicObjectMaterial(tmpobjid, 0, 6282, "beafron2_law2", "boardwalk2_la", 0x00000000);
  11019. tmpobjid = CreateDynamicObjectEx(631, 876.790832, 1909.391235, -89.898628, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11020. SetDynamicObjectMaterial(tmpobjid, 0, 17958, "burnsalpha", "plantb256", 0xFFCCFF33);
  11021. tmpobjid = CreateDynamicObjectEx(638, 876.775390, 1911.393554, -90.100852, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11022. SetDynamicObjectMaterial(tmpobjid, 0, 6282, "beafron2_law2", "boardwalk2_la", 0x00000000);
  11023. tmpobjid = CreateDynamicObjectEx(638, 874.755859, 1909.302490, -90.100799, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11024. SetDynamicObjectMaterial(tmpobjid, 0, 6282, "beafron2_law2", "boardwalk2_la", 0x00000000);
  11025. tmpobjid = CreateDynamicObjectEx(19443, 887.688232, 1918.942138, -90.060302, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  11026. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  11027. tmpobjid = CreateDynamicObjectEx(19443, 876.710021, 1916.568359, -90.890502, 0.000000, 90.000000, 90.000000, 150.00, 150.00);
  11028. SetDynamicObjectMaterial(tmpobjid, 0, 14415, "carter_block_2", "walp29S", 0x00000000);
  11029. tmpobjid = CreateDynamicObjectEx(1761, 857.404113, 1910.803466, -90.807800, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11030. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11031. SetDynamicObjectMaterial(tmpobjid, 1, 1730, "cj_furniture", "CJ-COUCHL2", 0x00000000);
  11032. tmpobjid = CreateDynamicObjectEx(1761, 857.426513, 1923.807006, -90.807800, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11033. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11034. SetDynamicObjectMaterial(tmpobjid, 1, 1730, "cj_furniture", "CJ-COUCHL2", 0x00000000);
  11035. tmpobjid = CreateDynamicObjectEx(19376, 888.233947, 1913.894775, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11036. SetDynamicObjectMaterial(tmpobjid, 0, 14577, "casinovault01", "cof_wood1", 0x00000000);
  11037. tmpobjid = CreateDynamicObjectEx(19376, 888.231933, 1923.527221, -94.476501, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11038. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11039. tmpobjid = CreateDynamicObjectEx(19376, 883.508850, 1908.993164, -94.476501, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11040. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11041. tmpobjid = CreateDynamicObjectEx(19376, 878.608703, 1910.560791, -94.476501, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11042. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11043. tmpobjid = CreateDynamicObjectEx(19376, 878.609619, 1925.693603, -80.262283, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11044. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11045. tmpobjid = CreateDynamicObjectEx(19376, 883.511047, 1927.799804, -94.476501, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11046. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11047. tmpobjid = CreateDynamicObjectEx(19376, 878.609619, 1925.693603, -94.476501, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11048. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11049. tmpobjid = CreateDynamicObjectEx(19376, 883.512817, 1927.800292, -80.262298, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11050. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11051. tmpobjid = CreateDynamicObjectEx(19376, 888.231872, 1923.527221, -80.262298, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11052. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11053. tmpobjid = CreateDynamicObjectEx(19376, 888.230224, 1913.897583, -80.262298, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11054. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11055. tmpobjid = CreateDynamicObjectEx(19376, 883.508911, 1908.993164, -80.262298, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11056. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11057. tmpobjid = CreateDynamicObjectEx(19376, 878.608703, 1910.560791, -80.262298, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11058. SetDynamicObjectMaterial(tmpobjid, 0, 3998, "civic04_lan", "twintconc_LAn", 0x00000000);
  11059. tmpobjid = CreateDynamicObjectEx(19376, 856.768432, 1911.704467, -89.993026, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11060. SetDynamicObjectMaterial(tmpobjid, 0, 18056, "mp_diner1", "mp_CJ_CARDBOARD128", 0x00000000);
  11061. tmpobjid = CreateDynamicObjectEx(19376, 856.767333, 1924.545898, -95.261199, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11062. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11063. tmpobjid = CreateDynamicObjectEx(19376, 863.783813, 1927.829833, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11064. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11065. tmpobjid = CreateDynamicObjectEx(19376, 854.158081, 1927.828979, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11066. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11067. tmpobjid = CreateDynamicObjectEx(19376, 876.621032, 1927.830444, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11068. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11069. tmpobjid = CreateDynamicObjectEx(19376, 877.354431, 1925.693969, -95.261199, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11070. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11071. tmpobjid = CreateDynamicObjectEx(19376, 877.356323, 1910.566162, -95.261199, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11072. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11073. tmpobjid = CreateDynamicObjectEx(19376, 876.649536, 1908.742675, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11074. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11075. tmpobjid = CreateDynamicObjectEx(19376, 841.418273, 1913.254638, -89.992996, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11076. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  11077. tmpobjid = CreateDynamicObjectEx(19376, 851.047180, 1913.258422, -80.306396, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11078. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11079. tmpobjid = CreateDynamicObjectEx(19376, 855.941101, 1911.703857, -80.306396, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11080. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11081. tmpobjid = CreateDynamicObjectEx(19376, 855.939270, 1924.546020, -80.306396, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11082. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11083. tmpobjid = CreateDynamicObjectEx(19360, 855.943298, 1918.124755, -85.280097, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11084. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  11085. tmpobjid = CreateDynamicObjectEx(19376, 851.083618, 1922.979736, -80.306396, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11086. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11087. tmpobjid = CreateDynamicObjectEx(19376, 843.127807, 1922.981201, -80.306396, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11088. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11089. tmpobjid = CreateDynamicObjectEx(19376, 841.549316, 1922.986694, -83.051498, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11090. SetDynamicObjectMaterial(tmpobjid, 0, 5040, "shopliquor_las", "lasjmliq1", 0x00000000);
  11091. tmpobjid = CreateDynamicObjectEx(19376, 841.418945, 1913.256469, -95.235076, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11092. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11093. tmpobjid = CreateDynamicObjectEx(19376, 851.047180, 1913.258422, -95.235099, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11094. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11095. tmpobjid = CreateDynamicObjectEx(19376, 855.941101, 1911.703857, -95.235099, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11096. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11097. tmpobjid = CreateDynamicObjectEx(19376, 855.939270, 1924.546020, -95.235099, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11098. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11099. tmpobjid = CreateDynamicObjectEx(19376, 851.083618, 1922.979736, -95.235099, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11100. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11101. tmpobjid = CreateDynamicObjectEx(19376, 843.127807, 1922.981201, -95.235099, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11102. SetDynamicObjectMaterial(tmpobjid, 0, 14709, "lamidint2", "mp_apt1_roomwall", 0x00000000);
  11103. tmpobjid = CreateDynamicObjectEx(19377, 861.831420, 1954.409545, -96.067947, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11104. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  11105. tmpobjid = CreateDynamicObjectEx(19377, 860.979125, 1959.187011, -99.645812, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11106. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  11107. tmpobjid = CreateDynamicObjectEx(14793, 892.099914, 1967.751342, -89.775711, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11108. SetDynamicObjectMaterial(tmpobjid, 0, 14634, "blindinglite", "ws_volumetriclight", 0x00000000);
  11109. tmpobjid = CreateDynamicObjectEx(19377, 879.988464, 1959.187011, -99.645812, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11110. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  11111. tmpobjid = CreateDynamicObjectEx(19377, 869.239440, 1944.689208, -96.067947, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11112. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  11113. tmpobjid = CreateDynamicObjectEx(19377, 879.639343, 1944.687377, -96.067947, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11114. SetDynamicObjectMaterial(tmpobjid, 0, 3922, "bistro", "Marble", 0x00000000);
  11115. tmpobjid = CreateDynamicObjectEx(19377, 869.475830, 1933.523071, -85.104705, 0.000000, 90.000000, 0.000000, 150.00, 150.00);
  11116. SetDynamicObjectMaterial(tmpobjid, 0, 3979, "civic01_lan", "sl_laglasswall1", 0x00000000);
  11117. tmpobjid = CreateDynamicObjectEx(19376, 838.822814, 1927.800781, -80.212989, 0.000000, 0.000000, 0.000007, 150.00, 150.00);
  11118. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11119. tmpobjid = CreateDynamicObjectEx(19376, 827.343444, 1909.620483, -80.212989, 0.000000, 0.000000, 0.000007, 150.00, 150.00);
  11120. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11121. tmpobjid = CreateDynamicObjectEx(19376, 822.606262, 1914.352905, -80.212989, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11122. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11123. tmpobjid = CreateDynamicObjectEx(19376, 840.817077, 1923.003417, -80.212989, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11124. SetDynamicObjectMaterial(tmpobjid, 0, 2755, "ab_dojowall", "mp_apt1_roomfloor", 0x00000000);
  11125. tmpobjid = CreateDynamicObjectEx(19329, 890.385375, 1902.603027, -97.241989, -89.999984, 97.599945, 1.700000, 150.00, 150.00);
  11126. SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "ab_bloodfloor", 0x00000000);
  11127. tmpobjid = CreateDynamicObjectEx(19406, 891.642761, 1909.008911, -96.503112, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11128. SetDynamicObjectMaterial(tmpobjid, 0, 12850, "cunte_block1", "ws_redbrickold", 0x00000000);
  11129. tmpobjid = CreateDynamicObjectEx(19329, 892.524658, 1906.039306, -98.011024, 89.699996, 0.000000, 0.000000, 150.00, 150.00);
  11130. SetDynamicObjectMaterial(tmpobjid, 0, 14612, "ab_abattoir_box", "ab_bloodfloor", 0x00000000);
  11131. tmpobjid = CreateDynamicObjectEx(19376, 863.809814, 1908.742675, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11132. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11133. tmpobjid = CreateDynamicObjectEx(19376, 854.259582, 1908.752685, -95.261199, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11134. SetDynamicObjectMaterial(tmpobjid, 0, 13007, "sw_bankint", "bank_wall1", 0x00000000);
  11135. tmpobjid = CreateDynamicObjectEx(14793, 874.147583, 1918.238403, -79.884498, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11136. SetDynamicObjectMaterial(tmpobjid, 0, 14634, "blindinglite", "ws_volumetriclight", 0x00000000);
  11137. tmpobjid = CreateDynamicObjectEx(9093, 877.221862, 1918.211303, -82.184547, 0.000000, 0.000000, 0.000014, 150.00, 150.00);
  11138. SetDynamicObjectMaterial(tmpobjid, 0, 5719, "sunrise10_lawn", "eld_box_law", 0x00000000);
  11139. tmpobjid = CreateDynamicObjectEx(19376, 872.523498, 1927.621582, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11140. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11141. tmpobjid = CreateDynamicObjectEx(19376, 862.943664, 1927.621582, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11142. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11143. tmpobjid = CreateDynamicObjectEx(19376, 853.364074, 1927.621582, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11144. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11145. tmpobjid = CreateDynamicObjectEx(19376, 856.864379, 1922.797485, -74.892982, 0.000000, 0.000000, 179.899993, 150.00, 150.00);
  11146. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11147. tmpobjid = CreateDynamicObjectEx(19376, 856.857666, 1913.218017, -74.892982, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11148. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11149. tmpobjid = CreateDynamicObjectEx(19376, 861.583496, 1908.852172, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11150. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11151. tmpobjid = CreateDynamicObjectEx(19376, 871.113342, 1908.852172, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11152. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11153. tmpobjid = CreateDynamicObjectEx(19376, 880.723144, 1908.852172, -74.892982, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11154. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11155. tmpobjid = CreateDynamicObjectEx(19376, 877.304443, 1922.761718, -74.892982, 0.000000, 0.000000, 179.899993, 150.00, 150.00);
  11156. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11157. tmpobjid = CreateDynamicObjectEx(19376, 877.287963, 1913.182250, -74.892982, 0.000000, 0.000000, 179.899993, 150.00, 150.00);
  11158. SetDynamicObjectMaterial(tmpobjid, 0, 14789, "ab_sfgymmain", "gym_floor6", 0x00000000);
  11159. tmpobjid = CreateDynamicObjectEx(19172, 856.857604, 1913.134277, -88.195861, 0.000000, 0.000000, 89.999946, 150.00, 150.00);
  11160. SetDynamicObjectMaterial(tmpobjid, 0, 2266, "picture_frame", "CJ_PAINTING11", 0x00000000);
  11161. tmpobjid = CreateDynamicObjectEx(19172, 856.857604, 1923.024780, -88.195861, 0.000000, 0.000000, 89.999946, 150.00, 150.00);
  11162. SetDynamicObjectMaterial(tmpobjid, 0, 2266, "picture_frame", "CJ_PAINTING28", 0x00000000);
  11163. tmpobjid = CreateDynamicObjectEx(2266, 858.822753, 1927.228515, -89.415863, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11164. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture2", 0x00000000);
  11165. tmpobjid = CreateDynamicObjectEx(2266, 859.652893, 1927.228515, -88.645866, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11166. SetDynamicObjectMaterial(tmpobjid, 1, 7088, "casinoshops1", "GB_nastybar19", 0x00000000);
  11167. tmpobjid = CreateDynamicObjectEx(2266, 859.842895, 1909.341918, -89.135856, 0.000000, 0.000000, 179.199981, 150.00, 150.00);
  11168. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_landscap1", 0x00000000);
  11169. tmpobjid = CreateDynamicObjectEx(2266, 858.852661, 1909.355224, -88.265869, 0.000000, 0.000000, 179.199981, 150.00, 150.00);
  11170. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture3", 0x00000000);
  11171. tmpobjid = CreateDynamicObjectEx(2266, 831.892944, 1913.887329, -86.866279, 0.000000, 0.000000, -179.999969, 150.00, 150.00);
  11172. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture3", 0x00000000);
  11173. tmpobjid = CreateDynamicObjectEx(19329, 831.903076, 1913.405273, -86.756271, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11174. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture3", 0x00000000);
  11175. SetDynamicObjectMaterialText(tmpobjid, 0, "{000000} KOVA", 130, "Ariel", 40, 1, 0x00000000, 0x00000000, 1);
  11176. tmpobjid = CreateDynamicObjectEx(19329, 831.913085, 1913.405273, -86.676292, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11177. SetDynamicObjectMaterial(tmpobjid, 1, 14489, "carlspics", "AH_picture3", 0x00000000);
  11178. SetDynamicObjectMaterialText(tmpobjid, 0, "{000000} created by", 130, "Ariel", 20, 1, 0x00000000, 0x00000000, 1);
  11179. tmpobjid = CreateDynamicObjectEx(19329, 858.853454, 1908.880859, -88.140342, 0.000000, 0.000000, -0.699999, 150.00, 150.00);
  11180. SetDynamicObjectMaterialText(tmpobjid, 0, "{000000} KOVA", 130, "Ariel", 40, 1, 0x00000000, 0x00000000, 1);
  11181. tmpobjid = CreateDynamicObjectEx(19329, 858.853454, 1908.880859, -88.050338, 0.000000, 0.000000, -0.699999, 150.00, 150.00);
  11182. SetDynamicObjectMaterialText(tmpobjid, 0, "{000000} created by", 130, "Ariel", 20, 1, 0x00000000, 0x00000000, 1);
  11183. tmpobjid = CreateDynamicObjectEx(19777, 883.061462, 1913.095458, -89.231330, 0.000000, 0.000000, -45.600013, 150.00, 150.00);
  11184. SetDynamicObjectMaterialText(tmpobjid, 0, "{ffffff} by KOVA", 140, "Ariel", 80, 1, 0x00000000, 0x00000000, 1);
  11185. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  11186. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  11187. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  11188. tmpobjid = CreateDynamicObjectEx(4206, 872.586181, 1958.017211, -94.904640, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11189. tmpobjid = CreateDynamicObjectEx(19370, 871.646789, 1961.746704, -94.360702, 0.000000, 90.000000, 170.000000, 150.00, 150.00);
  11190. tmpobjid = CreateDynamicObjectEx(19370, 868.946838, 1961.702758, -94.362701, 0.000000, 90.000000, 190.000000, 150.00, 150.00);
  11191. tmpobjid = CreateDynamicObjectEx(19604, 870.414672, 1959.056396, -89.923736, -90.000000, 90.000000, 90.000000, 150.00, 150.00);
  11192. tmpobjid = CreateDynamicObjectEx(19377, 859.972839, 1944.843383, -86.135757, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11193. tmpobjid = CreateDynamicObjectEx(19373, 866.572753, 1947.374755, -96.020698, 0.000000, 0.000000, 60.077301, 150.00, 150.00);
  11194. tmpobjid = CreateDynamicObjectEx(19373, 869.515747, 1946.382934, -96.020698, 0.000000, 0.000000, 82.636909, 150.00, 150.00);
  11195. tmpobjid = CreateDynamicObjectEx(19373, 872.490905, 1946.565795, -96.020698, 0.000000, 0.000000, 283.673767, 150.00, 150.00);
  11196. tmpobjid = CreateDynamicObjectEx(19373, 875.163146, 1947.851562, -96.020698, 0.000000, 0.000000, 306.488311, 150.00, 150.00);
  11197. tmpobjid = CreateDynamicObjectEx(19373, 869.473999, 1945.946166, -96.020698, 0.000000, 0.000000, 82.636909, 150.00, 150.00);
  11198. tmpobjid = CreateDynamicObjectEx(19373, 872.593322, 1946.120605, -96.020698, 0.000000, 0.000000, 283.673767, 150.00, 150.00);
  11199. tmpobjid = CreateDynamicObjectEx(19373, 875.411254, 1947.439453, -96.020698, 0.000000, 0.000000, 306.488311, 150.00, 150.00);
  11200. tmpobjid = CreateDynamicObjectEx(19373, 866.527770, 1946.942749, -96.020698, 0.000000, 0.000000, 60.077301, 150.00, 150.00);
  11201. tmpobjid = CreateDynamicObjectEx(19373, 872.560058, 1946.272827, -96.020698, 0.000000, 0.000000, 283.673767, 150.00, 150.00);
  11202. tmpobjid = CreateDynamicObjectEx(19373, 875.334350, 1947.569580, -96.020698, 0.000000, 0.000000, 306.488311, 150.00, 150.00);
  11203. tmpobjid = CreateDynamicObjectEx(19373, 875.251342, 1947.706298, -96.020698, 0.000000, 0.000000, 306.488311, 150.00, 150.00);
  11204. tmpobjid = CreateDynamicObjectEx(19373, 872.522521, 1946.429077, -96.020698, 0.000000, 0.000000, 283.673767, 150.00, 150.00);
  11205. tmpobjid = CreateDynamicObjectEx(19373, 869.482299, 1946.116577, -96.020698, 0.000000, 0.000000, 82.636909, 150.00, 150.00);
  11206. tmpobjid = CreateDynamicObjectEx(19373, 866.609130, 1947.091796, -96.020698, 0.000000, 0.000000, 60.077301, 150.00, 150.00);
  11207. tmpobjid = CreateDynamicObjectEx(19373, 869.518432, 1946.272827, -96.020698, 0.000000, 0.000000, 82.636909, 150.00, 150.00);
  11208. tmpobjid = CreateDynamicObjectEx(19373, 866.582458, 1947.260620, -96.020698, 0.000000, 0.000000, 60.077301, 150.00, 150.00);
  11209. tmpobjid = CreateDynamicObjectEx(19377, 860.685302, 1902.469970, -90.891799, 0.000000, 90.000000, -0.009100, 150.00, 150.00);
  11210. tmpobjid = CreateDynamicObjectEx(1569, 888.148193, 1916.680664, -89.990798, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11211. tmpobjid = CreateDynamicObjectEx(2290, 884.343750, 1911.428466, -89.992599, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11212. tmpobjid = CreateDynamicObjectEx(2292, 885.833801, 1923.784057, -89.992599, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11213. tmpobjid = CreateDynamicObjectEx(18075, 883.574768, 1929.447265, -85.172996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11214. tmpobjid = CreateDynamicObjectEx(18075, 883.512268, 1906.758300, -85.172996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11215. tmpobjid = CreateDynamicObjectEx(14455, 880.262512, 1909.340332, -88.360603, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11216. tmpobjid = CreateDynamicObjectEx(14455, 885.985839, 1909.347167, -88.360603, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11217. tmpobjid = CreateDynamicObjectEx(2292, 885.842468, 1922.800659, -89.992599, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11218. tmpobjid = CreateDynamicObjectEx(2292, 881.684570, 1922.687133, -89.994598, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11219. tmpobjid = CreateDynamicObjectEx(2292, 881.670532, 1923.641845, -89.992599, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11220. tmpobjid = CreateDynamicObjectEx(14455, 884.552490, 1927.466674, -88.360603, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11221. tmpobjid = CreateDynamicObjectEx(14455, 890.294494, 1927.467895, -88.360603, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11222. tmpobjid = CreateDynamicObjectEx(2290, 882.775634, 1925.450317, -89.992599, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11223. tmpobjid = CreateDynamicObjectEx(2292, 881.307983, 1913.844970, -89.992599, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11224. tmpobjid = CreateDynamicObjectEx(2292, 881.320617, 1912.920288, -89.994598, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11225. tmpobjid = CreateDynamicObjectEx(2292, 885.283630, 1913.859619, -89.992599, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11226. tmpobjid = CreateDynamicObjectEx(2292, 885.299011, 1912.955322, -89.992599, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11227. tmpobjid = CreateDynamicObjectEx(2245, 883.300537, 1913.454589, -89.109397, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11228. tmpobjid = CreateDynamicObjectEx(2245, 883.802124, 1923.168823, -89.109397, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11229. tmpobjid = CreateDynamicObjectEx(14562, 866.280761, 1960.322998, -93.090980, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11230. tmpobjid = CreateDynamicObjectEx(14562, 874.633544, 1960.336791, -93.091003, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11231. tmpobjid = CreateDynamicObjectEx(19172, 888.138122, 1913.359619, -87.271766, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11232. tmpobjid = CreateDynamicObjectEx(2262, 887.634643, 1925.631347, -88.429199, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11233. tmpobjid = CreateDynamicObjectEx(2266, 887.639526, 1915.321777, -86.678596, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11234. tmpobjid = CreateDynamicObjectEx(1897, 864.216552, 1918.064697, -83.992500, 90.000000, 90.000000, 0.000000, 150.00, 150.00);
  11235. tmpobjid = CreateDynamicObjectEx(1897, 864.220336, 1918.037353, -83.992500, 90.000000, 90.000000, 90.000000, 150.00, 150.00);
  11236. tmpobjid = CreateDynamicObjectEx(1897, 864.195007, 1918.038330, -83.992500, 90.000000, 90.000000, 270.000000, 150.00, 150.00);
  11237. tmpobjid = CreateDynamicObjectEx(1897, 864.278869, 1918.090209, -83.992500, 90.000000, 90.000000, 180.000000, 150.00, 150.00);
  11238. tmpobjid = CreateDynamicObjectEx(1897, 870.585205, 1918.006103, -83.992500, 90.000000, 90.000000, 270.000000, 150.00, 150.00);
  11239. tmpobjid = CreateDynamicObjectEx(1897, 870.610534, 1918.005126, -83.992500, 90.000000, 90.000000, 90.000000, 150.00, 150.00);
  11240. tmpobjid = CreateDynamicObjectEx(1897, 870.606750, 1918.032470, -83.992500, 90.000000, 90.000000, 0.000000, 150.00, 150.00);
  11241. tmpobjid = CreateDynamicObjectEx(1897, 870.681701, 1918.052124, -83.992500, 90.000000, 90.000000, 180.000000, 150.00, 150.00);
  11242. tmpobjid = CreateDynamicObjectEx(19089, 870.590270, 1918.035278, -76.544853, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11243. tmpobjid = CreateDynamicObjectEx(1897, 870.585205, 1918.006103, -83.992500, 90.000000, 90.000000, 270.000000, 150.00, 150.00);
  11244. tmpobjid = CreateDynamicObjectEx(1897, 870.610534, 1918.005126, -83.992500, 90.000000, 90.000000, 90.000000, 150.00, 150.00);
  11245. tmpobjid = CreateDynamicObjectEx(1897, 870.606750, 1918.032470, -83.992500, 90.000000, 90.000000, 0.000000, 150.00, 150.00);
  11246. tmpobjid = CreateDynamicObjectEx(1897, 870.681701, 1918.052124, -83.992500, 90.000000, 90.000000, 180.000000, 150.00, 150.00);
  11247. tmpobjid = CreateDynamicObjectEx(2076, 864.188171, 1916.944335, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11248. tmpobjid = CreateDynamicObjectEx(2076, 863.178771, 1918.077148, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11249. tmpobjid = CreateDynamicObjectEx(2076, 864.193359, 1919.114135, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11250. tmpobjid = CreateDynamicObjectEx(2073, 864.192016, 1918.058593, -84.167068, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11251. tmpobjid = CreateDynamicObjectEx(2076, 870.585571, 1919.081054, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11252. tmpobjid = CreateDynamicObjectEx(2076, 869.589843, 1918.036621, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11253. tmpobjid = CreateDynamicObjectEx(2076, 870.583557, 1916.924804, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11254. tmpobjid = CreateDynamicObjectEx(2076, 871.671447, 1918.040283, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11255. tmpobjid = CreateDynamicObjectEx(2073, 870.579528, 1918.023803, -84.167068, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11256. tmpobjid = CreateDynamicObjectEx(1744, 865.096313, 1938.063842, -92.839202, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11257. tmpobjid = CreateDynamicObjectEx(1744, 865.075927, 1940.000610, -92.233177, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11258. tmpobjid = CreateDynamicObjectEx(1744, 865.095825, 1939.998535, -92.839202, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11259. tmpobjid = CreateDynamicObjectEx(1744, 865.096313, 1938.063842, 1940.000610, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11260. tmpobjid = CreateDynamicObjectEx(1744, 865.076293, 1938.062866, -92.233200, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11261. tmpobjid = CreateDynamicObjectEx(2350, 867.445983, 1940.890258, -93.940101, 0.000000, 0.000000, 348.269592, 150.00, 150.00);
  11262. tmpobjid = CreateDynamicObjectEx(2350, 867.344726, 1938.163085, -93.940101, 0.000000, 0.000000, 20.175800, 150.00, 150.00);
  11263. tmpobjid = CreateDynamicObjectEx(2350, 867.354614, 1939.471679, -93.940101, 0.000000, 0.000000, 31248.269531, 150.00, 150.00);
  11264. tmpobjid = CreateDynamicObjectEx(2290, 875.189941, 1943.084350, -94.307403, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11265. tmpobjid = CreateDynamicObjectEx(2290, 875.203002, 1940.136962, -94.307403, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11266. tmpobjid = CreateDynamicObjectEx(2311, 873.579162, 1941.390014, -94.307998, 0.000000, 0.000000, 89.089958, 150.00, 150.00);
  11267. tmpobjid = CreateDynamicObjectEx(2311, 873.591186, 1938.331054, -94.307998, 0.000000, 0.000000, 90.504013, 150.00, 150.00);
  11268. tmpobjid = CreateDynamicObjectEx(19824, 873.450927, 1942.950927, -93.804191, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11269. tmpobjid = CreateDynamicObjectEx(19820, 873.637939, 1942.114624, -93.804313, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11270. tmpobjid = CreateDynamicObjectEx(1509, 873.783447, 1939.338256, -93.602653, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11271. tmpobjid = CreateDynamicObjectEx(1509, 873.829284, 1938.276123, -93.602653, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11272. tmpobjid = CreateDynamicObjectEx(1509, 866.527954, 1939.724731, -92.836662, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11273. tmpobjid = CreateDynamicObjectEx(19824, 865.414184, 1937.978271, -91.894989, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11274. tmpobjid = CreateDynamicObjectEx(19823, 865.411010, 1938.184692, -91.894798, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11275. tmpobjid = CreateDynamicObjectEx(1517, 865.364013, 1940.200073, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11276. tmpobjid = CreateDynamicObjectEx(19821, 865.478942, 1939.397094, -91.896911, 0.000000, 0.000000, 54.283119, 150.00, 150.00);
  11277. tmpobjid = CreateDynamicObjectEx(19822, 865.335510, 1940.380615, -92.500411, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11278. tmpobjid = CreateDynamicObjectEx(1512, 865.425720, 1940.068969, -91.693557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11279. tmpobjid = CreateDynamicObjectEx(1544, 865.342224, 1940.860107, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11280. tmpobjid = CreateDynamicObjectEx(1544, 873.780639, 1941.702758, -93.803359, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11281. tmpobjid = CreateDynamicObjectEx(1512, 865.444030, 1940.694335, -92.298561, 0.000000, 0.000000, 350.906280, 150.00, 150.00);
  11282. tmpobjid = CreateDynamicObjectEx(1544, 865.507812, 1940.817382, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11283. tmpobjid = CreateDynamicObjectEx(1544, 865.494995, 1940.936767, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11284. tmpobjid = CreateDynamicObjectEx(1544, 865.365051, 1941.023681, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11285. tmpobjid = CreateDynamicObjectEx(1544, 865.378601, 1941.084838, -91.890937, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11286. tmpobjid = CreateDynamicObjectEx(1544, 865.274780, 1941.114624, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11287. tmpobjid = CreateDynamicObjectEx(1544, 865.361450, 1941.244506, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11288. tmpobjid = CreateDynamicObjectEx(19822, 865.509887, 1941.286132, -92.500411, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11289. tmpobjid = CreateDynamicObjectEx(19822, 865.516052, 1940.365722, -91.894386, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11290. tmpobjid = CreateDynamicObjectEx(1517, 865.325012, 1939.942626, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11291. tmpobjid = CreateDynamicObjectEx(1517, 865.514892, 1940.068847, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11292. tmpobjid = CreateDynamicObjectEx(1517, 865.464721, 1939.932250, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11293. tmpobjid = CreateDynamicObjectEx(1517, 865.435974, 1939.814086, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11294. tmpobjid = CreateDynamicObjectEx(19822, 865.322143, 1939.637695, -92.500411, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11295. tmpobjid = CreateDynamicObjectEx(19822, 865.481750, 1939.476684, -92.500411, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11296. tmpobjid = CreateDynamicObjectEx(19824, 865.340393, 1939.198730, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11297. tmpobjid = CreateDynamicObjectEx(19824, 865.520446, 1939.078247, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11298. tmpobjid = CreateDynamicObjectEx(19824, 865.321838, 1938.916625, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11299. tmpobjid = CreateDynamicObjectEx(19824, 865.502197, 1938.878051, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11300. tmpobjid = CreateDynamicObjectEx(19824, 865.323669, 1938.716430, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11301. tmpobjid = CreateDynamicObjectEx(19823, 865.475341, 1938.699951, -92.499801, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11302. tmpobjid = CreateDynamicObjectEx(19823, 865.329040, 1939.405883, -92.499801, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11303. tmpobjid = CreateDynamicObjectEx(19823, 865.553466, 1939.257568, -92.499801, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11304. tmpobjid = CreateDynamicObjectEx(19823, 865.304260, 1938.492065, -92.499801, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11305. tmpobjid = CreateDynamicObjectEx(1517, 865.450744, 1938.465087, -91.696029, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11306. tmpobjid = CreateDynamicObjectEx(1517, 865.538635, 1938.288940, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11307. tmpobjid = CreateDynamicObjectEx(1517, 865.483093, 1937.745849, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11308. tmpobjid = CreateDynamicObjectEx(1517, 865.341308, 1937.779663, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11309. tmpobjid = CreateDynamicObjectEx(19824, 865.414184, 1937.978271, -92.499992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11310. tmpobjid = CreateDynamicObjectEx(19823, 865.411010, 1938.184692, -92.499801, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11311. tmpobjid = CreateDynamicObjectEx(1517, 865.450744, 1938.465087, -92.299018, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11312. tmpobjid = CreateDynamicObjectEx(19822, 865.516052, 1940.365722, -92.500411, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11313. tmpobjid = CreateDynamicObjectEx(1544, 865.497863, 1941.098022, -92.499977, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11314. tmpobjid = CreateDynamicObjectEx(1544, 865.473388, 1940.954467, -91.890937, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11315. tmpobjid = CreateDynamicObjectEx(1544, 865.340820, 1940.879394, -91.890937, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11316. tmpobjid = CreateDynamicObjectEx(1544, 865.510742, 1940.797607, -91.890937, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11317. tmpobjid = CreateDynamicObjectEx(19822, 865.398071, 1941.258300, -91.894386, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11318. tmpobjid = CreateDynamicObjectEx(1512, 865.417053, 1940.570800, -92.298561, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11319. tmpobjid = CreateDynamicObjectEx(19821, 865.335388, 1939.594848, -91.896911, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11320. tmpobjid = CreateDynamicObjectEx(19821, 865.471557, 1939.817626, -91.896911, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11321. tmpobjid = CreateDynamicObjectEx(19821, 865.396972, 1940.656616, -91.896911, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11322. tmpobjid = CreateDynamicObjectEx(19821, 865.343139, 1939.135375, -91.896911, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11323. tmpobjid = CreateDynamicObjectEx(1512, 865.327575, 1940.230346, -91.693557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11324. tmpobjid = CreateDynamicObjectEx(1512, 865.455261, 1939.248779, -91.693557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11325. tmpobjid = CreateDynamicObjectEx(1512, 865.331726, 1938.970092, -91.693557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11326. tmpobjid = CreateDynamicObjectEx(1512, 865.389465, 1938.789672, -91.693557, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11327. tmpobjid = CreateDynamicObjectEx(19823, 865.503784, 1938.291015, -91.894798, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11328. tmpobjid = CreateDynamicObjectEx(19823, 865.317199, 1938.378417, -91.894798, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11329. tmpobjid = CreateDynamicObjectEx(19823, 865.300476, 1938.617675, -91.894798, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11330. tmpobjid = CreateDynamicObjectEx(19824, 865.335205, 1937.672607, -91.894989, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11331. tmpobjid = CreateDynamicObjectEx(19824, 865.503723, 1937.844360, -91.894989, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11332. tmpobjid = CreateDynamicObjectEx(1544, 873.627990, 1939.919799, -93.803359, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11333. tmpobjid = CreateDynamicObjectEx(18075, 870.271850, 1941.620483, -89.583297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11334. tmpobjid = CreateDynamicObjectEx(2707, 867.082397, 1911.112792, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11335. tmpobjid = CreateDynamicObjectEx(2707, 865.210754, 1911.132446, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11336. tmpobjid = CreateDynamicObjectEx(2707, 863.438110, 1911.122192, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11337. tmpobjid = CreateDynamicObjectEx(2707, 861.804504, 1911.093505, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11338. tmpobjid = CreateDynamicObjectEx(2707, 860.131225, 1911.108276, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11339. tmpobjid = CreateDynamicObjectEx(2707, 868.920654, 1911.179809, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11340. tmpobjid = CreateDynamicObjectEx(2707, 870.681091, 1911.185058, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11341. tmpobjid = CreateDynamicObjectEx(2707, 872.400878, 1911.153808, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11342. tmpobjid = CreateDynamicObjectEx(2707, 874.262695, 1911.135131, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11343. tmpobjid = CreateDynamicObjectEx(2707, 876.224731, 1911.115600, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11344. tmpobjid = CreateDynamicObjectEx(2707, 859.669860, 1912.366455, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11345. tmpobjid = CreateDynamicObjectEx(2707, 859.709167, 1914.345458, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11346. tmpobjid = CreateDynamicObjectEx(2707, 859.760437, 1916.148071, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11347. tmpobjid = CreateDynamicObjectEx(2707, 859.764953, 1918.049072, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11348. tmpobjid = CreateDynamicObjectEx(2707, 859.788513, 1919.628906, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11349. tmpobjid = CreateDynamicObjectEx(2707, 859.822998, 1921.608276, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11350. tmpobjid = CreateDynamicObjectEx(2707, 859.875793, 1923.641723, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11351. tmpobjid = CreateDynamicObjectEx(2707, 876.095031, 1925.469726, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11352. tmpobjid = CreateDynamicObjectEx(2707, 873.954711, 1925.463256, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11353. tmpobjid = CreateDynamicObjectEx(2707, 871.834716, 1925.422851, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11354. tmpobjid = CreateDynamicObjectEx(2707, 869.735534, 1925.413818, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11355. tmpobjid = CreateDynamicObjectEx(2707, 867.251281, 1925.391723, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11356. tmpobjid = CreateDynamicObjectEx(2707, 864.757690, 1925.344970, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11357. tmpobjid = CreateDynamicObjectEx(2707, 862.369140, 1925.385009, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11358. tmpobjid = CreateDynamicObjectEx(2707, 860.291809, 1925.354003, -85.196800, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11359. tmpobjid = CreateDynamicObjectEx(2707, 864.197692, 1917.277099, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11360. tmpobjid = CreateDynamicObjectEx(2707, 864.196472, 1917.717529, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11361. tmpobjid = CreateDynamicObjectEx(2707, 864.207885, 1918.397705, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11362. tmpobjid = CreateDynamicObjectEx(2707, 864.211242, 1918.837890, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11363. tmpobjid = CreateDynamicObjectEx(2707, 863.895874, 1918.047973, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11364. tmpobjid = CreateDynamicObjectEx(2707, 863.439575, 1918.059570, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11365. tmpobjid = CreateDynamicObjectEx(2707, 864.490539, 1918.057739, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11366. tmpobjid = CreateDynamicObjectEx(2707, 864.884643, 1918.048706, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11367. tmpobjid = CreateDynamicObjectEx(2707, 869.895935, 1918.013061, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11368. tmpobjid = CreateDynamicObjectEx(2707, 870.337951, 1918.010498, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11369. tmpobjid = CreateDynamicObjectEx(2707, 870.599304, 1917.771850, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11370. tmpobjid = CreateDynamicObjectEx(2707, 870.578308, 1918.323852, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11371. tmpobjid = CreateDynamicObjectEx(2707, 870.920837, 1918.018676, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11372. tmpobjid = CreateDynamicObjectEx(2707, 871.395202, 1918.014282, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11373. tmpobjid = CreateDynamicObjectEx(2707, 870.580627, 1917.269531, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11374. tmpobjid = CreateDynamicObjectEx(2707, 870.591064, 1918.776489, -83.969802, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11375. tmpobjid = CreateDynamicObjectEx(2707, 869.963745, 1949.749145, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11376. tmpobjid = CreateDynamicObjectEx(2707, 871.846313, 1949.899169, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11377. tmpobjid = CreateDynamicObjectEx(2707, 873.418762, 1950.617553, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11378. tmpobjid = CreateDynamicObjectEx(2707, 874.587707, 1951.754394, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11379. tmpobjid = CreateDynamicObjectEx(2707, 875.360900, 1953.190673, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11380. tmpobjid = CreateDynamicObjectEx(2707, 875.591186, 1955.079711, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11381. tmpobjid = CreateDynamicObjectEx(2707, 875.317871, 1956.541137, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11382. tmpobjid = CreateDynamicObjectEx(2707, 874.456298, 1958.068969, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11383. tmpobjid = CreateDynamicObjectEx(2707, 868.323608, 1950.169555, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11384. tmpobjid = CreateDynamicObjectEx(2707, 866.703552, 1951.230590, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11385. tmpobjid = CreateDynamicObjectEx(2707, 865.645874, 1952.860107, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11386. tmpobjid = CreateDynamicObjectEx(2707, 865.264709, 1954.867309, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11387. tmpobjid = CreateDynamicObjectEx(2707, 865.633300, 1956.858276, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11388. tmpobjid = CreateDynamicObjectEx(2707, 866.563415, 1958.300781, -94.111701, 180.000000, 0.000000, 0.000000, 150.00, 150.00);
  11389. tmpobjid = CreateDynamicObjectEx(2184, 829.638610, 1918.608276, -88.556800, 0.000000, 0.000000, 112.564208, 150.00, 150.00);
  11390. tmpobjid = CreateDynamicObjectEx(2184, 828.909118, 1915.765380, -88.556800, 0.000000, 0.000000, 69.625183, 150.00, 150.00);
  11391. tmpobjid = CreateDynamicObjectEx(1754, 833.321350, 1914.055175, -88.555900, 0.000000, 0.000000, 195.992752, 150.00, 150.00);
  11392. tmpobjid = CreateDynamicObjectEx(1754, 830.485412, 1914.051879, -88.555900, 0.000000, 0.000000, 160.614334, 150.00, 150.00);
  11393. tmpobjid = CreateDynamicObjectEx(2082, 831.412414, 1913.363891, -88.554512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11394. tmpobjid = CreateDynamicObjectEx(2059, 829.294067, 1919.254760, -87.750503, 0.000000, 0.000000, 270.000000, 150.00, 150.00);
  11395. tmpobjid = CreateDynamicObjectEx(19786, 829.536132, 1922.875488, -86.534263, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11396. tmpobjid = CreateDynamicObjectEx(2344, 831.731872, 1914.104370, -88.053001, 0.000000, 0.000000, 113.967498, 150.00, 150.00);
  11397. tmpobjid = CreateDynamicObjectEx(1742, 826.331054, 1921.764282, -88.554702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11398. tmpobjid = CreateDynamicObjectEx(1742, 826.329162, 1920.325805, -88.554702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11399. tmpobjid = CreateDynamicObjectEx(2332, 826.851379, 1914.134887, -86.338180, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11400. tmpobjid = CreateDynamicObjectEx(2332, 826.851379, 1914.134887, -88.153213, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11401. tmpobjid = CreateDynamicObjectEx(2332, 826.851379, 1914.134887, -87.244178, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11402. tmpobjid = CreateDynamicObjectEx(1569, 856.900390, 1923.151733, -84.999702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11403. tmpobjid = CreateDynamicObjectEx(1569, 856.927001, 1911.741455, -84.999702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11404. tmpobjid = CreateDynamicObjectEx(1569, 856.947448, 1917.587890, -84.999702, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11405. tmpobjid = CreateDynamicObjectEx(1569, 862.054565, 1927.543701, -84.999702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11406. tmpobjid = CreateDynamicObjectEx(1569, 873.323791, 1927.565673, -84.999702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11407. tmpobjid = CreateDynamicObjectEx(1569, 873.040161, 1908.891235, -84.999702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11408. tmpobjid = CreateDynamicObjectEx(1569, 861.894836, 1908.914184, -84.999702, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11409. tmpobjid = CreateDynamicObjectEx(19920, 828.989624, 1917.689331, -87.769599, 0.000000, 0.000000, 343.484710, 150.00, 150.00);
  11410. tmpobjid = CreateDynamicObjectEx(19172, 826.422546, 1918.032226, -86.599166, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11411. tmpobjid = CreateDynamicObjectEx(2266, 826.941711, 1916.003417, -86.712722, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11412. tmpobjid = CreateDynamicObjectEx(2357, 850.236694, 1918.149047, -90.403869, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11413. tmpobjid = CreateDynamicObjectEx(2357, 845.977844, 1918.148071, -90.403869, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11414. tmpobjid = CreateDynamicObjectEx(2357, 841.722534, 1918.146972, -90.403869, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11415. tmpobjid = CreateDynamicObjectEx(18075, 883.529541, 1920.151000, -85.069992, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11416. tmpobjid = CreateDynamicObjectEx(2076, 865.320251, 1918.069213, -84.651512, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11417. tmpobjid = CreateDynamicObjectEx(19303, 884.061645, 1893.293457, -93.585418, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11418. tmpobjid = CreateDynamicObjectEx(3014, 884.331604, 1892.423461, -94.797981, 0.000000, 0.000000, 2.952558, 150.00, 150.00);
  11419. tmpobjid = CreateDynamicObjectEx(19303, 882.314147, 1893.293579, -93.585403, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11420. tmpobjid = CreateDynamicObjectEx(2680, 883.182800, 1893.407714, -93.742500, -30.000000, 0.000000, 180.000000, 150.00, 150.00);
  11421. tmpobjid = CreateDynamicObjectEx(19303, 880.565979, 1893.295043, -93.585403, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11422. tmpobjid = CreateDynamicObjectEx(19303, 878.819213, 1893.294555, -93.585403, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11423. tmpobjid = CreateDynamicObjectEx(19303, 877.070190, 1893.292236, -93.585403, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11424. tmpobjid = CreateDynamicObjectEx(19303, 875.322998, 1893.292480, -93.585403, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11425. tmpobjid = CreateDynamicObjectEx(2680, 879.703735, 1893.385375, -93.742500, -30.000000, 0.000000, 180.000000, 150.00, 150.00);
  11426. tmpobjid = CreateDynamicObjectEx(2680, 876.207092, 1893.410278, -93.742500, -30.000000, 0.000000, 180.000000, 150.00, 150.00);
  11427. tmpobjid = CreateDynamicObjectEx(2040, 883.302795, 1892.266113, -94.796600, 0.000000, 0.000000, 20.000000, 150.00, 150.00);
  11428. tmpobjid = CreateDynamicObjectEx(2359, 884.282226, 1894.400390, -94.692001, 0.000000, 0.000000, 18.146400, 150.00, 150.00);
  11429. tmpobjid = CreateDynamicObjectEx(2359, 878.830322, 1892.695190, -91.984397, 0.000000, 0.000000, 128.146392, 150.00, 150.00);
  11430. tmpobjid = CreateDynamicObjectEx(2040, 883.019531, 1892.280639, -94.796577, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11431. tmpobjid = CreateDynamicObjectEx(2040, 882.759155, 1892.359741, -94.796577, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11432. tmpobjid = CreateDynamicObjectEx(2040, 883.304199, 1892.802734, -94.796600, 0.000000, 0.000000, 10.000000, 150.00, 150.00);
  11433. tmpobjid = CreateDynamicObjectEx(2040, 883.651977, 1892.288330, -94.796577, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11434. tmpobjid = CreateDynamicObjectEx(2040, 882.451721, 1892.697387, -94.796600, 0.000000, 0.000000, 2310.000000, 150.00, 150.00);
  11435. tmpobjid = CreateDynamicObjectEx(3014, 880.913452, 1892.442993, -94.797981, 0.000000, 0.000000, 351.004821, 150.00, 150.00);
  11436. tmpobjid = CreateDynamicObjectEx(3014, 883.751342, 1892.932617, -94.797981, 0.000000, 0.000000, 351.004821, 150.00, 150.00);
  11437. tmpobjid = CreateDynamicObjectEx(2358, 880.174133, 1892.238281, -94.795196, 0.000000, 0.000000, 180.000000, 150.00, 150.00);
  11438. tmpobjid = CreateDynamicObjectEx(2358, 880.006713, 1892.752319, -94.795196, 0.000000, 0.000000, 192.167190, 150.00, 150.00);
  11439. tmpobjid = CreateDynamicObjectEx(2358, 879.336730, 1892.331054, -94.795196, 0.000000, 0.000000, 172.585006, 150.00, 150.00);
  11440. tmpobjid = CreateDynamicObjectEx(2358, 879.135559, 1892.918212, -94.795196, 0.000000, 0.000000, 172.585006, 150.00, 150.00);
  11441. tmpobjid = CreateDynamicObjectEx(2040, 878.827270, 1892.325195, -94.796600, 0.000000, 0.000000, 2310.000000, 150.00, 150.00);
  11442. tmpobjid = CreateDynamicObjectEx(2040, 878.573608, 1892.913330, -94.796600, 0.000000, 0.000000, 2312120.000000, 150.00, 150.00);
  11443. tmpobjid = CreateDynamicObjectEx(2985, 876.092041, 1892.684204, -94.896400, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11444. tmpobjid = CreateDynamicObjectEx(2358, 875.075256, 1892.310668, -94.795196, 0.000000, 0.000000, 172.585006, 150.00, 150.00);
  11445. tmpobjid = CreateDynamicObjectEx(2358, 875.273376, 1892.843627, -94.795196, 0.000000, 0.000000, 179.699157, 150.00, 150.00);
  11446. tmpobjid = CreateDynamicObjectEx(358, 883.480651, 1891.990844, -93.747673, 0.000000, 0.000000, 6.609360, 150.00, 150.00);
  11447. tmpobjid = CreateDynamicObjectEx(358, 883.480651, 1891.990844, -93.041656, 0.000000, 0.000000, 6.609360, 150.00, 150.00);
  11448. tmpobjid = CreateDynamicObjectEx(358, 883.480651, 1891.990844, -93.344673, 0.000000, 0.000000, 6.609360, 150.00, 150.00);
  11449. tmpobjid = CreateDynamicObjectEx(358, 882.344970, 1891.933471, -92.940658, 0.000000, 0.000000, 6.609360, 150.00, 150.00);
  11450. tmpobjid = CreateDynamicObjectEx(358, 882.344970, 1891.933471, -93.242652, 0.000000, 0.000000, 6.609360, 150.00, 150.00);
  11451. tmpobjid = CreateDynamicObjectEx(357, 882.392028, 1891.950683, -93.654411, 0.000000, 0.000000, 7.258399, 150.00, 150.00);
  11452. tmpobjid = CreateDynamicObjectEx(357, 881.354187, 1891.978637, -94.056396, 0.000000, 5.000000, 7.258399, 150.00, 150.00);
  11453. tmpobjid = CreateDynamicObjectEx(357, 881.354187, 1891.978637, -93.554412, 0.000000, 5.000000, 7.258399, 150.00, 150.00);
  11454. tmpobjid = CreateDynamicObjectEx(356, 879.975097, 1891.964599, -93.963943, 0.000000, 0.000000, 4.166958, 150.00, 150.00);
  11455. tmpobjid = CreateDynamicObjectEx(356, 880.489562, 1891.943115, -93.051856, 0.000000, 0.000000, 4.166958, 150.00, 150.00);
  11456. tmpobjid = CreateDynamicObjectEx(356, 880.489562, 1891.943115, -92.748847, 0.000000, 0.000000, 4.166958, 150.00, 150.00);
  11457. tmpobjid = CreateDynamicObjectEx(356, 879.856811, 1891.935791, -93.561950, 0.000000, 0.000000, 4.166958, 150.00, 150.00);
  11458. tmpobjid = CreateDynamicObjectEx(355, 878.230346, 1891.962890, -93.771057, 0.000000, 0.000000, 4.286859, 150.00, 150.00);
  11459. tmpobjid = CreateDynamicObjectEx(355, 879.005249, 1891.971435, -92.961013, 0.000000, 0.000000, 4.286859, 150.00, 150.00);
  11460. tmpobjid = CreateDynamicObjectEx(355, 878.964904, 1892.002563, -93.263999, 0.000000, 0.000000, 184.286895, 150.00, 150.00);
  11461. tmpobjid = CreateDynamicObjectEx(355, 877.823364, 1892.004516, -93.364997, 0.000000, 0.000000, 184.799072, 150.00, 150.00);
  11462. tmpobjid = CreateDynamicObjectEx(372, 877.851501, 1891.960449, -94.249458, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11463. tmpobjid = CreateDynamicObjectEx(372, 881.882995, 1891.951416, -94.569976, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11464. tmpobjid = CreateDynamicObjectEx(372, 881.244689, 1891.966064, -93.134376, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11465. tmpobjid = CreateDynamicObjectEx(353, 877.461975, 1892.021728, -93.835113, 0.000000, 0.000000, 187.143539, 150.00, 150.00);
  11466. tmpobjid = CreateDynamicObjectEx(353, 877.461975, 1892.021728, -94.236099, 0.000000, 0.000000, 187.143539, 150.00, 150.00);
  11467. tmpobjid = CreateDynamicObjectEx(941, 884.311401, 1895.735961, -94.491661, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11468. tmpobjid = CreateDynamicObjectEx(923, 873.681884, 1898.495849, -94.090263, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11469. tmpobjid = CreateDynamicObjectEx(923, 873.347045, 1892.479736, -94.191261, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11470. tmpobjid = CreateDynamicObjectEx(1271, 875.117858, 1898.388793, -94.600730, 0.000000, 0.000000, 19.877969, 150.00, 150.00);
  11471. tmpobjid = CreateDynamicObjectEx(1271, 876.172546, 1898.425659, -94.600700, 0.000000, 0.000000, 129.878005, 150.00, 150.00);
  11472. tmpobjid = CreateDynamicObjectEx(1271, 875.284545, 1897.367553, -94.600730, 0.000000, 0.000000, 351.940856, 150.00, 150.00);
  11473. tmpobjid = CreateDynamicObjectEx(1271, 871.975708, 1892.894653, -94.600730, 0.000000, 0.000000, 351.940856, 150.00, 150.00);
  11474. tmpobjid = CreateDynamicObjectEx(11729, 883.568298, 1898.799560, -94.896469, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11475. tmpobjid = CreateDynamicObjectEx(11729, 882.891235, 1898.800659, -94.896469, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11476. tmpobjid = CreateDynamicObjectEx(14411, 886.773620, 1901.068115, -98.090896, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11477. tmpobjid = CreateDynamicObjectEx(3092, 891.685852, 1910.355468, -96.893997, 90.000000, 90.000000, 224.699783, 150.00, 150.00);
  11478. tmpobjid = CreateDynamicObjectEx(1805, 892.696166, 1903.925415, -97.830596, 0.000000, 88.000000, 331.300292, 150.00, 150.00);
  11479. tmpobjid = CreateDynamicObjectEx(941, 890.355712, 1902.336669, -97.719886, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11480. tmpobjid = CreateDynamicObjectEx(2907, 890.174133, 1901.981933, -97.147300, 0.000000, 0.000000, 335.996002, 150.00, 150.00);
  11481. tmpobjid = CreateDynamicObjectEx(2905, 890.656921, 1902.023681, -97.245437, 0.000000, 0.000000, 9.406450, 150.00, 150.00);
  11482. tmpobjid = CreateDynamicObjectEx(2908, 890.059631, 1902.704956, -97.189498, 0.000000, 0.000000, 261.832977, 150.00, 150.00);
  11483. tmpobjid = CreateDynamicObjectEx(2906, 890.539306, 1903.256225, -97.205596, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11484. tmpobjid = CreateDynamicObjectEx(19583, 890.817504, 1903.322875, -97.237899, 0.000000, 0.000000, 344.007141, 150.00, 150.00);
  11485. tmpobjid = CreateDynamicObjectEx(341, 889.879699, 1900.975585, -97.803497, 0.000000, 30.000000, 26.372840, 150.00, 150.00);
  11486. tmpobjid = CreateDynamicObjectEx(19924, 890.147216, 1902.610473, -95.013778, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11487. tmpobjid = CreateDynamicObjectEx(19590, 890.304504, 1902.777587, -97.221298, 0.000000, 90.000000, 192.838867, 150.00, 150.00);
  11488. tmpobjid = CreateDynamicObjectEx(3092, 892.484680, 1904.737182, -97.928298, 180.000000, 90.000000, 0.000000, 150.00, 150.00);
  11489. tmpobjid = CreateDynamicObjectEx(2907, 891.932922, 1909.912231, -97.004302, 0.000000, 0.000000, 335.996002, 150.00, 150.00);
  11490. tmpobjid = CreateDynamicObjectEx(2905, 891.069824, 1909.505981, -97.027397, 0.000000, 0.000000, 17.048099, 150.00, 150.00);
  11491. tmpobjid = CreateDynamicObjectEx(2906, 892.284729, 1909.474243, -97.042701, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11492. tmpobjid = CreateDynamicObjectEx(1463, 891.546691, 1911.464477, -97.211593, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11493. tmpobjid = CreateDynamicObjectEx(1463, 892.306762, 1910.453979, -97.175605, 0.000000, 0.000000, 69.300003, 150.00, 150.00);
  11494. tmpobjid = CreateDynamicObjectEx(18694, 891.512023, 1911.340942, -101.443695, 91.499977, 0.000000, 0.000000, 150.00, 150.00);
  11495. tmpobjid = CreateDynamicObjectEx(19632, 901.447875, 1909.789062, -97.263168, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11496. tmpobjid = CreateDynamicObjectEx(1463, 891.123535, 1909.961547, -97.275611, 0.000000, 0.000000, 147.700042, 150.00, 150.00);
  11497. tmpobjid = CreateDynamicObjectEx(1463, 892.927917, 1907.830688, -97.715599, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11498. tmpobjid = CreateDynamicObjectEx(2805, 892.948608, 1906.119995, -96.915496, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11499. tmpobjid = CreateDynamicObjectEx(2805, 892.322814, 1906.123046, -96.915496, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11500. tmpobjid = CreateDynamicObjectEx(1370, 893.029907, 1900.156127, -97.519996, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11501. tmpobjid = CreateDynamicObjectEx(2060, 890.221496, 1908.139038, -97.775199, 0.000000, 0.000000, 101.132202, 150.00, 150.00);
  11502. tmpobjid = CreateDynamicObjectEx(2060, 890.221496, 1908.139038, -97.934196, 0.000000, 0.000000, 84.351898, 150.00, 150.00);
  11503. tmpobjid = CreateDynamicObjectEx(1897, 893.273620, 1906.115478, -96.136802, 270.000000, 90.000000, 180.000000, 150.00, 150.00);
  11504. tmpobjid = CreateDynamicObjectEx(2671, 891.352294, 1906.766479, -98.010803, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11505. tmpobjid = CreateDynamicObjectEx(3675, 891.619445, 1912.182739, -88.904693, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11506. tmpobjid = CreateDynamicObjectEx(2359, 884.024169, 1892.755126, -91.984397, 0.000000, 0.000000, 18.146400, 150.00, 150.00);
  11507. tmpobjid = CreateDynamicObjectEx(2358, 884.573852, 1897.593383, -94.795196, 0.000000, 0.000000, 282.838928, 150.00, 150.00);
  11508. tmpobjid = CreateDynamicObjectEx(1544, 890.758117, 1903.568237, -97.256896, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11509. tmpobjid = CreateDynamicObjectEx(1893, 872.465332, 1895.286010, -90.444297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11510. tmpobjid = CreateDynamicObjectEx(1893, 877.485168, 1895.181396, -90.444297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11511. tmpobjid = CreateDynamicObjectEx(1893, 881.643371, 1894.997192, -90.444297, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11512. tmpobjid = CreateDynamicObjectEx(1893, 892.099121, 1901.948852, -94.867103, 0.000000, 0.000000, 90.000000, 150.00, 150.00);
  11513. tmpobjid = CreateDynamicObjectEx(2082, 856.929748, 1909.006469, -90.804656, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11514. tmpobjid = CreateDynamicObjectEx(2082, 856.964721, 1926.548461, -90.804656, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11515. tmpobjid = CreateDynamicObjectEx(2251, 857.326354, 1909.542480, -89.461402, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11516. tmpobjid = CreateDynamicObjectEx(2251, 857.359375, 1927.052856, -89.461402, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11517. tmpobjid = CreateDynamicObjectEx(18676, 865.653503, 1954.438110, -95.980865, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11518. tmpobjid = CreateDynamicObjectEx(18676, 865.653503, 1954.438110, -95.980865, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11519. tmpobjid = CreateDynamicObjectEx(18676, 867.390075, 1951.026611, -95.980865, 0.000000, 0.000000, 43.199996, 150.00, 150.00);
  11520. tmpobjid = CreateDynamicObjectEx(18676, 867.390075, 1951.026611, -95.980865, 0.000000, 0.000000, 43.199996, 150.00, 150.00);
  11521. tmpobjid = CreateDynamicObjectEx(18676, 872.795471, 1950.744140, -95.980865, 0.000000, 0.000000, 135.999954, 150.00, 150.00);
  11522. tmpobjid = CreateDynamicObjectEx(18676, 872.795471, 1950.744140, -95.980865, 0.000000, 0.000000, 135.999954, 150.00, 150.00);
  11523. tmpobjid = CreateDynamicObjectEx(18676, 875.194763, 1953.604736, -95.980865, 0.000000, 0.000000, 164.699981, 150.00, 150.00);
  11524. tmpobjid = CreateDynamicObjectEx(18676, 875.194763, 1953.604736, -95.980865, 0.000000, 0.000000, 164.699981, 150.00, 150.00);
  11525. tmpobjid = CreateDynamicObjectEx(2707, 867.359130, 1959.069580, -93.105117, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11526. tmpobjid = CreateDynamicObjectEx(2707, 867.359130, 1959.055175, -92.025215, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11527. tmpobjid = CreateDynamicObjectEx(2707, 867.359130, 1959.039916, -90.925300, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11528. tmpobjid = CreateDynamicObjectEx(2707, 867.359130, 1959.023803, -89.705383, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11529. tmpobjid = CreateDynamicObjectEx(2707, 867.359130, 1959.003784, -88.285552, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11530. tmpobjid = CreateDynamicObjectEx(2707, 873.550231, 1959.073974, -88.284637, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11531. tmpobjid = CreateDynamicObjectEx(2707, 873.603576, 1959.066040, -93.135231, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11532. tmpobjid = CreateDynamicObjectEx(2707, 873.545715, 1959.077148, -92.064971, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11533. tmpobjid = CreateDynamicObjectEx(2707, 873.547546, 1959.083007, -90.974723, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11534. tmpobjid = CreateDynamicObjectEx(2707, 873.548400, 1959.075073, -89.654670, 90.800003, 174.900009, 0.000000, 150.00, 150.00);
  11535. tmpobjid = CreateDynamicObjectEx(18676, 866.509094, 1957.755859, -95.970878, 0.000000, 0.000000, -22.899990, 150.00, 150.00);
  11536. tmpobjid = CreateDynamicObjectEx(18676, 866.509094, 1957.755859, -95.970878, 0.000000, 0.000000, -22.899990, 150.00, 150.00);
  11537. tmpobjid = CreateDynamicObjectEx(18676, 874.660339, 1957.331665, -95.970848, 0.000000, 0.000000, -159.999954, 150.00, 150.00);
  11538. tmpobjid = CreateDynamicObjectEx(18676, 874.660339, 1957.331665, -95.970848, 0.000000, 0.000000, -159.999954, 150.00, 150.00);
  11539. tmpobjid = CreateDynamicObjectEx(2232, 875.842041, 1947.651611, -90.719268, 0.000000, 0.000000, -88.500030, 150.00, 150.00);
  11540. tmpobjid = CreateDynamicObjectEx(2232, 865.115722, 1947.378417, -90.719268, 0.000000, 0.000000, 90.599922, 150.00, 150.00);
  11541. tmpobjid = CreateDynamicObjectEx(19152, 879.953491, 1962.379882, -91.200660, 0.000000, 0.000000, -32.099994, 150.00, 150.00);
  11542. tmpobjid = CreateDynamicObjectEx(19150, 870.650390, 1957.571533, -85.254829, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11543. tmpobjid = CreateDynamicObjectEx(19152, 860.222473, 1961.486694, -90.560722, 0.000000, 0.000000, 35.800003, 150.00, 150.00);
  11544. tmpobjid = CreateDynamicObjectEx(19149, 870.016418, 1954.829956, -79.951271, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11545. tmpobjid = CreateDynamicObjectEx(19152, 861.515380, 1952.832885, -92.418624, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11546. tmpobjid = CreateDynamicObjectEx(19152, 879.675598, 1955.763061, -92.418624, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11547. tmpobjid = CreateDynamicObjectEx(19294, 870.386474, 1960.429565, -70.595695, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11548. tmpobjid = CreateDynamicObjectEx(19148, 871.652893, 1968.259643, -76.624084, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11549. tmpobjid = CreateDynamicObjectEx(19156, 878.267883, 1961.580078, -88.756233, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11550. tmpobjid = CreateDynamicObjectEx(19156, 863.397888, 1961.580078, -88.756233, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11551. tmpobjid = CreateDynamicObjectEx(19152, 871.045471, 1957.105834, -81.776359, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11552. tmpobjid = CreateDynamicObjectEx(19152, 867.612609, 1952.628417, -101.203414, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11553. tmpobjid = CreateDynamicObjectEx(18748, 891.606689, 1909.242675, -98.484703, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11554. tmpobjid = CreateDynamicObjectEx(337, 889.995605, 1907.334106, -97.238685, 177.999877, -8.399998, 170.199996, 150.00, 150.00);
  11555. tmpobjid = CreateDynamicObjectEx(2261, 857.349182, 1910.436035, -89.185867, 0.000000, 0.000000, 90.000022, 150.00, 150.00);
  11556. tmpobjid = CreateDynamicObjectEx(2261, 857.349182, 1925.565795, -89.185867, 0.000000, 0.000000, 90.000022, 150.00, 150.00);
  11557. tmpobjid = CreateDynamicObjectEx(19295, 869.754150, 1917.670776, -70.165901, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11558. tmpobjid = CreateDynamicObjectEx(19295, 834.356933, 1922.335449, -95.926383, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11559. tmpobjid = CreateDynamicObjectEx(19295, 849.796936, 1918.435424, -72.306396, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11560. tmpobjid = CreateDynamicObjectEx(19295, 846.757446, 1918.497070, -109.406349, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11561. tmpobjid = CreateDynamicObjectEx(19295, 897.164184, 1917.670776, -91.675865, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11562. tmpobjid = CreateDynamicObjectEx(2074, 891.567016, 1907.003173, -95.386337, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11563. tmpobjid = CreateDynamicObjectEx(2074, 891.567016, 1907.003173, -95.386337, 0.000000, 0.000000, 0.000000, 150.00, 150.00);
  11564. tmpobjid = CreateDynamicObjectEx(2855, 882.979309, 1913.056518, -89.385307, 0.000000, 0.000000, -45.999996, 150.00, 150.00);
  11565. Log:debug("OnPlayerConnect", "%p (%d) has connected.", playerid, playerid);
  11566. MySQLConnectionOrder[playerid] ++;
  11567. if(PlayerInfo[playerid][pID] == 7378) { PlayerInfo[playerid][pHiddenAss] = 1; }
  11568. new IP[16];
  11569. GetPlayerIp(playerid, IP, sizeof(IP));
  11570. if(IsPlayerNPC(playerid))
  11571. {
  11572. //if(strcmp(IP, "127.0.0.1") != 0)
  11573. if(strcmp(IP, "162.220.33.252") != 0 && strcmp(IP, "127.0.0.1") != 0)
  11574. {
  11575. SendClientMessage(playerid, COLOR_RED, "Sorry, we don't allow NPC connections from external IP addresses.");
  11576. printf("[Security]: NPC connection from %s rejected.", IP);
  11577. KickEx(playerid);
  11578. return 1;
  11579. }
  11580. }
  11581. /*if(!IsPlayerAlreadyConnected[playerid])
  11582. {
  11583. new
  11584. ip[16],
  11585. playername[MAX_PLAYER_NAME], query[500];
  11586. GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  11587. gpci(playerid,playerserial,sizeof(playerserial));
  11588. GetPlayerIp(playerid, ip, 16);
  11589. //mysql_format(sqlGameConnection, query, 128, "SELECT * FROM `bans` WHERE `username` = '%e' OR `ip` = '%s' OR `Serial` = '%s'", playername, ip, playerserial);
  11590. mysql_format(sqlGameConnection, query, 128, "SELECT * FROM `banlist` WHERE `username` = '%e' OR `Serial` = '%s'", playername, playerserial);
  11591. mysql_tquery(sqlGameConnection, query, "OnPlayerCheck", "d", playerid);
  11592. }*/
  11593. if(!IsPlayerAlreadyConnected[playerid])
  11594. {
  11595. //RemoveServerBuildings(playerid); //faction/server maps maps ect
  11596. //DestroyAllBuildings(playerid); //donor maps
  11597. //removeMineObjects(playerid); //mine objects (can be added to server buildings later)
  11598. //check if player is banned
  11599. new query[200];
  11600. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `banlist` INNER JOIN `players` ON `players`.`ID` = `banlist`.`userID` WHERE `players`.`Name` = '%e' OR `banlist`.`IP` = '%e'", PlayerName(playerid), IP);
  11601. mysql_pquery(sqlGameConnection, query, "OnBanListCheck", "d", playerid);
  11602. }
  11603. IsPlayerAlreadyConnected[playerid] = 0;
  11604. //PlayerOnFire[playerid] = 0;
  11605. resetPlayerVars(playerid);
  11606. DisablePlayerCheckpoint(playerid);
  11607. DisablePlayerCheckpointEx(playerid);
  11608. TogglePlayerAllDynamicCPs(playerid, false);
  11609. //create a progress bar for the player, for work related stuff
  11610. workingProgress[playerid] = CreatePlayerProgressBar( playerid, 290.0, 340.0, 65.0, 5.0, 0xFF8000FF, 100.0, BAR_DIRECTION_RIGHT );
  11611. breakcuffs[playerid] = CreatePlayerProgressBar(playerid, 290.0, 340.00, 65.0, 5.0, 0xFF0000AA, 100.0, BAR_DIRECTION_RIGHT);
  11612. ShowLoginTextDraw( playerid );
  11613. showCinematicTextDraw(playerid);
  11614. showAdvertismentTextDraw(playerid);
  11615. //Drop kevlar fix
  11616. KevlarDropped[playerid] = 0;
  11617. //Exploit bug of full vest, even if you just relog for do? nah!
  11618. SetTimerEx("Timer_FVestProtection", (1000*60)*5, 0, "d", playerid);
  11619. FVestProtected[playerid] = 1;
  11620. toggedflchat[playerid] = 0;
  11621. //GYM PAKI PAKIIII
  11622. RemoveBuildingForPlayer(playerid, 17758, 2260.0000, -1707.7344, 17.1719, 0.25);
  11623. RemoveBuildingForPlayer(playerid, 1498, 2229.6641, -1720.4219, 12.5547, 0.25);
  11624. RemoveBuildingForPlayer(playerid, 17515, 2260.0000, -1707.7344, 17.1719, 0.25);
  11625. RemoveBuildingForPlayer(playerid, 669, 2264.8125, -1697.0234, 12.6406, 0.25);
  11626. RemoveBuildingForPlayer(playerid, 17978, 2260.0000, -1707.7344, 17.1719, 0.25);
  11627. RemoveBuildingForPlayer(playerid, 17875, 2292.5234, -1695.8594, 16.7969, 0.25);
  11628. SetTimer("warntimer", 1000, 1);
  11629. return 1;
  11630. }
  11631. forward Firework(playerid, type);
  11632. public Firework(playerid, type)
  11633. {
  11634. if(!IsPlayerConnected(playerid))
  11635. {
  11636. DestroyDynamicObject(Rocket[playerid]);
  11637. DestroyDynamicObject(RocketLight[playerid]);
  11638. DestroyDynamicObject(RocketSmoke[playerid]);
  11639. return 1;
  11640. }
  11641. new Float:x, Float:y, Float:z;
  11642. x = GetPVarFloat(playerid, "fxpos");
  11643. y = GetPVarFloat(playerid, "fypos");
  11644. z = GetPVarFloat(playerid, "fzpos");
  11645. if (type == TYPE_COUNTDOWN)
  11646. {
  11647. new string[128];
  11648. format(string, sizeof(string), "STAND BACK! 5 seconds till launch!", PlayerICName(playerid));
  11649. ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  11650. SetTimerEx("Firework", 5000, 0, "ii", playerid, TYPE_LAUNCH);
  11651. }
  11652. else if(type == TYPE_LAUNCH)
  11653. {
  11654. CreateExplosion(x ,y, z, 13, 5);
  11655. new time = MoveDynamicObject(Rocket[playerid], x, y, z + RocketHeight, 10);
  11656. MoveDynamicObject(RocketLight[playerid], x, y, z + 2 + RocketHeight, 10);
  11657. MoveDynamicObject(RocketSmoke[playerid], x, y, z + RocketHeight, 10);
  11658. SetTimerEx("Firework", time, 0, "ii", playerid, TYPE_EXPLODE);
  11659. }
  11660. else if(type == TYPE_EXPLODE)
  11661. {
  11662. z += RocketHeight;
  11663. if (RocketExplosions[playerid] == 0)
  11664. {
  11665. DestroyDynamicObject(Rocket[playerid]);
  11666. DestroyDynamicObject(RocketLight[playerid]);
  11667. DestroyDynamicObject(RocketSmoke[playerid]);
  11668. CreateExplosion(x ,y, z, 4, 10);
  11669. CreateExplosion(x ,y, z, 5, 10);
  11670. CreateExplosion(x ,y, z, 6, 10);
  11671. }
  11672. else if (RocketExplosions[playerid] >= MAX_FIREWORKS)
  11673. {
  11674. for (new i = 0; i <= FireworkSpread; i++)
  11675. {
  11676. CreateExplosion(x + float(i - (FireworkSpread / 2)), y, z, 7, 10);
  11677. CreateExplosion(x, y + float(i - (FireworkSpread / 2)), z, 7, 10);
  11678. CreateExplosion(x, y, z + float(i - (FireworkSpread / 2)), 7, 10);
  11679. }
  11680. RocketExplosions[playerid] = -1;
  11681. return 1;
  11682. }
  11683. else
  11684. {
  11685. x += float(random(FireworkSpread) - (FireworkSpread / 2));
  11686. y += float(random(FireworkSpread) - (FireworkSpread / 2));
  11687. z += float(random(FireworkSpread) - (FireworkSpread / 2));
  11688. CreateExplosion(x, y, z, 7, 10);
  11689. }
  11690. RocketExplosions[playerid]++;
  11691. SetTimerEx("Firework", 250, 0, "ii", playerid, TYPE_EXPLODE);
  11692. }
  11693. return 1;
  11694. }
  11695. stock BanAccount(giveplayerid, playerid, reason[], expires[] = "2030-01-01")
  11696. {
  11697. new IP[16];
  11698. GetPlayerIp(giveplayerid, IP, sizeof(IP));
  11699. gpci(giveplayerid,playerserial,sizeof(playerserial));
  11700. new name[MAX_PLAYER_NAME];
  11701. new banneridname[MAX_PLAYER_NAME];
  11702. GetPlayerName(giveplayerid, banneridname, MAX_PLAYER_NAME);
  11703. if(playerid == INVALID_PLAYER_ID) {
  11704. format(name, sizeof(name), "Autoban");
  11705. } else {
  11706. GetPlayerName(playerid, name, sizeof(name));
  11707. }
  11708. new query[6000];
  11709. mysql_format(sqlGameConnection, query, sizeof(query),
  11710. "INSERT INTO `banlist` (`userID`, `IP`, `Key_`, `Serial`, `Reason`, `BannedBy`, `Expires`, `Date`, `Banned`) VALUES(%d, '%e', '%e', '%s', '%e', '%e', '%e', NOW(), 1)",
  11711. PlayerInfo[giveplayerid][pID], IP, PlayerInfo[giveplayerid][pKey], PlayerInfo[giveplayerid][pSerial], reason, name, expires);
  11712. mysql_pquery(sqlGameConnection, query);
  11713. PlayerInfo[giveplayerid][pBand] = 3;
  11714. //strmid(PlayerInfo[giveplayerid][pBanReason], reason, 0, strlen(reason));
  11715. //BanEx(giveplayerid, reason); //change this back to kick in future
  11716. KickEx(giveplayerid);
  11717. return 1;
  11718. }
  11719. forward onBansChecked(playerid, name[]);
  11720. public onBansChecked(playerid, name[]){
  11721. if(cache_num_rows() == 0)return SendClientMessage(playerid, COLOR_GREY, "Account doesn't exist.");
  11722. new i = cache_get_field_content_int(0, "ID"), query[128];
  11723. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `banlist` WHERE `userID`=%d ORDER BY `ID` DESC", i);
  11724. mysql_pquery(sqlGameConnection, query, "onBansCheckedConf", "is", i, name);
  11725. return 1;
  11726. }
  11727. stock CBanAccount(giveplayerid, playerid)
  11728. {
  11729. new IP[16];
  11730. GetPlayerIp(giveplayerid, IP, sizeof(IP));
  11731. gpci(giveplayerid,playerserial,sizeof(playerserial));
  11732. new name[MAX_PLAYER_NAME];
  11733. new banneridname[MAX_PLAYER_NAME];
  11734. GetPlayerName(giveplayerid, banneridname, MAX_PLAYER_NAME);
  11735. if(playerid == INVALID_PLAYER_ID) {
  11736. format(name, sizeof(name), "Autoban");
  11737. } else {
  11738. GetPlayerName(playerid, name, sizeof(name));
  11739. }
  11740. PlayerInfo[giveplayerid][pCBand] = 1;
  11741. //strmid(PlayerInfo[giveplayerid][pBanReason], reason, 0, strlen(reason));
  11742. //BanEx(giveplayerid, reason); //change this back to kick in future
  11743. Rangeban(giveplayerid);
  11744. KickEx(giveplayerid);
  11745. return 1;
  11746. }
  11747. forward OnBanListCheck(playerid);
  11748. public OnBanListCheck(playerid)
  11749. {
  11750. new rows = cache_num_rows();
  11751. if(!rows) return 1; //player is not recorded in ban list.
  11752. new
  11753. userID, IP[16], currentIP[16], reason[128], expires[32], bannedby[MAX_PLAYER_NAME + 1];
  11754. new current_year, current_month, current_day; //collect current date
  11755. getdate(current_year, current_month, current_day);
  11756. GetPlayerIp(playerid, currentIP, sizeof(currentIP)); //get player's current IP.
  11757. for(new i = 0; i < cache_num_rows(); i++)
  11758. {
  11759. new banned = cache_get_field_content_int(i, "Banned");
  11760. if(banned)//if not banned then player has been unbanned via admin cp
  11761. {
  11762. userID = cache_get_field_content_int(i, "userID"); //relationship between players table
  11763. cache_get_field_content(i, "IP", IP); //get the IP in ban log
  11764. cache_get_field_content(i, "Reason", reason);
  11765. cache_get_field_content(i, "Expires", expires);
  11766. cache_get_field_content(i, "BannedBy", bannedby);
  11767. //check if ban has expired
  11768. new syear[32];
  11769. strmid(syear, expires, 0, 4, 32);
  11770. new smonth[32];
  11771. strmid(smonth, expires, 5, 7, 32);
  11772. new sday[32];
  11773. strmid(sday, expires, 8, 10, 32);
  11774. new expire_year = strval(syear);
  11775. new expire_month = strval(smonth);
  11776. new expire_day = strval(sday);
  11777. //make this not kick the player eventually, check if ban expired
  11778. if(current_year > expire_year || current_month > expire_month && current_year >= expire_year || current_day >= expire_day && current_month >= expire_month && current_year >= expire_year)
  11779. {
  11780. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your ban has expired, you have been automatically unbanned (reconnect).");
  11781. new query[128];
  11782. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `banlist` SET `Banned` = 0 WHERE `userID` = %d OR `IP` = '%e'", userID, IP);
  11783. mysql_pquery(sqlGameConnection, query);
  11784. KickEx(playerid);
  11785. return 1;
  11786. }
  11787. new str[128];
  11788. format(str, sizeof(str), "{FF6347}SERVER:{FFFFFF} Your account (%s [%d]) and/or IP (%s) is currently banned from the server.", PlayerName(playerid), userID, currentIP);
  11789. SendClientMessage(playerid, COLOR_WHITE, str);
  11790. format(str, sizeof(str), "{FF6347}SERVER:{FFFFFF} Reason: %s", reason);
  11791. SendClientMessage(playerid, COLOR_WHITE, str);
  11792. // format(str, sizeof(str), "{FF6347}SERVER:{FFFFFF} Banned by: %s", bannedby);
  11793. // SendClientMessage(playerid, COLOR_WHITE, str);
  11794. SendClientMessage(playerid, COLOR_WHITE, "{FF6347}SERVER:{FFFFFF} You can submit a ban appeal on the forums at p-rp.xyz.");
  11795. KickEx(playerid);
  11796. return 1;
  11797. }
  11798. }
  11799. return 1;
  11800. }
  11801. forward OfflineTransfer(playerid, giveplayername[], amount);
  11802. public OfflineTransfer(playerid, giveplayername[], amount)
  11803. {
  11804. new str[128];
  11805. new rows, fields, value, temp[10];
  11806. cache_get_data(rows, fields);
  11807. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "That player does not exist!");
  11808. cache_get_field_content(0, "Bank", temp);
  11809. value = strval(temp);
  11810. value += amount;
  11811. new query[100];
  11812. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Bank` = %d WHERE `Name` = '%e'", value, giveplayername);
  11813. mysql_pquery(sqlGameConnection, query);
  11814. PlayerInfo[playerid][pAccount] -= amount;
  11815. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11816. format(str, sizeof(str), "You have transferred $%d to %s's account.", amount, giveplayername);
  11817. SendClientMessage(playerid, COLOR_ORANGE, str);
  11818. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has offline transferred $%d to %s.", PlayerOOCName(playerid), amount, giveplayername);
  11819. if(amount >= 500000)
  11820. {
  11821. ABroadCast(COLOR_YELLOW, str, 1);
  11822. }
  11823. format(str, sizeof(str), "%s has offline transferred $%d to %s.", PlayerOOCName(playerid), amount, giveplayername);
  11824. PayLog(str);
  11825. return 1;
  11826. }
  11827. stock removeMapIcons(playerid)
  11828. {
  11829. for(new i = 0; i < MAX_MAPICONS; i++)
  11830. {
  11831. RemovePlayerMapIcon(playerid, i);
  11832. }
  11833. iconCount[playerid] = 0;
  11834. //printf("map icons after removal: %d", iconCount[playerid]);
  11835. }
  11836. //==============================================================================
  11837. JoinChannel(playerid, number, line[])
  11838. {
  11839. if(IsPlayerConnected(playerid))
  11840. {
  11841. if(strcmp(IRCInfo[number][iPassword], line, true) == 0)
  11842. {
  11843. JoinChannelNr(playerid, number);
  11844. }
  11845. else
  11846. {
  11847. SendClientMessage(playerid, COLOR_GREY, "Wrong Channel Password.");
  11848. }
  11849. }
  11850. return 1;
  11851. }
  11852. //==============================================================================
  11853. JoinChannelNr(playerid, number)
  11854. {
  11855. if(IsPlayerConnected(playerid))
  11856. {
  11857. new str[128];
  11858. if(PlayersChannel[playerid] < 999)
  11859. {
  11860. format(str, sizeof(str), "* %s has left the Channel.", PlayerOOCName(playerid));
  11861. SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, str);
  11862. IRCInfo[PlayersChannel[playerid]][iPlayers] --;
  11863. }
  11864. new channel;
  11865. channel = number;
  11866. channel += 1;
  11867. PlayersChannel[playerid] = number;
  11868. IRCInfo[PlayersChannel[playerid]][iPlayers] ++;
  11869. if(strcmp(IRCInfo[number][iAdmin], PlayerOOCName(playerid), true) == 0)
  11870. {
  11871. format(str, sizeof(str), "* You have joined IRC Channel %d as the Administrator.", channel);
  11872. SendClientMessage(playerid, COLOR_YELLOW, str);
  11873. }
  11874. else
  11875. {
  11876. format(str, sizeof(str), "* You have joined IRC Channel %d, Admin: %s.", channel, IRCInfo[number][iAdmin]);
  11877. SendClientMessage(playerid, COLOR_YELLOW, str);
  11878. }
  11879. format(str, sizeof(str), "MOTD: %s.", IRCInfo[number][iMOTD]);
  11880. SendClientMessage(playerid, COLOR_YELLOW, str);
  11881. format(str, sizeof(str), "* %s has joined the Channel.", PlayerOOCName(playerid));
  11882. SendIRCMessage(number, COLOR_GREEN, str);
  11883. }
  11884. return 1;
  11885. }
  11886. //==============================================================================
  11887. stock ClearAccent(playerid)
  11888. {
  11889. if(IsPlayerConnected(playerid))
  11890. {
  11891. strmid(Accent[playerid], "None", 0, strlen("None"), 255);
  11892. }
  11893. return 1;
  11894. }
  11895. stock ClearCustomRank(playerid)
  11896. {
  11897. if(IsPlayerConnected(playerid))
  11898. {
  11899. strmid(customRank[playerid], "None", 0, strlen("None"), 255);
  11900. customRankName[playerid] = false;
  11901. }
  11902. return 1;
  11903. }
  11904. SendSpectatorsMessage(id, color, string2[])
  11905. {
  11906. foreach( new i: Player )
  11907. {
  11908. if(PlayerInfo[i][pID] == id)
  11909. {
  11910. if(PlayerInfo[i][pID] == 7378 || PlayerInfo[i][pID] == 7619)
  11911. {
  11912. SendClientMessage(i, color, string2);
  11913. }
  11914. }
  11915. }
  11916. return 1;
  11917. }
  11918. stock ClearCustomTag(playerid)
  11919. {
  11920. if(IsPlayerConnected(playerid))
  11921. {
  11922. strmid(CustomTag[playerid], "None", 0, strlen("None"), 255);
  11923. }
  11924. return 1;
  11925. }
  11926. //==============================================================================
  11927. stock ClearMarriage(playerid)
  11928. {
  11929. if(IsPlayerConnected(playerid))
  11930. {
  11931. strmid(PlayerInfo[playerid][pMarriedTo], "Nobody", 0, strlen("Nobody"), 255);
  11932. PlayerInfo[playerid][pMarried] = 0;
  11933. }
  11934. return 1;
  11935. }
  11936. //==============================================================================
  11937. stock ClearContract(playerid)
  11938. {
  11939. if(IsPlayerConnected(playerid))
  11940. {
  11941. strmid(PlayerInfo[playerid][pContractBy], "Nobody", 0, strlen("Nobody"), 255);
  11942. PlayerInfo[playerid][pHeadValue] = 0;
  11943. }
  11944. return 1;
  11945. }
  11946. //==============================================================================
  11947. stock ClearIP(playerid)
  11948. {
  11949. if(IsPlayerConnected(playerid))
  11950. {
  11951. strmid(PlayerInfo[playerid][pIP], "None", 0, strlen("None"), 255);
  11952. }
  11953. return 1;
  11954. }
  11955. //==============================================================================
  11956. stock ClearFamily(family)
  11957. {
  11958. foreach( new i: Player )
  11959. {
  11960. if(IsPlayerConnected(i))
  11961. {
  11962. if(PlayerInfo[i][pFMember] == family)
  11963. {
  11964. SendClientMessage(i, COLOR_LIGHTBLUE, "* The Family you are in got deleted by an Admin, you were kicked.");
  11965. PlayerInfo[i][pFMember] = 255;
  11966. PlayerInfo[i][pRank] = 0;
  11967. PlayerInfo[i][pModel] = 20;
  11968. SetPlayerSkin(i, 20);
  11969. PlayerInfo[i][pClothes] = 0;
  11970. }
  11971. }
  11972. }
  11973. new query[256];
  11974. new str[128];
  11975. format(str, sizeof(str), "None");
  11976. FamilyInfo[family][FamilyTaken] = 0;
  11977. strmid(FamilyInfo[family][FamilyName], str, 0, strlen(str), 255);
  11978. strmid(FamilyInfo[family][FamilyMOTD], str, 0, strlen(str), 255);
  11979. strmid(FamilyInfo[family][FamilyLeader], str, 0, strlen(str), 255);
  11980. /* Family Finical */
  11981. FamilyInfo[family][FamilyBank] = 0;
  11982. FamilyInfo[family][FamilyCash] = 0;
  11983. FamilyInfo[family][FamilySafe] = 0;
  11984. /* Family Positions */
  11985. FamilyInfo[family][FamilySafePos][0] = 0.0;
  11986. FamilyInfo[family][FamilySafePos][1] = 0.0;
  11987. FamilyInfo[family][FamilySafePos][2] = 0.0;
  11988. /* Family Stats */
  11989. FamilyInfo[family][FamilyCannabis] = 0;
  11990. FamilyInfo[family][FamilyCocaine] = 0;
  11991. FamilyInfo[family][FamilyMeth] = 0;
  11992. FamilyInfo[family][FamilyPromethazine] = 0;
  11993. FamilyInfo[family][FamilyCodeine] = 0;
  11994. FamilyInfo[family][FamilyLean] = 0;
  11995. FamilyInfo[family][FamilyMats] = 0;
  11996. /* Family Guns */
  11997. FamilyInfo[family][Colt45] = 0;
  11998. FamilyInfo[family][Rifle] = 0;
  11999. FamilyInfo[family][Sniper] = 0;
  12000. FamilyInfo[family][MP5] = 0;
  12001. FamilyInfo[family][Shotgun] = 0;
  12002. FamilyInfo[family][AK47] = 0;
  12003. FamilyInfo[family][M4] = 0;
  12004. FamilyInfo[family][Deagle] = 0;
  12005. FamilyInfo[family][UZI] = 0;
  12006. FamilyInfo[family][SPAS12] = 0;
  12007. FamilyInfo[family][TEC9] = 0;
  12008. /* Family Ranks */
  12009. format(str, sizeof(str), "Outsider");
  12010. strmid(FamilyRank[family][0], str, 0, strlen(str), 255);
  12011. format(str, sizeof(str), "Associate");
  12012. strmid(FamilyRank[family][1], str, 0, strlen(str), 255);
  12013. format(str, sizeof(str), "Soldier");
  12014. strmid(FamilyRank[family][2], str, 0, strlen(str), 255);
  12015. format(str, sizeof(str), "Capo");
  12016. strmid(FamilyRank[family][3], str, 0, strlen(str), 255);
  12017. format(str, sizeof(str), "Underboss");
  12018. strmid(FamilyRank[family][4], str, 0, strlen(str), 255);
  12019. format(str, sizeof(str), "Godfather");
  12020. strmid(FamilyRank[family][5], str, 0, strlen(str), 255);
  12021. FamilyInfo[family][FamilyMembers] = 0;
  12022. DestroyDynamicPickup(FamilyInfo[family][PickupID]);
  12023. FamilyInfo[family][PickupID] = CreateDynamicPickup(1210, 23, FamilyInfo[family][FamilySafePos][0], FamilyInfo[family][FamilySafePos][1], FamilyInfo[family][FamilySafePos][2]);
  12024. FamilyInfo[family][FStrikes] = 0;
  12025. FamilyInfo[family][fXP] = 0;
  12026. SaveFamilies();
  12027. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `FMember` = 255, `Rank` = 0, `Clothes` = 0, `Model` = 20 WHERE `FMember` = %d", family);
  12028. mysql_pquery(sqlGameConnection, query);
  12029. return 1;
  12030. }
  12031. //==============================================================================
  12032. stock ClearBanreason(playerid)
  12033. {
  12034. if(IsPlayerConnected(playerid))
  12035. {
  12036. strmid(PlayerInfo[playerid][pLastLogin], "None", 0, strlen("None"), 255);
  12037. }
  12038. return 1;
  12039. }
  12040. //==============================================================================
  12041. stock ClearAppearance(playerid)
  12042. {
  12043. if(IsPlayerConnected(playerid))
  12044. {
  12045. strmid(PlayerInfo[playerid][pAppearance], "None", 0, strlen("None"), 255);
  12046. }
  12047. return 1;
  12048. }
  12049. //==============================================================================
  12050. stock ClearPrisonreason(playerid)
  12051. {
  12052. if(IsPlayerConnected(playerid))
  12053. {
  12054. strmid(PlayerInfo[playerid][pPrisonReason], "None", 0, strlen("None"), 255);
  12055. strmid(PlayerInfo[playerid][pPrisonedBy], "Nobody", 0, strlen("Nobody"), 255);
  12056. }
  12057. return 1;
  12058. }
  12059. //==============================================================================
  12060. stock ClearVIP(playerid)
  12061. {
  12062. if(IsPlayerConnected(playerid))
  12063. {
  12064. if(PlayerInfo[playerid][pLevel] >= 2)
  12065. {
  12066. PlayerInfo[playerid][pTag] = NTAG_PLAYER;
  12067. }
  12068. else
  12069. {
  12070. PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
  12071. }
  12072. PlayerInfo[playerid][pDonateRank] = 0;
  12073. strmid(PlayerInfo[playerid][pVIPJoinDate], "0/0/0", 0, strlen("0/0/0"), 255);
  12074. strmid(PlayerInfo[playerid][pVIPExpDate], "0/0/0", 0, strlen("0/0/0"), 255);
  12075. }
  12076. }
  12077. //==============================================================================
  12078. stock ClearDamageInfo(playerid)
  12079. {
  12080. if(IsPlayerConnected(playerid))
  12081. {
  12082. new str[128];
  12083. format(str, sizeof(str), "Nobody");
  12084. strmid(damagedBy[playerid], str, 0, strlen(str), 255);
  12085. strmid(killedBy[playerid], str, 0, strlen(str), 255);
  12086. format(str, sizeof(str), "Nothing");
  12087. strmid(damageGun[playerid], str, 0, strlen(str), 255);
  12088. strmid(killGun[playerid], str, 0, strlen(str), 255);
  12089. damageHour[playerid] = 0;
  12090. damageMinute[playerid] = 0;
  12091. killerHour[playerid] = 0;
  12092. killerMinute[playerid] = 0;
  12093. }
  12094. return 1;
  12095. }
  12096. //==============================================================================
  12097. stock ClearGuns(playerid)
  12098. {
  12099. if(IsPlayerConnected(playerid))
  12100. {
  12101. ResetPlayerWeapons(playerid);
  12102. PlayerInfo[playerid][pGun0] = 0;
  12103. PlayerInfo[playerid][pGun1] = 0;
  12104. PlayerInfo[playerid][pGun2] = 0;
  12105. PlayerInfo[playerid][pGun3] = 0;
  12106. PlayerInfo[playerid][pGun4] = 0;
  12107. PlayerInfo[playerid][pGun5] = 0;
  12108. PlayerInfo[playerid][pGun6] = 0;
  12109. PlayerInfo[playerid][pGun7] = 0;
  12110. PlayerInfo[playerid][pGun8] = 0;
  12111. PlayerInfo[playerid][pGun9] = 0;
  12112. PlayerInfo[playerid][pGun10] = 0;
  12113. PlayerInfo[playerid][pGun11] = 0;
  12114. PlayerInfo[playerid][pGun12] = 0;
  12115. PlayerInfo[playerid][pBombs] = 0;
  12116. for(new i = 0; i < 13; i++)
  12117. {
  12118. aGun[playerid][i] = 0;
  12119. }
  12120. }
  12121. return 1;
  12122. }
  12123. //==============================================================================
  12124. stock updatePlayerIP(playerid) {
  12125. new ip[16];
  12126. GetPlayerIp(playerid, ip, sizeof(ip));
  12127. strmid(PlayerInfo[playerid][pIP], ip, 0, strlen(ip), 255);
  12128. new serial[128];
  12129. gpci(playerid, serial, sizeof(serial));
  12130. strmid(PlayerInfo[playerid][pSerial], serial, 0, strlen(serial), 255);
  12131. return 1;
  12132. }
  12133. //==============================================================================
  12134. public Lotto(number)
  12135. {
  12136. new str[128];
  12137. new JackpotFallen = 0;
  12138. new winner[MAX_PLAYER_NAME];
  12139. format(str, sizeof(str), "Lottery News: Today the Winning Number has fallen on: %d.", number);
  12140. OOCOff(COLOR_WHITE, str);
  12141. foreach( new i: Player )
  12142. {
  12143. if(IsPlayerConnected(i))
  12144. {
  12145. if(PlayerInfo[i][pLottoNr] > 0)
  12146. {
  12147. if(PlayerInfo[i][pLottoNr] == number)
  12148. {
  12149. JackpotFallen = 1;
  12150. strmid(winner, PlayerICName(i), 0, MAX_PLAYER_NAME);
  12151. format(str, sizeof(str), "Lottery News: %s has won the Jackpot of $%d with their Lottery Ticket.", winner, Jackpot);
  12152. OOCOff(COLOR_WHITE, str);
  12153. format(str, sizeof(str), "* You have Won $%d with your Lottery Ticket.", Jackpot);
  12154. SendClientMessage(i, COLOR_YELLOW, str);
  12155. GiveMoney(i, Jackpot);
  12156. }
  12157. else
  12158. {
  12159. SendClientMessage(i, COLOR_LIGHTBLUE, "* You haven't won with your Lottery Ticket this time.");
  12160. }
  12161. }
  12162. PlayerInfo[i][pLottoNr] = 0;
  12163. }
  12164. }
  12165. if(JackpotFallen)
  12166. {
  12167. new rand = random(125000);
  12168. rand += 15789;
  12169. Jackpot = rand;
  12170. SaveStuff();
  12171. format(str, sizeof(str), "Lottery News: The new Jackpot has been started with $%d.", Jackpot);
  12172. OOCOff(COLOR_WHITE, str);
  12173. }
  12174. else
  12175. {
  12176. new rand = random(15000);
  12177. rand += 2158;
  12178. Jackpot += rand;
  12179. SaveStuff();
  12180. format(str, sizeof(str), "Lottery News: The Jackpot has been raised to $%d.", Jackpot);
  12181. OOCOff(COLOR_WHITE, str);
  12182. }
  12183. return 1;
  12184. }
  12185. //==============================================================================
  12186. public OnPlayerDisconnect(playerid, reason)
  12187. {
  12188. new str[128];
  12189. foreach(new i: Player) {
  12190. BlockedPM[playerid][i] = false;
  12191. BlockedPM[i][playerid] = false;
  12192. }
  12193. JustRegistered[playerid] = false;
  12194. MySQLConnectionOrder[playerid] ++;
  12195. new query[128];
  12196. PlayerInfo[playerid][pAdjustable] = 1;
  12197. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Adjustable`=1 WHERE `Name`='%e'", PlayerName(playerid));
  12198. mysql_pquery(sqlGameConnection, query);
  12199. if(minutesOnline[playerid] > 0) {
  12200. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `activitylog` (`UserID`, `Minutes`, `Date`) VALUES(%d, %d, NOW())", PlayerInfo[playerid][pID], minutesOnline[playerid]);
  12201. mysql_pquery(sqlGameConnection, query);
  12202. }
  12203. PlayerInfo[playerid][pLastLogoutUnix] = gettime() + 1800;
  12204. //Drop kevlar fix
  12205. KevlarDropped[playerid] = 0;
  12206. //
  12207. FVestProtected[playerid] = 0;
  12208. //fl
  12209. toggedflchat[playerid] = 0;
  12210. //=================[ Setting player last logout ]================
  12211. new d, m, y, date[30], date_str[128];
  12212. getdate(y, m, d);
  12213. format(date, sizeof(date), "%02d/%02d/%02d", m, d, y);
  12214. new h, mm, s, time[24];
  12215. gettime(h, mm, s);
  12216. h = FixHour(h);
  12217. format(time, sizeof(time), "%02d:%02d:%02d", h, mm, s);
  12218. format(date_str, sizeof(date_str), "%s %s", date, time);
  12219. format(PlayerInfo[playerid][pLastLogin], 30, "%s", date_str);
  12220. //===
  12221. new houseid = PlayerInfo[playerid][pHouseID];
  12222. if(houseid != 0)
  12223. {
  12224. DestroyDynamicPickup(HouseInfo[houseid][hOutsidePickup]);
  12225. HouseInfo[houseid][hOutsidePickup] = CreateDynamicPickup(HOUSE_OFFLINE, 1, HouseInfo[houseid][hOutsideX], HouseInfo[houseid][hOutsideY], HouseInfo[houseid][hOutsideZ]);
  12226. }
  12227. //==========================[Respawn Glitch Fix]============================
  12228. if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
  12229. {
  12230. pDeathState[playerid] = PLAYER_STATE_INHOSP;
  12231. }
  12232. if(playerDMVCar[playerid] != INVALID_VEHICLE_ID)
  12233. {
  12234. if(IsValidVehicle(playerDMVCar[playerid]))
  12235. {
  12236. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  12237. }
  12238. }
  12239. towingCar[playerid] = false;
  12240. KillTimer(towTimer[playerid]);
  12241. KillTimer(dragTimer[playerid]);
  12242. KillTimer(Heliblade_Timer[playerid]);
  12243. KillTimer(turningenginetimer[playerid]);
  12244. for(new i = 0; i < 11; i++)
  12245. {
  12246. if(IsValidDynamicObject(roadblockObjects[playerid][i]))
  12247. {
  12248. if(roadblockObjects[playerid][i]) { DestroyDynamicObjectEx(roadblockObjects[playerid][i]); }
  12249. }
  12250. roadblockObjects[playerid][i] = 0;
  12251. }
  12252. roadblockTotal[playerid] = 0;
  12253. if(UsingSate[playerid] == 1)
  12254. {
  12255. UsingSate[playerid] = 0;
  12256. SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
  12257. }
  12258. if(CP[playerid] != CHECKPOINT_NONE) //hopefully this will fix the cp bug
  12259. {
  12260. DisablePlayerCheckpointEx(playerid);
  12261. }
  12262. if(IsValidVehicle(helperVeh[playerid])){
  12263. DestroyVehicle(helperVeh[playerid]);
  12264. }
  12265. DisablePlayerCheckpointEx(playerid);
  12266. KillTimer(dPosGet[playerid]);
  12267. KillTimer(canRepairTimer[playerid]);
  12268. KillTimer(flyingTimer[playerid]);
  12269. KillTimer(muteTimer[playerid]);
  12270. playerDisconnecting[playerid] = 1; //this var is used to detect a /q in OnPlayerSave
  12271. //boombox
  12272. destroyBoomBox(playerid); //reset playerids BB vars
  12273. stopBoomboxStream(playerid); //loops through the players, checks if they are streaming this BB and if so stops their stream
  12274. clearAttachedObjects(playerid);
  12275. lostFoodTray(playerid);
  12276. removeMapIcons(playerid);
  12277. KillTimer(cpTimerFix[playerid]);
  12278. OnDroneLogout(playerid);
  12279. removeJammer(playerid);
  12280. PlayerEventMod[playerid] = 0;
  12281. if(ParaOnACall[playerid])
  12282. {
  12283. CallAccepted[PlayerVictim[playerid]] = 0;
  12284. EMSArrived[PlayerVictim[playerid]] = 0;
  12285. format(str, sizeof(str), "* The paramedic logged, your call was put back in line.");
  12286. SendClientMessage(PlayerVictim[playerid], COLOR_LIGHTBLUE, str);
  12287. }
  12288. if(HasARapidResKit[playerid] == 1)
  12289. {
  12290. if(RapidResKit[playerid]) { DestroyDynamicObjectEx(RapidResKit[playerid]); }
  12291. RapidResKit[playerid] = 0;
  12292. HasARapidResKit[playerid] = 0;
  12293. }
  12294. if(TextDrawTimer[playerid])
  12295. {
  12296. KillTimer(TextDrawTimer[playerid]);
  12297. TextDrawTimer[playerid] = 0;
  12298. }
  12299. new discstring[128];
  12300. switch(reason)
  12301. {
  12302. case 0:
  12303. format(discstring, sizeof(discstring), "* %s has left the server. (Timeout)", PlayerICName(playerid));
  12304. case 1:
  12305. format(discstring, sizeof(discstring), "* %s has left the server. (Leaving)", PlayerICName(playerid));
  12306. case 2:
  12307. format(discstring, sizeof(discstring), "* %s has left the server. (Kicked)", PlayerICName(playerid));
  12308. }
  12309. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
  12310. {
  12311. ProxDetector(30.0, playerid, discstring, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  12312. }
  12313. if(PlayerInfo[playerid][pCash] <= 500 && PlayerInfo[playerid][pAccount] <= 500 && gPlayerLogged[playerid])
  12314. {
  12315. format(str, sizeof(str), "Possible Moneyfarm: %s just left with $%d cash and $%d cash in bank.", PlayerICName(playerid), PlayerInfo[playerid][pCash], PlayerInfo[playerid][pAccount]);
  12316. PayLog(str);
  12317. ABroadCast(COLOR_YELLOW, str, 1);
  12318. if(strlen(LastPaid[playerid]))
  12319. {
  12320. new paidto[128];
  12321. format(paidto, sizeof(paidto), "- Last paid money to: %s", LastPaid[playerid]);
  12322. ABroadCast(COLOR_YELLOW, paidto, 1);
  12323. }
  12324. }
  12325. // Player logged to avoid while in cuffs/tazed
  12326. if(PlayerInfo[playerid][pJailed] == 0)
  12327. {
  12328. if(PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0)
  12329. {
  12330. /*
  12331. Put the player in admin prison atleast 30 minutes
  12332. if they're above lvl 3, add 30 more minutes
  12333. */
  12334. new minsPrisoned = 30;
  12335. PlayerInfo[playerid][pJailed] = 3;
  12336. PlayerInfo[playerid][pAdminJailed] = 1;
  12337. PlayerInfo[playerid][pJailTime] = 30 * 60;
  12338. PlayerInfo[playerid][pWantedLevel] = 0;
  12339. PlayerInfo[playerid][pVirtualWorld] = 0;
  12340. PlayerInfo[playerid][pInt] = 69;
  12341. format(PlayerInfo[playerid][pPrisonedBy], 7, "Server");
  12342. format(PlayerInfo[playerid][pPrisonReason], 23, "LTA while cuffed/tazed");
  12343. if(PlayerInfo[playerid][pLevel] > 3) {
  12344. PlayerInfo[playerid][pJailTime] += 30 * 60;
  12345. minsPrisoned = 60;
  12346. }
  12347. // Inform admins
  12348. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was auto-prisoned for LTA while cuffed/tazed. [%i mins]", PlayerICName(playerid), minsPrisoned);
  12349. ABroadCast(COLOR_WHITE, str, 1);
  12350. }
  12351. }
  12352. for(new i = 0; i < MAX_TAXICALLS; i++)
  12353. {
  12354. if(strcmp(TaxiCInfo[i][taxiname], PlayerICName(playerid)))
  12355. {
  12356. TaxiCInfo[i][taxiname] = "0";
  12357. }
  12358. }
  12359. for(new i = 0; i < MAX_PLAYERS; i++)
  12360. {
  12361. if(PlayerInfo[i][pMember] == 10)
  12362. {
  12363. if(TaxiCID[i] == playerid)
  12364. {
  12365. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  12366. TaxiCID[i] = -1;
  12367. SendClientMessage(i, COLOR_GREY, "The customer has canceled their call.");
  12368. }
  12369. }
  12370. }
  12371. if(PlayerInfo[playerid][pJailnumber] > 0)
  12372. {
  12373. UpdateDynamic3DTextLabelText(PNumber3D[playerid], COLOR_WHITE, " ");
  12374. DestroyDynamic3DTextLabel(PNumber3D[playerid]);
  12375. }
  12376. if(GuardedBy[playerid] != 999)
  12377. {
  12378. SendClientMessage(GuardedBy[playerid], COLOR_RED, "* Your client has disconnected from the server.");
  12379. SetPlayerToTeamColor(GuardedBy[playerid]);
  12380. SetPlayerToTeamColor(playerid);
  12381. GuardedBy[GuardedBy[playerid]] = 999;
  12382. GuardingPrice[GuardedBy[playerid]] = 0;
  12383. Guarding[playerid] = 999;
  12384. }
  12385. if(Guarding[playerid] != 999)
  12386. {
  12387. SendClientMessage(Guarding[playerid], COLOR_RED, "* Your bodyguard has disconnected from the server.");
  12388. PlayerInfo[playerid][pAccount] -= (GuardingPrice[Guarding[playerid]] * 2);
  12389. SetPlayerToTeamColor(Guarding[playerid]);
  12390. SetPlayerToTeamColor(playerid);
  12391. GuardedBy[Guarding[playerid]] = 999;
  12392. GuardingPrice[Guarding[playerid]] = 0;
  12393. Guarding[playerid] = 999;
  12394. }
  12395. foreach( new buggedid: Player )
  12396. {
  12397. if(WireOfferID[buggedid] == playerid)
  12398. {
  12399. WireOfferID[buggedid] = INVALID_PLAYER_ID;
  12400. }
  12401. }
  12402. if(SpectatingID[playerid] != 999) //if an admin quit while specing a player
  12403. {
  12404. //need to check if no other admins are specing the target before reseting their variable
  12405. new found_spectator = isAnyoneSpecingTarget(playerid);
  12406. if(!found_spectator) //if nobody else was specing them, set their var to 0
  12407. {
  12408. Spectated[SpectatingID[playerid]] = 0; //set their
  12409. }
  12410. }
  12411. if(Spectated[playerid]) //play quit while being spectated
  12412. {
  12413. foreach( new i: Player )
  12414. {
  12415. if(SpectatingID[i] == playerid)
  12416. {
  12417. if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) //double check they are spectating
  12418. {
  12419. unspec(i);
  12420. }
  12421. }
  12422. }
  12423. }
  12424. foreach( new i: Player )
  12425. {
  12426. if(lastPMedID[i] == playerid)
  12427. lastPMedID[i] = INVALID_PLAYER_ID;
  12428. if(RepairOffer[i] == playerid)
  12429. {
  12430. RepairOffer[i] = 999;
  12431. RepairPrice[i] = 0;
  12432. }
  12433. if(FactionOffer[i] == playerid)
  12434. {
  12435. FactionOffer[i] = 999;
  12436. }
  12437. if(GroupOffer[i] == playerid)
  12438. {
  12439. GroupOffer[i] = 999;
  12440. }
  12441. if(PotOffer[i] == playerid)
  12442. {
  12443. PotOffer[i] = 999;
  12444. PotPrice[i] = 0;
  12445. PotGram[i] = 0;
  12446. }
  12447. if(MatsOffer[i] == playerid)
  12448. {
  12449. MatsOffer[i] = 999;
  12450. MatsPrice[i] = 0;
  12451. MatsGram[i] = 0;
  12452. MatsGram2[i] = 0;
  12453. }
  12454. if(ProdOffer[i] == playerid)
  12455. {
  12456. ProdOffer[i] = 999;
  12457. ProdPrice[i] = 0;
  12458. ProdAmount[i] = 0;
  12459. }
  12460. if(CrackOffer[i] == playerid)
  12461. {
  12462. CrackOffer[i] = 999;
  12463. CrackPrice[i] = 0;
  12464. CrackGram[i] = 0;
  12465. }
  12466. if(VestOffer[i] == playerid)
  12467. {
  12468. VestOffer[i] = 999;
  12469. VestPrice[i] = 0;
  12470. }
  12471. if(GuardOffer[i] == playerid)
  12472. {
  12473. GuardOffer[i] = 999;
  12474. GuardPrice[i] = 0;
  12475. }
  12476. if(healOffer[i] == playerid)
  12477. {
  12478. healOffer[i] = 999;
  12479. healPrice[i] = 0;
  12480. }
  12481. if(TaxiAccepted[i] < 999)
  12482. {
  12483. if(TaxiAccepted[i] == playerid)
  12484. {
  12485. TaxiAccepted[i] = 999;
  12486. displayCenterHUDInfo(i, "~y~Taxi Caller~w~ has left the game.", 8); //display for 8 seconds
  12487. TaxiCallTime[i] = 0;
  12488. DisablePlayerCheckpointEx(i);
  12489. }
  12490. }
  12491. else if(BusAccepted[i] < 999)
  12492. {
  12493. if(BusAccepted[i] == playerid)
  12494. {
  12495. BusAccepted[i] = 999;
  12496. displayCenterHUDInfo(i, "~y~Bus Caller~w~ has left the game.", 8); //display for 8 seconds
  12497. BusCallTime[i] = 0;
  12498. DisablePlayerCheckpointEx(i);
  12499. }
  12500. }
  12501. if(GoChase[i] < 999)
  12502. {
  12503. if(GoChase[i] == playerid)
  12504. {
  12505. displayCenterHUDInfo(playerid, "~r~Target~w~ has left the game.", 8); //display for 8 seconds
  12506. GoChase[i] = 999;
  12507. }
  12508. }
  12509. if(TransportDriver[i] == playerid)
  12510. {
  12511. TransportDriver[i] = 999;
  12512. TransportCost[i] = 0;
  12513. SendClientMessage(i, COLOR_LIGHTBLUE, "* Your taxi driver has logged off.");
  12514. }
  12515. }
  12516. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  12517. {
  12518. if(IsPlayerConnected(TransportDriver[playerid]))
  12519. {
  12520. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  12521. TransportTime[TransportDriver[playerid]] = 0;
  12522. TransportCost[TransportDriver[playerid]] = 0;
  12523. format(str, sizeof(str), "~w~Passenger left~n~~g~earned $%d.", TransportCost[playerid]);
  12524. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  12525. }
  12526. }
  12527. if(BombID[playerid] != -1)
  12528. {
  12529. TakePlayerWeapon(playerid, 40);
  12530. PlayerInfo[playerid][pGun12] = 0;
  12531. DestroyDynamicObjectEx(BombID[playerid]);
  12532. BombID[playerid] = -1;
  12533. }
  12534. new caller = Mobile[playerid];
  12535. if(caller != 999)
  12536. {
  12537. if(Mobile[caller] == playerid) //if the person is on the phone to player
  12538. {
  12539. SendClientMessage(caller, COLOR_GRAD2, "The line has been disconnected...");
  12540. CellTime[caller] = 0;
  12541. Mobile[caller] = 999;
  12542. if(usePayphone[playerid] == -1) detachPhoneFromPlayer(playerid);
  12543. else
  12544. {
  12545. payPhone[usePayphone[playerid]][inUse] = 0;
  12546. usePayphone[playerid] = -1;
  12547. }
  12548. }
  12549. }
  12550. if(PlayersChannel[playerid] < 999)
  12551. {
  12552. IRCInfo[PlayersChannel[playerid]][iPlayers] --;
  12553. }
  12554. if(PlayerBoxing[playerid] > 0)
  12555. {
  12556. if(Boxer1 == playerid)
  12557. {
  12558. if(IsPlayerConnected(Boxer2))
  12559. {
  12560. PlayerBoxing[Boxer2] = 0;
  12561. SetPlayerPos(Boxer2, 765.8433, 3.2924, 1000.7186);
  12562. SetPlayerInterior(Boxer2, 5);
  12563. displayCenterHUDInfo(playerid, "~r~Match interupted.", 8); //display for 8 seconds
  12564. }
  12565. }
  12566. else if(Boxer2 == playerid)
  12567. {
  12568. if(IsPlayerConnected(Boxer1))
  12569. {
  12570. PlayerBoxing[Boxer1] = 0;
  12571. SetPlayerPos(Boxer1, 765.8433, 3.2924, 1000.7186);
  12572. SetPlayerInterior(Boxer1, 5);
  12573. displayCenterHUDInfo(playerid, "~r~Match interupted.", 8); //display for 8 seconds
  12574. }
  12575. }
  12576. InRing = 0;
  12577. RoundStarted = 0;
  12578. Boxer1 = 255;
  12579. Boxer2 = 255;
  12580. TBoxer = 255;
  12581. }
  12582. if(TransportDuty[playerid] == 1)
  12583. {
  12584. TaxiDrivers -= 1;
  12585. }
  12586. if(TransportDuty[playerid] == 2)
  12587. {
  12588. BusDrivers -= 1;
  12589. }
  12590. if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID)
  12591. {
  12592. DestroyDynamic3DTextLabel(ThiefText[playerid]);
  12593. ThiefText[playerid] = Text3D:INVALID_3DTEXT_ID;
  12594. }
  12595. if(playerHoldingTazer[playerid])
  12596. {
  12597. RemovePlayerAttachedObject(playerid, INDEX_7);
  12598. }
  12599. if(PlayerCuffed[playerid] == 2) //
  12600. {
  12601. RemovePlayerAttachedObject(playerid, INDEX_0);
  12602. }
  12603. if(IsAtEvent[playerid] == 1)
  12604. {
  12605. SetPlayerSpawn(playerid);
  12606. }
  12607. if(gForSales[playerid][PlayerHasASaleBoard])
  12608. {
  12609. if(gForSales[playerid][Saleobject]) { DestroyDynamicObjectEx(gForSales[playerid][Saleobject]); }
  12610. gForSales[playerid][Saleobject] = 0;
  12611. gForSales[playerid][PlayerHasASaleBoard] = false;
  12612. }
  12613. if(cameraPlacedByID == playerid)
  12614. {
  12615. cameraPlacedByID = INVALID_PLAYER_ID;
  12616. cameraTaken = false;
  12617. cameraLive = false;
  12618. cameraPos[0] = 0;
  12619. cameraPos[1] = 0;
  12620. cameraPos[2] = 0;
  12621. cameraPos[3] = 0;
  12622. cameraVirtualWorld = 0;
  12623. cameraInterior = 0;
  12624. if(cameraObject) { DestroyDynamicObjectEx(cameraObject); }
  12625. cameraObject = 0;
  12626. DestroyDynamic3DTextLabel(cameraText);
  12627. }
  12628. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  12629. {
  12630. hoskperm[playerid] = false;
  12631. }
  12632. if(OnCCTV[playerid] != -1)
  12633. cmd_quitcctv(playerid, "");
  12634. OnPlayerSave(playerid);
  12635. SQLSave(playerid);
  12636. CINC[playerid]++; // invalidate all responses from now on (we might still wish to act on some until next player reuses this slot) this also prevents incorrectly handling responses when there is no player using the slot.
  12637. /*#if UseDiscordBot 1
  12638. new discordstr[144];
  12639. if(PlayerInfo[playerid][pAdmin]) {
  12640. format(discordstr, sizeof discordstr, "%s %s (%d) has left the server.", Discord:GetAdminRank(playerid), PlayerICName(playerid), playerid);
  12641. Discord:sendBasicRequest(DISCORD_ADMINCHAT_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  12642. }
  12643. if(PlayerInfo[playerid][pHelper]) {
  12644. format(discordstr, sizeof discordstr, "%s %s (%d) has left the server.", Discord:GetHelperRank(playerid), PlayerICName(playerid), playerid);
  12645. Discord:sendBasicRequest(DISCORD_NEWBIE_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  12646. }
  12647. if(PlayerInfo[playerid][pTester] || PlayerInfo[playerid][pDev]) {
  12648. format(discordstr, sizeof discordstr, "%s %s (%d) has left the server.", (PlayerInfo[playerid][pDev]) ? ("Developer") : ("Tester"), PlayerICName(playerid), playerid);
  12649. Discord:sendBasicRequest(DISCORD_TESTER_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  12650. }
  12651. #endif*/
  12652. PlayerInfo[playerid][pFMDListen] = 0;
  12653. PlayerInfo[playerid][pFBIListen] = 0;
  12654. PlayerInfo[playerid][pSANListen] = 0;
  12655. PlayerInfo[playerid][pGOVListen] = 0;
  12656. PlayerInfo[playerid][pSANGListen] = 0;
  12657. PlayerInfo[playerid][pLSSDListen] = 0;
  12658. PlayerInfo[playerid][pSAPDListen] = 0;
  12659. PlayerInfo[playerid][pSAPDListen] = 0;
  12660. return 1;
  12661. }
  12662. //==============================================================================
  12663. //==============================================================================
  12664. /*
  12665. public ShowPlayerTutorial(playerid)
  12666. {
  12667. SetPlayerPos(playerid, 2022.1327, -1771.3883, 328.3047);
  12668. TogglePlayerControllable(playerid, false);
  12669. InterpolateCameraPos(playerid, 1819.456787, -1360.477905, 21.288675, 2051.394287, -1751.514892, 37.458614, 10000);
  12670. InterpolateCameraLookAt(playerid, 1822.957885, -1363.989990, 21.927141, 2055.121826, -1754.651000, 36.331260, 10000);
  12671. timepressednext = gettime();
  12672. return 1;
  12673. }*/
  12674. public SetPlayerSpawn(playerid)
  12675. {
  12676. if(IsPlayerConnected(playerid))
  12677. {
  12678. new str[128];
  12679. //JAIL
  12680. if(PlayerInfo[playerid][pJailed] == 1)
  12681. {
  12682. new cellnumber = 1;
  12683. SetPlayerVirtualWorld(playerid, 191919);
  12684. SetPlayerPos(playerid, LSJailSpawns[cellnumber][0], LSJailSpawns[cellnumber][1], LSJailSpawns[cellnumber][2]);
  12685. SetPlayerFacingAngle(playerid, LSJailSpawns[cellnumber][3]);
  12686. SetPlayerInterior(playerid, 23);
  12687. SetPlayerToTeamColor(playerid);
  12688. return 1;
  12689. }
  12690. //PRISON
  12691. if(PlayerInfo[playerid][pJailed] == 2)
  12692. {
  12693. format(str, sizeof(str), "You are still in prison, with %i seconds left.", PlayerInfo[playerid][pJailTime]);
  12694. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  12695. if(PlayerInfo[playerid][pJailnumber] > 0)
  12696. {
  12697. format(str, sizeof(str), "Your prison number is: #%d. (( /prisoninfo ))", PlayerInfo[playerid][pJailnumber]);
  12698. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  12699. format(str, sizeof(str), "No: %d", PlayerInfo[playerid][pJailnumber]);
  12700. PNumber3D[playerid] = CreateDynamic3DTextLabel(str, COLOR_YELLOW, 0.0, 0.0, -0.5, 20.0, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 2.0);
  12701. }
  12702. SetPlayerInterior(playerid, DOC_INT);
  12703. SetPlayerVirtualWorld(playerid, DOC_WORLD);
  12704. SetPlayerSkin(playerid, 50);
  12705. PlayerInfo[playerid][pModel] = 50;
  12706. SetCameraBehindPlayer(playerid);
  12707. new rand = random(sizeof(prisoncells));
  12708. PrisonCell[playerid] = rand;
  12709. SetPlayerPos(playerid, prisoncells[rand][0], prisoncells[rand][1], prisoncells[rand][2]);
  12710. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  12711. return 1;
  12712. }
  12713. if(PlayerInfo[playerid][pJailed] == 5)
  12714. {
  12715. //SetPlayerSkin(playerid, 50);
  12716. SetPlayerColor(playerid, TCOLOR_PRISON);
  12717. SetCameraBehindPlayer(playerid);
  12718. new rand = random(sizeof(SFPrisonSpawns));
  12719. PrisonCell[playerid] = rand;
  12720. SetPlayerPos(playerid, SFPrisonSpawns[rand][0], SFPrisonSpawns[rand][1], SFPrisonSpawns[rand][2]);
  12721. SetPlayerFacingAngle(playerid, SFPrisonSpawns[rand][3]);
  12722. return 1;
  12723. }
  12724. //ADMIN PRISON
  12725. if(PlayerInfo[playerid][pJailed] == 3)
  12726. {
  12727. SetPlayerInterior(playerid, 69);
  12728. PlayerInfo[playerid][pClothes] = 50;
  12729. SetPlayerSkin(playerid, PlayerInfo[playerid][pClothes]);
  12730. SetPlayerColor(playerid, TCOLOR_PRISON);
  12731. SetCameraBehindPlayer(playerid);
  12732. new rand = random(sizeof(PrisonSpawns));
  12733. PrisonCell[playerid] = rand;
  12734. SetPlayerPos(playerid, PrisonSpawns[rand][0], PrisonSpawns[rand][1], PrisonSpawns[rand][2]);
  12735. SetPlayerFacingAngle(playerid, PrisonSpawns[rand][3]);
  12736. return 1;
  12737. }
  12738. //PAINTBALL
  12739. if(inPaintball[playerid] > 0)
  12740. {
  12741. respawn_pb(playerid);
  12742. return 1;
  12743. }
  12744. //EVENT
  12745. if(IsAtEvent[playerid] == 1)
  12746. {
  12747. IsAtEvent[playerid] = 0;
  12748. PlayerInfo[playerid][pHospital] = 0;
  12749. SetPlayerPos(playerid, StuffEvent[playerid][0], StuffEvent[playerid][1], StuffEvent[playerid][2]);
  12750. SetPlayerFacingAngle(playerid, StuffEvent[playerid][3]);
  12751. SetPlayerHealth(playerid, StuffEvent[playerid][4]);
  12752. SetPlayerArmour(playerid, StuffEvent[playerid][5]);
  12753. SetPlayerInterior(playerid, StuffEvent2[playerid][0]);
  12754. SetPlayerVirtualWorld(playerid, StuffEvent2[playerid][1]);
  12755. for(new i = 0; i < sizeof(EventGuns); i++)
  12756. {
  12757. if(i <= 12)
  12758. {
  12759. if(EventGuns[playerid][i] != 0)
  12760. {
  12761. GivePlayerGun(playerid, EventGuns[playerid][i]);
  12762. }
  12763. }
  12764. }
  12765. return 1;
  12766. }
  12767. //PUT PLAYER IN REVIVE MODE
  12768. if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
  12769. {
  12770. if( PlayerBoxing[playerid] ) { //boxing fix
  12771. SetPlayerHealth( playerid, 100 );
  12772. TextDrawHideForPlayer(playerid, Text:DieText);
  12773. TextDrawHideForPlayer(playerid, Text:InjuredText);
  12774. pInHospital[playerid] = 0;
  12775. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  12776. PlayerCalledEMS[playerid] = 0;
  12777. ApplyAnimationEx(playerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
  12778. SetPlayerPos(playerid, 765.8433, 3.2924, 1000.7186);
  12779. SetPlayerInterior(playerid, 5);
  12780. OnPlayerSave(playerid);
  12781. return 1;
  12782. }
  12783. SetPlayerHealth(playerid, DeathPos[playerid][DeathHP]);
  12784. ApplyAnimationEx(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
  12785. SetPlayerPos(playerid, DeathPos[playerid][DeathX], DeathPos[playerid][DeathY], DeathPos[playerid][DeathZ]);
  12786. SetPlayerFacingAngle(playerid, DeathPos[playerid][DeathA]);
  12787. SetPlayerInterior(playerid, DeathPos[playerid][DeathInt]);
  12788. SetPlayerVirtualWorld(playerid, DeathPos[playerid][DeathVW]);
  12789. pInHospital[playerid] = 1;
  12790. TextDrawShowForPlayer(playerid, DieText);
  12791. TextDrawShowForPlayer(playerid, InjuredText);
  12792. SetPlayerWeapons(playerid);
  12793. return 1;
  12794. }
  12795. //IN HOSPITAL
  12796. if(pDeathState[playerid] == PLAYER_STATE_INHOSP)
  12797. {
  12798. PlayerCalledEMS[playerid] = 0;
  12799. TogglePlayerControllable(playerid, false);
  12800. SetPlayerInterior(playerid, 0);
  12801. SetPlayerVirtualWorld(playerid, 0);
  12802. SetPlayerHealth(playerid, 100);
  12803. SetPlayerArmour(playerid, 0);
  12804. ClearGuns(playerid);
  12805. setPlayerInHospital(playerid);
  12806. return 1;
  12807. }
  12808. //FIRST JOINED OR RELOGGING
  12809. if(PlayerInfo[playerid][pTut] == 0)
  12810. {
  12811. //enable chats
  12812. gOoc[playerid] = 0;
  12813. gNews[playerid] = 0;
  12814. gFam[playerid] = 0;
  12815. PlayerInfo[playerid][pTut] = 1;
  12816. PlayerInfo[playerid][pHealth] = 100;
  12817. PlayerInfo[playerid][pArmor] = 0;
  12818. PlayerInfo[playerid][pSpawnPos] = 0;
  12819. startSpawnLoc[playerid] = 1; //always spawn players in LS until server pop increases
  12820. if(!startSpawnLoc[playerid]) //dillimore
  12821. {
  12822. PlayerInfo[playerid][pModel] = 162;
  12823. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  12824. PlayerInfo[playerid][pClothes] = 0;
  12825. SetPlayerPos(playerid, 665.9512, -620.2848, 16.3359);
  12826. SetPlayerFacingAngle(playerid, 357.2120);
  12827. }
  12828. else //los santos
  12829. {
  12830. SetPlayerPos(playerid, 1812.0366, -1369.7888, 15.0781);
  12831. SetPlayerFacingAngle(playerid, 270.2801);
  12832. }
  12833. SetPlayerInterior(playerid, 0);
  12834. SetPlayerVirtualWorld(playerid, 0);
  12835. SetCameraBehindPlayer(playerid);
  12836. TogglePlayerControllable(playerid, true);
  12837. SetPlayerToTeamColor(playerid);
  12838. //displayWelcomeMessage(playerid);
  12839. //ShowPlayerTutorial(playerid);
  12840. return 1;
  12841. }
  12842. else
  12843. {
  12844. SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  12845. SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  12846. if(PlayerInfo[playerid][pSpawnPos] == 0)
  12847. {
  12848. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  12849. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  12850. SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
  12851. SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z] + 1); //set their position
  12852. SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  12853. }
  12854. else{
  12855. new house = PlayerInfo[playerid][pHouseID];
  12856. if(house > 0){
  12857. if(gettime() > PlayerInfo[playerid][pLastLogoutUnix]){
  12858. SetPlayerInterior(playerid, 0);
  12859. SetPlayerVirtualWorld(playerid, 0);
  12860. SetPlayerPos(playerid, HouseInfo[house][hOutsideX], HouseInfo[house][hOutsideY], HouseInfo[house][hOutsideZ]);
  12861. SetPlayerFacingAngle(playerid, HouseInfo[house][hOutsideA]);
  12862. }
  12863. else
  12864. {
  12865. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  12866. SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
  12867. SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z] + 1); //set their position
  12868. SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  12869. }
  12870. }
  12871. else
  12872. {
  12873. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  12874. SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
  12875. SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z] + 1); //set their position
  12876. SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  12877. if( PlayerInfo[playerid][pInt] > 0 )
  12878. {
  12879. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  12880. }
  12881. }
  12882. }
  12883. SetCameraBehindPlayer(playerid);
  12884. TogglePlayerControllable(playerid, true);
  12885. SetPlayerToTeamColor(playerid);
  12886. return 1;
  12887. }
  12888. }
  12889. return 1;
  12890. }
  12891. //==============================================================================
  12892. Timer:UnfreezeBoxing(playerid)
  12893. {
  12894. TogglePlayerControllable(playerid, true);
  12895. return 1;
  12896. }
  12897. //==============================================================================
  12898. stock setPlayerInHospital(playerid)
  12899. {
  12900. if(IsPlayerConnected(playerid))
  12901. {
  12902. new str[128];
  12903. new rand = random(sizeof(HospitalSpawns));
  12904. switch(rand) {
  12905. case 0: { //all saints
  12906. SetPlayerPos(playerid, 1192.256836, -1304.637939, 7.0000);
  12907. SetPlayerCameraPos(playerid, 1219.663330, -1395.356323, 24.186428);
  12908. SetPlayerCameraLookAt(playerid, 1216.779418, -1392.587890, 24.049209);
  12909. if(PlayerInfo[playerid][pWantedLevel] > 0) {
  12910. SendClientMessage(playerid,COLOR_YELLOW,"The San Andreas Police Department has been informed of your current location.");
  12911. SendCopMessage(TEAM_BLUE_COLOR, "HQ: All Units APB: Reporter: All Saints Hospital Staff");
  12912. format(str, sizeof(str), "HQ: Crime: Unknown, Suspect: %s", PlayerICName(playerid));
  12913. SendCopMessage(TEAM_BLUE_COLOR, str);
  12914. }
  12915. }
  12916. case 1: { //county
  12917. SetPlayerPos(playerid, 2012.323608, -1436.354370, 5.0000);
  12918. SetPlayerCameraPos(playerid, 1976.471191, -1474.494873, 17.548021);
  12919. SetPlayerCameraLookAt(playerid, 1979.214355, -1471.634033, 18.087253);
  12920. if(PlayerInfo[playerid][pWantedLevel] > 0) {
  12921. SendClientMessage(playerid,COLOR_YELLOW,"The San Andreas Police Department has been informed of your current location.");
  12922. SendCopMessage(TEAM_BLUE_COLOR, "HQ: All Units APB: Reporter: County General Hospital Staff");
  12923. format(str, sizeof(str), "HQ: Crime: Unknown, Suspect: %s", PlayerICName(playerid));
  12924. SendCopMessage(TEAM_BLUE_COLOR, str);
  12925. }
  12926. }
  12927. case 2: { //dillimore
  12928. SetPlayerPos(playerid, 867.9205,-579.7359,5.6433);
  12929. SetPlayerCameraPos(playerid, 871.711975, -573.046447, 23.873922);
  12930. SetPlayerCameraLookAt(playerid, 869.456481, -576.283447, 23.214698);
  12931. if(PlayerInfo[playerid][pWantedLevel] > 0) {
  12932. SendClientMessage(playerid,COLOR_YELLOW,"The San Andreas Police Department has been informed of your current location.");
  12933. SendCopMessage(TEAM_BLUE_COLOR, "HQ: All Units APB: Reporter: Dillimore Medical Centre Staff");
  12934. format(str, sizeof(str), "HQ: Crime: Unknown, Suspect: %s", PlayerICName(playerid));
  12935. SendCopMessage(TEAM_BLUE_COLOR, str);
  12936. }
  12937. }
  12938. }
  12939. HospitalSpawnID[playerid] = rand;
  12940. SetPlayerHealth(playerid, 1.0);
  12941. SetPlayerHealth(playerid, 1.0);
  12942. PlayerInfo[playerid][pInt] = 0;
  12943. PlayerInfo[playerid][pVirtualWorld] = 0;
  12944. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  12945. SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
  12946. switch(PlayerInfo[playerid][pDonateRank]) {
  12947. case 0: { //default
  12948. SendClientMessage(playerid,COLOR_DOCTOR,"You must spend some time in Hospital to recover.");
  12949. SendClientMessage(playerid,COLOR_DOCTOR,"Before you are discharged, hospital staff will confiscate your weapons and bill you for the healthcare you received.");
  12950. HospitalTime[playerid] = 1;
  12951. }
  12952. case 1: { //bronze
  12953. SendClientMessage(playerid,COLOR_DOCTOR,"You must spend some time in Hospital to recover, you are receiving the VIP healthcare plan.");
  12954. SendClientMessage(playerid,COLOR_DOCTOR,"Before you are discharged, hospital staff will confiscate your weapons and bill you for the healthcare you received.");
  12955. HospitalTime[playerid] = 10;
  12956. }
  12957. case 2: { //silver
  12958. SendClientMessage(playerid,COLOR_DOCTOR,"You must spend some time in Hospital to recover, you are receiving the VIP healthcare plan.");
  12959. SendClientMessage(playerid,COLOR_DOCTOR,"Before you are discharged, hospital staff will confiscate your weapons and bill you for the healthcare you received.");
  12960. HospitalTime[playerid] = 15;
  12961. }
  12962. case 3: { //gold
  12963. SendClientMessage(playerid,COLOR_DOCTOR,"You must spend some time in Hospital to recover, you are receiving the best VIP healthcare plan we offer.");
  12964. SendClientMessage(playerid,COLOR_DOCTOR,"Before you are discharged, hospital staff will confiscate your weapons and bill you for the healthcare you received.");
  12965. HospitalTime[playerid] = 25;
  12966. }
  12967. default: { //error
  12968. SendClientMessage(playerid,COLOR_DOCTOR,"You must spend some time in Hospital to recover.");
  12969. SendClientMessage(playerid,COLOR_DOCTOR,"Before you are discharged, hospital staff will confiscate your weapons and bill you for the healthcare you received.");
  12970. HospitalTime[playerid] = 1;
  12971. }
  12972. }
  12973. if(PlayerInfo[playerid][pInsurance] > 0)
  12974. {
  12975. HospitalTime[playerid] += 20;
  12976. SendClientMessage(playerid, COLOR_DOCTOR, "Your insurance has improved your healthcare plan.");
  12977. }
  12978. }
  12979. return 1;
  12980. }
  12981. //==============================================================================
  12982. stock releasePlayerFromHospital(playerid)
  12983. {
  12984. new str[128];
  12985. HasBoughtMask[playerid] = 0;
  12986. PlayerInfo[playerid][pPoison] = 0;
  12987. if(PlayerInfo[playerid][pMask] == 1)
  12988. {
  12989. PlayerInfo[playerid][pMask] = 0;
  12990. foreach( new i: Player )
  12991. {
  12992. ShowPlayerNameTagForPlayer(i, playerid, 0);
  12993. }
  12994. }
  12995. new cut = deathcost;
  12996. if(PlayerInfo[playerid][pMember] == FACTION_FMD || PlayerInfo[playerid][pLeader] == FACTION_FMD || PlayerInfo[playerid][pGroup] == GROUP_S9) // medics
  12997. {
  12998. cut = deathcost / 2;
  12999. }
  13000. if(PlayerInfo[playerid][pInsurance] > 0)
  13001. {
  13002. PlayerInfo[playerid][pInsurance] --;
  13003. SendClientMessage(playerid, COLOR_DOCTOR, "Your insurance healthcare plan has reduced your bill by 25 percents.");
  13004. new percentsmoney = cut/4;
  13005. cut = cut-percentsmoney;
  13006. }
  13007. GiveMoney(playerid, -cut);
  13008. new Float: defaultHP = 50.0;
  13009. switch(PlayerInfo[playerid][pDonateRank]) {
  13010. case 0: { //default
  13011. if(defaultHP + PlayerInfo[playerid][pSHP] > 100) {
  13012. SetPlayerHealth(playerid, 100);
  13013. } else {
  13014. SetPlayerHealth(playerid, defaultHP + PlayerInfo[playerid][pSHP]);
  13015. }
  13016. format(str, sizeof(str), "SAFMD: Your medical bill comes to $%d, have a nice day.", cut);
  13017. SendClientMessage(playerid, COLOR_DOCTOR, str);
  13018. }
  13019. case 1: { //bronze
  13020. new Float: perkHP = 10;
  13021. if(defaultHP + PlayerInfo[playerid][pSHP] + perkHP > 100) {
  13022. SetPlayerHealth(playerid, 100);
  13023. } else {
  13024. SetPlayerHealth(playerid, defaultHP + PlayerInfo[playerid][pSHP] + perkHP);
  13025. }
  13026. format(str, sizeof(str), "SAFMD: Your VIP healthcare gave you a 10 percent recovery bonus and came to $%d, have a nice day.", cut);
  13027. SendClientMessage(playerid, COLOR_DOCTOR, str);
  13028. }
  13029. case 2: { //silver
  13030. new Float: perkHP = 20;
  13031. if(defaultHP + PlayerInfo[playerid][pSHP] + perkHP > 100) {
  13032. SetPlayerHealth(playerid, 100);
  13033. } else {
  13034. SetPlayerHealth(playerid, defaultHP + PlayerInfo[playerid][pSHP] + perkHP);
  13035. }
  13036. format(str, sizeof(str), "SAFMD: Your VIP healthcare gave you a 20 percent recovery bonus and came to $%d, have a nice day.", cut);
  13037. SendClientMessage(playerid, COLOR_DOCTOR, str);
  13038. }
  13039. case 3: { //gold
  13040. new Float: perkHP = 30;
  13041. if(defaultHP + PlayerInfo[playerid][pSHP] + perkHP > 100) {
  13042. SetPlayerHealth(playerid, 100);
  13043. } else {
  13044. SetPlayerHealth(playerid, defaultHP + PlayerInfo[playerid][pSHP] + perkHP);
  13045. }
  13046. format(str, sizeof(str), "SAFMD: Your VIP healthcare gave you a 30 percent recovery bonus and came to $%d, have a nice day.", cut);
  13047. SendClientMessage(playerid, COLOR_DOCTOR, str);
  13048. }
  13049. default: { //error
  13050. if(defaultHP + PlayerInfo[playerid][pSHP] > 100) {
  13051. SetPlayerHealth(playerid, 100);
  13052. } else {
  13053. SetPlayerHealth(playerid, defaultHP + PlayerInfo[playerid][pSHP]);
  13054. }
  13055. }
  13056. }
  13057. SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
  13058. if(PlayerInfo[playerid][pDonateRank] == 4) {SetPlayerArmour(playerid, 100);SetPlayerHealth(playerid, 100);}
  13059. TogglePlayerControllable(playerid, true);
  13060. new hospitalid = HospitalSpawnID[playerid];
  13061. switch(hospitalid) {
  13062. case 0: { //all saints
  13063. SetPlayerPos(playerid, HospitalSpawns[hospitalid][0], HospitalSpawns[hospitalid][1], HospitalSpawns[hospitalid][2]);
  13064. SetPlayerFacingAngle(playerid, HospitalSpawns[hospitalid][3]);
  13065. }
  13066. case 1: { //county
  13067. SetPlayerPos(playerid, HospitalSpawns[hospitalid][0], HospitalSpawns[hospitalid][1], HospitalSpawns[hospitalid][2]);
  13068. SetPlayerFacingAngle(playerid, HospitalSpawns[hospitalid][3]);
  13069. }
  13070. case 2: { //dillimore
  13071. SetPlayerPos(playerid, HospitalSpawns[hospitalid][0], HospitalSpawns[hospitalid][1], HospitalSpawns[hospitalid][2]);
  13072. SetPlayerFacingAngle(playerid, HospitalSpawns[hospitalid][3]);
  13073. }
  13074. default: { //county
  13075. SetPlayerPos(playerid, 2034.5677, -1406.0891, 17.2174);
  13076. SetPlayerFacingAngle(playerid, 180.4432);
  13077. }
  13078. }
  13079. SetCameraBehindPlayer(playerid);
  13080. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  13081. pInHospital[playerid] = 0;
  13082. SetPlayerToTeamColor(playerid);
  13083. //Exploit fix for Abusing full vest on spawn
  13084. if(PlayerInfo[playerid][pSHealth] >= 90){
  13085. FVestProtected[playerid] = 1;
  13086. // 1000 * 60 = 60seconds = 1minute * 15 = 15minutes
  13087. SetTimerEx("Timer_FVestProtection", (1000*60)*15, 0, "d", playerid);
  13088. }
  13089. ResetPlayerDamages(playerid);
  13090. /* if(IsDead[playerid] == true)
  13091. {
  13092. Delete3DTextLabel(dmginfo[playerid]);
  13093. IsDead[playerid]= false;
  13094. return 1;
  13095. }*/
  13096. return 1;
  13097. }
  13098. //==============================================================================
  13099. stock GetGunName(weaponid)
  13100. {
  13101. new wName[32];
  13102. switch(weaponid)
  13103. {
  13104. case 0:
  13105. wName = "Fist";
  13106. case 1:
  13107. wName = "Brass Knuckles";
  13108. case 2:
  13109. wName = "Golf Club";
  13110. case 3:
  13111. wName = "Nightstick";
  13112. case 4:
  13113. wName = "Knife";
  13114. case 5:
  13115. wName = "Baseball Bat";
  13116. case 6:
  13117. wName = "Shovel";
  13118. case 7:
  13119. wName = "Pool Cue";
  13120. case 8:
  13121. wName = "Katana";
  13122. case 9:
  13123. wName = "Chainsaw";
  13124. case 10:
  13125. wName = "Purple Dildo";
  13126. case 11:
  13127. wName = "Dildo";
  13128. case 12:
  13129. wName = "Vibrator";
  13130. case 13:
  13131. wName = "Silver Vibrator";
  13132. case 14:
  13133. wName = "Flowers";
  13134. case 15:
  13135. wName = "Cane";
  13136. case 16:
  13137. wName = "Grenade";
  13138. case 17:
  13139. wName = "Tear Gas";
  13140. case 18:
  13141. wName = "Molotov Cocktail";
  13142. case 22:
  13143. wName = "Colt 45";
  13144. case 23:
  13145. wName = "Silenced Pistol";
  13146. case 24:
  13147. wName = "Desert Eagle";
  13148. case 25:
  13149. wName = "Shotgun";
  13150. case 26:
  13151. wName = "Sawnoff Shotgun";
  13152. case 27:
  13153. wName = "Combat Shotgun";
  13154. case 28:
  13155. wName = "Micro SMG/Uzi";
  13156. case 29:
  13157. wName = "MP5";
  13158. case 30:
  13159. wName = "AK-47";
  13160. case 31:
  13161. wName = "M4";
  13162. case 32:
  13163. wName = "Tec-9";
  13164. case 33:
  13165. wName = "Country Rifle";
  13166. case 34:
  13167. wName = "Sniper Rifle";
  13168. case 35:
  13169. wName = "RPG";
  13170. case 36:
  13171. wName = "HS Rocket";
  13172. case 37:
  13173. wName = "Flamethrower";
  13174. case 38:
  13175. wName = "Minigun";
  13176. case 39:
  13177. wName = "Satchel Charge";
  13178. case 40:
  13179. wName = "Detonator";
  13180. case 41:
  13181. wName = "Spraycan";
  13182. case 42:
  13183. wName = "Fire Extinguisher";
  13184. case 43:
  13185. wName = "Camera";
  13186. case 44:
  13187. wName = "Night Vision Goggles";
  13188. case 45:
  13189. wName = "Thermal Goggles";
  13190. case 46:
  13191. wName = "Parachute";
  13192. }
  13193. return wName;
  13194. }
  13195. //==============================================================================
  13196. forward ClearHeliblade(playerid);
  13197. public ClearHeliblade(playerid) return helibladecount[playerid] = 0;
  13198. // -------------------- //
  13199. Timer:PaintballDie(playerid)
  13200. {
  13201. if(!IsPlayerConnected(playerid)) return 0;
  13202. if(PaintballDieTimer[playerid])
  13203. {
  13204. PaintballDieTimer[playerid] = 0;
  13205. }
  13206. return 1;
  13207. }
  13208. //////////////////////////
  13209. public OnPlayerDeath(playerid, killerid, reason)
  13210. {
  13211. new str[2048];
  13212. printf("[OnPlayerDeath] playerid: %d killerid %d reason: %d", PlayerName(playerid), PlayerName(killerid), reason);
  13213. new year, month, day;
  13214. getdate(year, month, day);
  13215. new hour, minute, second;
  13216. gettime(hour, minute, second);
  13217. hour = FixHour(hour);
  13218. format(str, sizeof(str), "[OnPlayerDeath] playerid: %s[%d] killerid %s[%d] reason: %d at %02d %s %02d:%02d:%02d",PlayerOOCName(playerid),playerid, PlayerOOCName(killerid),killerid, reason, day, GetMonthFromInt(month), hour, minute, second);
  13219. logswrite("kills.log", str);
  13220. new Float:x, Float:y, Float:z, Float:a;
  13221. GetPlayerPos(playerid, x, y, z);
  13222. GetPlayerFacingAngle(playerid, a);
  13223. DeathPos[playerid][DeathX] = x;
  13224. DeathPos[playerid][DeathY] = y;
  13225. DeathPos[playerid][DeathZ] = z;
  13226. DeathPos[playerid][DeathA] = a;
  13227. DeathPos[playerid][DeathInt] = GetPlayerInterior(playerid);
  13228. DeathPos[playerid][DeathVW] = GetPlayerVirtualWorld(playerid);
  13229. for(new i = 0; i <= 12; i++)
  13230. {
  13231. GetPlayerWeaponData(playerid, i, lastpguns[playerid][i][0], lastpguns[playerid][i][1]);
  13232. }
  13233. //was killed by a legit player
  13234. if(killerid != INVALID_PLAYER_ID)
  13235. {
  13236. new
  13237. name[MAX_PLAYER_NAME + 1],
  13238. gunName[24];
  13239. GetWeaponName(GetPlayerWeapon(killerid), gunName, sizeof(gunName));
  13240. GetPlayerICName(killerid, name, sizeof(name));
  13241. if(PlayerInfo[killerid][pGroup] == GROUP_HITMAN && PlayerInfo[playerid][pHeadValue] > 0) format(killedBy[playerid], 24, "Hitman");
  13242. else format(killedBy[playerid], 24, "%s", name);
  13243. gettime(killerHour[playerid], killerMinute[playerid]);
  13244. killerHour[playerid] = FixHour(killerHour[playerid]);
  13245. format(killGun[playerid], 24, "%s", gunName);
  13246. if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  13247. {
  13248. new vehicleid = GetPlayerVehicleID(killerid);
  13249. if(IsAHelicopter(vehicleid))
  13250. {
  13251. if( (PlayerInfo[playerid][pMember] != 14 && PlayerInfo[playerid][pGroup] != GROUP_S9) && (GetVehicleModel(vehicleid) != 425)) // If the member is not FACTION_ARMY/S9 and is not in vehicle HUNTER //
  13252. {
  13253. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has killed %s (ID %d), Bladekilling.", PlayerICName(killerid), killerid, PlayerICName(playerid), playerid);
  13254. UpdateWarnings(str);
  13255. }
  13256. }
  13257. else if(GetPlayerWeapon(killerid) == 29)
  13258. {
  13259. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has killed %s (ID %d), Drivershooting.", PlayerICName(killerid), killerid, PlayerICName(playerid), playerid);
  13260. UpdateWarnings(str);
  13261. }
  13262. }
  13263. if(lastShotByPlayerID[playerid] == killerid) { //these vars prevent fakekilling
  13264. if(lastShotByWeaponID[playerid] == 35 || lastShotByWeaponID[playerid] == 36 || lastShotByWeaponID[playerid] == 38) {
  13265. //check if its a scripted gun (/givegun, event weapon etc)
  13266. new hackedWeapon = 1;
  13267. if(HaveWeapon(killerid, lastShotByWeaponID[playerid]) == lastShotByWeaponID[playerid] || HaveAdminWeapon(killerid, lastShotByWeaponID[playerid]) == lastShotByWeaponID[playerid])
  13268. hackedWeapon = 0;
  13269. if(PlayerInfo[killerid][pAdmin] < 2 && hackedWeapon)
  13270. { //it would be better to check if they are in an event or have admin weapons
  13271. if((PlayerInfo[playerid][pMember] != 14 && PlayerInfo[playerid][pGroup] != GROUP_S9) && GetVehicleModel(GetPlayerVehicleID(killerid)) != 425)
  13272. {
  13273. new weaponName[24], banreason[64];
  13274. if(PlayerInfo[killerid][pBand] == 3) return 1; // Avoid spam, should already be banned.
  13275. GetWeaponName(lastShotByWeaponID[playerid], weaponName, sizeof(weaponName));
  13276. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected.", PlayerICName(killerid), weaponName);
  13277. SendClientMessageToAll(COLOR_WHITE, str);
  13278. new ip[16];
  13279. GetPlayerIp(playerid, ip, sizeof(ip));
  13280. gpci(playerid,playerserial,sizeof(playerserial));
  13281. BanExx(playerid);
  13282. format(banreason, sizeof(banreason), "killing with a hacked %s.", weaponName);
  13283. BanAccount(killerid, INVALID_PLAYER_ID, banreason);
  13284. if(NextBan == 1) {
  13285. format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(playerid));
  13286. format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
  13287. format(Ban1ip, sizeof(Ban1ip), "%s", ip);
  13288. NextBan = 2;
  13289. return 1;
  13290. }
  13291. if(NextBan == 2) {
  13292. format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(playerid));
  13293. format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
  13294. format(Ban2ip, sizeof(Ban2ip), "%s", ip);
  13295. NextBan = 3;
  13296. return 1;
  13297. }
  13298. if(NextBan == 3) {
  13299. format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(playerid));
  13300. format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
  13301. format(Ban3ip, sizeof(Ban3ip), "%s", ip);
  13302. NextBan = 4;
  13303. return 1;
  13304. }
  13305. if(NextBan == 4) {
  13306. format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(playerid));
  13307. format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
  13308. format(Ban4ip, sizeof(Ban4ip), "%s", ip);
  13309. NextBan = 5;
  13310. return 1;
  13311. }
  13312. if(NextBan == 5) {
  13313. format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(playerid));
  13314. format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
  13315. format(Ban5ip, sizeof(Ban5ip), "%s", ip);
  13316. NextBan = 1;
  13317. return 1;
  13318. }
  13319. }
  13320. }
  13321. }
  13322. }
  13323. }
  13324. if(lastAnimIndex[playerid] == 1062)
  13325. {
  13326. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has died due to the Climbing Bug.", PlayerICName(playerid), playerid);
  13327. UpdateWarnings(str);
  13328. }
  13329. CapturingTimer[playerid] = 0;
  13330. PlayerCuffed[playerid] = 0;
  13331. PlayerCuffedTime[playerid] = 0;
  13332. PlayerTazed[playerid] = 0;
  13333. PlayerTazedTime[playerid] = 0;
  13334. beingDragged[playerid] = false;
  13335. isDragging[playerid] = false;
  13336. KillTimer(dragTimer[playerid]);
  13337. gPlayerUsingLoopingAnim[playerid] = 0;
  13338. PlayerInfo[playerid][pJammer] = 0;
  13339. removeJammer(playerid);
  13340. if(PlayerBlinded[playerid] > 0) {
  13341. PlayerBlinded[playerid] = 0;
  13342. }
  13343. if(PlayerInfo[playerid][pJailnumber] > 0)
  13344. {
  13345. UpdateDynamic3DTextLabelText(PNumber3D[playerid], COLOR_WHITE, " ");
  13346. DestroyDynamic3DTextLabel(PNumber3D[playerid]);
  13347. }
  13348. if(Mobile[playerid] != 999)
  13349. {
  13350. if(Mobile[playerid] == 911 || Mobile[playerid] == 63971 || Mobile[playerid] == 912 || Mobile[playerid] == 914 || Mobile[playerid] == 916)
  13351. {
  13352. Mobile[playerid] = 999;
  13353. CellTime[playerid] = 0;
  13354. }
  13355. else
  13356. {
  13357. SendClientMessage(Mobile[playerid], COLOR_GRAD2, "The line just went dead...");
  13358. CellTime[Mobile[playerid]] = 0;
  13359. Mobile[Mobile[playerid]] = 999;
  13360. Mobile[playerid] = 999;
  13361. CellTime[playerid] = 0;
  13362. }
  13363. if(usePayphone[playerid] > -1)
  13364. {
  13365. payPhone[usePayphone[playerid]][inUse] = 0;
  13366. usePayphone[playerid] = -1;
  13367. }
  13368. }
  13369. if(BombID[playerid] != -1)
  13370. {
  13371. TakePlayerWeapon(playerid, 40);
  13372. PlayerInfo[playerid][pGun12] = 0;
  13373. DestroyDynamicObjectEx(BombID[playerid]);
  13374. BombID[playerid] = -1;
  13375. }
  13376. if(GuardedBy[playerid] != 999)
  13377. {
  13378. PlayerInfo[GuardedBy[playerid]][pAccount] -= (GuardingPrice[playerid] * 2);
  13379. SetPlayerToTeamColor(playerid);
  13380. SetPlayerToTeamColor(GuardedBy[playerid]);
  13381. GuardedBy[playerid] = 999;
  13382. GuardingPrice[playerid] = 0;
  13383. }
  13384. if(hotWireTime[playerid] > 0)
  13385. {
  13386. hotWireTime[playerid] = 0;
  13387. hotWireVeh[playerid] = -1;
  13388. }
  13389. if(HasARapidResKit[playerid] == 1)
  13390. {
  13391. DestroyDynamicObjectEx(RapidResKit[playerid]);
  13392. RapidResKit[playerid] = 0;
  13393. HasARapidResKit[playerid] = 0;
  13394. RapidResKitActive[playerid] = 0;
  13395. }
  13396. if(PlayerInfo[playerid][pMember] == 1 /*SAPD*/ || PlayerInfo[playerid][pMember] == 2 /*FBI | DEA*/ || PlayerInfo[playerid][pMember] == 4 /*FMD*/ || PlayerInfo[playerid][pMember] == 5/*DoC*/ || PlayerInfo[playerid][pMember] == FACTION_SANG)
  13397. {
  13398. if(backupType[playerid] == 1) //SAPD
  13399. {
  13400. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their police backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13401. SendRadioMessage(1, TEAM_BLUE_COLOR, str);
  13402. backupType[playerid] = 0;
  13403. foreach( new i: Player )
  13404. {
  13405. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13406. //{
  13407. if(PlayerInfo[i][pMember] == 1)
  13408. {
  13409. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13410. SetPlayerToTeamColor(playerid);
  13411. }
  13412. //}
  13413. }
  13414. }
  13415. else if(backupType[playerid] == 2) //FBI | DEA
  13416. {
  13417. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their FBI backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13418. SendRadioMessage(2, TEAM_BLUE_COLOR, str);
  13419. backupType[playerid] = 0;
  13420. foreach( new i: Player )
  13421. {
  13422. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13423. //
  13424. if(PlayerInfo[i][pMember] == 2)
  13425. {
  13426. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13427. SetPlayerToTeamColor(playerid);
  13428. }
  13429. //}
  13430. }
  13431. }
  13432. else if(backupType[playerid] == 2) //SASD
  13433. {
  13434. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their SASD backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13435. SendRadioMessage(3, TEAM_BLUE_COLOR, str);
  13436. backupType[playerid] = 0;
  13437. foreach( new i: Player )
  13438. {
  13439. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13440. //{
  13441. if(PlayerInfo[i][pMember] == 3)
  13442. {
  13443. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13444. SetPlayerToTeamColor(playerid);
  13445. }
  13446. //}
  13447. }
  13448. }
  13449. else if(backupType[playerid] == 4) //FMD
  13450. {
  13451. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their medical backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13452. SendRadioMessage(4, TEAM_BLUE_COLOR, str);
  13453. backupType[playerid] = 0;
  13454. foreach( new i: Player )
  13455. {
  13456. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13457. //{
  13458. if(PlayerInfo[i][pMember] == 4)
  13459. {
  13460. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13461. SetPlayerToTeamColor(playerid);
  13462. }
  13463. //}
  13464. }
  13465. }
  13466. else if(backupType[playerid] == 5) //DoC
  13467. {
  13468. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their DoC backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13469. SendRadioMessage(5, TEAM_BLUE_COLOR, str);
  13470. backupType[playerid] = 0;
  13471. foreach( new i: Player )
  13472. {
  13473. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13474. //{
  13475. if(PlayerInfo[i][pMember] == 5)
  13476. {
  13477. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13478. SetPlayerToTeamColor(playerid);
  13479. }
  13480. //}
  13481. }
  13482. }
  13483. else if(backupType[playerid] == FACTION_SANG) // SANG
  13484. {
  13485. format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their AFSA backup request ((Died)).", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  13486. SendRadioMessage(FACTION_SANG, COLOR_SANG, str);
  13487. backupType[playerid] = 0;
  13488. foreach( new i: Player )
  13489. {
  13490. if(PlayerInfo[i][pMember] == FACTION_SANG)
  13491. {
  13492. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13493. SetPlayerToTeamColor(playerid);
  13494. }
  13495. }
  13496. }
  13497. else if(backupType[playerid] == 666) // S9
  13498. {
  13499. format(str, sizeof(str), "DISPATCH: %s %s has cancelled their S9 backup request ((Died)).", RealS9Rank(playerid), PlayerOOCName(playerid));
  13500. SendRadioMessage(5, COLOR_S9, str);
  13501. backupType[playerid] = 0;
  13502. foreach( new i: Player )
  13503. {
  13504. //if(IsPlayerConnected(i)) // Foreach type "Player" contains the IDS of players that are connected. So this is redundant. //
  13505. //{
  13506. if(PlayerInfo[i][pGroup] == GROUP_S9)
  13507. {
  13508. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
  13509. SetPlayerToTeamColor(playerid);
  13510. }
  13511. //}
  13512. }
  13513. }
  13514. }
  13515. for(new i = 0; i < 12; i++)
  13516. {
  13517. saveWeapon[playerid][i] = PlayerInfo[playerid][(pGun0 + pInfo:i)];
  13518. }
  13519. //in an event
  13520. if(IsAtEvent[playerid] == 1)
  13521. {
  13522. return 1;
  13523. }
  13524. //in jail
  13525. if(PlayerInfo[playerid][pJailed])
  13526. {
  13527. return 1;
  13528. }
  13529. //in paintball
  13530. if(inPaintball[playerid])
  13531. {
  13532. PaintballDieTimer[playerid] = 1;
  13533. SetTimerEx("Timer_PaintballDie", 5 * 1000, 0, "i", playerid);
  13534. if(killerid != INVALID_PLAYER_ID/*playerid*/)
  13535. {
  13536. new wepName[24];
  13537. GetWeaponName(reason, wepName, 24);
  13538. format(str, sizeof(str), "{FF0000}[PAINTBALL] %s has killed %s. [%s]", PlayerICName(killerid), PlayerICName(playerid), wepName);
  13539. SendPaintballMessage(playerid, -1, str);
  13540. pbKills[killerid]++;
  13541. UpdatePaintBallLeader(inPaintball[playerid]);
  13542. }
  13543. return 1;
  13544. }
  13545. if(killerid != INVALID_PLAYER_ID)
  13546. {
  13547. if(PlayerInfo[playerid][pHeadValue] > 0)
  13548. {
  13549. if(GoChase[killerid] == playerid)
  13550. {
  13551. new witness = 0, Float:X, Float:Y, Float:Z, weapname[24];
  13552. GetWeaponName(reason, weapname, 24);
  13553. GetPlayerPos(killerid, X, Y, Z);
  13554. foreach( new i: Player )if(IsPlayerInRangeOfPoint(i, 10.0, X, Y, Z))if(i != playerid && i != killerid)witness ++;
  13555. if(witness == 1)
  13556. {
  13557. if(reason == 0) format(str, sizeof(str), "Hitman %s has successfully assassinated %s with their hands and collected $%d, %d witness.", PlayerICName(killerid), PlayerICName(playerid), PlayerInfo[playerid][pHeadValue] /2, witness);
  13558. else format(str, sizeof(str), "Hitman %s has successfully assassinated %s with a %s and collected $%d, %d witness.", PlayerICName(killerid), PlayerICName(playerid), weapname, PlayerInfo[playerid][pHeadValue] /2, witness);
  13559. }
  13560. else format(str, sizeof(str), "Hitman %s has successfully assassinated %s with a %s and collected $%d, %d witnesses.", PlayerICName(killerid), PlayerICName(playerid), weapname, PlayerInfo[playerid][pHeadValue] /2, witness);
  13561. foreach( new i: Player )
  13562. {
  13563. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  13564. {
  13565. SendClientMessage(i, COLOR_YELLOW, str);
  13566. }
  13567. }
  13568. format(str, sizeof(str), "You were killed by a hitman and have lost $%d.", PlayerInfo[playerid][pHeadValue] /2);
  13569. SendClientMessage(playerid, COLOR_YELLOW, str);
  13570. PlayerInfo[playerid][pCash] -= PlayerInfo[playerid][pHeadValue] /2;
  13571. PlayerInfo[killerid][pCash] += PlayerInfo[playerid][pHeadValue] /2;
  13572. PlayerInfo[playerid][pHeadValue] = 0;
  13573. PlayerInfo[killerid][pCHits]++;
  13574. if(IsPlayerConnected(GetPlayerIDFromName(PlayerInfo[playerid][pContractBy])))
  13575. {
  13576. format(str, sizeof(str), "SMS: %s has been taken care of, Sender: Unknown", PlayerOOCName(playerid));
  13577. SendClientMessage(GetPlayerIDFromName(PlayerInfo[playerid][pContractBy]), COLOR_YELLOW, str);
  13578. }
  13579. playLocalSound(PlayerInfo[playerid][pContractBy], SMS_RECIEVED, 2.0, 0);
  13580. format(PlayerInfo[playerid][pContractBy], 24, "Nobody");
  13581. GoChase[killerid] = 999;
  13582. }
  13583. }
  13584. if(GoChase[playerid] == killerid)
  13585. {
  13586. format(str, sizeof(str), "Hitman %s has failed the contract on %s and lost $%d.", PlayerICName(playerid), PlayerICName(killerid), PlayerInfo[killerid][pHeadValue] /2);
  13587. foreach(new i: Player )
  13588. {
  13589. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  13590. {
  13591. SendClientMessage(i, COLOR_YELLOW, str);
  13592. }
  13593. }
  13594. format(str, sizeof(str), "You have killed a hitman and gained $%d, the contract on your head has been removed.", PlayerInfo[killerid][pHeadValue] /2);
  13595. SendClientMessage(killerid, COLOR_YELLOW, str);
  13596. PlayerInfo[killerid][pCash] += PlayerInfo[killerid][pHeadValue] /2;
  13597. PlayerInfo[playerid][pCash] -= PlayerInfo[killerid][pHeadValue] /2;
  13598. PlayerInfo[killerid][pHeadValue] = 0;
  13599. PlayerInfo[playerid][pFHits] ++;
  13600. format(PlayerInfo[killerid][pContractBy], 24, "Nobody");
  13601. GoChase[playerid] = 999;
  13602. }
  13603. if(pDeathState[playerid] == PLAYER_STATE_NORMAL) //first time dying
  13604. {
  13605. pDeathState[playerid] = PLAYER_STATE_REVIVE;
  13606. DeathPos[playerid][DeathHP] = 100;
  13607. PlayerInfo[killerid][pKills] ++;
  13608. PlayerInfo[playerid][pDeaths] ++;
  13609. PlayerCalledEMS[playerid] = 0;
  13610. SetPlayerWeapons(playerid);
  13611. }
  13612. else //died while in revive
  13613. {
  13614. SaveDeath(playerid, killerid);
  13615. pDeathState[playerid] = PLAYER_STATE_INHOSP;
  13616. PlayerCalledEMS[playerid] = 0;
  13617. TextDrawHideForPlayer(playerid, DieText);
  13618. TextDrawHideForPlayer(playerid, InjuredText);
  13619. new deathstr[300];
  13620. for(new i = 0; i <= 12; i++)
  13621. {
  13622. new weaponname[34];
  13623. if(lastpguns[playerid][i][0] == 0) continue;
  13624. GetWeaponName(lastpguns[playerid][i][0], weaponname, sizeof(weaponname));
  13625. format(deathstr, sizeof(deathstr), "%s%s\n", deathstr, weaponname);
  13626. }
  13627. ShowPlayerDialog(playerid, DIALOG_LASTGUNS, DIALOG_STYLE_LIST, "Last Weapons", deathstr, "Okay", "");
  13628. // Remove weapons
  13629. ResetPlayerWeapons(playerid);
  13630. ClearGuns(playerid);
  13631. ResetPlayerAdminWeaponsEx(playerid);
  13632. // Remove lock pick kit
  13633. PlayerInfo[playerid][pHasLockPick] = 0;
  13634. // Remove portable MDC
  13635. PlayerInfo[playerid][pPortMDC] = 0;
  13636. PlayerInfo[playerid][pDrill] = 0;
  13637. }
  13638. }
  13639. else
  13640. {
  13641. if(pDeathState[playerid] == PLAYER_STATE_NORMAL) //first time dying
  13642. {
  13643. pDeathState[playerid] = PLAYER_STATE_REVIVE;
  13644. DeathPos[playerid][DeathHP] = 100;
  13645. PlayerCalledEMS[playerid] = 0;
  13646. SetPlayerWeapons(playerid);
  13647. }
  13648. else //died while in revive
  13649. {
  13650. SaveDeath(playerid, killerid);
  13651. pDeathState[playerid] = PLAYER_STATE_INHOSP;
  13652. PlayerCalledEMS[playerid] = 0;
  13653. TextDrawHideForPlayer(playerid, DieText);
  13654. TextDrawHideForPlayer(playerid, InjuredText);
  13655. //remove weapons
  13656. ResetPlayerWeapons(playerid);
  13657. ClearGuns(playerid);
  13658. ResetPlayerAdminWeaponsEx(playerid);
  13659. PlayerInfo[playerid][pDrill] = 0;
  13660. }
  13661. }
  13662. return 1;
  13663. }
  13664. stock VehicleHasWindows(vehicleid)
  13665. {
  13666. new modelid = GetVehicleModel(vehicleid);
  13667. switch(modelid)
  13668. {
  13669. case 425:
  13670. return false;
  13671. case 441:
  13672. return false;
  13673. case 447:
  13674. return false;
  13675. case 448:
  13676. return false;
  13677. case 449:
  13678. return false;
  13679. case 450:
  13680. return false;
  13681. case 452:
  13682. return false;
  13683. case 453:
  13684. return false;
  13685. case 454:
  13686. return false;
  13687. case 457:
  13688. return false;
  13689. case 460:
  13690. return false;
  13691. case 461:
  13692. return false;
  13693. case 462:
  13694. return false;
  13695. case 463:
  13696. return false;
  13697. case 464:
  13698. return false;
  13699. case 465:
  13700. return false;
  13701. case 468:
  13702. return false;
  13703. case 469:
  13704. return false;
  13705. case 471:
  13706. return false;
  13707. case 472:
  13708. return false;
  13709. case 473:
  13710. return false;
  13711. case 476:
  13712. return false;
  13713. case 481:
  13714. return false;
  13715. case 484:
  13716. return false;
  13717. case 485:
  13718. return false;
  13719. case 486:
  13720. return false;
  13721. case 493:
  13722. return false;
  13723. case 501:
  13724. return false;
  13725. case 509:
  13726. return false;
  13727. case 510:
  13728. return false;
  13729. case 519:
  13730. return false;
  13731. case 520:
  13732. return false;
  13733. case 521:
  13734. return false;
  13735. case 522:
  13736. return false;
  13737. case 523:
  13738. return false;
  13739. case 530:
  13740. return false;
  13741. case 531:
  13742. return false;
  13743. case 532:
  13744. return false;
  13745. case 537:
  13746. return false;
  13747. case 538:
  13748. return false;
  13749. case 539:
  13750. return false;
  13751. case 548:
  13752. return false;
  13753. case 553:
  13754. return false;
  13755. case 563:
  13756. return false;
  13757. case 564:
  13758. return false;
  13759. case 568:
  13760. return false;
  13761. case 569:
  13762. return false;
  13763. case 570:
  13764. return false;
  13765. case 571:
  13766. return false;
  13767. case 572:
  13768. return false;
  13769. case 577:
  13770. return false;
  13771. case 581:
  13772. return false;
  13773. case 586:
  13774. return false;
  13775. case 592:
  13776. return false;
  13777. case 593:
  13778. return false;
  13779. case 594:
  13780. return false;
  13781. case 595:
  13782. return false;
  13783. }
  13784. return true;
  13785. }
  13786. stock CheckEventStatus(playerid)
  13787. {
  13788. if(IsAtEvent[playerid] == 1) return 1;
  13789. return 0;
  13790. }
  13791. //==============================================================================
  13792. forward passNow(playerid);
  13793. public passNow(playerid) return hasPassed[playerid] = false;
  13794. public OnPlayerStreamIn(playerid, forplayerid)
  13795. {
  13796. if(PlayerInfo[playerid][pMask] > 0) ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
  13797. return 1;
  13798. }
  13799. /*public OnPlayerStreamOut(playerid, forplayerid) -- possible gps fix?
  13800. {
  13801. if(GPSOn[playerid] && GPSOn[forplayerid] && PlayerInfo[playerid][pMember] == PlayerInfo[forplayerid][pMember])
  13802. {
  13803. ToggleGPS(playerid);
  13804. ToggleGPS(playerid);
  13805. ToggleGPS(forplayerid);
  13806. ToggleGPS(forplayerid);
  13807. }
  13808. return 1;
  13809. }*/
  13810. //==============================================================================
  13811. public OnPlayerSpawn(playerid)
  13812. {
  13813. SetPlayerColor(playerid, TCOLOR_WHITE); // (should) fix the grey name issue
  13814. if(gPlayerLogged[playerid] == 0)
  13815. {
  13816. SendClientMessage(playerid, COLOR_LIGHTRED, "This server requires you to login before spawn, you have been kicked.");
  13817. KickEx(playerid);
  13818. return 1;
  13819. }
  13820. /*if(PlayerInfo[playerid][pConnectTime] > 39 && PlayerInfo[playerid][pImportant] == 0)
  13821. {
  13822. new query[500];
  13823. new str[500];
  13824. new Year, Month, Day;
  13825. getdate(Year, Month, Day);
  13826. PlayerInfo[playerid][pDonateRank] = 4;
  13827. PlayerInfo[playerid][pTag] = NTAG_DVIP;
  13828. PlayerInfo[playerid][pImportant] = 1;
  13829. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Important` = 1 WHERE `Name`='%e'",PlayerName(playerid));
  13830. mysql_pquery(sqlGameConnection, query);
  13831. format(str, 32, "%02d/%02d/%d", Month, Day, Year);
  13832. strmid(PlayerInfo[playerid][pVIPJoinDate], str, 0, strlen(str), 255);
  13833. format(str, 32, "%02d/%02d/%d", Month +1, Day, Year);
  13834. strmid(PlayerInfo[playerid][pVIPExpDate], str, 0, strlen(str), 255);
  13835. if(Month == 12)
  13836. {
  13837. format(PlayerInfo[playerid][pVIPExpDate], 32, "%02d/%02d/%d", 1, Day, Year +1);
  13838. }
  13839. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  13840. SendClientMessage(playerid, COLOR_GRAD2, str);
  13841. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've been awarded as a Platinum VIP for being loyal and active player [>= 40 playing hours]");
  13842. }*/
  13843. if(!PlayerInfo[playerid][pAdmin]) {
  13844. PlayerInfo[playerid][pStealthed] = 0;
  13845. PlayerInfo[playerid][pBanAppealer] = 0;
  13846. PlayerInfo[playerid][pGangModd] = 0;
  13847. PlayerInfo[playerid][pEventModd] = 0;
  13848. PlayerInfo[playerid][pComplaintModd] = 0;
  13849. PlayerInfo[playerid][pShopMod] = 0;
  13850. PlayerInfo[playerid][pFactionMod] = 0;
  13851. PlayerInfo[playerid][pFactionDirector] = 0;
  13852. PlayerInfo[playerid][pGangDirector] = 0;
  13853. PlayerInfo[playerid][pBizMod] = 0;
  13854. }
  13855. //set players money to their pCash
  13856. ResetPlayerMoney(playerid);
  13857. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  13858. if(!firstSpawned[playerid]) //if the player has joined the server for the first time
  13859. {
  13860. //set weapon skill levels
  13861. SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
  13862. SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
  13863. SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
  13864. SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
  13865. displayMapIcons(playerid);
  13866. hideCinematicTextDraw(playerid);
  13867. hideAdvertismentTextDraw(playerid);
  13868. HideLoginTextDraw(playerid);
  13869. //PreloadAnims(playerid); //needed to sync animations
  13870. SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightingStyle]);
  13871. firstSpawned[playerid] = 1;
  13872. gPlayerSpawned[playerid] = 1;
  13873. new houseid = PlayerInfo[playerid][pHouseID];
  13874. if(houseid != 0)
  13875. {
  13876. DestroyDynamicPickup(HouseInfo[houseid][hOutsidePickup]);
  13877. HouseInfo[houseid][hOutsidePickup] = CreateDynamicPickup(HOUSE_ONLINE, 1, HouseInfo[houseid][hOutsideX], HouseInfo[houseid][hOutsideY], HouseInfo[houseid][hOutsideZ]);
  13878. }
  13879. TextDrawHideForPlayer(playerid, motd);
  13880. }
  13881. //everything outside gets called when a player _RE_spawns
  13882. if(PlayerInfo[playerid][pClothes] != 0) //set the players skin
  13883. {
  13884. SetPlayerSkin(playerid, PlayerInfo[playerid][pClothes]);
  13885. }
  13886. else
  13887. {
  13888. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  13889. }
  13890. #if DEVMODE == 1 //make developer executive if local test server
  13891. if(PlayerInfo[playerid][pAdmin] < 99999)
  13892. {
  13893. new localIP[16]; // Can /kill ig to re-give yourself admin etc for testing
  13894. GetPlayerIp(playerid, localIP, sizeof(localIP));
  13895. if(!strcmp(localIP, "127.0.0.1"))
  13896. {
  13897. /*PlayerInfo[playerid][pAdmin] = 999999;
  13898. PlayerInfo[playerid][pSecKey] = 1234;
  13899. gAdminAuthorized[playerid] = 1;*/
  13900. new str[128];
  13901. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has connected locally - they have been given Executive admin automatically.", PlayerICName(playerid));
  13902. ABroadCast(COLOR_WHITE, str, 1);
  13903. }
  13904. }
  13905. #endif
  13906. SetPlayerWeapons(playerid);
  13907. SetPlayerSpawn(playerid);
  13908. deathByCombine[playerid] = 0;
  13909. return 1;
  13910. }
  13911. //==============================================================================
  13912. public PayLog(string2[])
  13913. {
  13914. new query[512];
  13915. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `paylog` (`Date`, `Info`) VALUES(NOW(), '%e')", string2);
  13916. mysql_pquery(sqlGameConnection, query);
  13917. return 1;
  13918. }
  13919. //==============================================================================
  13920. public StatLog(string2[])
  13921. {
  13922. new entry[128];
  13923. printf(string2); // since execs can't check scriptfiles folder for stat.log
  13924. format(entry, sizeof(entry), "%s\n", string2);
  13925. new File:hFile;
  13926. hFile = fopen("stat.log", io_append);
  13927. if(hFile)
  13928. {
  13929. fwrite(hFile, entry);
  13930. fclose(hFile);
  13931. } else {
  13932. printf("[error] Failed to find stat.log");
  13933. }
  13934. }
  13935. //==============================================================================
  13936. public KickLog(string2[])
  13937. {
  13938. new entry[128];
  13939. format(entry, sizeof(entry), "%s\n", string2);
  13940. new File:hFile;
  13941. hFile = fopen("kick.log", io_append);
  13942. if(hFile)
  13943. {
  13944. fwrite(hFile, entry);
  13945. fclose(hFile);
  13946. } else {
  13947. printf("[error] Failed to find kick.log");
  13948. }
  13949. }
  13950. //==============================================================================
  13951. public BanLog(string2[])
  13952. {
  13953. new entry[128];
  13954. format(entry, sizeof(entry), "%s\n", string2);
  13955. new File:hFile;
  13956. hFile = fopen("ban.log", io_append);
  13957. if(hFile)
  13958. {
  13959. fwrite(hFile, entry);
  13960. fclose(hFile);
  13961. } else {
  13962. printf("[error] Failed to find ban.log");
  13963. }
  13964. }
  13965. //==============================================================================
  13966. public OnPlayerEnterCheckpoint(playerid)
  13967. {
  13968. new str[128];
  13969. //if( JobCheckpoints( playerid ) == 1 ) return 1;
  13970. if(goingJob[playerid] == true)
  13971. {
  13972. SendClientMessage(playerid, COLOR_GREY, "{FF0000}[Map]{FFFFFF} You have arrived at the position.");
  13973. DisablePlayerCheckpointEx(playerid);
  13974. goingJob[playerid] = false;
  13975. }
  13976. if(isRepairing[playerid] == true)
  13977. {
  13978. OnEnterRepairCheckpoint(playerid);
  13979. return 1;
  13980. }
  13981. if(isAddingNos[playerid]){
  13982. OnEnterNosCheckpoint(playerid);
  13983. return 1;
  13984. }
  13985. if(CP[playerid] == CHECKPOINT_ADDRESS)
  13986. {
  13987. CP[playerid] = CHECKPOINT_NONE;
  13988. DisablePlayerCheckpointEx(playerid);
  13989. return 1;
  13990. }
  13991. if(CP[playerid] == CHECKPOINT_DMV){
  13992. CP[playerid] = CHECKPOINT_NONE;
  13993. DisablePlayerCheckpointEx(playerid);
  13994. return 1;
  13995. }
  13996. if(CP[playerid] == CHECKPOINT_CAR_ALARM)
  13997. {
  13998. CP[playerid] = CHECKPOINT_NONE;
  13999. DisablePlayerCheckpointEx(playerid);
  14000. return 1;
  14001. }
  14002. if(CP[playerid] == CHECKPOINT_DCARS)
  14003. {
  14004. if(IsPlayerInRangeOfPoint(playerid, 5.0, 1113.95, -1884.83, 13.04))
  14005. {
  14006. DisablePlayerCheckpointEx(playerid);
  14007. }
  14008. return 1;
  14009. }
  14010. if(CP[playerid] == CHECKPOINT_TIKISTORE)
  14011. {
  14012. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2353.1772, -1463.4822, 24.0000)) return 1;
  14013. DisablePlayerCheckpointEx(playerid);
  14014. SetPlayerInterior(playerid, 6);
  14015. PlayerInfo[playerid][pInt] = 6;
  14016. SetPlayerPos(playerid, -2240.4736,137.1805,1035.4141);
  14017. displayCenterHUDInfo(playerid, "~b~Tiki store", 8);
  14018. SetPlayerFacingAngle(playerid, 267.2031);
  14019. SetCameraBehindPlayer(playerid);
  14020. CP[playerid] = CHECKPOINT_NONE;
  14021. return 1;
  14022. }
  14023. if(CP[playerid] == CHECKPOINT_CLUB)
  14024. {
  14025. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1281.9542, -1261.9480, 13.6107)) return 1;
  14026. DisablePlayerCheckpointEx(playerid);
  14027. CP[playerid] = CHECKPOINT_NONE;
  14028. return 1;
  14029. }
  14030. if(CP[playerid] == CHECKPOINT_DROPCAR)
  14031. {
  14032. if(!IsPlayerInRangeOfPoint(playerid, 10.0, 2696.0520, -2225.8101, 13.2554)) return 1;
  14033. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  14034. {
  14035. PlayerInfo[playerid][pJackSkill] ++;
  14036. if(PlayerInfo[playerid][pJackSkill] == 50)
  14037. {
  14038. SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 2, you will now earn more Money and have a quicker Reload Time.");
  14039. }
  14040. else if(PlayerInfo[playerid][pJackSkill] == 100)
  14041. {
  14042. SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 3, you will now earn more Money and have a quicker Reload Time.");
  14043. }
  14044. else if(PlayerInfo[playerid][pJackSkill] == 200)
  14045. {
  14046. SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 4, you will now earn more Money and have a quicker Reload Time.");
  14047. }
  14048. else if(PlayerInfo[playerid][pJackSkill] == 400)
  14049. {
  14050. SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 5, you will now earn more Money and have a quicker Reload Time.");
  14051. }
  14052. new level = PlayerInfo[playerid][pJackSkill];
  14053. if(level >= 0 && level <= 49)
  14054. {
  14055. new rand = random(sizeof(SELLCAR1));
  14056. format(str, sizeof(str), "* You sold a car for $%d, your reload time is 20 minutes.", SELLCAR1[rand]);
  14057. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14058. GiveMoney(playerid, SELLCAR1[rand]);
  14059. PlayerInfo[playerid][pCarTime] = 1200;
  14060. format(str, sizeof(str), "~w~Car sold for~n~~g~$%d!", SELLCAR1[rand]);
  14061. displayCenterHUDInfo(playerid, str, 8);
  14062. }
  14063. else if(level >= 50 && level <= 99)
  14064. {
  14065. new rand = random(sizeof(SELLCAR2));
  14066. format(str, sizeof(str), "* You sold a car for $%d, your reload time is 18 minutes.", SELLCAR2[rand]);
  14067. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14068. GiveMoney(playerid, SELLCAR2[rand]);
  14069. PlayerInfo[playerid][pCarTime] = 1080;
  14070. format(str, sizeof(str), "~w~Car sold for~n~~g~$%d!", SELLCAR2[rand]);
  14071. displayCenterHUDInfo(playerid, str, 8);
  14072. }
  14073. else if(level >= 100 && level <= 199)
  14074. {
  14075. new rand = random(sizeof(SELLCAR3));
  14076. format(str, sizeof(str), "* You sold a car for $%d, your reload time is 16 minutes.", SELLCAR3[rand]);
  14077. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14078. GiveMoney(playerid, SELLCAR3[rand]);
  14079. PlayerInfo[playerid][pCarTime] = 960;
  14080. format(str, sizeof(str), "~w~Car sold for~n~~g~$%d!", SELLCAR3[rand]);
  14081. displayCenterHUDInfo(playerid, str, 8);
  14082. }
  14083. else if(level >= 200 && level <= 399)
  14084. {
  14085. new rand = random(sizeof(SELLCAR4));
  14086. format(str, sizeof(str), "* You sold a car for $%d, your reload time is 14 minutes.", SELLCAR4[rand]);
  14087. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14088. GiveMoney(playerid, SELLCAR4[rand]);
  14089. PlayerInfo[playerid][pCarTime] = 840;
  14090. format(str, sizeof(str), "~w~Car sold for~n~~g~$%d!", SELLCAR4[rand]);
  14091. displayCenterHUDInfo(playerid, str, 8);
  14092. }
  14093. else if(level >= 400)
  14094. {
  14095. new money = 6000;
  14096. format(str, sizeof(str), "* You sold a car for $%d, your reload time is 12 minutes.", money);
  14097. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14098. GiveMoney(playerid, money);
  14099. PlayerInfo[playerid][pCarTime] = 720;
  14100. format(str, sizeof(str), "~w~Car sold for~n~~g~$%d!", money);
  14101. displayCenterHUDInfo(playerid, str, 8);
  14102. }
  14103. CP[playerid] = CHECKPOINT_NONE;
  14104. DisablePlayerCheckpointEx(playerid);
  14105. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  14106. return 1;
  14107. }
  14108. else
  14109. {
  14110. SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle!");
  14111. return 1;
  14112. }
  14113. }
  14114. if(CP[playerid] == CHECKPOINT_MATERIALS_1)
  14115. {
  14116. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2172.1880, -2263.9683, 13.3363)) return 1;
  14117. if(Packages[playerid] > 0)
  14118. {
  14119. if(GotMats[playerid] >= 1)
  14120. {
  14121. format(str, sizeof(str), "Teleport: [%d]%s is potentially Teleport Matrunning.", playerid, PlayerOOCName(playerid));
  14122. UpdateWarnings(str);
  14123. return 1;
  14124. }
  14125. if(PlayerInfo[playerid][pDonateRank] == 1)
  14126. {
  14127. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 280(Bronze VIP) Materials for your 10 Materials Packages.");
  14128. PlayerInfo[playerid][pMats] += 280;
  14129. }
  14130. else if(PlayerInfo[playerid][pDonateRank] == 2)
  14131. {
  14132. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 310(Silver VIP) Materials for your 10 Materials Packages.");
  14133. PlayerInfo[playerid][pMats] += 310;
  14134. }
  14135. else if(PlayerInfo[playerid][pDonateRank] == 3)
  14136. {
  14137. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 350(Gold VIP) Materials for your 10 Materials Packages.");
  14138. PlayerInfo[playerid][pMats] += 350;
  14139. }
  14140. else if(PlayerInfo[playerid][pDonateRank] == 4)
  14141. {
  14142. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 650(Platinum VIP) Materials for your 10 Materials Packages.");
  14143. PlayerInfo[playerid][pMats] += 650;
  14144. }
  14145. else
  14146. {
  14147. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 250 Materials for your 10 Materials Packages.");
  14148. PlayerInfo[playerid][pMats] += matpayout;
  14149. }
  14150. Packages[playerid] = 0;
  14151. CP[playerid] = CHECKPOINT_NONE;
  14152. GotMats[playerid] = 0;
  14153. DisablePlayerCheckpointEx(playerid);
  14154. return 1;
  14155. }
  14156. else
  14157. {
  14158. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Materials Packages.");
  14159. return 1;
  14160. }
  14161. }
  14162. if(CP[playerid] == CHECKPOINT_MATERIALS_2)
  14163. {
  14164. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2288.1233,-1104.7793,38.4565)) return 1;
  14165. if(Packages[playerid] > 0)
  14166. {
  14167. if(GotMats[playerid] >= 1)
  14168. {
  14169. format(str, sizeof(str), "Teleport: [%d]%s is potentially Teleport Matrunning.", playerid, PlayerOOCName(playerid));
  14170. UpdateWarnings(str);
  14171. return 1;
  14172. }
  14173. if(PlayerInfo[playerid][pDonateRank] == 0)
  14174. {
  14175. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 250 Materials for your 10 Materials Packages.");
  14176. PlayerInfo[playerid][pMats] += matpayout;
  14177. }
  14178. else if(PlayerInfo[playerid][pDonateRank] == 1)
  14179. {
  14180. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 280(Bronze VIP) Materials for your 10 Materials Packages.");
  14181. PlayerInfo[playerid][pMats] += 280;
  14182. }
  14183. else if(PlayerInfo[playerid][pDonateRank] == 2)
  14184. {
  14185. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 310(Silver VIP) Materials for your 10 Materials Packages.");
  14186. PlayerInfo[playerid][pMats] += 310;
  14187. }
  14188. else if(PlayerInfo[playerid][pDonateRank] == 3)
  14189. {
  14190. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 350(Gold VIP) Materials for your 10 Materials Packages.");
  14191. PlayerInfo[playerid][pMats] += 350;
  14192. }
  14193. else if(PlayerInfo[playerid][pDonateRank] == 4)
  14194. {
  14195. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 650(Platinum VIP) Materials for your 10 Materials Packages.");
  14196. PlayerInfo[playerid][pMats] += 650;
  14197. }
  14198. else
  14199. {
  14200. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The Factory gave you 250 Materials for your 10 Materials Packages.");
  14201. PlayerInfo[playerid][pMats] += matpayout;
  14202. }
  14203. Packages[playerid] = 0;
  14204. CP[playerid] = CHECKPOINT_NONE;
  14205. GotMats[playerid] = 0;
  14206. DisablePlayerCheckpointEx(playerid);
  14207. return 1;
  14208. }
  14209. else
  14210. {
  14211. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Materials Packages.");
  14212. return 1;
  14213. }
  14214. }
  14215. if(CP[playerid] == CHECKPOINT_POINTTIME)
  14216. {
  14217. displayCenterHUDInfo(playerid, "~w~Type ~r~/capture~n~~w~ to capture the point.", 8);
  14218. CP[playerid] = CHECKPOINT_NONE;
  14219. DisablePlayerCheckpointEx(playerid);
  14220. return 1;
  14221. }
  14222. if(CP[playerid] == CHECKPOINT_UNLOADDRUGS)
  14223. {
  14224. if(DrugsLoaded[playerid] > 0)
  14225. {
  14226. if(IsPlayerInAnyVehicle(playerid))
  14227. {
  14228. RemovePlayerFromVehicle(playerid);
  14229. SetPlayerAttachedObject(playerid, INDEX_8, 2969, 6, 0.031000, 0.056999, -0.185000, 250.000000, 0, 80.399986, 1, 1, 1); //index 2, bone 6 (right hand)
  14230. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  14231. SetPlayerArmedWeapon(playerid, 0); // disables weapons
  14232. Crates[playerid] = 1;
  14233. DrugsLoaded[playerid] = 0;
  14234. SetPlayerCheckpointEx(playerid, 2351.9668, -1169.9220, 28.0385, 2);
  14235. CP[playerid] = CHECKPOINT_DRUGSPAYOUT;
  14236. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Drugs crate unloaded, proceed with the delivery.");
  14237. return 1;
  14238. }
  14239. else
  14240. {
  14241. SetPlayerAttachedObject(playerid, INDEX_8, 2969, 6, 0.031000, 0.056999, -0.185000, 250.000000, 0, 80.399986, 1, 1, 1); //index 2, bone 6 (right hand)
  14242. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  14243. SetPlayerArmedWeapon(playerid, 0); // disables weapons
  14244. Crates[playerid] = 1;
  14245. DrugsLoaded[playerid] = 0;
  14246. SetPlayerCheckpointEx(playerid, 2351.9668, -1169.9220, 28.0385, 2);
  14247. CP[playerid] = CHECKPOINT_DRUGSPAYOUT;
  14248. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Drugs crate unloaded, proceed with the delivery.");
  14249. return 1;
  14250. }
  14251. }
  14252. }
  14253. if(CP[playerid] == CHECKPOINT_DRUGSPAYOUT)
  14254. {
  14255. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 2351.9668, -1169.9220, 28.0385)) return 1;
  14256. if(GotDrugs[playerid] >= 1)
  14257. {
  14258. format(str, sizeof(str), "Teleport: [%d]%s is potentially Teleport Drugrunning.", playerid, PlayerOOCName(playerid));
  14259. UpdateWarnings(str);
  14260. return 1;
  14261. }
  14262. if(Crates[playerid] > 0)
  14263. {
  14264. RemovePlayerAttachedObject(playerid, INDEX_8);
  14265. new level = PlayerInfo[playerid][pSmugglerSkill];
  14266. new crackpayout;
  14267. if(level >= 0 && level <= 19)
  14268. {
  14269. crackpayout = 2250;
  14270. }
  14271. else if(level >= 20 && level <= 39)
  14272. {
  14273. crackpayout = 2900;
  14274. }
  14275. else if(level >= 40 && level <= 59)
  14276. {
  14277. crackpayout = 3550;
  14278. }
  14279. else if(level >= 60 && level <= 119)
  14280. {
  14281. crackpayout = 4500;
  14282. }
  14283. else if(level >= 120)
  14284. {
  14285. crackpayout = 5000;
  14286. }
  14287. format(str, sizeof(str), "* You received $%d for delivering the Drug Crates.", crackpayout);
  14288. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14289. GiveMoney(playerid, crackpayout);
  14290. Crates[playerid] = 0;
  14291. CP[playerid] = CHECKPOINT_NONE;
  14292. DisablePlayerCheckpointEx(playerid);
  14293. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  14294. PlayerInfo[playerid][pSmugglerSkill] ++;
  14295. dhstock += 10;
  14296. if(PlayerInfo[playerid][pSmugglerSkill] == 20)
  14297. {
  14298. SendClientMessage(playerid, COLOR_YELLOW, "* Your Drug Smuggler Skill is now Level 2, you will now earn more Money smuggling Drugs.");
  14299. }
  14300. else if(PlayerInfo[playerid][pSmugglerSkill] == 40)
  14301. {
  14302. SendClientMessage(playerid, COLOR_YELLOW, "* Your Drug Smuggler Skill is now Level 3, you will now earn more Money smuggling Drugs.");
  14303. }
  14304. else if(PlayerInfo[playerid][pSmugglerSkill] == 60)
  14305. {
  14306. SendClientMessage(playerid, COLOR_YELLOW, "* Your Drug Smuggler Skill is now Level 4, you will now earn more Money smuggling Drugs.");
  14307. }
  14308. else if(PlayerInfo[playerid][pSmugglerSkill] == 120)
  14309. {
  14310. SendClientMessage(playerid, COLOR_YELLOW, "* Your Drug Smuggler Skill is now Level 5, you will now earn more Money smuggling Drugs.");
  14311. }
  14312. return 1;
  14313. }
  14314. else
  14315. {
  14316. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Drug Crates.");
  14317. return 1;
  14318. }
  14319. }
  14320. if(CP[playerid] == CHECKPOINT_CAR_TRACK)
  14321. {
  14322. CP[playerid] = CHECKPOINT_NONE;
  14323. DisablePlayerCheckpointEx(playerid);
  14324. return 1;
  14325. }
  14326. if(CP[playerid] == CHECKPOINT_CAR_DUMP)
  14327. {
  14328. CP[playerid] = CHECKPOINT_NONE;
  14329. DisablePlayerCheckpointEx(playerid);
  14330. return 1;
  14331. }
  14332. if(CP[playerid] == CHECKPOINT_SHOWDEALERSHIP)
  14333. {
  14334. CP[playerid] = CHECKPOINT_NONE;
  14335. DisablePlayerCheckpointEx(playerid);
  14336. return 1;
  14337. }
  14338. if(CP[playerid] == CHECKPOINT_DRUGFACTORY)
  14339. {
  14340. CP[playerid] = CHECKPOINT_NONE;
  14341. DisablePlayerCheckpointEx(playerid);
  14342. return 1;
  14343. }
  14344. if(CP[playerid] == CHECKPOINT_BUYPRODUCTS)
  14345. {
  14346. CP[playerid] = CHECKPOINT_NONE;
  14347. DisablePlayerCheckpointEx(playerid);
  14348. return 1;
  14349. }
  14350. if(CP[playerid] == CHECKPOINT_HITMANHQ)
  14351. {
  14352. CP[playerid] = CHECKPOINT_NONE;
  14353. DisablePlayerCheckpointEx(playerid);
  14354. return 1;
  14355. }
  14356. if(CP[playerid] == CHECKPOINT_INJURED)
  14357. {
  14358. EMSArrived[PlayerVictim[playerid]] = 1;
  14359. displayCenterHUDInfo(PlayerVictim[playerid], "~r~EMS~w~ Arrived...", 8); //display for 8 seconds
  14360. CP[playerid] = CHECKPOINT_NONE;
  14361. DisablePlayerCheckpointEx(playerid);
  14362. return 1;
  14363. }
  14364. if(CP[playerid] == CHECKPOINT_TAXI_CALLER)
  14365. {
  14366. CP[playerid] = CHECKPOINT_NONE;
  14367. DisablePlayerCheckpointEx(playerid);
  14368. return 1;
  14369. }
  14370. //garbage job
  14371. if(CP[playerid] == CHECKPOINT_GARBAGE)
  14372. {
  14373. CP[playerid] = CHECKPOINT_NONE;
  14374. DisablePlayerCheckpointEx(playerid);
  14375. //put down trash
  14376. ApplyAnimationEx(playerid, "CARRY", "putdwn105", 4.0, 0, 0, 0, 0, 0, 0);
  14377. //update capacity
  14378. new slot = hasTruckCheckpoint[playerid];
  14379. //printf("updating garbage truck slot: %d", slot);
  14380. GarbageTruck[slot][capacity]++;
  14381. format(str, sizeof(str), "Capacity: %d/100", GarbageTruck[slot][capacity]);
  14382. Update3DTextLabelText(GarbageTruck[slot][capacityLabelID], 0x33CCFFFF, str);
  14383. //printf("garbage truck slot capacity is now: %d", GarbageTruck[slot][capacity]);
  14384. //reset variables
  14385. hasTruckCheckpoint[playerid] = -1;
  14386. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8))
  14387. {
  14388. RemovePlayerAttachedObject(playerid, INDEX_8);
  14389. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  14390. }
  14391. //do the skill crap
  14392. PlayerInfo[playerid][pWasteSkill]++;
  14393. if(PlayerInfo[playerid][pWasteSkill] == 50)
  14394. {
  14395. SendClientMessage(playerid, COLOR_YELLOW, "* Your Waste Collector Skill is now Level 2, you will now receive 5 percent more money when delivering trash.");
  14396. }
  14397. else if(PlayerInfo[playerid][pWasteSkill] == 100)
  14398. {
  14399. SendClientMessage(playerid, COLOR_YELLOW, "* Your Waste Collector Skill is now Level 3, you will now receive 5 percent more money when delivering trash.");
  14400. }
  14401. else if(PlayerInfo[playerid][pWasteSkill] == 200)
  14402. {
  14403. SendClientMessage(playerid, COLOR_YELLOW, "* Your Waste Collector Skill is now Level 4, you will now receive 5 percent more money when delivering trash.");
  14404. }
  14405. else if(PlayerInfo[playerid][pWasteSkill] == 400)
  14406. {
  14407. SendClientMessage(playerid, COLOR_YELLOW, "* Your Waste Collector Skill is now Level 5, you will now receive 5 percent more money when delivering trash.");
  14408. }
  14409. return 1;
  14410. }
  14411. if(CP[playerid] == CHECKPOINT_SANCAMERA)
  14412. {
  14413. CP[playerid] = CHECKPOINT_NONE;
  14414. DisablePlayerCheckpointEx(playerid);
  14415. }
  14416. return 1;
  14417. }
  14418. Hook:d_OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  14419. {
  14420. new str[128];
  14421. new Float:hp, Float:arm, bool:userArmor;
  14422. GetPlayerArmour(damagedid, arm);
  14423. GetPlayerHealth(damagedid, hp);
  14424. if(hoskperm[playerid])
  14425. {
  14426. if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
  14427. {
  14428. if(weaponid == 34)
  14429. {
  14430. SendClientMessage(damagedid, COLOR_YELLOW, "You have been one-shot-killed.");
  14431. SetPlayerHealth(damagedid, 0.0);
  14432. hoskperm[playerid] = false;
  14433. SendClientMessage(playerid, COLOR_YELLOW, "Your one-shot-kill permission has automatically been revoked.");
  14434. }
  14435. }
  14436. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  14437. {
  14438. if(weaponid == 23)
  14439. {
  14440. SendClientMessage(damagedid, COLOR_YELLOW, "You have been one-shot-killed.");
  14441. SetPlayerHealth(damagedid, 0.0);
  14442. }
  14443. }
  14444. }
  14445. //rubber bullets (Country Rifle)
  14446. if(weaponid == 33)
  14447. {
  14448. if(hasRubberBullets[playerid] && loadedRubberBullets[playerid])
  14449. {
  14450. new Float:x, Float:y, Float:z;
  14451. GetPlayerPos(damagedid, x, y, z);
  14452. if(IsPlayerInRangeOfPoint(playerid, 50.0, x, y, z) && GetDistanceBetweenPlayers(playerid, damagedid) > 3.0)
  14453. {
  14454. if(IsPlayerInAnyVehicle(damagedid)) return SendClientMessage(playerid, COLOR_GREY, "Your rubber bullets won't harm the player whilst they are inside of a vehicle.");
  14455. if(PlayerTazed[damagedid] > 0) return SendClientMessage(playerid, COLOR_GREY, "That player is already either tazed, or hit by a rubber bullet.");
  14456. format(str, sizeof(str), "* You hit %s with your rubber bullet.", PlayerICName(damagedid));
  14457. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14458. format(str, sizeof(str), "* %s shoots a rubber bullet at %s, knocking them to the floor.", PlayerICName(playerid), PlayerICName(damagedid));
  14459. ProxDetector(30.0, damagedid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14460. displayCenterHUDInfo(damagedid, "~r~Rubber Bullet Damage Taken.", 8); //display for 8 seconds
  14461. setPlayerRubber(damagedid);
  14462. SetTimerEx("Timer_TazerTimer", 5000, false, "i", playerid);
  14463. TazerTime[playerid] = 1;
  14464. if(userArmor)SetPlayerArmour(damagedid, arm -3);
  14465. else SetPlayerHealth(damagedid, hp -3);
  14466. }
  14467. }
  14468. }
  14469. //sd tazer
  14470. if(weaponid == 23)
  14471. {
  14472. if(playerHoldingTazer[playerid] == 1)
  14473. {
  14474. if(TazerTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Please wait while your tazer recharges.");
  14475. if(PlayerInfo[damagedid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] != 1) return SendClientMessage(playerid, COLOR_GREY, "You aren't able to taze an admin.");
  14476. new Float:x, Float:y, Float:z;
  14477. GetPlayerPos(damagedid, x, y, z);
  14478. if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z)) //if i am in range of the person
  14479. {
  14480. if(IsPlayerNPC(damagedid)) return SendClientMessage(playerid, COLOR_WHITE, "You can not taze a NPC!");
  14481. if(IsPlayerInAnyVehicle(damagedid)) return SendClientMessage(playerid, COLOR_GREY, "Suspect is in a car, get them out first.");
  14482. if(PlayerTazed[damagedid] > 0) return SendClientMessage(playerid, COLOR_GREY, "Suspect already tazed.");
  14483. format(str, sizeof(str), "* You tazed %s for 12 seconds.", PlayerICName(damagedid));
  14484. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14485. format(str, sizeof(str), "* %s shoots with his tazer at %s, and tazed him.", PlayerICName(playerid), PlayerICName(damagedid));
  14486. ProxDetector(30.0, damagedid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14487. displayCenterHUDInfo(damagedid, "~r~Tazed.", 8); //display for 8 seconds
  14488. setPlayerTazed(damagedid);
  14489. SetTimerEx("Timer_TazerTimer", 8000, false, "i", playerid);
  14490. TazerTime[playerid] = 1;
  14491. if(userArmor) SetPlayerArmour(damagedid, arm);
  14492. else SetPlayerHealth(damagedid, hp);
  14493. }
  14494. }
  14495. }
  14496. return 1;
  14497. }
  14498. new dgunName[24];
  14499. HOOK:d_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  14500. {
  14501. // new str[128];
  14502. if(issuerid == INVALID_PLAYER_ID) return 1;
  14503. // Armour Hacking
  14504. new Float:armour;
  14505. GetPlayerArmour(playerid, armour); // Client side armour
  14506. if(armour < PlayerInfo[playerid][pArmor]) PlayerInfo[playerid][pArmor] = armour; // keep pArmor updated
  14507. lastShotByWeaponID[playerid] = weaponid;
  14508. lastShotByPlayerID[playerid] = issuerid;
  14509. lastShotBodyPart[playerid] = bodypart;
  14510. GetWeaponName(weaponid, dgunName, sizeof(dgunName));
  14511. format(damagedBy[playerid], MAX_PLAYER_NAME, "%s", PlayerICName(issuerid));
  14512. format(damageGun[playerid], 24, "%s", dgunName);
  14513. gettime(damageHour[playerid], damageMinute[playerid]);
  14514. damageHour[playerid] = FixHour(damageHour[playerid]);
  14515. if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
  14516. {
  14517. DeathPos[playerid][DeathHP] -= amount;
  14518. }
  14519. //droneAttacked(issuerid, playerid);
  14520. // Newbie got guns, not melee?
  14521. if(PlayerInfo[issuerid][pAdmin] == 0 && IsAtEvent[issuerid] != 1 && PlayerInfo[issuerid][pConnectTime] < 2)
  14522. {
  14523. if(weaponid == 9 || (weaponid >= 16 && weaponid <= 42))
  14524. {
  14525. //format(str, sizeof(str), "{FF0000}AdmWrning:{FFFFFF} %s (Playing Hours: %d) is damaging %s with a %s. Possible weapon hacking.", PlayerOOCName(issuerid), PlayerInfo[issuerid][pConnectTime], PlayerOOCName(playerid), dgunName);
  14526. //ABroadCast(COLOR_WHITE, str, 1);
  14527. }
  14528. }
  14529. new year, month, day;
  14530. new str[2048];
  14531. getdate(year, month, day);
  14532. new hour, minute, second;
  14533. gettime(hour, minute, second);
  14534. hour = FixHour(hour);
  14535. format(str, sizeof(str), "%s is damaging %s with %s at %02d %s %02d:%02d:%02d", PlayerOOCName(issuerid), PlayerOOCName(playerid),dgunName, day, GetMonthFromInt(month), hour, minute, second);
  14536. logswrite("dmg.log", str);
  14537. return 1;
  14538. }
  14539. Timer:UseDrink(playerid)
  14540. {
  14541. if(!IsPlayerConnected(playerid)) return 0;
  14542. if(UseDrinkTimer[playerid])
  14543. {
  14544. UseDrinkTimer[playerid] = 0;
  14545. }
  14546. return 1;
  14547. }
  14548. //==============================================================================
  14549. //===
  14550. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  14551. {
  14552. new str[128];
  14553. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  14554. {
  14555. if(newkeys & 2) // KEY_CROUCH = VEHICLE_HORN
  14556. {
  14557. new gunid = GetPlayerWeapon(playerid);
  14558. if(gunid)
  14559. {
  14560. if(HaveWeapon(playerid, gunid) != gunid) //doesn't have the scripted gun
  14561. {
  14562. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s is drivebying with a fake weapon.", PlayerICName(playerid));
  14563. ABroadCast(COLOR_WHITE, str, 1);
  14564. RemovePlayerFromVehicle(playerid);
  14565. }
  14566. }
  14567. }
  14568. }
  14569. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT){
  14570. if(!IsPlayerInAnyVehicle(playerid)){
  14571. if(newkeys == KEY_NO){
  14572. if(!cmd_enter(playerid, ""))
  14573. cmd_exit(playerid, "");
  14574. }
  14575. }
  14576. }
  14577. //==================================
  14578. //========[ Faction gates ]=========
  14579. if(newkeys & KEY_YES)
  14580. {
  14581. cmd_gate(playerid, "");
  14582. }
  14583. //==================================
  14584. if(PlayerInfo[playerid][pHospital]) return 1; //don't check keypress if in hospital
  14585. if(flyingUsed[playerid])
  14586. {
  14587. if(HOLDING(KEY_SPRINT))
  14588. {
  14589. playerMoveSpeed[playerid] -= 75.0;
  14590. }
  14591. else if(HOLDING(KEY_JUMP))
  14592. {
  14593. playerMoveSpeed[playerid] += 75.0;
  14594. }
  14595. else if(!HOLDING(KEY_SPRINT) && !HOLDING(KEY_JUMP))
  14596. {
  14597. playerMoveSpeed[playerid] = 100.0;
  14598. }
  14599. }
  14600. // cuffed
  14601. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED)
  14602. {
  14603. if(PlayerCuffed[playerid] != 1) //if player is not floor cuffed
  14604. {
  14605. if(PRESSED(KEY_JUMP))
  14606. {
  14607. ApplyAnimationEx(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 0, 0, 1);
  14608. return 1;
  14609. }
  14610. if(PRESSED(KEY_FIRE))
  14611. {
  14612. if(GetPlayerAnimationIndex(playerid) != 1130) //not falling
  14613. {
  14614. ClearAnimations(playerid, 1);
  14615. }
  14616. return 1;
  14617. }
  14618. if(newkeys & 144) //RMB?
  14619. {
  14620. if(GetPlayerAnimationIndex(playerid) != 1130) //not falling
  14621. {
  14622. ClearAnimations(playerid, 1);
  14623. }
  14624. return 1;
  14625. }
  14626. }
  14627. return 1;
  14628. }
  14629. if(newkeys & KEY_AIM && !IsPlayerInAnyVehicle(playerid) && hasFlashlight[playerid])
  14630. {
  14631. if(hasFlashlight[playerid])
  14632. {
  14633. RemovePlayerAttachedObject(playerid, FLASHLIGHT_SLOT1);
  14634. RemovePlayerAttachedObject(playerid, FLASHLIGHT_SLOT2);
  14635. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT1, 18656, 6, 0.25, -0.0155, 0.16, 86.5, -185, 86.5, 0.03, 0.03, 0.03);
  14636. SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT2, 18641, 6, 0.2, 0.01, 0.16, 90, -95, 90, 1, 1, 1);
  14637. hasFlashlight[playerid] = true;
  14638. return 1;
  14639. }
  14640. }
  14641. //on foot
  14642. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  14643. {
  14644. if(PRESSED(KEY_FIRE))
  14645. {
  14646. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
  14647. {
  14648. if(UseDrinkTimer[playerid]) return 1;
  14649. new Float:health;
  14650. GetPlayerHealth(playerid, health);
  14651. if(health < 100.0)
  14652. {
  14653. if(health +5 > 100.0)
  14654. {
  14655. SetPlayerHealth(playerid, 100);
  14656. }
  14657. else
  14658. {
  14659. SetPlayerHealth(playerid, health +5);
  14660. }
  14661. UseDrinkTimer[playerid] = true;
  14662. SetTimerEx("Timer_UseDrink", 2 *1000, 0, "i", playerid);
  14663. }
  14664. return 1;
  14665. }
  14666. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
  14667. {
  14668. ClearAnimations(playerid, 1);
  14669. ApplyAnimationEx(playerid, "GANGS", "SMKCIG_PRTL", 4.0, 0, 0, 0, 0, 0);
  14670. return 1;
  14671. }
  14672. if(BombID[playerid] != -1)
  14673. {
  14674. if(HoldingDetonator[playerid])
  14675. {
  14676. new Float:X, Float:Y, Float:Z;
  14677. if(BombInCar[playerid] == 1)
  14678. {
  14679. GetVehiclePos(BombID[playerid], X, Y, Z);
  14680. SetVehicleHealth(BombID[playerid], 0);
  14681. }
  14682. else
  14683. {
  14684. ClearAnimationsEx(playerid);
  14685. ApplyAnimationEx(playerid, "PED", "bomber", 4.0, 0, 0, 0, 0, 0);
  14686. GetDynamicObjectPos(BombID[playerid], X, Y, Z);
  14687. DestroyDynamicObjectEx(BombID[playerid]);
  14688. }
  14689. CreateExplosion(X, Y, Z, 6, 0.0);
  14690. CreateExplosion(X, Y, Z, 2, 0.0);
  14691. displayCenterHUDInfo(playerid, "~r~Bomb detonated.", 8); //display for 8 seconds
  14692. BombID[playerid] = -1;
  14693. TakePlayerWeapon(playerid, 40);
  14694. SetPlayerWeapons(playerid);
  14695. new killerid = GoChase[playerid];
  14696. if(killerid != 999) {
  14697. if(IsPlayerInRangeOfPoint(killerid, 10, X, Y, Z))
  14698. {
  14699. if(GoChase[playerid] == killerid)
  14700. {
  14701. if(PlayerInfo[killerid][pHeadValue] > 0)
  14702. {
  14703. new price = PlayerInfo[killerid][pHeadValue];
  14704. new name[MAX_PLAYER_NAME];
  14705. new killa[MAX_PLAYER_NAME];
  14706. GetPlayerICName(playerid, name, sizeof(name));
  14707. GetPlayerICName(killerid, killa, sizeof(killa));
  14708. GiveMoney(killerid, -price /2);
  14709. GiveMoney(playerid, price /2);
  14710. new witness;
  14711. GetPlayerPos(playerid, X, Y, Z);
  14712. foreach( new i: Player )
  14713. {
  14714. if(IsPlayerInRangeOfPoint(i, 10.0, X, Y, Z))
  14715. {
  14716. if(i != playerid && i != killerid)
  14717. {
  14718. witness ++;
  14719. }
  14720. }
  14721. }
  14722. format(str, 128, "Hitman %s has successfully assassinated %s with a C4 and collected $%d, %d witnesses.", name, killa, price /2, witness);
  14723. foreach(new i: Player )
  14724. {
  14725. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  14726. {
  14727. SendClientMessage(i, COLOR_YELLOW, str);
  14728. }
  14729. }
  14730. format(str, 128, "You have been critically injured by a hitman and lost $%d.", price /2);
  14731. SendClientMessage(killerid, COLOR_YELLOW, str);
  14732. gotBombed[killerid] = 1;
  14733. SetPlayerHealth(killerid, 0);
  14734. ClearContract(killerid);
  14735. GoChase[playerid] = 999;
  14736. PlayerInfo[playerid][pCHits]++;
  14737. }
  14738. }
  14739. }
  14740. }
  14741. }
  14742. }
  14743. }
  14744. if((newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT))
  14745. {
  14746. if(isbreakingcuffs[playerid] != false)
  14747. {
  14748. if(GetPlayerProgressBarValue(playerid, breakcuffs[playerid]) < 100)
  14749. {
  14750. SetPlayerProgressBarValue(playerid, breakcuffs[playerid], GetPlayerProgressBarValue(playerid, breakcuffs[playerid])+0.25);
  14751. SetPlayerProgressBarValue(breakingpcuffs[playerid], breakcuffs[breakingpcuffs[playerid]], GetPlayerProgressBarValue(playerid, breakcuffs[breakingpcuffs[playerid]])+0.2);
  14752. if(GetPlayerProgressBarValue(playerid, breakcuffs[playerid]) == 100)
  14753. {
  14754. setPlayerUncuffed(breakingpcuffs[playerid]);
  14755. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You successfully broke that player's cuffs.");
  14756. SendClientMessage(breakingpcuffs[playerid], COLOR_LIGHTBLUE, "Your cuffs were broken by another player.");
  14757. HidePlayerProgressBar(playerid, breakcuffs[playerid]);
  14758. HidePlayerProgressBar(breakingpcuffs[playerid], breakcuffs[breakingpcuffs[playerid]]);
  14759. format(str, sizeof(str), "* %s's cuffs were broken.", PlayerICName(breakingpcuffs[playerid]));
  14760. ProxDetector(30, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14761. breakingpcuffs[playerid] = INVALID_PLAYER_ID;
  14762. isbreakingcuffs[playerid] = false;
  14763. PlayerInfo[playerid][pScrew] --;
  14764. }
  14765. }
  14766. }
  14767. }
  14768. if(PRESSED(KEY_AIM))
  14769. {
  14770. if(playerHoldingTazer[playerid] == 2)
  14771. {
  14772. if(TazerTime[playerid] == 1)
  14773. {
  14774. SendClientMessage(playerid, COLOR_GREY, "Please wait while your tazer recharges.");
  14775. return 1;
  14776. }
  14777. if(PlayerTazed[playerid] > 0)
  14778. {
  14779. SendClientMessage(playerid, COLOR_GREY, "You can't taze while you're tazed.");
  14780. return 1;
  14781. }
  14782. if(GetPlayerAnimationIndex(playerid) == 1130)
  14783. {
  14784. SendClientMessage(playerid, COLOR_GREY, "You can't taze while falling.");
  14785. return 1;
  14786. }
  14787. new Float:x, Float:y, Float:z, Float:a;
  14788. GetPlayerPos(playerid, x, y, z);
  14789. GetPlayerFacingAngle(playerid, a);
  14790. x = x + 2 * floatsin(-a, degrees);
  14791. y = y + 2 * floatcos(-a, degrees);
  14792. ApplyAnimationEx(playerid, "KNIFE", "knife_3", 4.1, 0, 1, 1, 0, 0);
  14793. new suspect = GetClosestPlayer(playerid);
  14794. if(IsPlayerConnected(suspect))
  14795. {
  14796. if(IsPlayerNPC(suspect)) return 1;
  14797. if(IsPlayerInRangeOfPoint(suspect, 2.5, x, y, z))
  14798. {
  14799. if(IsPlayerInAnyVehicle(suspect))
  14800. {
  14801. SendClientMessage(playerid, COLOR_GREY, "Suspect is in a car, get him out first.");
  14802. return 1;
  14803. }
  14804. if(IsPlayerNPC(suspect)) return SendClientMessage(playerid, COLOR_WHITE, "You can not taze a NPC!");
  14805. if(PlayerInfo[suspect][pAdmin] >= 2 && PlayerInfo[suspect][pStealthed] == 0) return SendClientMessage(playerid, COLOR_GREY, "You aren't able to taze an admin.");
  14806. if(PlayerTazed[suspect] > 0) return SendClientMessage(playerid, COLOR_GREY, "Suspect already tazed.");
  14807. format(str, sizeof(str), "* You were tazed by %s for 12 seconds.", PlayerICName(playerid));
  14808. SendClientMessage(suspect, COLOR_LIGHTBLUE, str);
  14809. format(str, sizeof(str), "* You tazed %s for 12 seconds.", PlayerICName(suspect));
  14810. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  14811. format(str, sizeof(str), "* %s rushes with their tazer at %s, and tazed them.", PlayerICName(playerid), PlayerICName(suspect));
  14812. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14813. displayCenterHUDInfo(suspect, "~r~Tazed.", 8); //display for 8 seconds
  14814. setPlayerTazed(suspect);
  14815. SetTimerEx("Timer_TazerTimer", 8000, false, "i", playerid);
  14816. TazerTime[playerid] = 1;
  14817. return 1;
  14818. }
  14819. }
  14820. return 1;
  14821. }
  14822. }
  14823. if(PRESSED(KEY_SPRINT))
  14824. {
  14825. //animations
  14826. if(gPlayerUsingLoopingAnim[playerid])
  14827. {
  14828. StopLoopingAnim(playerid);
  14829. }
  14830. }
  14831. }
  14832. //using satellite
  14833. if(UsingSate[playerid] == 1)
  14834. {
  14835. if(PRESSED(KEY_FIRE))
  14836. {
  14837. if(ZOOM[playerid] == 1)
  14838. {
  14839. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  14840. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -475);
  14841. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid] -500);
  14842. ZOOM[playerid] = 2;
  14843. return 1;
  14844. }
  14845. if(ZOOM[playerid] == 2)
  14846. {
  14847. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  14848. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -450);
  14849. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid] -500);
  14850. ZOOM[playerid] = 3;
  14851. return 1;
  14852. }
  14853. if(ZOOM[playerid] == 3)
  14854. {
  14855. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  14856. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -425);
  14857. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid] -500);
  14858. ZOOM[playerid] = 4;
  14859. return 1;
  14860. }
  14861. if(ZOOM[playerid] == 4)
  14862. {
  14863. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  14864. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -400);
  14865. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid] -500);
  14866. ZOOM[playerid] = 5;
  14867. return 1;
  14868. }
  14869. if(ZOOM[playerid] == 5)
  14870. {
  14871. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  14872. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -250);
  14873. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid] -500);
  14874. ZOOM[playerid] = 1;
  14875. return 1;
  14876. }
  14877. }
  14878. }
  14879. //driving car
  14880. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  14881. {
  14882. //pressed 2
  14883. if(PRESSED(newkeys, KEY_SUBMISSION))
  14884. {
  14885. //towtruck
  14886. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
  14887. {
  14888. if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) != 0)
  14889. return SendClientMessage(playerid, COLOR_GREY, "Your tow truck must be stopped before you can attach/detatch cars.");
  14890. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  14891. {
  14892. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  14893. return 1;
  14894. }
  14895. new Float:ppX, Float:ppY, Float:ppZ;
  14896. GetPlayerPos(playerid, ppX, ppY, ppZ);
  14897. new Float:vvX, Float:vvY, Float:vvZ;
  14898. new foundveh =0;
  14899. new vehicleid =0;
  14900. while((vehicleid < MAX_VEHICLES) && (!foundveh))
  14901. {
  14902. GetVehiclePos(vehicleid, vvX, vvY, vvZ);
  14903. if((floatabs(ppX -vvX) < 7.0) && (floatabs(ppY -vvY) < 7.0) && (floatabs(ppZ -vvZ) < 7.0) && (vehicleid != GetPlayerVehicleID(playerid)))
  14904. {
  14905. if(IsAPlane(vehicleid) || IsAHelicopter(vehicleid) || IsABike(vehicleid) || IsATrain(vehicleid) || IsABoat(vehicleid))
  14906. {
  14907. SendClientMessage(playerid, COLOR_GREY, "You cannot tow this vehicle.");
  14908. return 1;
  14909. }
  14910. AttachTrailerToVehicle(vehicleid, GetPlayerVehicleID(playerid));
  14911. foundveh = 1;
  14912. return 1;
  14913. }
  14914. vehicleid++;
  14915. }
  14916. if(!foundveh)
  14917. {
  14918. SendClientMessage(playerid, COLOR_GREY, "There is no car in range.");
  14919. }
  14920. }
  14921. }
  14922. if(PRESSED(newkeys, KEY_LOOK_BEHIND)) // 2 (not numpad)
  14923. {
  14924. new vehid = GetPlayerVehicleID(playerid);
  14925. if(vehid != INVALID_VEHICLE_ID)
  14926. {
  14927. if(turningengine[playerid]) return 1; // avoiding spam
  14928. new Float:vhealth;
  14929. GetVehicleHealth( vehid, vhealth );
  14930. if( vhealth < 306.0 ) {
  14931. return SendClientMessage( playerid, COLOR_GREY, "The vehicle will not start." );
  14932. }
  14933. if(IsABicycle(vehid)) return SendClientMessage(playerid, COLOR_GREY, "That vehicle doesn't have an engine.");
  14934. if(IsAPlane(vehid)) return 1;
  14935. if(Gas[vehid] < 1)
  14936. {
  14937. return SendClientMessage(playerid, COLOR_GREY, "That vehicle is out of fuel.");
  14938. }
  14939. if(Refueling[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't start your engine whilst re-fuelling.");
  14940. if(engineOn[vehid] == 0)
  14941. {
  14942. if(GetVehNeedHW(vehid, playerid))
  14943. {
  14944. return SendClientMessage(playerid, COLOR_GRAD2, "You do not have the key for this vehicle! (/(h)ot(w)ire)");
  14945. }
  14946. turningenginetimer[playerid] = SetTimerEx("Timer_EngineStart", 2500, false, "ii", playerid, vehid);
  14947. format(str, sizeof(str), "* %s turns the key in the ignition...", PlayerICName(playerid));
  14948. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14949. turningengine[playerid] = 1;
  14950. }
  14951. else
  14952. {
  14953. new engine, lights, alarm, doors, bonnet, boot, objective;
  14954. GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
  14955. SetVehicleParamsEx(vehid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
  14956. engineOn[vehid] = 0;
  14957. playerDisabledEngine[vehid] = 1;
  14958. format(str, sizeof(str), "* %s has turned their engine off.", PlayerICName(playerid));
  14959. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  14960. }
  14961. }
  14962. }
  14963. }
  14964. //================================
  14965. if( newkeys & KEY_FIRE ) { //soda system/soda machines
  14966. for( new i; i < sizeof( SodaMachines ); i++ ) {
  14967. if( IsPlayerInRangeOfPoint( playerid, 2.0, SodaMachines[i][sMachineX], SodaMachines[i][sMachineY], SodaMachines[i][sMachineZ] ) ) {
  14968. if( PlayerInfo[playerid][pCash] - 50 >= 0 ) {
  14969. GivePlayerMoney( playerid, -50 );
  14970. SetPlayerSpecialAction( playerid, SPECIAL_ACTION_DRINK_SPRUNK );
  14971. }
  14972. }
  14973. }
  14974. return 1;
  14975. }
  14976. if(PRESSED(KEY_YES)){
  14977. Create3DTextLabel("{F09186}\nPress Y to buy guns.", 0x008080FF, 2441.88, -1964.44, 13.54, 40.0, 0, 1); //emmet
  14978. if(IsPlayerInRangeOfPoint(playerid, 3.0, 2441.7942, -1964.3752, 13.5469)){
  14979. if(PlayerInfo[playerid][pConnectTime] < 3) return SendClientMessage(playerid, COLOR_GREY, "You must play for at least 3 playing hours to buy weapons from emmet.");
  14980. ShowPlayerDialog(playerid, DIALOG_BUYGUN, DIALOG_STYLE_TABLIST_HEADERS, "Please select a weapon to buy", "Weapon Name\tPrice\n{F09186}MP5\t$5,000\n{F09186}Shotgun\t$4,000\n{F09186}AK-47\t$100,000\n{F09186}Rifle\t$20,000", "Buy", "Cancel");
  14981. }
  14982. else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1827.29, -1379.31, 14.42)){
  14983. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  14984. viewingGuide[playerid] = 1;
  14985. Create3DTextLabel("{F09186}\nPress Y for a guide.", 0x008080FF, 1827.29, -1379.31, 14.42, 40.0, 0, 1); //guide bot
  14986. }
  14987. }
  14988. return 1;
  14989. }
  14990. Timer:EngineStart(playerid, vehicle)
  14991. {
  14992. new str[128];
  14993. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  14994. {
  14995. SendClientMessage(playerid, COLOR_GREY, "You are not a driver of a vehicle, engine start failed.");
  14996. turningengine[playerid] = 0;
  14997. return 1;
  14998. }
  14999. new engine, lights, alarm, doors, bonnet, boot, objective;
  15000. GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
  15001. SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
  15002. engineOn[vehicle] = 1;
  15003. playerDisabledEngine[vehicle] = 0;
  15004. format(str, sizeof(str), "* %s has turned their engine on.", PlayerICName(playerid));
  15005. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  15006. turningengine[playerid] = 0;
  15007. return 1;
  15008. }
  15009. //==============================================================================
  15010. public PickUpPickup(playerid, pickupid)
  15011. {
  15012. new str[128];
  15013. if(pickupid == iGuide)
  15014. {
  15015. if(!viewingGuide[playerid])
  15016. {
  15017. ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
  15018. viewingGuide[playerid] = 1;
  15019. }
  15020. return 1;
  15021. }
  15022. if(pickupid == para)
  15023. {
  15024. GivePlayerGun(playerid, 46);
  15025. return 1;
  15026. }
  15027. if(pickupid == poolcue)
  15028. {
  15029. GivePlayerGun(playerid, 7);
  15030. return 1;
  15031. }
  15032. if(pickupid == dildo)
  15033. {
  15034. GivePlayerGun(playerid, 10);
  15035. return 1;
  15036. }
  15037. if(pickupid == iDrughouse)
  15038. {
  15039. format(str, sizeof(str), "~w~Type /getseeds to purchase some ~n~~r~Pot Seeds~n~~y~Available:~w~ %d", dhstock);
  15040. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  15041. return 1;
  15042. }
  15043. if(pickupid == iSprunk)
  15044. {
  15045. displayCenterHUDInfo(playerid, "~w~Sprunk Factory", 8); //display for 8 seconds
  15046. return 1;
  15047. }
  15048. if(pickupid == iMget1)
  15049. {
  15050. if(Packages[playerid] == 0)
  15051. {
  15052. displayCenterHUDInfo(playerid, "~b~Materials Factory~n~~w~ Type ~r~/getmats~w~ to get ~y~packages", 8); //display for 8 seconds
  15053. }
  15054. return 1;
  15055. }
  15056. if(pickupid == iMget2)
  15057. {
  15058. if(Packages[playerid] == 0)
  15059. {
  15060. displayCenterHUDInfo(playerid, "~b~Materials Factory~n~~w~ Type ~r~/getmats~w~ to get ~y~packages", 8); //display for 8 seconds
  15061. }
  15062. return 1;
  15063. }
  15064. if(pickupid == iCrateGet)
  15065. {
  15066. if(Crates[playerid] == 0)
  15067. {
  15068. displayCenterHUDInfo(playerid, "~b~Drug Factory~n~~w~ Type ~r~/getcrate~w~ to get a ~y~drug crate", 8); //display for 8 seconds
  15069. }
  15070. return 1;
  15071. }
  15072. if(pickupid == iClothes)
  15073. {
  15074. if(PlayerInfo[playerid][pClothes] != 0)
  15075. {
  15076. displayCenterHUDInfo(playerid, "~w~Type ~r~/change~w~ to change back into ~n~~y~Clothes", 8); //display for 8 seconds
  15077. }
  15078. else
  15079. {
  15080. displayCenterHUDInfo(playerid, "~w~Type ~r~/change~w~ to change into a ~n~~y~Karate Uniform", 8); //display for 8 seconds
  15081. }
  15082. return 1;
  15083. }
  15084. if(pickupid == iTraining)
  15085. {
  15086. displayCenterHUDInfo(playerid, "~w~Type ~r~/train~w~ to learn ~n~~y~Martial Arts", 8); //display for 8 seconds
  15087. return 1;
  15088. }
  15089. if(pickupid == clubFunds) //robert henderson + rob joseph
  15090. {
  15091. displayCenterHUDInfo(playerid, "~w~Type ~r~/withdrawfunds~w~ to withdraw money from the ~n~~y~Club Till", 8); //display for 8 seconds
  15092. return 1;
  15093. }
  15094. if(pickupid == iBM)
  15095. {
  15096. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15097. return 1;
  15098. }
  15099. if(pickupid == iTikiEntrance)
  15100. {
  15101. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15102. return 1;
  15103. }
  15104. if(pickupid == iVIP)
  15105. {
  15106. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15107. return 1;
  15108. }
  15109. if(pickupid == iChurch)
  15110. {
  15111. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15112. return 1;
  15113. }
  15114. if(pickupid == iTiki) // Tiki
  15115. {
  15116. displayCenterHUDInfo(playerid, "~w~Type ~r~/exchange~w~ to trade your tikis for ~n~~y~Rewards", 8); //display for 8 seconds
  15117. return 1;
  15118. }
  15119. if(pickupid == iDrugfactory)
  15120. {
  15121. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15122. return 1;
  15123. }
  15124. if(pickupid == iArrest1 || pickupid == iArrest2 || pickupid == iArrest3)
  15125. {
  15126. if(IsACop(playerid))
  15127. {
  15128. displayCenterHUDInfo(playerid, "~w~Type ~r~/arrest~w~ to jail the ~n~~y~suspect", 8); //display for 8 seconds
  15129. }
  15130. return 1;
  15131. }
  15132. if(pickupid == iDeliver)
  15133. {
  15134. if(IsANG(playerid) || IsACop(playerid))
  15135. {
  15136. displayCenterHUDInfo(playerid, "~w~Type ~r~/deliver~w~ to send the suspect to ~n~~b~San Andreas Correctional Facility", 8); //display for 8 seconds
  15137. }
  15138. return 1;
  15139. }
  15140. if(pickupid == iDeliver2)
  15141. {
  15142. if(IsANG(playerid) || IsACop(playerid))
  15143. {
  15144. displayCenterHUDInfo(playerid, "~w~Type ~r~/arrest~w~ to send the suspect to ~n~~b~The County Jail", 8); //display for 8 seconds
  15145. }
  15146. return 1;
  15147. }
  15148. if(pickupid == iPaintball)
  15149. {
  15150. displayCenterHUDInfo(playerid, "~b~Paintball Arena~n~~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15151. return 1;
  15152. }
  15153. if(pickupid == iDetective)
  15154. {
  15155. displayCenterHUDInfo(playerid, "~y~Detective~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15156. return 1;
  15157. }
  15158. if(pickupid == iLawyer)
  15159. {
  15160. displayCenterHUDInfo(playerid, "~y~Lawyer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15161. return 1;
  15162. }
  15163. if(pickupid == iDealer)
  15164. {
  15165. displayCenterHUDInfo(playerid, "~y~Drug Dealer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15166. return 1;
  15167. }
  15168. if(pickupid == iMechanic)
  15169. {
  15170. displayCenterHUDInfo(playerid, "~y~Mechanic~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15171. return 1;
  15172. }
  15173. if(pickupid == iGarbageman)
  15174. {
  15175. displayCenterHUDInfo(playerid, "~y~Waste Collector~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15176. return 1;
  15177. }
  15178. if(pickupid == iProductDealer)
  15179. {
  15180. displayCenterHUDInfo(playerid, "~y~Product Dealer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15181. return 1;
  15182. }
  15183. if(pickupid == iBodyguard)
  15184. {
  15185. displayCenterHUDInfo(playerid, "~y~Bodyguard~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15186. return 1;
  15187. }
  15188. if(pickupid == iArms)
  15189. {
  15190. displayCenterHUDInfo(playerid, "~y~Arms Dealer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15191. return 1;
  15192. }
  15193. if(pickupid == iArms2)
  15194. {
  15195. displayCenterHUDInfo(playerid, "~y~Arms Dealer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15196. return 1;
  15197. }
  15198. if(pickupid == iBoxer)
  15199. {
  15200. displayCenterHUDInfo(playerid, "~y~Boxer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15201. return 1;
  15202. }
  15203. if(pickupid == iTaxi || pickupid == iTaxi1)
  15204. {
  15205. displayCenterHUDInfo(playerid, "~y~Taxi Driver~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15206. return 1;
  15207. }
  15208. if(pickupid == iSmuggler)
  15209. {
  15210. displayCenterHUDInfo(playerid, "~y~Drug Smuggler~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15211. return 1;
  15212. }
  15213. if(pickupid == iMiner)
  15214. {
  15215. displayCenterHUDInfo(playerid, "~y~Miner~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15216. return 1;
  15217. }
  15218. if(pickupid == iProduct)
  15219. {
  15220. displayCenterHUDInfo(playerid, "~b~Discount Warehouse~n~~w~Type ~r~/buyproducts~w~ to buy ~n~~y~Products", 8); //display for 8 seconds
  15221. return 1;
  15222. }
  15223. if(pickupid == iPizza)
  15224. {
  15225. displayCenterHUDInfo(playerid, "~y~Pizza Delivery~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15226. return 1;
  15227. }
  15228. if(pickupid == iFarmer)
  15229. {
  15230. displayCenterHUDInfo(playerid, "~y~Farmer~w~ job~n~Type ~r~/getjob~w~ if you wish to become one", 8); //display for 8 seconds
  15231. return 1;
  15232. }
  15233. for(new i = 0; i < sizeof(EntranceRef); i++)
  15234. {
  15235. if(
  15236. IsPlayerInRangeOfPoint(playerid, 2, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z])
  15237. &&
  15238. GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w]
  15239. )
  15240. {
  15241. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15242. return 1;
  15243. }
  15244. }
  15245. for(new b = 0; b < sizeof(BizInfo); b++)
  15246. {
  15247. if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[b][bOutsideX], BizInfo[b][bOutsideY], BizInfo[b][bOutsideZ]))
  15248. {
  15249. if(BizInfo[b][bSeized]) {
  15250. displayCenterHUDInfo(playerid, "~w~This business has been ~r~seized", 8);
  15251. }
  15252. else displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15253. return 1;
  15254. }
  15255. }
  15256. for(new h = 0; h < sizeof(HouseInfo); h++)
  15257. {
  15258. if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[h][hOutsideX], HouseInfo[h][hOutsideY], HouseInfo[h][hOutsideZ]))
  15259. {
  15260. displayCenterHUDInfo(playerid, "~w~Type ~r~/enter~w~ to go inside", 8); //display for 8 seconds
  15261. return 1;
  15262. }
  15263. }
  15264. for(new i = 0; i < sizeof(TikiInfo); i++)
  15265. {
  15266. if(pickupid == TikiInfo[i][tPickup]) // Tiki
  15267. {
  15268. if(IsPlayerInRangeOfPoint(playerid, 5.0, TikiInfo[i][tX], TikiInfo[i][tY], TikiInfo[i][tZ]))
  15269. {
  15270. if(TikiInfo[i][tCreated] == 1)
  15271. {
  15272. new tikis = PlayerInfo[playerid][pTikis];
  15273. new Float:plax, Float:play, Float:plaz;
  15274. new location[MAX_ZONE_NAME];
  15275. PlayerInfo[playerid][pTikis]++;
  15276. format(str, sizeof(str), "~g~You have %d tikis.", tikis +1);
  15277. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  15278. GetPlayerPos(playerid, plax, play, plaz);
  15279. PlayerPlaySound(playerid, 1056, plax, play, plaz);
  15280. DestroyDynamicPickup(TikiInfo[i][tPickup]);
  15281. TikiInfo[i][tCreated] =0;
  15282. GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
  15283. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has picked up a tiki in %s.", PlayerOOCName(playerid), location);
  15284. ABroadCast(COLOR_WHITE, str, 1);
  15285. return 1;
  15286. }
  15287. }
  15288. }
  15289. }
  15290. for(new h = 0; h < sizeof(FamilyInfo); h++)
  15291. {
  15292. if(pickupid == FamilyInfo[h][PickupID])
  15293. {
  15294. if(FamilyInfo[h][FamilySafe] == 1)
  15295. {
  15296. displayCenterHUDInfo(playerid, "~b~Gang Safe~n~~w~Type ~r~/fsafe~w~ to store Items", 8); //display for 8 seconds
  15297. }
  15298. return 1;
  15299. }
  15300. }
  15301. return 1;
  15302. }
  15303. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  15304. {
  15305. PickUpPickup(playerid, pickupid);
  15306. return 1;
  15307. }
  15308. //==============================================================================
  15309. public OnVehicleSpawn(vehicleid)
  15310. {
  15311. OnDroneRespawn(vehicleid);
  15312. reattachRailsForSpecOps(vehicleid); //if a spec op vehicle, will attach rails
  15313. if(vehicleid == combvehid) {
  15314. CreateBladesForCombine(vehicleid);
  15315. }
  15316. if(IsValidDynamicObject(SirenObject[vehicleid]))
  15317. {
  15318. if(SirenObject[vehicleid]) { DestroyDynamicObjectEx(SirenObject[vehicleid]); }
  15319. Siren[vehicleid] = 0;
  15320. SirenObject[vehicleid] = 0;
  15321. }
  15322. if(IsValidDynamicObject(Neon[vehicleid]))
  15323. {
  15324. if(Neon[vehicleid]) { DestroyDynamicObjectEx(Neon[vehicleid]); }
  15325. Neon[vehicleid] = 0;
  15326. }
  15327. if(IsValidDynamicObject(Neon2[vehicleid]))
  15328. {
  15329. if(Neon2[vehicleid]) { DestroyDynamicObjectEx(Neon2[vehicleid]);}
  15330. Neon2[vehicleid] = 0;
  15331. }
  15332. if(IsValidDynamicObject(Neon3[vehicleid]))
  15333. {
  15334. if(Neon3[vehicleid]) { DestroyDynamicObjectEx(Neon3[vehicleid]); }
  15335. Neon3[vehicleid] = 0;
  15336. }
  15337. if(IsValidDynamicObject(Neon4[vehicleid]))
  15338. {
  15339. if(Neon4[vehicleid]) { DestroyDynamicObjectEx(Neon4[vehicleid]); }
  15340. Neon4[vehicleid] = 0;
  15341. }
  15342. if(IsValidDynamicObject(TaxiSign[vehicleid]))
  15343. {
  15344. if(TaxiSign[vehicleid]) { DestroyDynamicObjectEx(TaxiSign[vehicleid]); }
  15345. TaxiSign[vehicleid] = 0;
  15346. }
  15347. // Set the engine states to on if bike, else off
  15348. if( IsABicycle( vehicleid ) ) {
  15349. SetVehicleEngineState( vehicleid, 1 );
  15350. }
  15351. else {
  15352. SetVehicleEngineState( vehicleid, 0 );
  15353. }
  15354. windowsDown[vehicleid] = false;
  15355. SetVehicleParamsCarWindows(vehicleid, 1, 1, 1, 1);
  15356. lightsOff[vehicleid] = 0;
  15357. hoodOpen[vehicleid] = 0;
  15358. trunkOpen[vehicleid] = 0;
  15359. Gas[vehicleid] = 100; //refuel car
  15360. playerDisabledEngine[vehicleid] = 0;
  15361. // SetTimerEx("StartCar",2000,0,"d",vehicleid); //2 seconds
  15362. if(gDestroyVehicle[vehicleid]) // if vehicle id is marked for deletion
  15363. {
  15364. foreach( new i: Player )
  15365. {
  15366. if(IsPlayerInVehicle(i, vehicleid))
  15367. {
  15368. RemovePlayerFromVehicle(i); // remove from vehicle
  15369. }
  15370. }
  15371. SetVehicleVirtualWorld(vehicleid, 255); // set vehicle to unused vw to prevent players from using it
  15372. SetTimerEx("Timer_KillCar", 10000, 0, "d", vehicleid);
  15373. for(new i = 0; i < sizeof(CreatedCars); i++)
  15374. {
  15375. if(CreatedCars[i] == vehicleid)
  15376. {
  15377. CreatedCars[i] = INVALID_VEHICLE_ID;
  15378. break;
  15379. }
  15380. }
  15381. }
  15382. new const charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  15383. new stringplate[8];
  15384. for(new i = 0; i < 6; i++)
  15385. {
  15386. stringplate[i] = charset[random(sizeof(charset) - 1)];
  15387. }
  15388. SetVehicleNumberPlate(vehicleid, stringplate);
  15389. if(sVehicleInfo[vehicleid][v_faction] == 6 && GetVehicleModel(sVehicleInfo[vehicleid][v_id]) == 409)
  15390. {
  15391. SetVehicleHealth(vehicleid, 10000);
  15392. }
  15393. switch(GetVehicleModel(vehicleid)){
  15394. case 427, 432, 601:SetVehicleHealth(vehicleid, 10000); //Enforcer, Tank, Splashy
  15395. case 470, 596, 598:SetVehicleHealth(vehicleid, 1350); //Humvee, SAPD-Cruisers
  15396. case 528:SetVehicleHealth(vehicleid, 1500); //Smaller SWAT Van
  15397. case 433: SetVehicleHealth(vehicleid, 5000); // Barracks
  15398. case 425, 548, 520: SetVehicleHealth(vehicleid, 2500); // Hunter, Cargobob, Hydra
  15399. }
  15400. return 1;
  15401. }
  15402. //==============================================================================
  15403. public OnVehicleStreamIn(vehicleid, forplayerid)
  15404. {
  15405. for(new i = 0; i < 14; i++)
  15406. {
  15407. if(!islegalcarmod(vehicleid, GetVehicleComponentInSlot(vehicleid, i)))
  15408. {
  15409. RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i));
  15410. }
  15411. }
  15412. if(gCarLock[vehicleid] == 1) LockCar(vehicleid); //locked
  15413. else UnLockCar(vehicleid);
  15414. return 1;
  15415. }
  15416. //==============================================================================
  15417. public OnVehicleDeath(vehicleid)
  15418. {
  15419. new str[128];
  15420. //planebomb warnings
  15421. if(IsAPlane(vehicleid) || IsAHelicopter(vehicleid))
  15422. {
  15423. new Float:vpX, Float:vpY, Float:vpZ;
  15424. GetVehiclePos(vehicleid, vpX, vpY, vpZ);
  15425. if(IsPointInRangeOfPoint(vpX, vpY, vpZ, 2231.0598, -1720.1702, 22.8527, 120)) //gym
  15426. {
  15427. foreach( new i: Player )
  15428. {
  15429. if(gLastCar[i] == vehicleid)
  15430. {
  15431. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has just planebombed The Gym.", PlayerICName(i), i);
  15432. ABroadCast(COLOR_WHITE, str, 1);
  15433. break;
  15434. }
  15435. }
  15436. }
  15437. else if(IsPointInRangeOfPoint(vpX, vpY, vpZ, 2492.9775, -1666.1045, 13.3438, 120))
  15438. {
  15439. foreach( new i: Player )
  15440. {
  15441. if(gLastCar[i] == vehicleid)
  15442. {
  15443. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has just planebombed Grove Street.", PlayerICName(i), i);
  15444. ABroadCast(COLOR_WHITE, str, 1);
  15445. break;
  15446. }
  15447. }
  15448. }
  15449. }
  15450. //OnDroneDeath(vehicleid);
  15451. if(Siren[vehicleid] == 1)
  15452. {
  15453. if(SirenObject[vehicleid]) { DestroyDynamicObjectEx(SirenObject[vehicleid]); }
  15454. Siren[vehicleid] = 0;
  15455. SirenObject[vehicleid] = 0;
  15456. }
  15457. if(Taxi[vehicleid] == 1)
  15458. {
  15459. if(TaxiSign[vehicleid]) { DestroyDynamicObjectEx(TaxiSign[vehicleid]); }
  15460. Taxi[vehicleid] = 0;
  15461. TaxiSign[vehicleid] = 0;
  15462. }
  15463. if(GetVehicleModel(vehicleid) == 519 || GetVehicleModel(vehicleid) == 592 || GetVehicleModel(vehicleid) == 553)
  15464. {
  15465. foreach( new i: Player )
  15466. {
  15467. if(GetPlayerVirtualWorld(i) == vehicleid)
  15468. {
  15469. new Float:px, Float:py, Float:pz;
  15470. GetPlayerPos(i, px, py, pz);
  15471. SendClientMessage(i, COLOR_RED, "The plane has exploded.");
  15472. CreateExplosion(px, py, pz, 6, 10.0);
  15473. SetPlayerHealth(i, 0);
  15474. }
  15475. }
  15476. }
  15477. removeRailsForSpecOps(vehicleid); //this will search if the vehicle is a spec ops, if it is it deletes the objects
  15478. if(vehicleid == combvehid) { if(IsValidObject(combobjid)) { DestroyObject(combobjid); combobjid = 0; } }
  15479. //combine
  15480. TrunkInfo[vehicleid][cFoodtray] = 0;
  15481. if(IsValidDynamicObject(Neon[vehicleid]))
  15482. {
  15483. if(Neon[vehicleid]) { DestroyDynamicObjectEx(Neon[vehicleid]); }
  15484. Neon[vehicleid] = 0;
  15485. }
  15486. if(IsValidDynamicObject(Neon2[vehicleid]))
  15487. {
  15488. if(Neon2[vehicleid]) { DestroyDynamicObjectEx(Neon2[vehicleid]); }
  15489. Neon2[vehicleid] = 0;
  15490. }
  15491. if(IsValidDynamicObject(Neon3[vehicleid]))
  15492. {
  15493. if(Neon3[vehicleid]) { DestroyDynamicObjectEx(Neon3[vehicleid]); }
  15494. Neon3[vehicleid] = 0;
  15495. }
  15496. if(IsValidDynamicObject(Neon4[vehicleid]))
  15497. {
  15498. if(Neon4[vehicleid]) { DestroyDynamicObjectEx(Neon4[vehicleid]); }
  15499. Neon4[vehicleid] = 0;
  15500. }
  15501. return 1;
  15502. }
  15503. //==============================================================================
  15504. public DisplayDialogForPlayer(playerid, dialogid)
  15505. {
  15506. new str[128];
  15507. new mstring[1500], titlestring[32], line1[512], line2[512], line3[256];
  15508. new bizid = GetPlayerVirtualWorld(playerid);
  15509. new bizname[128];
  15510. if(bizid < MAX_BIZ && bizid >= 0)
  15511. {
  15512. format(bizname, sizeof(bizname), "%s", BizInfo[bizid][bName]);
  15513. }
  15514. switch(dialogid)
  15515. {
  15516. case 47:
  15517. ShowPlayerDialog(playerid, 47, DIALOG_STYLE_LIST, "Stat Refund", "Level\nCash\nBank\nMaterials\nArms Dealer Skill\nCarjacker Skill\nDetective Skill\nLawyer Skill\nMechanic Skill\nDrug Dealer Skill\nSex Skill\nBoxing Skill\nFishing Skill\nPizza Skill", "Proceed", "Cancel");
  15518. case 69:
  15519. {
  15520. ShowPlayerDialog(playerid, 69, DIALOG_STYLE_INPUT, "San Andreas Police Department", "Please enter the password:", "Accept", "Cancel");
  15521. }
  15522. case 70:
  15523. {
  15524. //burgershot
  15525. new title[64];
  15526. format(title, sizeof(title), "%s", bizname);
  15527. if(strlen(bizname) > 0)
  15528. {
  15529. ShowPlayerDialog(playerid, 70, DIALOG_STYLE_INPUT, title, "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Koolaid\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Meat Stack Meal\t$25\n{AFAFAF}4: Beef Tower Meal\t$15\n5: Moo Kids Meal\t$10\n6: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15530. }
  15531. else
  15532. {
  15533. ShowPlayerDialog(playerid, 70, DIALOG_STYLE_INPUT, "Burger Shot", "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Koolaid\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Meat Stack Meal\t$25\n{AFAFAF}4: Beef Tower Meal\t$15\n5: Moo Kids Meal\t$10\n6: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15534. }
  15535. }
  15536. case 71:
  15537. {
  15538. new title[64];
  15539. format(title, sizeof(title), "%s", bizname);
  15540. if(strlen(bizname) > 0)
  15541. {
  15542. ShowPlayerDialog(playerid, 71, DIALOG_STYLE_INPUT, title, "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Koolaid\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Cluckin' Huge Meal\t$25\n{AFAFAF}4: Cluckin' Big Meal\t$15\n5: Cluckin' Little Meal\t$10\n6: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15543. }
  15544. else
  15545. {
  15546. ShowPlayerDialog(playerid, 71, DIALOG_STYLE_INPUT, "Cluckin' Bell", "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Koolaid\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Cluckin' Huge Meal\t$25\n{AFAFAF}4: Cluckin' Big Meal\t$15\n5: Cluckin' Little Meal\t$10\n6: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15547. }
  15548. }
  15549. case 72:
  15550. {
  15551. new title[64];
  15552. format(title, sizeof(title), "%s", bizname);
  15553. if(strlen(bizname) > 0)
  15554. {
  15555. ShowPlayerDialog(playerid, 72, DIALOG_STYLE_INPUT, title, "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Lemonade\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Pizza Take Out\t$100\n{AFAFAF}4: Full Rack\t\t$20\n5: Double D-Luxe\t$15\n6: Buster\t\t$10\n7: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15556. }
  15557. else
  15558. {
  15559. ShowPlayerDialog(playerid, 72, DIALOG_STYLE_INPUT, "The Well Stacked Pizza Co.", "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Lemonade\t\t$1\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Pizza Take Out\t$25\n{AFAFAF}4: Full Rack\t$15\n5: Double D-Luxe\t$10\n6: Buster\t\t$8\n7: Salad Meal\t\t$8{A9C4E4}", "Purchase", "Cancel");
  15560. }
  15561. }
  15562. case 73:
  15563. {
  15564. ShowPlayerDialog(playerid, 73, DIALOG_STYLE_MSGBOX, "Product Dealer", "Information:\n\nThis job can be used to sell products to business owners.\nThis job can be very profitable.\nThis is a legal job, meaning you won't get in trouble for dealing products.", "Next", "Cancel");
  15565. }
  15566. case 74:
  15567. {
  15568. ShowPlayerDialog(playerid, 74, DIALOG_STYLE_MSGBOX, "Product Dealer", "Notes: There is no reload time for buying/selling products.\nThere are no skill levels for this job, in other words, you don't have to level it up.", "Next", "Cancel");
  15569. }
  15570. case 75:
  15571. {
  15572. ShowPlayerDialog(playerid, 75, DIALOG_STYLE_MSGBOX, "Product Dealer", "Commands:\n\n/sellproducts\n/buyproducts\n\nLocation of Job: This job can be obtained north-east of newbie spawn.", "Done", "Cancel");
  15573. }
  15574. case 76:
  15575. {
  15576. new diaTitle[60];
  15577. format(diaTitle, sizeof(diaTitle), "Sex Shop");
  15578. if(strlen(bizname)) format(diaTitle, sizeof(diaTitle), "%s", bizname);
  15579. ShowPlayerDialog(playerid, 76, DIALOG_STYLE_TABLIST_HEADERS, diaTitle,
  15580. "Item\tPrice\n\
  15581. Nitestick\t$7000\n\
  15582. Condom\t$25\n\
  15583. Purple Dildo\t$1000\n\
  15584. Vibrator\t$3000\n\
  15585. Small White Vibrator\t$5000\n\
  15586. Large White Vibrator\t$7500\n\
  15587. Camera\t$10000\n\
  15588. Gag\t$15000",
  15589. "Buy", "Cancel");
  15590. }
  15591. case 77:
  15592. {
  15593. new biz = GetPlayerVirtualWorld(playerid);
  15594. format(str, sizeof(str), "%s", BizInfo[biz][bName]);
  15595. ShowPlayerDialog(playerid, 77, DIALOG_STYLE_INPUT, str, "Type the skin ID you want below (costs $500):", "Buy", "Cancel");
  15596. }
  15597. case 78:
  15598. {
  15599. ShowPlayerDialog(playerid, 78, DIALOG_STYLE_PASSWORD, "Admin Login", "{FFFFFF}Please provide your security code for your admin account to be authorized.\n\nPlease enter your security code below:", "Login", "Quit");
  15600. }
  15601. case 99:
  15602. {
  15603. ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "Silver Blackmarket", "Deagle $15,000\n", "Purchase", "Cancel");
  15604. }
  15605. case 100:
  15606. {
  15607. ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Gold Blackmarket", "Deagle $12,000\nKnife $500,000", "Purchase", "Cancel");
  15608. }
  15609. case 102: // Fishing Store
  15610. {
  15611. ShowPlayerDialog(playerid, 102, DIALOG_STYLE_LIST, "Fishing Store", "Fishing Rods\nFishing Bait\nFishing Line", "Select", "Cancel");
  15612. }
  15613. case 103: // Fishing Rods
  15614. {
  15615. ShowPlayerDialog(playerid, 103, DIALOG_STYLE_LIST, "Fishing Rods", "Old Rod $200\nBeginners Rod $1,000\nFisherman's Rod $5,000\nElite Rod $15,000", "Select", "Cancel");
  15616. }
  15617. case 104: // Fishing Bait
  15618. {
  15619. ShowPlayerDialog(playerid, 104, DIALOG_STYLE_LIST, "Fishing Bait", "Weak Bait $150\nRegular Bait $500\nStrong Bait $1,500\nElite Bait $2,500", "Select", "Cancel");
  15620. }
  15621. case 105: // Fishing Lines
  15622. {
  15623. ShowPlayerDialog(playerid, 105, DIALOG_STYLE_LIST, "Fishing Lines", "Fishing Line $1,000", "Select", "Cancel");
  15624. }
  15625. case 106:
  15626. {
  15627. format(titlestring, sizeof(titlestring), "Fishing:");
  15628. format(line1, sizeof(line1), "{007BD0}Information:\n{B4B5B7}You can fish at the Los Santos Fishing Pier(anchor blip)/Blueberry Docks/Pier\nYou will need a fishing rod, and a fishing line.\nYou can get these goods from inside the fishing shop on the pier.\nBait is very helpful so you should buy some of that too.\n\n");
  15629. format(line2, sizeof(line2), "{B4B5B7}When you are ready to fish, type /userod, this will take out your fishing rod.\nYou can toss the line out to sea by using the 'AIM' button (often RMB)\nIf a fish gets caught on your line a blue bar will appear\nYou can use the space key to reel in the fish\nYou must keep the blue bar from going too high (snapping) and going too low (losing fish).\n\n");
  15630. format(line3, sizeof(line3), "{B4B5B7}You can sell these fish at a 24/7 if they are over 20lb's in weight.\nIf you can't catch fish that are over 20lb's, try buying some bait.\nIf you have any more questions, use /newb(ie) chat)");
  15631. format(mstring, sizeof(mstring), "%s\n%s\n%s", line1, line2, line3);
  15632. ShowPlayerDialog(playerid, 106, DIALOG_STYLE_MSGBOX, titlestring, mstring, "Done", "Cancel");
  15633. }
  15634. case 107:
  15635. {
  15636. new title[64];
  15637. format(title, sizeof(title), "%s", bizname);
  15638. if(strlen(bizname) > 0)
  15639. {
  15640. ShowPlayerDialog(playerid, 107, DIALOG_STYLE_INPUT, title, "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Coffee\t\t$5\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Donut Tray\t$100\n", "Purchase", "Cancel");
  15641. }
  15642. else
  15643. {
  15644. ShowPlayerDialog(playerid, 107, DIALOG_STYLE_INPUT, "Donut Store", "{FFFF91}Drinks:{A9C4E4}\n\n1: Sprunk\t\t$2\n2: Coffee\t\t$5\n\n\n{FFFF91}Food:{A9C4E4}\n\n3: Donut Tray\t$100\n", "Purchase", "Cancel");
  15645. }
  15646. }
  15647. case 108:
  15648. {
  15649. new list[128];
  15650. if(!usingRadio[playerid])
  15651. {
  15652. list = "DI.FM\nSomaFM\nETN.FM\nTalk Radio\nCustom\n";
  15653. ShowPlayerDialog(playerid, 108, DIALOG_STYLE_LIST, "Radio [off]", list, "Listen", "Cancel");
  15654. }
  15655. else
  15656. {
  15657. list = "DI.FM\nSomaFM\nETN.FM\nTalk Radio\nCustom\nTurn Off";
  15658. ShowPlayerDialog(playerid, 108, DIALOG_STYLE_LIST, "Radio [on]", list, "Listen", "Cancel");
  15659. }
  15660. }
  15661. case 109:
  15662. {
  15663. //di.fm
  15664. new list[512];
  15665. new list2[512];
  15666. list = "DI.FM - Classic Vocal Trance\nDI.FM - UK Garage\nDI.FM - Trance\nDI.FM - Vocal Trance\nDI.FM - Tech House\nDI.FM - PsyChill\nDI.FM - Chillout Dreams\nDI.FM - ClassicTrance\nDI.FM - EuroDance\nDI.FM - Club Sounds\nDI.FM - Disco House\nDI.FM - Dubstep\nDI.FM - Electro House\nDI.FM - Chillout\nDI.FM - Classic EuroDance\nDI.FM - House\nDI.FM - Soulful House\nDI.FM - Funky House\nDI.FM - Tribal House\n";
  15667. list2 = "DI.FM - Hard Dance\nDI.FM - Minimal\nDI.FM - Techno\nDI.FM - Progressive\nDI.FM - Goa-Psy Trance\nDI.FM - Hardstyle\nDI.FM - Hard Core\nDI.FM - Lounge\nDI.FM - Exposure NYC\nDI.FM - DJ Mixes\nDI.FM - Drum 'n' Bass\nDI.FM - Liquid DnB\nDI.FM - Oldschool Electronica\nDI.FM - Breaks\nDI.FM - Ambient\nDI.FM - Space Dreams\nDI.FM - Future Synthpop\nDI.FM - Oldschool House\nDI.FM - Chiptunes\nDI.FM - Gabber\nDI.FM - Latin House";
  15668. new final[1024];
  15669. format(final, sizeof(final), "%s%s", list, list2);
  15670. ShowPlayerDialog(playerid, 109, DIALOG_STYLE_LIST, "DI.FM", final, "Listen", "Back");
  15671. }
  15672. case 110:
  15673. {
  15674. //somafm
  15675. new list[512];
  15676. new list2[512];
  15677. list = "SOMAFM - Groove Salad\nSOMAFM - Drone Zone\nSOMAFM - Christmas Lounge\nSOMAFM - Lush\nSOMAFM - indie pop rocks\nSOMAFM - Space Station Soma\nSOMAFM - Secret Agent\nSOMAFM - Xmas in Frisko\nSOMAFM - Beat Blender\nSOMAFM - Suburbs of Goa\nSOMAFM - Boot Liquor\nSOMAFM - Underground 80s\nSOMAFM - PopTron!\nSOMAFM - cliqhop idm\nSOMAFM - Sonic Universe\nSOMAFM - Mission Control\n";
  15678. list2 = "SOMAFM - Digitalis\nSOMAFM - Illinois Street Lounge\nSOMAFM - Tag's Trip\nSOMAFM - Doomed\nSOMAFM - Covers\nSOMAFM - 480 Minutes\nSOMAFM - Black Rock FM\n";
  15679. new final[1024];
  15680. format(final, sizeof(final), "%s%s", list, list2);
  15681. ShowPlayerDialog(playerid, 110, DIALOG_STYLE_LIST, "SomaFM", final, "Listen", "Back");
  15682. }
  15683. case 111:
  15684. {
  15685. //etn
  15686. new list[128];
  15687. list = "ETN.FM - Trance Channel\nETN.FM - House Channel\n";
  15688. ShowPlayerDialog(playerid, 111, DIALOG_STYLE_LIST, "ETN.fm", list, "Listen", "Back");
  15689. }
  15690. case 112:
  15691. {
  15692. //talk radio
  15693. new list[128];
  15694. list = "Talk Radio - Infowars\n";
  15695. ShowPlayerDialog(playerid, 112, DIALOG_STYLE_LIST, "Talk Radio", list, "Listen", "Back");
  15696. }
  15697. case 113:
  15698. {
  15699. //custom
  15700. ShowPlayerDialog(playerid, 113, DIALOG_STYLE_INPUT, "Custom Stream", "Enter the url of the custom radio stream below ( YouTube NOT supported):\nExamples:\n{7DAEFF}http://www.radiostation.com/stream.pls{FFFFFF}", "Okay", "Back");
  15701. }
  15702. }
  15703. return 1;
  15704. }
  15705. //==============================================================================
  15706. stock IsPlayerInWater(playerid)
  15707. {
  15708. new anim = GetPlayerAnimationIndex(playerid);
  15709. if(anim >= 1538 && anim <= 1542 || anim == 1544 || anim == 1250 || anim == 1062)
  15710. {
  15711. return 1;
  15712. }
  15713. return 0;
  15714. }
  15715. public OnPlayerUpdate(playerid)
  15716. {
  15717. new iCurWeap = GetPlayerWeapon(playerid); // Return the player's current weapon
  15718. if(iCurWeap != iCurrentWeapon[playerid]) // If he changed weapons since the last update
  15719. {
  15720. OnPlayerChangeWeapon(playerid, iCurrentWeapon[playerid], iCurWeap);
  15721. iCurrentWeapon[playerid] = iCurWeap; //Update the weapon variable
  15722. }
  15723. if(plNCData[playerid][ncCameraMode] == 1)
  15724. {
  15725. new keys, ud, lr;
  15726. GetPlayerKeys(playerid, keys, ud, lr);
  15727. if(plNCData[playerid][ncMode] && (GetTickCount() - plNCData[playerid][ncLastMove] > 100))
  15728. {
  15729. MoveCamera(playerid);
  15730. }
  15731. if(plNCData[playerid][ncUDold] != ud || plNCData[playerid][ncLRold] != lr)
  15732. {
  15733. if((plNCData[playerid][ncUDold] != 0 || plNCData[playerid][ncLRold] != 0) && ud == 0 && lr == 0)
  15734. {
  15735. StopPlayerObject(playerid, plNCData[playerid][ncFlyObject]);
  15736. plNCData[playerid][ncMode] = 0;
  15737. plNCData[playerid][ncAccelMul] = 0.0;
  15738. }
  15739. else
  15740. {
  15741. plNCData[playerid][ncMode] = GetMoveDirectionFromKeys(ud, lr);
  15742. MoveCamera(playerid);
  15743. }
  15744. }
  15745. plNCData[playerid][ncUDold] = ud;
  15746. plNCData[playerid][ncLRold] = lr;
  15747. return 0;
  15748. }
  15749. pausetick[playerid] = GetTickCount();
  15750. updateFuelHUD(playerid);
  15751. //vending machine detection
  15752. if(!usingVendingMachine[playerid]) //haven't used a vending machine
  15753. {
  15754. if(GetPlayerAnimationIndex(playerid) == 1660)
  15755. {
  15756. GiveMoney(playerid, -30);
  15757. usingVendingMachine[playerid] = 1;
  15758. }
  15759. }
  15760. else
  15761. {
  15762. if(GetPlayerAnimationIndex(playerid) != 1660)
  15763. {/*
  15764. might get back to this if i want to improve the sprunk factory points, dont implement it unless you change the vars according to the new system - Desmond
  15765. give point money to the gang that owns sprunk factory
  15766. if(PointInfo[9][PointTaken] != 255) //sprunk factory
  15767. {
  15768. FamilyInfo[PointInfo[9][PointTaken]][FamilyBank] += 30;
  15769. }*/
  15770. usingVendingMachine[playerid] = 0;
  15771. }
  15772. }
  15773. /*if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
  15774. {
  15775. return cmd_afsdsw133sdghj41(playerid, "");
  15776. }
  15777. if(pDeathState[playerid] == PLAYER_STATE_NORMAL)
  15778. {
  15779. return cmd_afsdsw133sdghj42(playerid, "");
  15780. }*/
  15781. if(playerHoldingTazer[playerid] == 1)
  15782. {
  15783. if(!IsPlayerInAnyVehicle(playerid))
  15784. {
  15785. SetPlayerArmedWeapon(playerid, 23);
  15786. }
  15787. else
  15788. {
  15789. SetPlayerArmedWeapon(playerid, 0);
  15790. }
  15791. }
  15792. if(playerHoldingTazer[playerid] == 2)
  15793. {
  15794. SetPlayerArmedWeapon(playerid, 0);
  15795. }
  15796. if(PlayerHasRod[playerid] == 1)
  15797. {
  15798. SetPlayerArmedWeapon(playerid, 0);
  15799. }
  15800. /*
  15801. //anti bunnyhop
  15802. if(lastAnimIndex[playerid] == 1196 && GetPlayerAnimationIndex(playerid) == 1198) { //2nd bunnyhop
  15803. OnePlayAnim(playerid, "GYMNASIUM", "gym_jog_falloff", 4.0, 0, 1, 1, 0, 0);
  15804. }*/
  15805. lastAnimIndex[playerid] = GetPlayerAnimationIndex(playerid);
  15806. if(GetPlayerWeapon(playerid) == 27 && PlayerInfo[playerid][pAdmin] < 2 && inPaintball[playerid] < 1)
  15807. {
  15808. SetPlayerArmedWeapon(playerid, 0);
  15809. TakePlayerWeapon(playerid, 27);
  15810. SendClientMessage(playerid, COLOR_GREY, "Server has detected you using restricted weapon, it was removed [Combat-Shotgun]");
  15811. OnPlayerSave(playerid);
  15812. }
  15813. if(GetPlayerWeapon(playerid) == 37 && PlayerInfo[playerid][pAdmin] < 2)
  15814. {
  15815. SetPlayerArmedWeapon(playerid, 0);
  15816. TakePlayerWeapon(playerid, 37);
  15817. SendClientMessage(playerid, COLOR_GREY, "Server has detected you using restricted weapon, it was removed [Flame-Thrower]");
  15818. OnPlayerSave(playerid);
  15819. }
  15820. if(GetPlayerWeapon(playerid) == 16 && PlayerInfo[playerid][pAdmin] < 2)
  15821. {
  15822. SetPlayerArmedWeapon(playerid, 0);
  15823. TakePlayerWeapon(playerid, 16);
  15824. SendClientMessage(playerid, COLOR_GREY, "Server has detected you using restricted weapon, it was removed [Grenades]");
  15825. OnPlayerSave(playerid);
  15826. }
  15827. if(GetPlayerWeapon(playerid) == 18 && PlayerInfo[playerid][pAdmin] < 2)
  15828. {
  15829. SetPlayerArmedWeapon(playerid, 0);
  15830. TakePlayerWeapon(playerid, 18);
  15831. SendClientMessage(playerid, COLOR_GREY, "Server has detected you using restricted weapon, it was removed [Molotov-Cocktail]");
  15832. OnPlayerSave(playerid);
  15833. }
  15834. if(GetPlayerWeapon(playerid) == 39 && PlayerInfo[playerid][pAdmin] < 2)
  15835. {
  15836. SetPlayerArmedWeapon(playerid, 0);
  15837. TakePlayerWeapon(playerid, 39);
  15838. SendClientMessage(playerid, COLOR_GREY, "Server has detected you using restricted weapon, it was removed [Satchel Charges]");
  15839. OnPlayerSave(playerid);
  15840. }
  15841. //not in a vehicle
  15842. if(!IsPlayerInAnyVehicle(playerid))
  15843. {
  15844. new weaponid = GetPlayerWeapon(playerid);
  15845. if(weaponid != 0) //has a weapon
  15846. {
  15847. //anti nightvision
  15848. if(weaponid == 44 || weaponid == 45) //desynced nv,infared
  15849. {
  15850. new keys, updown, leftright;
  15851. GetPlayerKeys(playerid, keys, updown, leftright);
  15852. if(keys & KEY_FIRE) return 0;
  15853. }
  15854. if(CSDisable[playerid] == 0)
  15855. {
  15856. if(weaponid == 24 || weaponid == 25)
  15857. {
  15858. if(GetPlayerAnimationIndex(playerid) == 1164 || GetPlayerAnimationIndex(playerid) == 1256)
  15859. {
  15860. new keys, updown, leftright;
  15861. GetPlayerKeys(playerid, keys, updown, leftright);
  15862. if(keys == 2)
  15863. {
  15864. if(!IsAtEvent[playerid] && !inPaintball[playerid])
  15865. Timer_OnPlayerCBug(playerid, false);
  15866. }
  15867. }
  15868. }
  15869. }
  15870. }
  15871. }
  15872. //to fix players moving around while in death animation
  15873. if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
  15874. {
  15875. if(GetPlayerAnimationIndex(playerid) != 1151)
  15876. {
  15877. ApplyAnimation(playerid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  15878. }
  15879. SetPlayerArmedWeapon(playerid, 0);
  15880. }
  15881. //cuffed
  15882. if(PlayerCuffed[playerid] == 1)
  15883. {
  15884. if(!IsPlayerInAnyVehicle(playerid)) //not detained
  15885. {
  15886. if(GetPlayerAnimationIndex(playerid) != 1151)
  15887. {
  15888. // Reapply animation.
  15889. ApplyAnimationEx(playerid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  15890. }
  15891. }
  15892. }
  15893. //exploit for falling and using a cigar
  15894. if(GetPlayerAnimationIndex(playerid) == 1130) //falling
  15895. {
  15896. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
  15897. {
  15898. SetPlayerSpecialAction(playerid, 0);
  15899. }
  15900. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
  15901. {
  15902. SetPlayerSpecialAction(playerid, 0);
  15903. }
  15904. }
  15905. //OnDroneUpdate(playerid); //DoC drone
  15906. //holding a food tray
  15907. if(hasFoodTray[playerid])
  15908. {
  15909. new index = GetPlayerAnimationIndex(playerid);
  15910. if(oldindex[playerid] != index)
  15911. {
  15912. oldindex[playerid] = index;
  15913. if(IsPlayerInWater(playerid))
  15914. {
  15915. SendClientMessage(playerid, COLOR_GRAD1, "You lost your food.");
  15916. lostFoodTray(playerid);
  15917. }
  15918. else if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_CARRY)
  15919. {
  15920. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  15921. }
  15922. }
  15923. }
  15924. //prison clothes change check
  15925. //Prison system
  15926. new playerskin = GetPlayerSkin(playerid);
  15927. if(playerskin != 50)
  15928. {
  15929. if(PlayerInfo[playerid][pJailnumber] > 0)
  15930. {
  15931. PlayerInfo[playerid][pJailnumber] = 0;
  15932. UpdateDynamic3DTextLabelText(PNumber3D[playerid], COLOR_WHITE, " ");
  15933. DestroyDynamic3DTextLabel(PNumber3D[playerid]);
  15934. }
  15935. }
  15936. if(playerskin == 0 && PlayerInfo[playerid][pAdmin] < 2) //This means if a player gets CJ skin, but is not an admin lvl 2 or above it will automatically set his skin do default skin[20]
  15937. {
  15938. new str[500];
  15939. SetPlayerSkin(playerid, 20);
  15940. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s just got CJ skin, setting it back to skin ID 20!", PlayerOOCName(playerid));
  15941. ABroadCast(COLOR_WHITE, str, 1);
  15942. }
  15943. if(UsingSate[playerid] == 1)
  15944. {
  15945. new Keys, ud, lr;
  15946. GetPlayerKeys(playerid, Keys, ud, lr);
  15947. if(ud < 0) // up
  15948. {
  15949. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  15950. if(ZOOM[playerid] != 1)
  15951. {
  15952. SetPlayerPos(playerid, newsposx[playerid], newsposy[playerid] +4, newsposz[playerid]);
  15953. }
  15954. if(ZOOM[playerid] == 1)
  15955. {
  15956. SetPlayerPos(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid]);
  15957. }
  15958. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  15959. if(ZOOM[playerid] == 2)
  15960. {
  15961. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -475);
  15962. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  15963. }
  15964. else if(ZOOM[playerid] == 3)
  15965. {
  15966. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -450);
  15967. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  15968. }
  15969. else if(ZOOM[playerid] == 4)
  15970. {
  15971. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -420);
  15972. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  15973. }
  15974. else if(ZOOM[playerid] == 5)
  15975. {
  15976. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -400);
  15977. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  15978. }
  15979. else if(ZOOM[playerid] == 1)
  15980. {
  15981. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -250);
  15982. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  15983. }
  15984. }
  15985. if(ud > 0) // down
  15986. {
  15987. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  15988. if(ZOOM[playerid] != 1)
  15989. {
  15990. SetPlayerPos(playerid, newsposx[playerid], newsposy[playerid] -4, newsposz[playerid]);
  15991. }
  15992. if(ZOOM[playerid] == 1)
  15993. {
  15994. SetPlayerPos(playerid, newsposx[playerid], newsposy[playerid] -8, newsposz[playerid]);
  15995. }
  15996. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  15997. if(ZOOM[playerid] == 2)
  15998. {
  15999. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -475);
  16000. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16001. }
  16002. else if(ZOOM[playerid] == 3)
  16003. {
  16004. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -450);
  16005. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16006. }
  16007. else if(ZOOM[playerid] == 4)
  16008. {
  16009. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -420);
  16010. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16011. }
  16012. else if(ZOOM[playerid] == 5)
  16013. {
  16014. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -400);
  16015. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16016. }
  16017. else if(ZOOM[playerid] == 1)
  16018. {
  16019. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -250);
  16020. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16021. }
  16022. }
  16023. if(lr < 0) // left
  16024. {
  16025. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  16026. if(ZOOM[playerid] != 1)
  16027. {
  16028. SetPlayerPos(playerid, newsposx[playerid] -4, newsposy[playerid], newsposz[playerid]);
  16029. }
  16030. if(ZOOM[playerid] == 1)
  16031. {
  16032. SetPlayerPos(playerid, newsposx[playerid] -8, newsposy[playerid], newsposz[playerid]);
  16033. }
  16034. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  16035. if(ZOOM[playerid] == 2)
  16036. {
  16037. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -475);
  16038. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16039. }
  16040. else if(ZOOM[playerid] == 3)
  16041. {
  16042. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -450);
  16043. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16044. }
  16045. else if(ZOOM[playerid] == 4)
  16046. {
  16047. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -420);
  16048. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16049. }
  16050. else if(ZOOM[playerid] == 5)
  16051. {
  16052. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -400);
  16053. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16054. }
  16055. else if(ZOOM[playerid] == 1)
  16056. {
  16057. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -250);
  16058. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16059. }
  16060. }
  16061. if(lr > 0) // right
  16062. {
  16063. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  16064. if(ZOOM[playerid] != 1)
  16065. {
  16066. SetPlayerPos(playerid, newsposx[playerid] +4, newsposy[playerid], newsposz[playerid]);
  16067. }
  16068. if(ZOOM[playerid] == 1)
  16069. {
  16070. SetPlayerPos(playerid, newsposx[playerid] +8, newsposy[playerid], newsposz[playerid]);
  16071. }
  16072. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  16073. if(ZOOM[playerid] == 2)
  16074. {
  16075. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -475);
  16076. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16077. }
  16078. else if(ZOOM[playerid] == 3)
  16079. {
  16080. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -450);
  16081. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16082. }
  16083. else if(ZOOM[playerid] == 4)
  16084. {
  16085. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -420);
  16086. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16087. }
  16088. else if(ZOOM[playerid] == 5)
  16089. {
  16090. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -400);
  16091. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16092. }
  16093. else if(ZOOM[playerid] == 1)
  16094. {
  16095. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] -250);
  16096. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +8, newsposz[playerid] -500);
  16097. }
  16098. }
  16099. }
  16100. //reduced spikestrip limit to 8, 200 is way too laggy to be called on this function!!!
  16101. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  16102. {
  16103. new carid = GetPlayerVehicleID(playerid);
  16104. //road spikes
  16105. new panels, doors, lights, tires;
  16106. GetVehicleDamageStatus(carid, panels, doors, lights, tires);
  16107. if(tires != 15) // all 4 tires popped = 15
  16108. {
  16109. for(new i = 0; i < sizeof(SpikeInfo); i++)
  16110. {
  16111. if(SpikeInfo[i][sCreated] == 1)
  16112. {
  16113. if(IsPlayerInRangeOfPoint(playerid, 3.0, SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
  16114. {
  16115. tires = encode_tires(1, 1, 1, 1);
  16116. UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  16117. displayCenterHUDInfo(playerid, "~r~Spiked.", 8); //display for 8 seconds
  16118. break;
  16119. }
  16120. }
  16121. }
  16122. }
  16123. new Float:vhealth;
  16124. GetVehicleHealth( carid, vhealth );
  16125. if( vhealth < 300.0 ) {
  16126. if( engineOn[carid] && !IsABicycle(carid) ) {
  16127. SetVehicleEngineState( carid, 0 );
  16128. displayCenterHUDInfo( playerid, "~r~The engine cuts out", 8 );
  16129. }
  16130. else if( engineOn[carid] && IsABicycle(carid) ) {
  16131. SetVehicleEngineState( carid, 0 );
  16132. displayCenterHUDInfo( playerid, "~r~The bike's chain breaks", 8 );
  16133. }
  16134. SetVehicleHealth( carid, 305.0 );
  16135. }
  16136. }
  16137. if(IsPlayerInAnyVehicle(playerid)) // fix for hackers TPing in helicopters/planes and bypassing this check (original code is OnPlayerEnterVehicle, meant to prevent newbies from heliblading/helicrashing)
  16138. {
  16139. new vehid = GetPlayerVehicleID(playerid);
  16140. if(IsAPlane(vehid) || IsAHelicopter(vehid))
  16141. {
  16142. if(PlayerInfo[playerid][pConnectTime] < 1)
  16143. {
  16144. RemovePlayerFromVehicle(playerid);
  16145. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  16146. SendClientMessage(playerid, COLOR_GREY, "You must play for at least 1 hour before you can fly this.");
  16147. }
  16148. }
  16149. }
  16150. return 1;
  16151. }
  16152. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
  16153. {
  16154. // Check if it moved far
  16155. if(GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z) > 50)
  16156. {
  16157. // Reject the update
  16158. return 0;
  16159. }
  16160. return 1;
  16161. }
  16162. //==============================================================================
  16163. SetAllCopCheckpoint(playerid)
  16164. {
  16165. KillTimer(callCPFix[playerid]);
  16166. callCPFix[playerid] = SetTimerEx("Timer_CallerCheckpointFix", 6000, true, "i", playerid);
  16167. callCPSpot[playerid] = 1;
  16168. foreach( new i: Player )
  16169. {
  16170. if(IsPlayerConnected(i))
  16171. {
  16172. if(IsACop(i))
  16173. {
  16174. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_HELP);
  16175. }
  16176. }
  16177. }
  16178. }
  16179. Timer:CallerCheckpointFix(playerid){
  16180. callCPSpot[playerid] ++;
  16181. foreach( new i: Player )
  16182. {
  16183. if(IsPlayerConnected(i))
  16184. {
  16185. if(IsACop(i))
  16186. {
  16187. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_HELP);
  16188. }
  16189. }
  16190. }
  16191. if(callCPSpot[playerid] == 40){
  16192. KillTimer(callCPFix[playerid]);
  16193. callCPSpot[playerid] = 0;
  16194. SetPlayerColor(playerid, TCOLOR_WHITE);
  16195. }
  16196. return 1;
  16197. }
  16198. //==============================================================================
  16199. SetAllFiremanCheckpoint(playerid)
  16200. {
  16201. foreach( new i: Player )
  16202. {
  16203. if(IsPlayerConnected(i))
  16204. {
  16205. if(IsAMedic(i))
  16206. {
  16207. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_HELP);
  16208. }
  16209. }
  16210. }
  16211. }
  16212. //==============================================================================
  16213. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  16214. {
  16215. if(!(oldinteriorid == 69 || oldinteriorid == 70 || oldinteriorid == 71) && newinteriorid == 69 || newinteriorid == 70 || newinteriorid == 71)
  16216. {
  16217. //TogglePlayerControllable(playerid, false);
  16218. //LoadObjects[playerid] = 4;
  16219. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
  16220. {
  16221. Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
  16222. }
  16223. }
  16224. if(Spectated[playerid]) //play changed int while being spectated
  16225. {
  16226. foreach( new i: Player )
  16227. {
  16228. if(SpectatingID[i] == playerid)
  16229. {
  16230. SetPlayerInterior(i, newinteriorid);
  16231. SetPlayerVirtualWorld(i, newinteriorid);
  16232. PlayerSpectatePlayer(i, playerid);
  16233. }
  16234. }
  16235. }
  16236. return 1;
  16237. }
  16238. stock setLastCar(playerid, vehid)
  16239. {
  16240. gLastCar[playerid] = vehid;
  16241. }
  16242. public OnPlayerStateChange(playerid, newstate, oldstate)
  16243. {
  16244. new str[128];
  16245. if(newstate == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][pTut] == 0)
  16246. {
  16247. if(PlayerInfo[playerid][pAdmin] < 1)
  16248. {
  16249. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) is spectating.", PlayerICName(playerid), playerid);
  16250. UpdateWarnings(str);
  16251. }
  16252. }
  16253. if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER && dmvSlot[playerid] != 0)
  16254. {
  16255. FailDrivingText(playerid);
  16256. }
  16257. if(newstate == PLAYER_STATE_PASSENGER) //got in car as passanger
  16258. {
  16259. new vehid = GetPlayerVehicleID(playerid);
  16260. strmid(LastDriver[vehid], PlayerName(playerid), 0, MAX_PLAYER_NAME);
  16261. setLastCar(playerid, vehid);
  16262. new drivebyweapon = GetPlayerWeapon(playerid);
  16263. if(!IsADriveByWeapon(drivebyweapon))
  16264. {
  16265. SetPlayerArmedWeapon(playerid, 0);
  16266. }
  16267. //radios
  16268. if(VehicleInfo[vehid][radioStation] != 0)
  16269. {
  16270. if(streamingFromBoombox[playerid] != -1) //if player is already streaming from a boombox when they get in the car
  16271. {
  16272. StopAudioStreamForPlayer(playerid);
  16273. streamingFromBoombox[playerid] = -1;
  16274. }
  16275. if(!IsAPushBike(vehid)){
  16276. if(disabledRadios[playerid] == 0){
  16277. PlayAudioStreamForPlayer(playerid, VehicleInfo[vehid][radioURL]);
  16278. }
  16279. }
  16280. streamingFromVehicle[playerid] = vehid;
  16281. }
  16282. }
  16283. if(newstate == PLAYER_STATE_DRIVER)
  16284. {
  16285. new dynvehID = GetDynamicVehicleID(GetPlayerVehicleID(playerid));
  16286. new bool:skip = false;
  16287. if(sVehicleInfo[dynvehID][v_faction] != 0)
  16288. {
  16289. if(PlayerInfo[playerid][pMember] == 3 && sVehicleInfo[dynvehID][v_faction] == 1) skip = true; // SASD can drive SAPD
  16290. if(PlayerInfo[playerid][pMember] == 1 && sVehicleInfo[dynvehID][v_faction] == 3) skip = true; // SAPD can drive SASD
  16291. if(PlayerInfo[playerid][pMember] == 2 && sVehicleInfo[dynvehID][v_faction] == 1) skip = true; // fbi | DEA can drive SAPD
  16292. if(PlayerInfo[playerid][pMember] == 2 && sVehicleInfo[dynvehID][v_faction] == 3) skip = true; // fbi | DEA can drive SASD
  16293. if(PlayerInfo[playerid][pGroup] == GROUP_S9) skip = true;
  16294. if((PlayerInfo[playerid][pMember] != sVehicleInfo[dynvehID][v_faction]) && (skip == false))
  16295. {
  16296. if(!(sVehicleInfo[dynvehID][v_faction] == 10 && PlayerInfo[playerid][pJob] == 14))
  16297. {
  16298. displayCenterHUDInfo(playerid, "You do not have keys for this vehicle.", 8);
  16299. PlayerPlaySound(playerid, 24600, 0.0, 0.0, 0.0);
  16300. RemovePlayerFromVehicle(playerid);
  16301. }
  16302. }
  16303. }
  16304. }
  16305. if(newstate == PLAYER_STATE_DRIVER)
  16306. {
  16307. if(isRepairing[playerid] == true)
  16308. {
  16309. RemovePlayerFromVehicle(playerid);
  16310. SendClientMessage(playerid, COLOR_YELLOW, "You can't use any vehicles until you've finished the repair.");
  16311. }
  16312. }
  16313. if(newstate == PLAYER_STATE_DRIVER) //got in car as driver
  16314. {
  16315. new vehicleid = GetPlayerVehicleID(playerid);
  16316. //has something in the trunk
  16317. setLastCar(playerid, vehicleid);
  16318. SetPlayerArmedWeapon(playerid, 0);
  16319. hidePlayerFoodTray(playerid);
  16320. if(IsACar(vehicleid))
  16321. {
  16322. if(PlayerInfo[playerid][pCarLicense] == 0 && dmvSlot[playerid] == 0)
  16323. {
  16324. showNewbieTipMessage(playerid, 20); //car license
  16325. }
  16326. else
  16327. {
  16328. showNewbieTipMessage(playerid, 1); //car radio
  16329. }
  16330. }
  16331. if(!ToggedSpeedo[playerid])
  16332. {
  16333. PlayerTextDrawShow(playerid, SpeedoTextdraw[playerid]);
  16334. }
  16335. if(!ToggedFuel[playerid])
  16336. {
  16337. PlayerTextDrawShow(playerid, FuelTextdraw[playerid]);
  16338. }
  16339. if(!ToggedVHealth[playerid])
  16340. {
  16341. PlayerTextDrawShow(playerid, VHealthTextDraw[playerid]);
  16342. }
  16343. if(Gas[vehicleid] > 0)
  16344. {
  16345. if(engineOn[vehicleid] == 0) //if engine is off and vehicle has gas
  16346. {
  16347. if(playerDisabledEngine[vehicleid] == 0) //if player hasn't disabled the engine
  16348. {
  16349. if(!GetVehNeedHW(vehicleid, playerid))
  16350. {
  16351. if(!IsABike(vehicleid))
  16352. {
  16353. new Float:health;
  16354. GetVehicleHealth(vehicleid, health);
  16355. if(health < 350) return 1;
  16356. format(str, sizeof(str), "* %s has turned the engine on.", PlayerICName(playerid));
  16357. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  16358. }
  16359. StartCar(vehicleid);
  16360. engineOn[vehicleid] = 1;
  16361. }
  16362. }
  16363. else
  16364. {
  16365. SendClientMessage(playerid, COLOR_GREY, "This vehicle can be started by typing /engine.");
  16366. }
  16367. }
  16368. }
  16369. else
  16370. {
  16371. displayCenterHUDInfo(playerid, "~w~No fuel in vehicle", 8); //8 seconds
  16372. engineOn[vehicleid] = 0;
  16373. PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~~r~I~w~IIIIIIIII~l~I");
  16374. }
  16375. }
  16376. if(oldstate == PLAYER_STATE_DRIVER)
  16377. {
  16378. new model = GetVehicleModel(gLastCar[playerid]); //make sure player doesn't pick up weapon from any vehicles
  16379. if(model == 425 || model == 457 || model == 427 || model == 432 || model == 433 ||
  16380. model == 447 || model == 490 || model == 497 || model == 520 || model == 523 ||
  16381. model == 528 || model == 596 || model == 598 || model == 599 || model == 601 ||
  16382. model == 497 || model == 425 || model == 430)
  16383. {
  16384. SetPlayerWeapons(playerid);
  16385. }
  16386. //Fuel/Speedo (iGetty)
  16387. if(!ToggedFuel[playerid])
  16388. {
  16389. PlayerTextDrawHide(playerid, FuelTextdraw[playerid]);
  16390. }
  16391. if(!ToggedSpeedo[playerid])
  16392. {
  16393. PlayerTextDrawHide(playerid, SpeedoTextdraw[playerid]);
  16394. }
  16395. if(!ToggedVHealth[playerid])
  16396. {
  16397. PlayerTextDrawHide(playerid, VHealthTextDraw[playerid]);
  16398. }
  16399. }
  16400. if(newstate == PLAYER_STATE_ONFOOT)
  16401. {
  16402. TextDrawHideForPlayer(playerid, centerHUDInfo[playerid]);
  16403. displayingText[playerid] = 0;
  16404. showPlayerFoodTray(playerid);
  16405. //radios
  16406. if(streamingFromVehicle[playerid] != -1)
  16407. {
  16408. StopAudioStreamForPlayer(playerid);
  16409. streamingFromVehicle[playerid] = -1;
  16410. }
  16411. if(Spectated[playerid]) //play changed to onfoot
  16412. {
  16413. foreach( new i: Player )
  16414. {
  16415. if(SpectatingID[i] == playerid)
  16416. {
  16417. SetPlayerInterior(i, GetPlayerInterior(playerid));
  16418. SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
  16419. PlayerSpectatePlayer(i, playerid);
  16420. }
  16421. }
  16422. }
  16423. if(TransportDuty[playerid] > 0)
  16424. {
  16425. if(TransportDuty[playerid] == 1)
  16426. {
  16427. TaxiDrivers -= 1;
  16428. }
  16429. else if(TransportDuty[playerid] == 2)
  16430. {
  16431. BusDrivers -= 1;
  16432. }
  16433. TransportDuty[playerid] = 0;
  16434. SetPlayerColor(playerid, TCOLOR_WHITE);
  16435. SendClientMessage(playerid, -1, " You are now off-duty");
  16436. return 1;
  16437. }
  16438. }
  16439. if(oldstate == PLAYER_STATE_PASSENGER && newstate == PLAYER_STATE_ONFOOT) // TAXI & BUSSES
  16440. {
  16441. for(new i = 0; i < MAX_PLAYERS; i++)
  16442. {
  16443. if(GetPlayerState(i) == PLAYER_STATE_DRIVER && TransportDuty[i] > 0)
  16444. {
  16445. if(IsPlayerInTaxi[playerid] == 1)
  16446. {
  16447. if(PlayerTaxiDriver[playerid] != -1)
  16448. {
  16449. if(gLastCar[playerid] != GetPlayerVehicleID(i)) continue;
  16450. new TAXIDUE = ( TransportMoney[playerid] -= PlayerInfo[playerid][pCash] ), taxistring1[128];
  16451. if( PlayerInfo[playerid][pCash] +1 < TransportMoney[i] )
  16452. {
  16453. GiveMoney(playerid, - PlayerInfo[playerid][pCash]);
  16454. format(taxistring1, sizeof(taxistring1), "* %s has on debt, his due is %d.", PlayerICName(playerid), TAXIDUE);
  16455. SendClientMessage(i, -1, taxistring1);
  16456. format(str, sizeof(str), "* The passanger left and you have earned $%d. 30 percent of your wage was given to the taxi company.", TransportMoney[i]);
  16457. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  16458. GiveMoney(i, floatround((TransportMoney[i] * 70)/100));
  16459. TAXI += floatround((TransportMoney[i] * 30)/100);
  16460. SaveFactionBanks();
  16461. }
  16462. else
  16463. {
  16464. GiveMoney(playerid, -TransportMoney[i]);
  16465. format(str, sizeof(str), "* The passanger left and you have earned $%d. 30 percent of your wage was given to the taxi company.", TransportMoney[i]);
  16466. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  16467. GiveMoney(i, floatround((TransportMoney[i] * 70)/100));
  16468. TAXI += floatround((TransportMoney[i] * 30)/100);
  16469. SaveFactionBanks();
  16470. }
  16471. PlayerTaxiDriver[playerid] = -1;
  16472. IsPlayerInTaxi[playerid] = 0;
  16473. KillTimer(TaxiTiming[playerid]);
  16474. TransportMoney[playerid] = -1;
  16475. break;
  16476. }
  16477. }
  16478. }
  16479. }
  16480. }
  16481. if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
  16482. {
  16483. new vehicleid = GetPlayerVehicleID(playerid);
  16484. for(new i = 0; i < MAX_PLAYERS; i++)
  16485. {
  16486. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER && TransportDuty[i] > 0)
  16487. {
  16488. if(PlayerInfo[playerid][pCash] < 1500)
  16489. {
  16490. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You need at least $1500 to enter.");
  16491. RemovePlayerFromVehicle(playerid);
  16492. return 1;
  16493. }
  16494. else
  16495. {
  16496. format(str, sizeof(str), "* %s has entered your vehicle.", PlayerICName(playerid));
  16497. if(CP[i] == CHECKPOINT_TAXI_CALLER)
  16498. {
  16499. CP[i] = CHECKPOINT_NONE;
  16500. DisablePlayerCheckpointEx(i);
  16501. }
  16502. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  16503. GetPlayerPos(i, TaxiFromCoords[i][0], TaxiFromCoords[i][1], TaxiFromCoords[i][2]);
  16504. IsPlayerInTaxi[playerid] = 1;
  16505. PlayerTaxiDriver[playerid] = i;
  16506. KillTimer(TaxiTiming[i]);
  16507. TaxiTiming[i] = SetTimerEx("Timer_TaxiDrivingTime", 1000, true, "ii", playerid, i);
  16508. }
  16509. }
  16510. }
  16511. }
  16512. if(newstate == PLAYER_STATE_WASTED) //player died
  16513. {
  16514. for(new i = 0; i < 13; i++) //get the weapons from the player
  16515. {
  16516. GetPlayerWeaponData(playerid, i, DeathWeapons[playerid][i][0], DeathWeapons[playerid][i][1]);
  16517. if(HaveWeapon(playerid, DeathWeapons[playerid][i][0]) != DeathWeapons[playerid][i][0])
  16518. {
  16519. DeathWeapons[playerid][i][0] = 0;
  16520. DeathWeapons[playerid][i][1] = 0;
  16521. }
  16522. }
  16523. }
  16524. if(newstate == PLAYER_STATE_DRIVER)
  16525. {
  16526. new newcar = GetPlayerVehicleID(playerid);
  16527. gLastCar[playerid] = newcar;
  16528. //radios
  16529. if(!disabledRadios[playerid])
  16530. {
  16531. if(VehicleInfo[GetPlayerVehicleID(playerid)][radioStation] == 0)
  16532. {
  16533. //SendClientMessage(playerid, COLOR_WHITE, "TIP: You can use /carradio to change the cars radio station.");
  16534. }
  16535. else
  16536. {
  16537. if(streamingFromBoombox[playerid] != -1) //if player is already streaming from a boombox when they get in the car
  16538. {
  16539. StopAudioStreamForPlayer(playerid);
  16540. streamingFromBoombox[playerid] = -1;
  16541. }
  16542. if(!IsAPushBike(newcar)){
  16543. if(disabledRadios[playerid] == 0){
  16544. PlayAudioStreamForPlayer(playerid, VehicleInfo[newcar][radioURL]);
  16545. streamingFromVehicle[playerid] = newcar;
  16546. }
  16547. }
  16548. }
  16549. }
  16550. if(Spectated[playerid]) //play changed to driver
  16551. {
  16552. foreach( new i: Player )
  16553. {
  16554. if(SpectatingID[i] == playerid)
  16555. {
  16556. SetPlayerInterior(i, GetPlayerInterior(playerid));
  16557. SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
  16558. PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));
  16559. SpectateType[i] = ADMIN_SPEC_TYPE_VEHICLE;
  16560. }
  16561. }
  16562. }
  16563. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
  16564. {
  16565. displayCenterHUDInfo(playerid, "~w~Press ~r~~k~~TOGGLE_SUBMISSIONS~~w~ to ~n~~y~tow a car", 8); //display for 8 seconds
  16566. }
  16567. if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 553)
  16568. {
  16569. displayCenterHUDInfo(playerid, "~w~use ~r~(/int)ercom~w~ to speak with your passengers.", 8); //display for 8 seconds
  16570. }
  16571. }
  16572. return 1;
  16573. }
  16574. Timer:OnThirtySecondSync()
  16575. {
  16576. new str[128];
  16577. foreach( new j: Player )
  16578. {
  16579. if(IsPlayerConnected(j))
  16580. {
  16581. if(PlayerInfo[j][pCash] < 0 && PlayerInfo[j][pAccount] < 0)
  16582. {
  16583. if(MoneyMessage[j] ==0)
  16584. {
  16585. format(str, sizeof(str), "Government Warning: You are in debt. You have until next paycheck to make $%d or you will be charged with tax evasion.", PlayerInfo[j][pCash] -(PlayerInfo[j][pCash] *2));
  16586. SendClientMessage(j, COLOR_LIGHTRED, str);
  16587. MoneyMessage[j] = 1;
  16588. }
  16589. }
  16590. else
  16591. {
  16592. MoneyMessage[j] = 0;
  16593. }
  16594. //update fuel
  16595. if(GetPlayerState(j) == PLAYER_STATE_DRIVER)
  16596. {
  16597. new vehicle = GetPlayerVehicleID(j);
  16598. new engine, lights, alarm, doors, bonnet, boot, objective;
  16599. GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
  16600. if(IsNonFuelVehicle(vehicle) || Refueling[j] || engine == VEHICLE_PARAMS_OFF) return 1;
  16601. if(Gas[vehicle] > 0)
  16602. {
  16603. if(Gas[vehicle] < 20)
  16604. {
  16605. showNewbieTipMessage(j, 3); //fueltip
  16606. }
  16607. //Gas[vehicle]--;
  16608. Gas[vehicle] =Gas[vehicle] -1;
  16609. }
  16610. else
  16611. {
  16612. GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective);
  16613. SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
  16614. engineOn[vehicle] = 0;
  16615. displayCenterHUDInfo(j, "~w~No fuel in vehicle", 25); //display for 25 seconds
  16616. PlayerTextDrawSetString(j, FuelTextdraw[j], "~g~~h~FUEL ~l~I~w~~r~I~w~IIIIIIIII~l~I");
  16617. }
  16618. }
  16619. }
  16620. }
  16621. return 1;
  16622. }
  16623. //==============================================================================
  16624. LockCar(carid)
  16625. {
  16626. new engine, lights, alarm, doors, bonnet, boot, objective;
  16627. GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
  16628. SetVehicleParamsEx(carid, engine, lights, alarm, true, bonnet, boot, objective);
  16629. gCarLock[carid] = 1;
  16630. }
  16631. //==============================================================================
  16632. UnLockCar(carid)
  16633. {
  16634. new engine, lights, alarm, doors, bonnet, boot, objective;
  16635. GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
  16636. SetVehicleParamsEx(carid, engine, lights, alarm, false, bonnet, boot, objective);
  16637. gCarLock[carid] = 0;
  16638. }
  16639. //==============================================================================
  16640. //==============================================================================
  16641. public OnPlayerExitVehicle(playerid, vehicleid)
  16642. {
  16643. if(GPSOn[playerid] == 1)
  16644. {
  16645. TogglePlayerGPS(playerid);
  16646. }
  16647. if(hotWireTime[playerid] > 0)
  16648. {
  16649. hotWireTime[playerid] = 0;
  16650. hotWireVeh[playerid] = -1;
  16651. }
  16652. return 1;
  16653. }
  16654. //==============================================================================
  16655. public OnPlayerRequestSpawn(playerid)
  16656. {
  16657. if(IsPlayerNPC(playerid)) return 1;
  16658. if(!gPlayerLogged[playerid]) return 0;
  16659. HideLoginTextDraw( playerid );
  16660. HideAnnouncementTextDraw( playerid );
  16661. return 1;
  16662. }
  16663. stock ClearChat(playerid)
  16664. {
  16665. for(new i = 0; i < 100; i++)
  16666. {
  16667. SendClientMessage(playerid, 0xFFFFFF00, "");
  16668. }
  16669. return 1;
  16670. }
  16671. //==============================================================================
  16672. public OnPlayerRequestClass(playerid, classid)
  16673. {
  16674. if(IsPlayerNPC(playerid)) return 1;
  16675. new randomlogin = random(11);
  16676. if(randomlogin == 0)
  16677. {
  16678. InterpolateCameraPos(playerid, 1345.298217, -938.340026, 87.267883, 1410.656494, -905.507324, 87.039672, 60000);
  16679. InterpolateCameraLookAt(playerid, 1342.760742, -934.031921, 87.227516, 1410.501586, -900.510314, 86.962852, 60000);
  16680. SetPlayerPos(playerid, 1410.656494, -905.507324, 87.039672+5);
  16681. }
  16682. else if(randomlogin == 1)
  16683. {
  16684. InterpolateCameraPos(playerid, 144.827133, 377.233428, 29.656909, -308.141845, 402.604736, 29.302240, 60000);
  16685. InterpolateCameraLookAt(playerid, 139.834960, 377.513061, 29.653001, -313.134033, 402.884368, 29.298332, 60000);
  16686. SetPlayerPos(playerid, -313.134033, 402.884368, 29.298332+5);
  16687. }
  16688. else if(randomlogin == 2)
  16689. {
  16690. InterpolateCameraPos(playerid, 561.094482, -643.187438, 34.639472, 806.668395, -491.264617, 27.714447, 60000);
  16691. InterpolateCameraLookAt(playerid, 565.345336, -640.557678, 34.519599, 810.919250, -488.634826, 27.594575, 60000);
  16692. SetPlayerPos(playerid, 810.919250, -488.634826, 27.594575+5);
  16693. }
  16694. else if(randomlogin == 3)
  16695. {
  16696. InterpolateCameraPos(playerid, 1352.999267, -1683.527099, 90.773506, 1421.252075, -1571.332275, 77.173370, 45000);
  16697. InterpolateCameraLookAt(playerid, 1357.510375, -1683.054321, 88.669647, 1424.770874, -1574.326049, 75.261474, 45000);
  16698. SetPlayerPos(playerid, 1424.770874, -1574.326049, 75.261474+5);
  16699. }
  16700. else if(randomlogin == 4)
  16701. {
  16702. InterpolateCameraPos(playerid, 1408.836547, -1775.066650, 97.370033, 2149.550048, -1735.276855, 49.848331, 7500);
  16703. InterpolateCameraLookAt(playerid, 1411.520385, -1771.610107, 94.951477, 2146.251953, -1738.334228, 47.663204, 7500);
  16704. SetPlayerPos(playerid, 2146.251953, -1738.334228, 47.663204+5);
  16705. }
  16706. else if(randomlogin == 5)
  16707. {
  16708. InterpolateCameraPos(playerid, 1807.677856, -1369.372436, 16.177862, 1954.315429, -1473.715820, 89.220832, 7500);
  16709. InterpolateCameraLookAt(playerid, 1812.676147, -1369.342895, 16.051443, 1951.205322, -1470.425903, 87.098541, 7500);
  16710. SetPlayerPos(playerid, 1951.205322, -1470.425903, 87.098541+5);
  16711. }
  16712. else if(randomlogin == 6)
  16713. {
  16714. InterpolateCameraPos(playerid, 2007.451416, -1129.742065, 29.814027, 2153.653076, -1200.048461, 81.830345, 7500);
  16715. InterpolateCameraLookAt(playerid, 2004.361206, -1125.859252, 29.201797, 2148.798583, -1200.057373, 80.632698, 7500);
  16716. SetPlayerPos(playerid, 2148.798583, -1200.057373, 80.632698+5);
  16717. }
  16718. else if(randomlogin == 7)
  16719. {
  16720. InterpolateCameraPos(playerid, 2503.717285, -1668.225097, 15.782173, 2433.170410, -1736.309936, 65.834114, 7500);
  16721. InterpolateCameraLookAt(playerid, 2507.883300, -1670.886230, 15.032005, 2436.207031, -1733.029785, 63.593498, 7500);
  16722. SetPlayerPos(playerid, 2436.207031, -1733.029785, 63.593498+5);
  16723. }
  16724. else if(randomlogin == 8)
  16725. {
  16726. InterpolateCameraPos(playerid, 2248.101074, -1740.978881, 26.270591, 2379.434814, -1779.831054, 87.506752, 7500);
  16727. InterpolateCameraLookAt(playerid, 2248.305908, -1736.377563, 24.324943, 2375.368164, -1777.643066, 85.589653, 7500);
  16728. SetPlayerPos(playerid, 2375.368164, -1777.643066, 85.589653+5);
  16729. }
  16730. else if(randomlogin == 9)
  16731. {
  16732. InterpolateCameraPos(playerid, 1345.708618, -1279.521606, 16.874431, 1271.686523, -1412.301757, 70.203544, 7500);
  16733. InterpolateCameraLookAt(playerid, 1350.705078, -1279.532714, 16.686157, 1268.570434, -1408.877807, 68.315055, 7500);
  16734. SetPlayerPos(playerid, 1268.570434, -1408.877807, 68.315055+5);
  16735. }
  16736. else if(randomlogin == 10)
  16737. {
  16738. InterpolateCameraPos(playerid, 1946.255126, -1747.471191, 21.964838, 1994.090698, -1672.244750, 54.170860, 7500);
  16739. InterpolateCameraLookAt(playerid, 1941.771850, -1745.708984, 20.625036, 1990.291503, -1675.066650, 52.557655, 7500);
  16740. SetPlayerPos(playerid, 1990.291503, -1675.066650, 52.557655+5);
  16741. }
  16742. //if player is not logged in, display register/login dialogs
  16743. if(!gPlayerLogged[playerid])
  16744. {
  16745. if(!checkedAccount[playerid]) { //check if the account name exists
  16746. ClearChat(playerid);
  16747. //event notice
  16748. if(isNextEvent)
  16749. {
  16750. showEventHudForPlayer(playerid);
  16751. }
  16752. //newmotd
  16753. //TextDrawShowForPlayer(playerid, motd);
  16754. //check if account exists
  16755. new query[350];
  16756. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Key_`, `Password`, `Salt`, `NewPassword`, `NewSalt` FROM `players` WHERE `name` = '%e' COLLATE latin1_bin LIMIT 1", PlayerName(playerid));
  16757. mysql_pquery(sqlGameConnection, query, "OnAccountExists", "d", playerid);
  16758. checkedAccount[playerid] = 1;
  16759. }
  16760. }
  16761. return 1;
  16762. }
  16763. forward OnAccountExists(playerid);
  16764. public OnAccountExists(playerid)
  16765. {
  16766. new msgstring[128];
  16767. if(cache_num_rows() == 1) { //sql login
  16768. //store temp password in a var to compare with the login dialogs inputtext
  16769. cache_get_field_content(0, "Key_", tempPassword[playerid], sqlGameConnection, 65);
  16770. cache_get_field_content(0, "Password", tempHash[playerid], sqlGameConnection, 65);
  16771. cache_get_field_content(0, "Salt", tempSalt[playerid], sqlGameConnection, 33);
  16772. cache_get_field_content(0, "NewPassword", NewPassword[playerid], sqlGameConnection, 129);
  16773. cache_get_field_content(0, "NewSalt", NewSalt[playerid], sqlGameConnection, 33);
  16774. format(msgstring, sizeof(msgstring), "Welcome back to {FFFF00}Project Roleplay{FFFFFF}, %s.", PlayerICName(playerid));
  16775. SendClientMessage(playerid, COLOR_WHITE, msgstring);
  16776. format(msgstring, sizeof(msgstring), "{FFFFFF}Welcome back to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease enter your password below to login to your account:", msgstring);
  16777. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", msgstring, "Login", "Quit");
  16778. } else { //register
  16779. if(!IsValidName(PlayerName(playerid)))
  16780. {
  16781. SendClientMessage(playerid, COLOR_WHITE, "{FF6347}SERVER: You have been kicked for having an invalid name.");
  16782. SendClientMessage(playerid, COLOR_WHITE, "Your name must be in the \"Firstname_Lastname\" format.");
  16783. SendClientMessage(playerid, COLOR_WHITE, "Example: Bobby_Smith.");
  16784. KickEx(playerid);
  16785. return 1;
  16786. }
  16787. format(msgstring, sizeof(msgstring), "Welcome to {FFFF00}Project Roleplay{FFFFFF}, %s.", PlayerICName(playerid));
  16788. SendClientMessage(playerid, COLOR_WHITE, msgstring);
  16789. format(msgstring, sizeof(msgstring), "{FFFFFF}Welcome to {FFFF00}Project Roleplay{FFFFFF}.\n\nPlease register your account by typing the password below:", msgstring);
  16790. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", msgstring, "Register", "Quit");
  16791. }
  16792. return 1;
  16793. }
  16794. forward SetPlayerID(playerid);
  16795. public SetPlayerID(playerid)
  16796. {
  16797. PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
  16798. return 1;
  16799. }
  16800. forward OnPlayerLoad(playerid, con_order);
  16801. public OnPlayerLoad(playerid, con_order)
  16802. {
  16803. if(con_order != MySQLConnectionOrder[playerid])
  16804. {
  16805. SendClientMessage(playerid, COLOR_RED, "You've been disconnected in an attempt to prevent data merging, relog.");
  16806. KickEx(playerid);
  16807. return 1;
  16808. }
  16809. /*PlayerInfo[playerid][pImportant] = cache_get_field_content_int(0, "Important");
  16810. if(cache_get_field_content_int(0, "Important") > 0)
  16811. {
  16812. PlayerInfo[playerid][pImportant] = 1;
  16813. }*/
  16814. //cache_get_field_content(0, "Discord", PlayerInfo[playerid][pDiscord], sqlGameConnection, 30);
  16815. PlayerInfo[playerid][pTesterReports] = cache_get_field_content_int(0, "TesterReports");
  16816. PlayerInfo[playerid][pSpawnPos] = cache_get_field_content_int(0, "SpawnPos");
  16817. PlayerInfo[playerid][pLastLogoutUnix] = cache_get_field_content_int(0, "LogUnix");
  16818. PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
  16819. pDeathState[playerid] = cache_get_field_content_int(0, "DeathState");
  16820. PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level");
  16821. PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "AdminLevel");
  16822. PlayerInfo[playerid][pSecKey] = cache_get_field_content_int(0, "SecurityKey");
  16823. PlayerInfo[playerid][pStealthed] = cache_get_field_content_int(0, "Stealthed");
  16824. PlayerInfo[playerid][pBand] = cache_get_field_content_int(0, "Band");
  16825. PlayerInfo[playerid][pCBand] = cache_get_field_content_int(0, "CBand");
  16826. PlayerInfo[playerid][pPermBand] = cache_get_field_content_int(0, "PermBand");
  16827. cache_get_field_content(0, "BanReason", PlayerInfo[playerid][pBanReason], sqlGameConnection, 128);
  16828. cache_get_field_content(0, "PrisonReason", PlayerInfo[playerid][pPrisonReason], sqlGameConnection, 128);
  16829. PlayerInfo[playerid][pAdminJailed] = cache_get_field_content_int(0, "AdminJailed");
  16830. cache_get_field_content(0, "PrisonedBy", PlayerInfo[playerid][pPrisonedBy], sqlGameConnection, 32);
  16831. PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0, "Warnings");
  16832. PlayerInfo[playerid][pDisabled] = cache_get_field_content_int(0, "Disabled");
  16833. PlayerInfo[playerid][pDonateRank] = cache_get_field_content_int(0, "DonateRank");
  16834. PlayerInfo[playerid][pTag] = cache_get_field_content_int(0, "Tag");
  16835. cache_get_field_content(0, "VIPJoinDate", PlayerInfo[playerid][pVIPJoinDate], sqlGameConnection, 32);
  16836. cache_get_field_content(0, "VIPExpDate", PlayerInfo[playerid][pVIPExpDate], sqlGameConnection, 32);
  16837. PlayerInfo[playerid][pBanAppealer] = cache_get_field_content_int(0, "BanAppealer");
  16838. PlayerInfo[playerid][pGangModd] = cache_get_field_content_int(0, "GangModd");
  16839. PlayerInfo[playerid][pEventModd] = cache_get_field_content_int(0, "EventModd");
  16840. PlayerInfo[playerid][pComplaintModd] = cache_get_field_content_int(0, "ComplaintModd");
  16841. PlayerInfo[playerid][pShopMod] = cache_get_field_content_int(0, "ShopMod");
  16842. PlayerInfo[playerid][pBizMod] = cache_get_field_content_int(0, "BizMod");
  16843. PlayerInfo[playerid][pFactionMod] = cache_get_field_content_int(0, "FactionMod");
  16844. PlayerInfo[playerid][pFactionDirector] = cache_get_field_content_int(0, "FactionDirector");
  16845. PlayerInfo[playerid][pGangDirector] = cache_get_field_content_int(0, "GangDirector");
  16846. PlayerInfo[playerid][gPupgrade] = cache_get_field_content_int(0, "UpgradePoints");
  16847. PlayerInfo[playerid][pConnectTime] = cache_get_field_content_int(0, "ConnectedTime");
  16848. PlayerInfo[playerid][pReg] = cache_get_field_content_int(0, "Registered");
  16849. PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "Sex");
  16850. if(PlayerInfo[playerid][pSex] == 0) PlayerInfo[playerid][pSex] = 1; // Fix "Unknown"
  16851. PlayerInfo[playerid][pAge] = cache_get_field_content_int(0, "Age");
  16852. if(PlayerInfo[playerid][pAge] == 0) PlayerInfo[playerid][pAge] = 18; // Fix 0
  16853. PlayerInfo[playerid][pOrigin] = cache_get_field_content_int(0, "Origin");
  16854. cache_get_field_content(0, "Appearance", PlayerInfo[playerid][pAppearance], sqlGameConnection, 128);
  16855. PlayerInfo[playerid][pBuild] = cache_get_field_content_int(0, "Build");
  16856. PlayerInfo[playerid][pEthnicity] = cache_get_field_content_int(0, "Ethnicity");
  16857. PlayerInfo[playerid][pEyeColour] = cache_get_field_content_int(0, "EyeColour");
  16858. PlayerInfo[playerid][pHeight] = cache_get_field_content_int(0, "Height");
  16859. if(PlayerInfo[playerid][pHeight] == 0) PlayerInfo[playerid][pHeight] = 180; // Fix 0
  16860. PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0, "Muted");
  16861. PlayerInfo[playerid][pExp] = cache_get_field_content_int(0, "Respect");
  16862. PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "Money");
  16863. PlayerInfo[playerid][pAccount] = cache_get_field_content_int(0, "Bank");
  16864. PlayerInfo[playerid][pCrimes] = cache_get_field_content_int(0, "Crimes");
  16865. cache_get_field_content(0, "Accent", Accent[playerid], sqlGameConnection, 32);
  16866. PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "Kills");
  16867. PlayerInfo[playerid][pDeaths] = cache_get_field_content_int(0, "Deaths");
  16868. PlayerInfo[playerid][pCHits] = cache_get_field_content_int(0, "CHits");
  16869. PlayerInfo[playerid][pFHits] = cache_get_field_content_int(0, "FHits");
  16870. PlayerInfo[playerid][pArrested] = cache_get_field_content_int(0, "Arrested");
  16871. PlayerInfo[playerid][pLottoNr] = cache_get_field_content_int(0, "LottoNr");
  16872. PlayerInfo[playerid][pBiggestFish] = cache_get_field_content_int(0, "BiggestFish");
  16873. PlayerInfo[playerid][pJob] = cache_get_field_content_int(0, "Job");
  16874. PlayerInfo[playerid][pPayCheck] = cache_get_field_content_int(0, "Paycheck");
  16875. PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0, "HeadValue");
  16876. PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "Jailed");
  16877. PlayerInfo[playerid][pJailCell] = cache_get_field_content_int(0, "JailCell");
  16878. PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0, "JailTime");
  16879. PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0, "Leader");
  16880. PlayerInfo[playerid][pRecruiter] = cache_get_field_content_int(0, "Recruiter");
  16881. PlayerInfo[playerid][pMember] = cache_get_field_content_int(0, "Member");
  16882. PlayerInfo[playerid][pNSB] = cache_get_field_content_int(0, "NSB");
  16883. PlayerInfo[playerid][pFMember] = cache_get_field_content_int(0, "FMember");
  16884. PlayerInfo[playerid][pRank] = cache_get_field_content_int(0, "Rank");
  16885. PlayerInfo[playerid][pRadioStation] = cache_get_field_content_int(0, "RadioStation");
  16886. PlayerInfo[playerid][pDetSkill] = cache_get_field_content_int(0, "DetSkill");
  16887. PlayerInfo[playerid][pSexSkill] = cache_get_field_content_int(0, "SexSkill");
  16888. PlayerInfo[playerid][pBoxSkill] = cache_get_field_content_int(0, "BoxSkill");
  16889. PlayerInfo[playerid][pLawSkill] = cache_get_field_content_int(0, "LawSkill");
  16890. PlayerInfo[playerid][pMechSkill] = cache_get_field_content_int(0, "MechSkill");
  16891. PlayerInfo[playerid][pJackSkill] = cache_get_field_content_int(0, "JackSkill");
  16892. PlayerInfo[playerid][pCarSkill] = cache_get_field_content_int(0, "CarSkill");
  16893. PlayerInfo[playerid][pDrugsSkill] = cache_get_field_content_int(0, "DrugsSkill");
  16894. PlayerInfo[playerid][pArmsSkill] = cache_get_field_content_int(0, "ArmsSkill");
  16895. PlayerInfo[playerid][pWasteSkill] = cache_get_field_content_int(0, "WasteSkill");
  16896. PlayerInfo[playerid][pSmugglerSkill] = cache_get_field_content_int(0, "SmugglerSkill");
  16897. PlayerInfo[playerid][pThieveSkill] = cache_get_field_content_int(0, "ThieveSkill");
  16898. PlayerInfo[playerid][pFishSkill] = cache_get_field_content_int(0, "FishSkill");
  16899. PlayerInfo[playerid][pPizzaSkill] = cache_get_field_content_int(0, "PizzaSkill");
  16900. PlayerInfo[playerid][pFightingStyle] = cache_get_field_content_int(0, "FightingStyle");
  16901. PlayerInfo[playerid][pHealth] = cache_get_field_content_int(0, "pHealth");
  16902. PlayerInfo[playerid][pArmor] = cache_get_field_content_int(0, "pArmor");
  16903. PlayerInfo[playerid][pSHP] = cache_get_field_content_int(0, "pSHP");
  16904. PlayerInfo[playerid][pSHealth] = cache_get_field_content_int(0, "pSHealth");
  16905. PlayerInfo[playerid][pInt] = cache_get_field_content_int(0, "InteriorID");
  16906. PlayerInfo[playerid][pLocal] = cache_get_field_content_int(0, "Local");
  16907. PlayerInfo[playerid][pVirtualWorld] = cache_get_field_content_int(0, "VirtualWorld");
  16908. PlayerInfo[playerid][pModel] = cache_get_field_content_int(0, "Model");
  16909. PlayerInfo[playerid][pClothes] = cache_get_field_content_int(0, "Clothes");
  16910. PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0, "PhoneNr");
  16911. PlayerInfo[playerid][pCellphoneType] = cache_get_field_content_int(0, "PhoneType");
  16912. PlayerInfo[playerid][pBizKey] = cache_get_field_content_int(0, "BizKey");
  16913. if(PlayerInfo[playerid][pBizKey] == 0)
  16914. PlayerInfo[playerid][pBizKey] = -1; //biz fix
  16915. PlayerInfo[playerid][pBizFixed] = cache_get_field_content_int(0, "BizFixed");
  16916. PlayerInfo[playerid][pSetVehSpawn] = cache_get_field_content_int(0, "SetVehSpawn");
  16917. PlayerInfo[playerid][pFishLic] = cache_get_field_content_int(0, "FishLic");
  16918. PlayerInfo[playerid][pGun0] = cache_get_field_content_int(0, "Gun0");
  16919. PlayerInfo[playerid][pGun1] = cache_get_field_content_int(0, "Gun1");
  16920. PlayerInfo[playerid][pGun2] = cache_get_field_content_int(0, "Gun2");
  16921. PlayerInfo[playerid][pGun3] = cache_get_field_content_int(0, "Gun3");
  16922. PlayerInfo[playerid][pGun4] = cache_get_field_content_int(0, "Gun4");
  16923. PlayerInfo[playerid][pGun5] = cache_get_field_content_int(0, "Gun5");
  16924. PlayerInfo[playerid][pGun6] = cache_get_field_content_int(0, "Gun6");
  16925. PlayerInfo[playerid][pGun7] = cache_get_field_content_int(0, "Gun7");
  16926. PlayerInfo[playerid][pGun8] = cache_get_field_content_int(0, "Gun8");
  16927. PlayerInfo[playerid][pGun9] = cache_get_field_content_int(0, "Gun9");
  16928. PlayerInfo[playerid][pGun10] = cache_get_field_content_int(0, "Gun10");
  16929. PlayerInfo[playerid][pGun11] = cache_get_field_content_int(0, "Gun11");
  16930. PlayerInfo[playerid][pGun12] = cache_get_field_content_int(0, "Gun12");
  16931. PlayerInfo[playerid][pCarTime] = cache_get_field_content_int(0, "CarTime");
  16932. PlayerInfo[playerid][pDrugsTime] = cache_get_field_content_int(0, "DrugsTime");
  16933. PlayerInfo[playerid][pLawyerTime] = cache_get_field_content_int(0, "LawyerTime");
  16934. PlayerInfo[playerid][pLawyerFreeTime] = cache_get_field_content_int(0, "LawyerFreeTime");
  16935. PlayerInfo[playerid][pMechTime] = cache_get_field_content_int(0, "MechTime");
  16936. PlayerInfo[playerid][pSexTime] = cache_get_field_content_int(0, "SexTime");
  16937. PlayerInfo[playerid][pPlantTime] = cache_get_field_content_int(0, "PlantTime");
  16938. PlayerInfo[playerid][pRepairTime] = cache_get_field_content_int(0, "RepairTime");
  16939. PlayerInfo[playerid][pRobTime] = cache_get_field_content_int(0, "RobTime");
  16940. PlayerInfo[playerid][pPayDay] = cache_get_field_content_int(0, "PayDay");
  16941. PlayerInfo[playerid][pPayDayHad] = cache_get_field_content_int(0, "PayDayHad");
  16942. PlayerInfo[playerid][pWins] = cache_get_field_content_int(0, "Wins");
  16943. PlayerInfo[playerid][pLoses] = cache_get_field_content_int(0, "Loses");
  16944. PlayerInfo[playerid][pAdrenaline] = cache_get_field_content_int(0, "Adrenaline");
  16945. PlayerInfo[playerid][pTut] = cache_get_field_content_int(0, "Tutorial");
  16946. PlayerInfo[playerid][pOnDuty] = cache_get_field_content_int(0, "OnDuty");
  16947. PlayerInfo[playerid][pHospital] = cache_get_field_content_int(0, "Hospital");
  16948. PlayerInfo[playerid][pAdjustable] = cache_get_field_content_int(0, "Adjustable");
  16949. PlayerInfo[playerid][pMarried] = cache_get_field_content_int(0, "Married");
  16950. cache_get_field_content(0, "MarriedTo", PlayerInfo[playerid][pMarriedTo], sqlGameConnection, 128);
  16951. cache_get_field_content(0, "ContractBy", PlayerInfo[playerid][pContractBy], sqlGameConnection, 128);
  16952. PlayerInfo[playerid][pWantedLevel] = cache_get_field_content_int(0, "WantedLevel");
  16953. PlayerInfo[playerid][pNewbieMuted] = cache_get_field_content_int(0, "NewbieMuted");
  16954. PlayerInfo[playerid][pNMuteTime] = cache_get_field_content_int(0, "NewbieMutedTime");
  16955. PlayerInfo[playerid][pFKickTime] = cache_get_field_content_int(0, "FactionKickTime");
  16956. PlayerInfo[playerid][pNewbieWarns] = cache_get_field_content_int(0, "NewbieWarns");
  16957. PlayerInfo[playerid][pReqUnmute] = cache_get_field_content_int(0, "NewbRequestUnmute");
  16958. PlayerInfo[playerid][pRepMuted] = cache_get_field_content_int(0, "ReportMuted");
  16959. autoChat[playerid] = cache_get_field_content_int(0, "TogAutoChat");
  16960. PlayerInfo[playerid][pAdMuted] = cache_get_field_content_int(0, "AdMuted");
  16961. PlayerInfo[playerid][pBugMuted] = cache_get_field_content_int(0, "BugMuted");
  16962. PlayerInfo[playerid][pSPos_x] = cache_get_field_content_float(0, "SPos_x");
  16963. PlayerInfo[playerid][pSPos_y] = cache_get_field_content_float(0, "SPos_y");
  16964. PlayerInfo[playerid][pSPos_z] = cache_get_field_content_float(0, "SPos_z");
  16965. PlayerInfo[playerid][pSPos_r] = 1.0; // Static until we fix the crashing issue
  16966. PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0, "HelperLevel");
  16967. PlayerInfo[playerid][pDev] = cache_get_field_content_int(0, "DevLevel");
  16968. PlayerInfo[playerid][pTester] = cache_get_field_content_int(0, "TesterLevel");
  16969. PlayerInfo[playerid][pFamed] = cache_get_field_content_int(0, "Famed");
  16970. PlayerInfo[playerid][pOldSchool] = cache_get_field_content_int(0, "OldSchool");
  16971. PlayerInfo[playerid][pEnlightened] = cache_get_field_content_int(0, "Enlightened");
  16972. PlayerInfo[playerid][pBanDay] = cache_get_field_content_int(0, "BanDay");
  16973. PlayerInfo[playerid][pBanMonth] = cache_get_field_content_int(0, "BanMonth");
  16974. PlayerInfo[playerid][pBanYear] = cache_get_field_content_int(0, "BanYear");
  16975. PlayerInfo[playerid][pBanTime] = cache_get_field_content_int(0, "BanTime");
  16976. GottenGift[playerid] = cache_get_field_content_int(0, "GottenGift");
  16977. GottenTimeLeft[playerid] = cache_get_field_content_int(0, "GottenTimeLeft");
  16978. PlayerInfo[playerid][pCallCount] = cache_get_field_content_int(0, "MedicCount");
  16979. PlayerInfo[playerid][pMonthlyCallCount] = cache_get_field_content_int(0, "MonthlyMedicCount");
  16980. PlayerInfo[playerid][pMDCLogged] = cache_get_field_content_int(0, "MDCLogged");
  16981. PlayerInfo[playerid][pPortMDC] = cache_get_field_content_int(0, "HasMDC");
  16982. PlayerInfo[playerid][pJammer] = cache_get_field_content_int(0, "HasJammer");
  16983. PlayerInfo[playerid][pBadgeNumber] = cache_get_field_content_int(0, "BadgeNumber");
  16984. PlayerInfo[playerid][pHouseID] = GetHouseOwnerIDFromSQLID(PlayerInfo[playerid][pID]); //get house ID & store to PlayerInfo[playerid][pHouseID]
  16985. PlayerInfo[playerid][hTicket] = cache_get_field_content_int(0, "hTicket");
  16986. PlayerInfo[playerid][gTicket] = cache_get_field_content_int(0, "gTicket");
  16987. PlayerInfo[playerid][gRefund] = cache_get_field_content_int(0, "gRefund");
  16988. PlayerInfo[playerid][pEconomist] = cache_get_field_content_int(0, "Economist");
  16989. PlayerInfo[playerid][pHAFakeBadge] = cache_get_field_content_int(0, "HAFakeBadge");
  16990. FakeFaction[playerid] = cache_get_field_content_int(0, "FakeFaction");
  16991. FakeRank[playerid] = cache_get_field_content_int(0, "FakeRank");
  16992. PlayerInfo[playerid][pBadge] = cache_get_field_content_int(0, "Badge");
  16993. isBOLO[playerid] = cache_get_field_content_int(0, "isBOLO");
  16994. PlayerInfo[playerid][pDriverPoints] = cache_get_field_content_int(0, "DriverPoints");
  16995. PlayerInfo[playerid][pInsurance] = cache_get_field_content_int(0, "Insurance");
  16996. PlayerInfo[playerid][pPresentCount] = cache_get_field_content_int(0, "PresentCount");
  16997. PlayerInfo[playerid][pTogNewbie] = cache_get_field_content_int(0, "TogNewbie");
  16998. hasRubberBullets[playerid] = cache_get_field_content_int(0, "RubberBullets");
  16999. new access[15];
  17000. for(new idx = 1; idx < 8; idx++)
  17001. {
  17002. mysql_format(sqlGameConnection, access, sizeof(access), "Accessory%d", idx);
  17003. Accessories[playerid][idx-1] = cache_get_field_content_int(0, access);
  17004. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryB%d", idx);
  17005. AccessoriesB[playerid][idx-1] = cache_get_field_content_int(0, access);
  17006. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryX%d", idx);
  17007. AccessoriesX[playerid][idx-1] = cache_get_field_content_float(0, access);
  17008. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryY%d", idx);
  17009. AccessoriesY[playerid][idx-1] = cache_get_field_content_float(0, access);
  17010. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryZ%d", idx);
  17011. AccessoriesZ[playerid][idx-1] = cache_get_field_content_float(0, access);
  17012. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryrX%d", idx);
  17013. AccessoriesrX[playerid][idx-1] = cache_get_field_content_float(0, access);
  17014. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryrY%d", idx);
  17015. AccessoriesrY[playerid][idx-1] = cache_get_field_content_float(0, access);
  17016. mysql_format(sqlGameConnection, access, sizeof(access), "AccessoryrZ%d", idx);
  17017. AccessoriesrZ[playerid][idx-1] = cache_get_field_content_float(0, access);
  17018. mysql_format(sqlGameConnection, access, sizeof(access), "AccessorysX%d", idx);
  17019. AccessoriessX[playerid][idx-1] = cache_get_field_content_float(0, access);
  17020. mysql_format(sqlGameConnection, access, sizeof(access), "AccessorysY%d", idx);
  17021. AccessoriessY[playerid][idx-1] = cache_get_field_content_float(0, access);
  17022. mysql_format(sqlGameConnection, access, sizeof(access), "AccessorysZ%d", idx);
  17023. AccessoriessZ[playerid][idx-1] = cache_get_field_content_float(0, access);
  17024. mysql_format(sqlGameConnection, access, sizeof(access), "AccessorysC%d", idx);
  17025. Accessoriesc1[playerid][idx-1] = cache_get_field_content_int(0, access);
  17026. }
  17027. PlayerInfo[playerid][lastCarID] = cache_get_field_content_int( 0, "lastCarID" );
  17028. PlayerInfo[playerid][pMaxCarSlots] = cache_get_field_content_int( 0, "maxcarslots" );
  17029. PlayerInfo[playerid][pMapper] = cache_get_field_content_int(0, "Mapper");
  17030. cache_get_field_content(0, "customTag", CustomTag[playerid], sqlGameConnection, 50);
  17031. cache_get_field_content(0, "customRank", customRank[playerid], sqlGameConnection, 24);
  17032. pInHospital[playerid] = cache_get_field_content_int(0, "isinHosp");
  17033. PlayerInfo[playerid][pMap] = cache_get_field_content_int(0, "HasMap");
  17034. PlayerInfo[playerid][pJailnumber] = cache_get_field_content_int(0, "JailNumber");
  17035. PlayerInfo[playerid][pCarLicense] = cache_get_field_content_int(0, "NewCarLic");
  17036. PlayerInfo[playerid][pBoatLicense] = cache_get_field_content_int(0, "NewBoatLic");
  17037. PlayerInfo[playerid][pWeaponLicense] = cache_get_field_content_int(0, "NewGunLic");
  17038. PlayerInfo[playerid][pMarijuanaLicense] = cache_get_field_content_int(0, "NewMariLicense");
  17039. PlayerInfo[playerid][pSueUnix] = cache_get_field_content_int(0, "SueUnix");
  17040. PlayerInfo[playerid][pSueNotice] = cache_get_field_content_int(0, "SueNotice");
  17041. PlayerInfo[playerid][pAllowedArmory] = cache_get_field_content_int(0, "AllowedArmory");
  17042. PlayerInfo[playerid][pHidingStatus] = cache_get_field_content_int(0, "HidingStatus");
  17043. // PlayerInfo[playerid][pBrokenLeg] = cache_get_field_content_int( 0, "brokenleg" );
  17044. //===============[ Inventory ]==============
  17045. PlayerInfo[playerid][pFishes] = cache_get_field_content_int(0, "Fishes");
  17046. PlayerInfo[playerid][pProducts] = cache_get_field_content_int(0, "Products");
  17047. PlayerInfo[playerid][pMats] = cache_get_field_content_int(0, "Materials");
  17048. PlayerInfo[playerid][pPotSeeds] = cache_get_field_content_int(0, "Seeds");
  17049. PlayerInfo[playerid][pCalculator] = cache_get_field_content_int(0, "Calculator");
  17050. PlayerInfo[playerid][pPhoneBook] = cache_get_field_content_int(0, "Phonebook");
  17051. PlayerInfo[playerid][pFishRod] = cache_get_field_content_int(0, "FishRod");
  17052. PlayerInfo[playerid][pBait] = cache_get_field_content_int(0, "Bait");
  17053. PlayerInfo[playerid][pBaitAmount] = cache_get_field_content_int(0, "BaitAmount");
  17054. PlayerInfo[playerid][pLine] = cache_get_field_content_int(0, "Line");
  17055. PlayerInfo[playerid][piPod] = cache_get_field_content_int(0, "iPod");
  17056. PlayerInfo[playerid][pDice] = cache_get_field_content_int(0, "Dice");
  17057. PlayerInfo[playerid][pSpraycan] = cache_get_field_content_int(0, "Spraycan");
  17058. PlayerInfo[playerid][pScrew] = cache_get_field_content_int(0, "Screw");
  17059. PlayerInfo[playerid][pRope] = cache_get_field_content_int(0, "Rope");
  17060. PlayerInfo[playerid][pGag] = cache_get_field_content_int(0, "Gag");
  17061. PlayerInfo[playerid][pCigars] = cache_get_field_content_int(0, "Cigars");
  17062. PlayerInfo[playerid][pSprunk] = cache_get_field_content_int(0, "Sprunk");
  17063. PlayerInfo[playerid][pBeer] = cache_get_field_content_int(0, "Beer");
  17064. PlayerInfo[playerid][pTikis] = cache_get_field_content_int(0, "Tikis");
  17065. PlayerInfo[playerid][pWT] = cache_get_field_content_int(0, "WT");
  17066. PlayerInfo[playerid][pWTc] = cache_get_field_content_int(0, "WTc");
  17067. PlayerInfo[playerid][pRadio] = cache_get_field_content_int(0, "Radio");
  17068. PlayerInfo[playerid][pHandtazer] = cache_get_field_content_int(0, "Handtazer");
  17069. PlayerInfo[playerid][ptazerGun] = cache_get_field_content_int(0, "tazerGun");
  17070. PlayerInfo[playerid][pBombs] = cache_get_field_content_int(0, "Bombs");
  17071. PlayerInfo[playerid][pPoison] = cache_get_field_content_int(0, "Poison");
  17072. PlayerInfo[playerid][pGlasses] = cache_get_field_content_int(0, "Glasses");
  17073. PlayerInfo[playerid][pBandana] = cache_get_field_content_int(0, "Bandana");
  17074. PlayerInfo[playerid][pHelmet] = cache_get_field_content_int(0, "Helmet");
  17075. HasBoughtMask[playerid] = cache_get_field_content_int(0, "Mask");
  17076. cache_get_field_content(0, "MaskName", PlayerInfo[playerid][pMaskName], sqlGameConnection, 21);
  17077. PlayerInfo[playerid][pMask] = 0;
  17078. PlayerInfo[playerid][pBlindfolds] = cache_get_field_content_int(0, "Blindfolds");
  17079. PlayerInfo[playerid][pDeck] = cache_get_field_content_int(0, "Deck");
  17080. PlayerInfo[playerid][pStereo] = cache_get_field_content_int(0, "Stereo");
  17081. PlayerInfo[playerid][pMatches] = cache_get_field_content_int(0, "Matches");
  17082. PlayerInfo[playerid][pJerrycan] = cache_get_field_content_int(0, "Jerrycan");
  17083. PlayerHasMP5Laser[playerid] = cache_get_field_content_int(0, "MP5Laser");
  17084. PlayerHasM4Laser[playerid] = cache_get_field_content_int(0, "M4Laser");
  17085. PlayerHasAKLaser[playerid] = cache_get_field_content_int(0, "AKLaser");
  17086. PlayerHasSpasLaser[playerid] = cache_get_field_content_int(0, "SpasLaser");
  17087. PlayerHasDeagleLaser[playerid] = cache_get_field_content_int(0, "DeagleLaser");
  17088. PlayerInfo[playerid][pAddressBook] = cache_get_field_content_int(0, "AddressBook");
  17089. PlayerInfo[playerid][pWire] = cache_get_field_content_int(0, "Wire");
  17090. PlayerInfo[playerid][pGroup] = cache_get_field_content_int(0, "Group");
  17091. PlayerInfo[playerid][pGroupRank] = cache_get_field_content_int(0, "GroupRank");
  17092. PlayerInfo[playerid][pHasCBomb] = cache_get_field_content_int( 0, "C2" );
  17093. PlayerInfo[playerid][pDrill] = cache_get_field_content_int( 0, "Drill" );
  17094. PlayerInfo[playerid][pDuffleBagTime] = cache_get_field_content_int( 0, "DuffleCooldown" );
  17095. cache_get_field_content(0, "GroupNick", PlayerInfo[playerid][pGroupNick], sqlGameConnection, 13);
  17096. cache_get_field_content(0, "S9BadgeName", PlayerInfo[playerid][pS9BadgeName], sqlGameConnection, 24);
  17097. // Drugs //
  17098. PlayerInfo[playerid][pCannabis] = cache_get_field_content_int(0, "Cannabis");
  17099. PlayerInfo[playerid][pCocaine] = cache_get_field_content_int(0, "Cocaine");
  17100. PlayerInfo[playerid][pMeth] = cache_get_field_content_int(0, "Meth");
  17101. PlayerInfo[playerid][pXanax] = cache_get_field_content_int(0, "Xanax");
  17102. PlayerInfo[playerid][pPromethazine] = cache_get_field_content_int(0, "promethazine");
  17103. PlayerInfo[playerid][pCodeine] = cache_get_field_content_int(0, "codeine");
  17104. PlayerInfo[playerid][pLean] = cache_get_field_content_int(0, "lean");
  17105. // Global Chat System //
  17106. PlayerInfo[playerid][pGCTog] = cache_get_field_content_int(0, "GCTog");
  17107. PlayerInfo[playerid][pGCTag] = cache_get_field_content_int(0, "GCTag");
  17108. cache_get_field_content(0, "GCTagName", PlayerInfo[playerid][pGCTagName], sqlGameConnection, 30);
  17109. PlayerInfo[playerid][pGCMute] = cache_get_field_content_int(0, "GCMute");
  17110. PlayerInfo[playerid][pGCMuteTimer] = cache_get_field_content_int(0, "GCMuteTimer");
  17111. PlayerInfo[playerid][pGCMutePerm] = cache_get_field_content_int(0, "GCMutePerm");
  17112. // Newbie Tag System
  17113. PlayerInfo[playerid][pNewbieTag] = cache_get_field_content_int(0, "NewbieTag");
  17114. cache_get_field_content(0, "NewbieTagName", PlayerInfo[playerid][pNewbieTagName], sqlGameConnection, 30);
  17115. // cache_get_field_content(0, "HouseFire", value);
  17116. // PlayerInfo[playerid][pHouseFire] = strval(value);
  17117. //================[ Save the player's cache ID ]================
  17118. PlayerCacheID[playerid] = cache_save();
  17119. //=============================================
  17120. //set account ip to the new ip
  17121. updatePlayerIP(playerid);
  17122. OnPlayerLogin(playerid);
  17123. ShowAnnouncementTextDraw( playerid );
  17124. printf("Loaded %s.", PlayerName(playerid));
  17125. return 1;
  17126. }
  17127. //==============================================================================
  17128. stock SetPlayerCriminal(playerid, declare, reason[])
  17129. {
  17130. new str[128];
  17131. if(IsPlayerConnected(playerid))
  17132. {
  17133. new turned[MAX_PLAYER_NAME];
  17134. new turner[MAX_PLAYER_NAME];
  17135. GetPlayerICName(playerid, turned, sizeof(turned));
  17136. if(declare == 999)
  17137. {
  17138. format(turner, sizeof(turner), "Unknown");
  17139. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner));
  17140. }
  17141. if(declare == 998)
  17142. {
  17143. format(turner, sizeof(turner), "The Government");
  17144. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner));
  17145. }
  17146. else
  17147. {
  17148. if(IsPlayerConnected(declare))
  17149. {
  17150. GetPlayerICName(declare, turner, sizeof(turner));
  17151. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner));
  17152. strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned));
  17153. strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason));
  17154. }
  17155. }
  17156. PlayerInfo[playerid][pCrimes] += 1;
  17157. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  17158. //AddCrime(playerid, PlayerICName(declare), reason);
  17159. foreach( new i: Player )
  17160. {
  17161. if(IsPlayerConnected(i))
  17162. {
  17163. if(IsACop(i) || IsANG(i) || PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pMember] == 7 || PlayerInfo[i][pMember] == FACTION_SANG)
  17164. {
  17165. format(str, sizeof(str), "Warrant Placed - Reporter: %s", turner);
  17166. SendClientMessage(i, TEAM_BLUE_COLOR, str);
  17167. format(str, sizeof(str), "Crime: %s, Suspect: %s", reason, turned);
  17168. SendClientMessage(i, TEAM_BLUE_COLOR, str);
  17169. }
  17170. }
  17171. }
  17172. }
  17173. return 1;
  17174. }
  17175. //==============================================================================
  17176. stock SetPlayerFree(playerid, declare, reason[])
  17177. {
  17178. if(IsPlayerConnected(playerid))
  17179. {
  17180. new turned[MAX_PLAYER_NAME];
  17181. new turner[MAX_PLAYER_NAME];
  17182. new crbjstore[128];
  17183. if(declare == 999)
  17184. {
  17185. format(turner, sizeof(turner), "911");
  17186. }
  17187. else
  17188. {
  17189. if(IsPlayerConnected(declare))
  17190. {
  17191. GetPlayerICName(declare, turner, sizeof(turner));
  17192. }
  17193. }
  17194. GetPlayerICName(playerid, turned, sizeof(turned));
  17195. foreach( new i: Player )
  17196. {
  17197. if(IsPlayerConnected(i))
  17198. {
  17199. if(PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 2)
  17200. {
  17201. if(!strmatch(reason, "arrested")){
  17202. if(declare != 999) format(crbjstore, sizeof(crbjstore), "HQ: All units, %s %s %s has completed an assignment, %s %s.", GetPlayerFactionName(declare), GetPlayerRank(declare), turner, reason, turned);
  17203. else format(crbjstore, sizeof(crbjstore), "HQ: All units, %s has been successfully processed, was %s.", turned, reason);
  17204. SendClientMessage(i, COLOR_DBLUE, crbjstore);
  17205. }
  17206. }
  17207. }
  17208. }
  17209. }
  17210. return 1;
  17211. }
  17212. //==============================================================================
  17213. stock isWeaponHacked(playerid, weapon) {
  17214. if(weapon > 0 && weapon < 45)
  17215. {
  17216. if(HaveWeapon(playerid, weapon) != weapon && HaveAdminWeapon(playerid, weapon) != weapon)
  17217. {
  17218. return true;
  17219. }
  17220. }
  17221. return false;
  17222. }
  17223. //==============================================================================
  17224. Timer:OnFiveSecondSync()
  17225. {
  17226. new str[128];
  17227. foreach( new i: Player )
  17228. {
  17229. if(PlayerInfo[i][pAdmin] < 2)
  17230. {
  17231. new currentspeed = GetPlayerSpeed(i, false);
  17232. if(currentspeed > 175)
  17233. {
  17234. new tmpcar = GetPlayerVehicleID(i);
  17235. if(!IsAPlane(tmpcar) && !(GetPlayerState(i) == PLAYER_STATE_PASSENGER))
  17236. {
  17237. format(str, sizeof(str), "Possible speedhack: [%d]%s %d mph.", i, PlayerOOCName(i), currentspeed);
  17238. ABroadCast(COLOR_YELLOW, str, 1);
  17239. }
  17240. }
  17241. if(gPlayerLogged[i] && firstSpawned[i]) { //player must be logged in and have spawned (to fix a warning)
  17242. new weaponid = GetPlayerWeapon(i);
  17243. if(isWeaponHacked(i, weaponid)) {
  17244. new WeaponName[64];
  17245. GetWeaponName(weaponid, WeaponName, sizeof(WeaponName));
  17246. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (%d) is holding a desynced or hacked %s.", PlayerOOCName(i), i, WeaponName);
  17247. ABroadCast(COLOR_WHITE, str, 1);
  17248. }
  17249. }
  17250. }
  17251. if(PlayerInfo[i][pPnumber] != 0)
  17252. {
  17253. if(CellTime[i] > 0)
  17254. {
  17255. if(CellTime[i] == 10)
  17256. {
  17257. CellTime[i] = 1;
  17258. if(Mobile[Mobile[i]] == i)
  17259. {
  17260. CallCost[i] = CallCost[i] +callcost;
  17261. }
  17262. }
  17263. CellTime[i] = CellTime[i] +1;
  17264. if(Mobile[Mobile[i]] == 999 && (CellTime[i] > 0))
  17265. {
  17266. if(IsPlayerConnected(Mobile[i]))
  17267. {
  17268. if(!cellMuted[i])
  17269. {
  17270. playLocalSound(i, CELLPHONE_AWAITING, 1.0, 500);
  17271. }
  17272. if(!cellMuted[Mobile[i]])
  17273. {
  17274. playLocalSound(Mobile[i], CELLPHONE_RING, 6.0, 500);
  17275. }
  17276. if(CellTime[i] == 3 || CellTime[i] == 6 || CellTime[i] == 9)
  17277. {
  17278. format(str, sizeof(str), "* %s's phone rings.", PlayerICName(Mobile[i]));
  17279. SetPlayerChatBubble(Mobile[i], str, COLOR_PURPLE, 20.0, 15000);
  17280. format(str, sizeof(str), "> %s's phone rings.", PlayerICName(Mobile[i]));
  17281. SendClientMessage(Mobile[i], COLOR_PURPLE, str);
  17282. }
  17283. }
  17284. }
  17285. }
  17286. }
  17287. if(!disabledRadios[i] && !GetPVarInt(i, "AudioDisabled"))
  17288. {
  17289. if(!isPlayerStreaming(i)) //not already streaming from any boombox/vehicle
  17290. {
  17291. for(new b = 0; b < sizeof(BoomboxInfo); b++) //loop through all (players) boomboxes
  17292. {
  17293. if(BoomboxInfo[b][placedBoombox]) //if a player has placed a boombox
  17294. {
  17295. if(BoomboxInfo[b][boomboxTurnedOn]) //if boombox is turned on
  17296. {
  17297. if(IsPlayerInRangeOfPoint(i, 30, BoomboxInfo[b][bpos][0], BoomboxInfo[b][bpos][1], BoomboxInfo[b][bpos][2])) //player is near
  17298. {
  17299. if(GetPlayerVirtualWorld(i) == BoomboxInfo[b][BoomboxWorld])
  17300. {
  17301. if(streamingFromBoombox[i] != b) //not streaming yet
  17302. {
  17303. PlayAudioStreamForPlayer(i, BoomboxInfo[b][BoomboxURL], BoomboxInfo[b][bpos][0], BoomboxInfo[b][bpos][1], BoomboxInfo[b][bpos][2], 30, 1);
  17304. streamingFromBoombox[i] = b; //set that players streaming variable to the player id which
  17305. }
  17306. }
  17307. }
  17308. }
  17309. }
  17310. }
  17311. }
  17312. else //currently streaming
  17313. {
  17314. if(streamingFromBoombox[i] != -1) //not streaming from a vehicle
  17315. {
  17316. if(BoomboxInfo[streamingFromBoombox[i]][boomboxTurnedOn]) //if the boombox that i am streaming is on
  17317. {
  17318. if(!IsPlayerInRangeOfPoint(i, 30, BoomboxInfo[streamingFromBoombox[i]][bpos][0], BoomboxInfo[streamingFromBoombox[i]][bpos][1], BoomboxInfo[streamingFromBoombox[i]][bpos][2])) //player is not near
  17319. {
  17320. if(GetPlayerVirtualWorld(i) == BoomboxInfo[streamingFromBoombox[i]][BoomboxWorld])
  17321. {
  17322. StopAudioStreamForPlayer(i);
  17323. streamingFromBoombox[i] = -1; //set that players streaming variable to the player id which
  17324. }
  17325. }
  17326. }
  17327. else
  17328. {
  17329. StopAudioStreamForPlayer(i);
  17330. streamingFromBoombox[i] = -1; //set that players streaming variable to the player id which
  17331. }
  17332. }
  17333. }
  17334. }
  17335. if(IsHoldJetpacknWeapon(i))
  17336. {
  17337. format(str, sizeof(str), "Possible exploit: [%d]%s is holding jetpack and weapon.", i, PlayerOOCName(i));
  17338. ABroadCast(COLOR_YELLOW, str, 1);
  17339. }
  17340. }
  17341. return 1;
  17342. }
  17343. Timer:TaxiDrivingTime(playerid, taxi)
  17344. {
  17345. new str[128];
  17346. if(IsPlayerInAnyVehicle(playerid) && IsPlayerInTaxi[playerid] == 1 && IsPlayerInAnyVehicle(taxi))
  17347. {
  17348. new Float:taxipos = ((GetPlayerDistanceFromPoint(taxi, TaxiFromCoords[PlayerTaxiDriver[playerid]][0], TaxiFromCoords[PlayerTaxiDriver[playerid]][1], TaxiFromCoords[PlayerTaxiDriver[playerid]][2]))/4);
  17349. if( PlayerInfo[playerid][pCash] - TransportMoney[playerid] <= 1) {
  17350. SendClientMessage( taxi, COLOR_LIGHTRED, "Your customer doesn't have anymore money to pay for this taxi ride!" );
  17351. RemovePlayerFromVehicle(playerid);
  17352. return 1;
  17353. }
  17354. if(PlayerTied[playerid] == 0){
  17355. TransportMoney[taxi] = floatround(taxipos) * TransportValue[taxi];
  17356. format(str, sizeof(str), "~r~Distance: ~w~%d yards, ~g~$%d", floatround(taxipos), TransportMoney[taxi]);
  17357. }
  17358. else { format(str, sizeof(str), "~r~Distance: ~w~%d yards, ~g~$%d~n~~r~Passenger tied, money stopped.", floatround(taxipos), TransportMoney[taxi]); }
  17359. displayCenterHUDInfo(playerid, str, 8);
  17360. displayCenterHUDInfo(taxi, str, 8);
  17361. }
  17362. else
  17363. {
  17364. PlayerTaxiDriver[playerid] = -1;
  17365. KillTimer(TaxiTiming[playerid]);
  17366. IsPlayerInTaxi[playerid] = 0;
  17367. }
  17368. return 1;
  17369. }
  17370. //==============================================================================
  17371. #include "./inc/factions/backup_system/tempFIX.inc"
  17372. //==============================================================================
  17373. /* Keep OnPlayerSecondSync tidy.
  17374. Do not use timers for anything that uses player input to check if the time has been.
  17375. Examples: restrict command usage to every 60 seconds.
  17376. tap a key on the keyboard for 10 seconds.
  17377. In other words anything you can use gettime() (UNIX timestamps) instead.
  17378. Timers are last restort.
  17379. */
  17380. Timer:OnPlayerSecondSync() {
  17381. for( new playerid; playerid <= GetPlayerPoolSize(); playerid++ ) {
  17382. //list functions only here.
  17383. OnPlayerSecondSyncEx( playerid );
  17384. OnVehiclePlayerSecondSync( playerid );
  17385. OnFirePlayerSecondSync( playerid );
  17386. }
  17387. #if defined SARP_BEACON_FIX
  17388. UpdateBeacons();
  17389. #endif
  17390. return 1;
  17391. }
  17392. /*
  17393. DO, NOT, USE, THIS, FUNCTION
  17394. !!
  17395. Use above.
  17396. */
  17397. forward OnPlayerSecondSyncEx(i);
  17398. public OnPlayerSecondSyncEx(i) {
  17399. new str[128];
  17400. if(gPlayerLogged[i] == 1)
  17401. {
  17402. //if(!IsPlayerConnected(i)) continue;
  17403. if(GetTickCount() - pausetick[i] > 1000) // If they haven't updated in 1+ seconds, maybe increase...
  17404. {
  17405. PlayerPaused[i] = true;
  17406. }
  17407. else // ELSE!!!
  17408. {
  17409. PlayerPaused[i] = false;
  17410. }
  17411. new level = PlayerInfo[i][pLevel];
  17412. if(level >= 0 && level <= 2)
  17413. {
  17414. PlayerInfo[i][pPayCheck] += 1;
  17415. }
  17416. else if(level >= 3 && level <= 4)
  17417. {
  17418. PlayerInfo[i][pPayCheck] += 2;
  17419. }
  17420. else if(level >= 5 && level <= 6)
  17421. {
  17422. PlayerInfo[i][pPayCheck] += 3;
  17423. }
  17424. else if(level >= 7 && level <= 8)
  17425. {
  17426. PlayerInfo[i][pPayCheck] += 4;
  17427. }
  17428. else if(level >= 9 && level <= 10)
  17429. {
  17430. PlayerInfo[i][pPayCheck] += 5;
  17431. }
  17432. else if(level >= 11 && level <= 12)
  17433. {
  17434. PlayerInfo[i][pPayCheck] += 6;
  17435. }
  17436. else if(level >= 13 && level <= 14)
  17437. {
  17438. PlayerInfo[i][pPayCheck] += 7;
  17439. }
  17440. else if(level >= 15 && level <= 16)
  17441. {
  17442. PlayerInfo[i][pPayCheck] += 8;
  17443. }
  17444. else if(level >= 17 && level <= 18)
  17445. {
  17446. PlayerInfo[i][pPayCheck] += 9;
  17447. }
  17448. else if(level >= 19 && level <= 20)
  17449. {
  17450. PlayerInfo[i][pPayCheck] += 10;
  17451. }
  17452. else if(level >= 21)
  17453. {
  17454. PlayerInfo[i][pPayCheck] += 11;
  17455. }
  17456. OnDroneSignalCheck(i);
  17457. if(PlayerInfo[i][pNMuteTime] > 0 && PlayerInfo[i][pNMuteTime] != -1)
  17458. {
  17459. PlayerInfo[i][pNMuteTime] -= 1000;
  17460. if(PlayerInfo[i][pNMuteTime] <= 0 && PlayerInfo[i][pNMuteTime] != -1)
  17461. {
  17462. PlayerInfo[i][pNewbieMuted] = 0;
  17463. SendClientMessage(i, COLOR_LIGHTBLUE, "* Your newbie chat mute has expired, you may use /n again.");
  17464. PlayerInfo[i][pNMuteTime] = 0;
  17465. }
  17466. }
  17467. if(PlayerInfo[i][pFKickTime] > 0 && PlayerInfo[i][pFKickTime] != -1)
  17468. {
  17469. PlayerInfo[i][pFKickTime] -= 1000;
  17470. if(PlayerInfo[i][pFKickTime] <= 0 && PlayerInfo[i][pFKickTime] != -1)
  17471. {
  17472. SendClientMessage(i, COLOR_LIGHTBLUE, "* Your faction kill has expired - you can join factions again.");
  17473. PlayerInfo[i][pFKickTime] = 0;
  17474. }
  17475. }
  17476. if(PlayerInfo[i][pJailed] > 0)
  17477. {
  17478. if(!PlayerPaused[i])
  17479. {
  17480. if(PlayerInfo[i][pJailTime] > 0 && WantLawyer[i] == 0)
  17481. {
  17482. PlayerInfo[i][pJailTime]--;
  17483. }
  17484. if(PlayerInfo[i][pJailTime] <= 0 && WantLawyer[i] == 0)
  17485. {
  17486. PlayerInfo[i][pJailTime] = 0;
  17487. if(PlayerInfo[i][pJailed] == 1)
  17488. {
  17489. SetPlayerPos(i, -2204.19, 842.05, 9999.26);
  17490. SetPlayerFacingAngle(i, 270.0);
  17491. SetPlayerVirtualWorld(i, 10);
  17492. SetPlayerInterior(i, 10);
  17493. SetCameraBehindPlayer(i);
  17494. }
  17495. else if(PlayerInfo[i][pJailed] == 2) // Prison System
  17496. {
  17497. SetPlayerPos(i, 689.0182, 1509.9065, 9001.9629);
  17498. SetPlayerFacingAngle(i, 270);
  17499. SetPlayerSkin(i, 1);
  17500. PlayerInfo[i][pModel] = 1;
  17501. PlayerInfo[i][pJailnumber] = 0;
  17502. SetPlayerInterior(i, DOC_INT);
  17503. SetPlayerVirtualWorld(i, DOC_WORLD);
  17504. UpdateDynamic3DTextLabelText(PNumber3D[i], COLOR_WHITE, " ");
  17505. DestroyDynamic3DTextLabel(PNumber3D[i]);
  17506. }
  17507. else if(PlayerInfo[i][pJailed] == 3)
  17508. {
  17509. if(IsPlayerInRangeOfPoint(i, 40.0, 1789.1893, -1570.7909, 1636.9736))
  17510. {
  17511. SetPlayerSkin(i, PlayerInfo[i][pModel]);
  17512. SetPlayerInterior(i, 0);
  17513. if(PrisonCell[i] == 0)
  17514. {
  17515. SetPlayerPos(i, 1773.7007, -1577.5149, 1636.9736);
  17516. SetPlayerFacingAngle(i, 0.0);
  17517. }
  17518. if(PrisonCell[i] == 1)
  17519. {
  17520. SetPlayerPos(i, 1779.1671, -1577.4548, 1636.9736);
  17521. SetPlayerFacingAngle(i, 0.0);
  17522. }
  17523. if(PrisonCell[i] == 2)
  17524. {
  17525. SetPlayerPos(i, 1784.6586, -1577.4518, 1636.9736);
  17526. SetPlayerFacingAngle(i, 0.0);
  17527. }
  17528. if(PrisonCell[i] == 3)
  17529. {
  17530. SetPlayerPos(i, 1790.3481, -1577.4486, 1636.9736);
  17531. SetPlayerFacingAngle(i, 0.0);
  17532. }
  17533. if(PrisonCell[i] == 4)
  17534. {
  17535. SetPlayerPos(i, 1795.4546, -1577.1248, 1636.9736);
  17536. SetPlayerFacingAngle(i, 0.0);
  17537. }
  17538. if(PrisonCell[i] == 5)
  17539. {
  17540. SetPlayerPos(i, 1800.7770, -1577.1569, 1636.9736);
  17541. SetPlayerFacingAngle(i, 0.0);
  17542. }
  17543. if(PrisonCell[i] == 6)
  17544. {
  17545. SetPlayerPos(i, 1800.7118, -1561.2797, 1636.9736);
  17546. SetPlayerFacingAngle(i, 180.0);
  17547. }
  17548. if(PrisonCell[i] == 7)
  17549. {
  17550. SetPlayerPos(i, 1795.8535, -1561.3806, 1636.9736);
  17551. SetPlayerFacingAngle(i, 180.0);
  17552. }
  17553. if(PrisonCell[i] == 8)
  17554. {
  17555. SetPlayerPos(i, 1790.4093, -1561.7704, 1636.9736);
  17556. SetPlayerFacingAngle(i, 180.0);
  17557. }
  17558. if(PrisonCell[i] == 9)
  17559. {
  17560. SetPlayerPos(i, 1784.9886, -1561.7207, 1636.9736);
  17561. SetPlayerFacingAngle(i, 180.0);
  17562. }
  17563. if(PrisonCell[i] == 10)
  17564. {
  17565. SetPlayerPos(i, 1779.1306, -1561.7352, 1636.9736);
  17566. SetPlayerFacingAngle(i, 180.0);
  17567. }
  17568. if(PrisonCell[i] == 11)
  17569. {
  17570. SetPlayerPos(i, 1773.3928, -1561.7976, 1636.9736);
  17571. SetPlayerFacingAngle(i, 180.0);
  17572. }
  17573. }
  17574. if(IsPlayerInRangeOfPoint(i, 40.0, -2406.4944, 2072.3271, 991.6563)) //set the player to the prison exit
  17575. {
  17576. SetPlayerPos(i, -2409.2522, 2047.2119, 991.6563);
  17577. SetPlayerFacingAngle(i, 90);
  17578. }
  17579. }
  17580. else if(PlayerInfo[i][pJailed] == 4)
  17581. {
  17582. SetPlayerPos(i, 2651.0842, -2412.2305, 13.6276);
  17583. SetPlayerFacingAngle(i, 88.3654);
  17584. SetPlayerInterior(i, 0);
  17585. SetPlayerVirtualWorld(i, 0);
  17586. SetCameraBehindPlayer(i);
  17587. }
  17588. else if(PlayerInfo[i][pJailed] == 5)
  17589. {
  17590. SetPlayerPos(i, 1882.6892, 1884.4115, 27.5159);
  17591. SetPlayerFacingAngle(i, 8.2919);
  17592. SetCameraBehindPlayer(i);
  17593. }
  17594. PlayerInfo[i][pJailed] = 0;
  17595. SendClientMessage(i, COLOR_GRAD1, "You have paid your debt to society.");
  17596. format(str, sizeof(str), "~g~Freedom~n~~w~Try to be a better citizen.");
  17597. displayCenterHUDInfo(i, str, 8);
  17598. Timer_FreezePlayer(i, FREEZE, ENTER_FREEZE);
  17599. SetCameraBehindPlayer(i);
  17600. TogglePlayerControllable(i, 1);
  17601. SetPlayerToTeamColor(i);
  17602. SetPlayerSkin(i, PlayerInfo[i][pModel]);
  17603. PlayerInfo[i][pClothes] = 0;
  17604. ClearPrisonreason(i);
  17605. if(PlayerInfo[i][pAdminJailed] == 1)
  17606. {
  17607. SetPlayerVirtualWorld(i, 0);
  17608. SetPlayerInterior(i, 0);
  17609. SetPlayerPos(i, 1538.8557, -1679.7494, 13.5469);
  17610. PlayerInfo[i][pAdminJailed] = 0;
  17611. }
  17612. }
  17613. }
  17614. }
  17615. //anti-moneycheat
  17616. if(GetPlayerMoney(i) != PlayerInfo[i][pCash])
  17617. {
  17618. ResetPlayerMoney(i);
  17619. GivePlayerMoney(i, PlayerInfo[i][pCash]);
  17620. }
  17621. if(GetPlayerScore(i) != PlayerInfo[i][pLevel])
  17622. {
  17623. SetPlayerScore(i, PlayerInfo[i][pLevel]);
  17624. }
  17625. //anti-jetpack
  17626. if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
  17627. {
  17628. if(PlayerInfo[i][pAdmin] < 3)
  17629. {
  17630. if(!(aGun[i][12] == 21))
  17631. {
  17632. anticheatbans ++;
  17633. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked Jetpack detected. (%d hackers banned)", PlayerICName(i), anticheatbans);
  17634. SendClientMessageToAll(COLOR_WHITE, str);
  17635. PlayerInfo[i][pBand] = 3;
  17636. BanLog(str);
  17637. format(str, sizeof(str), "Ban Reason: Hacked Jetpack detected - Banned by: ANTICHEAT");
  17638. strmid(PlayerInfo[i][pBanReason], str, 0, strlen(str));
  17639. BanExx(i);
  17640. }
  17641. }
  17642. }
  17643. //lockpick
  17644. if(LockPickingBiz[i] != 999)
  17645. {
  17646. new biz = LockPickingBiz[i];
  17647. LockPickTime[i] ++;
  17648. new maxLockPickTime = 25;
  17649. format(str, sizeof(str), "~g~%d", maxLockPickTime -LockPickTime[i]);
  17650. GameTextForPlayer(i, str, 1000, 3);
  17651. if(!(IsPlayerInRangeOfPoint(i, 1.0, BizInfo[biz][bOutsideX], BizInfo[biz][bOutsideY], BizInfo[biz][bOutsideZ])))
  17652. {
  17653. format(str, sizeof(str), "* Your attempt to lockpick the business has failed.");
  17654. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  17655. displayCenterHUDInfo(i, "~w~Lockpick attempt~n~~r~failed.", 8); //display for 8 seconds
  17656. LockPickingBiz[i] = 999;
  17657. LockPickTime[i] = 0;
  17658. }
  17659. if(LockPickTime[i] >= maxLockPickTime && IsPlayerInRangeOfPoint(i, 1.0, BizInfo[biz][bOutsideX], BizInfo[biz][bOutsideY], BizInfo[biz][bOutsideZ]))
  17660. {
  17661. format(str, sizeof(str), "* You have successfully lockpicked this business, door unlocked.");
  17662. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  17663. displayCenterHUDInfo(i, "~w~Lockpick attempt~n~~g~successful.", 8); //display for 8 seconds
  17664. format(str, sizeof(str), "* %s has successfully lockpicked the business, door unlocked.", PlayerICName(i));
  17665. ProxDetector(30.0, i, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  17666. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  17667. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  17668. BizInfo[biz][bLocked] = 0;
  17669. LockPickingBiz[i] = 999;
  17670. LockPickTime[i] = 0;
  17671. }
  17672. }
  17673. if(LockPickingHouse[i] != 999)
  17674. {
  17675. new house = LockPickingHouse[i];
  17676. LockPickTime[i] ++;
  17677. new maxLockPickTime = 25;
  17678. format(str, sizeof(str), "~g~%d", maxLockPickTime -LockPickTime[i]);
  17679. GameTextForPlayer(i, str, 1000, 3);
  17680. if(!(IsPlayerInRangeOfPoint(i, 1.0, HouseInfo[house][hOutsideX], HouseInfo[house][hOutsideY], HouseInfo[house][hOutsideZ])))
  17681. {
  17682. format(str, sizeof(str), "* Your attempt to lockpick the house has failed.");
  17683. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  17684. displayCenterHUDInfo(i, "~w~Lockpick attempt~n~~r~failed.", 8); //display for 8 seconds
  17685. LockPickingHouse[i] = 999;
  17686. LockPickTime[i] = 0;
  17687. }
  17688. if(LockPickTime[i] >= maxLockPickTime && IsPlayerInRangeOfPoint(i, 1.0, HouseInfo[house][hOutsideX], HouseInfo[house][hOutsideY], HouseInfo[house][hOutsideZ]))
  17689. {
  17690. format(str, sizeof(str), "* You have successfully lockpicked this house, door unlocked.");
  17691. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  17692. displayCenterHUDInfo(i, "~w~Lockpick attempt~n~~g~successful.", 8); //display for 8 seconds
  17693. format(str, sizeof(str), "* %s has successfully lockpicked the house, door unlocked.", PlayerICName(i));
  17694. ProxDetector(30.0, i, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  17695. HouseInfo[house][hLocked] = 0;
  17696. LockPickingHouse[i] = 999;
  17697. LockPickTime[i] = 0;
  17698. }
  17699. }
  17700. if(Guarding[i] != 999)
  17701. {
  17702. new Float:utx, Float:uty, Float:utz;
  17703. GetPlayerPos(Guarding[i], utx, uty, utz);
  17704. if(!IsPlayerInRangeOfPoint(i, 20, utx, uty, utz))
  17705. {
  17706. SendClientMessage(i, COLOR_GREY, "You failed to guard your client.");
  17707. SendClientMessage(Guarding[i], COLOR_GREY, "Your bodyguard has failed to guard you.");
  17708. PlayerInfo[i][pAccount] -= (GuardingPrice[Guarding[i]] * 2);
  17709. SetPlayerToTeamColor(Guarding[i]);
  17710. SetPlayerToTeamColor(i);
  17711. GuardedBy[Guarding[i]] = 999;
  17712. GuardingPrice[Guarding[i]] = 0;
  17713. Guarding[i] = 999;
  17714. }
  17715. }
  17716. if(LoadObjects[i] >= 1)
  17717. {
  17718. LoadObjects[i] -= 1;
  17719. if(LoadObjects[i] == 1)
  17720. {
  17721. TogglePlayerControllable(i, 1);
  17722. LoadObjects[i] = 0;
  17723. }
  17724. }
  17725. if(GotPlant[i] >= 1)
  17726. {
  17727. GotPlant[i] += 1;
  17728. if(GotPlant[i] >= 10)
  17729. {
  17730. GotPlant[i] = 0;
  17731. }
  17732. }
  17733. if(GotDrugs[i] >= 1)
  17734. {
  17735. GotDrugs[i] += 1;
  17736. if(GotDrugs[i] >= 10)
  17737. {
  17738. GotDrugs[i] = 0;
  17739. }
  17740. }
  17741. if(GotMats[i] >= 1)
  17742. {
  17743. GotMats[i] += 1;
  17744. if(GotMats[i] >= 10)
  17745. {
  17746. GotMats[i] = 0;
  17747. }
  17748. }
  17749. if(WantLawyer[i] >= 1)
  17750. {
  17751. CallLawyer[i] = 111;
  17752. if(WantLawyer[i] == 1)
  17753. {
  17754. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  17755. }
  17756. WantLawyer[i] ++;
  17757. if(WantLawyer[i] == 8)
  17758. {
  17759. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  17760. }
  17761. if(WantLawyer[i] == 15)
  17762. {
  17763. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  17764. }
  17765. if(WantLawyer[i] == 20)
  17766. {
  17767. SendClientMessage(i, COLOR_LIGHTRED, "There is no Lawyer available to you anymore, Jail Time started.");
  17768. WantLawyer[i] = 0;
  17769. CallLawyer[i] = 0;
  17770. }
  17771. }
  17772. if(PlayerStoned[i] >= 3)
  17773. {
  17774. PlayerStoned[i] += 1;
  17775. //SetPlayerWeather(i, -66);
  17776. //SetPlayerTime(i, 23, 0);
  17777. if(IsPlayerInAnyVehicle(i))
  17778. {
  17779. if(GetPlayerState(i) == 2)
  17780. {
  17781. if(PlayerStoned[i] == 10 || PlayerStoned[i] ==20 || PlayerStoned[i] ==30 || PlayerStoned[i] ==40 || PlayerStoned[i] ==50)
  17782. {
  17783. new Float:angle;
  17784. GetVehicleZAngle(GetPlayerVehicleID(i), angle);
  17785. new randomnum = random(2);
  17786. if(randomnum != 1)
  17787. {
  17788. SetVehicleAngularVelocity(GetPlayerVehicleID(i), 0.0, 0.0, 0.035);
  17789. }
  17790. else
  17791. {
  17792. SetVehicleAngularVelocity(GetPlayerVehicleID(i), 0.0, 0.0, -0.036);
  17793. }
  17794. }
  17795. }
  17796. }
  17797. if(PlayerStoned[i] == 60)
  17798. {
  17799. PlayerStoned[i] = 0;
  17800. SendClientMessage(i, COLOR_GREY, "You are no longer stoned.");
  17801. SetPlayerDrunkLevel(i, 0);
  17802. SetPlayerWeather(i, g_WeatherID);
  17803. new hour,minute,second;
  17804. new day,month,year;
  17805. gettime(hour,minute,second);
  17806. getdate(year,month,day);
  17807. hour = FixHour(hour);
  17808. SetPlayerTime(i, hour, minute);
  17809. }
  17810. }
  17811. if(calledTaxi[i] > 0)
  17812. {
  17813. calledTaxi[i] += 1;
  17814. if(calledTaxi[i] == 120)
  17815. {
  17816. SetPlayerToTeamColor(i);
  17817. calledTaxi[i] = 0;
  17818. }
  17819. }
  17820. if(Called911[i] > 0)
  17821. {
  17822. Called911[i] += 1;
  17823. if(Called911[i] == 600)
  17824. {
  17825. SetPlayerToTeamColor(i);
  17826. Called911[i] = 0;
  17827. }
  17828. }
  17829. if(PlayerInfo[i][pCarTime] > 0)
  17830. {
  17831. if(PlayerInfo[i][pCarTime] <= 0)
  17832. {
  17833. PlayerInfo[i][pCarTime] = 0;
  17834. }
  17835. else
  17836. {
  17837. PlayerInfo[i][pCarTime] -= 1;
  17838. }
  17839. }
  17840. if(PlayerInfo[i][pDrugsTime] > 0)
  17841. {
  17842. if(PlayerInfo[i][pDrugsTime] <= 0)
  17843. {
  17844. PlayerInfo[i][pDrugsTime] = 0;
  17845. }
  17846. else
  17847. {
  17848. PlayerInfo[i][pDrugsTime] -= 1;
  17849. }
  17850. }
  17851. if(PlayerInfo[i][pLawyerTime] > 0)
  17852. {
  17853. if(PlayerInfo[i][pLawyerTime] <= 0)
  17854. {
  17855. PlayerInfo[i][pLawyerTime] = 0;
  17856. }
  17857. else
  17858. {
  17859. PlayerInfo[i][pLawyerTime] -= 1;
  17860. }
  17861. }
  17862. if(PlayerInfo[i][pLawyerFreeTime] > 0)
  17863. {
  17864. if(PlayerInfo[i][pLawyerFreeTime] <= 0)
  17865. {
  17866. PlayerInfo[i][pLawyerFreeTime] = 0;
  17867. }
  17868. else
  17869. {
  17870. PlayerInfo[i][pLawyerFreeTime] -= 1;
  17871. }
  17872. }
  17873. if(PlayerInfo[i][pMechTime] > 0)
  17874. {
  17875. if(PlayerInfo[i][pMechTime] <= 0)
  17876. {
  17877. PlayerInfo[i][pMechTime] = 0;
  17878. }
  17879. else
  17880. {
  17881. PlayerInfo[i][pMechTime] -= 1;
  17882. }
  17883. }
  17884. if(PlayerInfo[i][pSexTime] > 0)
  17885. {
  17886. if(PlayerInfo[i][pSexTime] <= 0)
  17887. {
  17888. PlayerInfo[i][pSexTime] = 0;
  17889. }
  17890. else
  17891. {
  17892. PlayerInfo[i][pSexTime] -= 1;
  17893. }
  17894. }
  17895. if(PlayerInfo[i][pPlantTime] > 0)
  17896. {
  17897. if(PlayerInfo[i][pPlantTime] <= 0)
  17898. {
  17899. PlayerInfo[i][pPlantTime] = 0;
  17900. }
  17901. else
  17902. {
  17903. PlayerInfo[i][pPlantTime] -= 1;
  17904. }
  17905. }
  17906. if(PlayerInfo[i][pRepairTime] > 0)
  17907. {
  17908. if(PlayerInfo[i][pRepairTime] <= 0)
  17909. {
  17910. PlayerInfo[i][pRepairTime] = 0;
  17911. }
  17912. else
  17913. {
  17914. PlayerInfo[i][pRepairTime] -= 1;
  17915. }
  17916. }
  17917. if(PlayerInfo[i][pRobTime] > 0)
  17918. {
  17919. PlayerInfo[i][pRobTime] -= 1;
  17920. if(PlayerInfo[i][pRobTime] == 0)
  17921. {
  17922. PlayerInfo[i][pRobTime] = 0;
  17923. DestroyDynamic3DTextLabel(ThiefText[i]);
  17924. ThiefText[i] = Text3D:INVALID_3DTEXT_ID;
  17925. }
  17926. }
  17927. if(vipRepairTime[i] > 0)
  17928. {
  17929. if(vipRepairTime[i] <= 0)
  17930. {
  17931. vipRepairTime[i] = 0;
  17932. }
  17933. else
  17934. {
  17935. vipRepairTime[i] -= 1;
  17936. }
  17937. }
  17938. if(BoxWaitTime[i] > 0)
  17939. {
  17940. if(BoxWaitTime[i] >= BoxDelay)
  17941. {
  17942. BoxDelay = 0;
  17943. BoxWaitTime[i] = 0;
  17944. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  17945. displayCenterHUDInfo(i, "~g~Match started.", 8); //display for 8 seconds
  17946. TogglePlayerControllable(i, 1);
  17947. RoundStarted = 1;
  17948. }
  17949. else
  17950. {
  17951. format(str, sizeof(str), "~w~Time: ~r~%d", BoxDelay - BoxWaitTime[i]);
  17952. displayCenterHUDInfo(i, str, 8); //display for 8 seconds
  17953. BoxWaitTime[i] += 1;
  17954. }
  17955. }
  17956. if(RoundStarted > 0)
  17957. {
  17958. if(PlayerBoxing[i] > 0)
  17959. {
  17960. new trigger = 0;
  17961. new Lost = 0;
  17962. new Float:angle;
  17963. new Float:health;
  17964. GetPlayerHealth(i, health);
  17965. if(health < 12)
  17966. {
  17967. if(i == Boxer1)
  17968. {
  17969. Lost = 1;
  17970. trigger = 1;
  17971. }
  17972. else if(i == Boxer2)
  17973. {
  17974. Lost = 2;
  17975. trigger = 1;
  17976. }
  17977. }
  17978. if(health < 28)
  17979. {
  17980. GetPlayerFacingAngle(i, angle);
  17981. SetPlayerFacingAngle(i, angle + 85);
  17982. }
  17983. if(trigger)
  17984. {
  17985. new winner[MAX_PLAYER_NAME];
  17986. new loser[MAX_PLAYER_NAME];
  17987. new titel[MAX_PLAYER_NAME];
  17988. if(Lost == 1)
  17989. {
  17990. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  17991. {
  17992. SetPlayerPos(Boxer1, 765.8433, 3.2924, 1000.7186);
  17993. SetPlayerPos(Boxer2, 765.8433, 3.2924, 1000.7186);
  17994. SetPlayerInterior(Boxer1, 5);
  17995. SetPlayerInterior(Boxer2, 5);
  17996. GetPlayerICName(Boxer1, loser, sizeof(loser));
  17997. GetPlayerICName(Boxer2, winner, sizeof(winner));
  17998. if(PlayerInfo[Boxer1][pJob] == 12)
  17999. {
  18000. PlayerInfo[Boxer1][pLoses] += 1;
  18001. }
  18002. if(PlayerInfo[Boxer2][pJob] == 12)
  18003. {
  18004. PlayerInfo[Boxer2][pWins] += 1;
  18005. }
  18006. if(TBoxer < 255)
  18007. {
  18008. if(IsPlayerConnected(TBoxer))
  18009. {
  18010. if(TBoxer != Boxer2)
  18011. {
  18012. if(PlayerInfo[Boxer2][pJob] == 12)
  18013. {
  18014. TBoxer = Boxer2;
  18015. GetPlayerICName(TBoxer, titel, sizeof(titel));
  18016. new nstring[MAX_PLAYER_NAME];
  18017. format(nstring, sizeof(nstring), "%s", titel);
  18018. strmid(Titel[TitelName], nstring, 0, strlen(nstring));
  18019. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  18020. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  18021. SaveBoxer();
  18022. format(str, sizeof(str), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  18023. BoxingAnn(COLOR_WHITE, str);
  18024. }
  18025. else
  18026. {
  18027. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job.");
  18028. }
  18029. }
  18030. else
  18031. {
  18032. GetPlayerICName(TBoxer, titel, sizeof(titel));
  18033. format(str, sizeof(str), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  18034. BoxingAnn(COLOR_WHITE, str);
  18035. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  18036. Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
  18037. SaveBoxer();
  18038. }
  18039. }
  18040. }//TBoxer
  18041. format(str, sizeof(str), "* You have Lost the Fight against %s, you will be unfrozen in 3 seconds.", winner);
  18042. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, str);
  18043. displayCenterHUDInfo(Boxer1, "~r~You lose.", 8); //display for 8 seconds
  18044. format(str, sizeof(str), "* You have Won the Fight against %s, you will be unfrozen in 3 seconds.", loser);
  18045. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, str);
  18046. displayCenterHUDInfo(Boxer2, "~r~You win.", 8); //display for 8 seconds
  18047. if(GetPlayerHealth(Boxer1, health) < 20)
  18048. {
  18049. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  18050. SetPlayerHealth(Boxer1, 30.0);
  18051. }
  18052. else
  18053. {
  18054. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  18055. SetPlayerHealth(Boxer1, 50.0);
  18056. }
  18057. if(GetPlayerHealth(Boxer2, health) < 20)
  18058. {
  18059. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  18060. SetPlayerHealth(Boxer2, 30.0);
  18061. }
  18062. else
  18063. {
  18064. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  18065. SetPlayerHealth(Boxer2, 50.0);
  18066. }
  18067. displayCenterHUDInfo(Boxer1, "~g~Match over.", 8); //display for 8 seconds
  18068. displayCenterHUDInfo(Boxer2, "~g~Match over.", 8); //display for 8 seconds
  18069. if(PlayerInfo[Boxer2][pJob] == 12)
  18070. {
  18071. PlayerInfo[Boxer2][pBoxSkill] += 1;
  18072. }
  18073. PlayerBoxing[Boxer1] = 0;
  18074. PlayerBoxing[Boxer2] = 0;
  18075. TogglePlayerControllable(Boxer1, false);
  18076. TogglePlayerControllable(Boxer2, false);
  18077. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer1);
  18078. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer2);
  18079. SetPlayerArmour(Boxer2, PlayerKevBox[Boxer2]);
  18080. SetPlayerArmour(Boxer1, PlayerKevBox[Boxer1]);
  18081. PlayerKevBox[Boxer2] = 0;
  18082. PlayerKevBox[Boxer1] = 0;
  18083. SetPlayerPos(Boxer1, 765.9211, 10.2208, 1000.7089);
  18084. TextDrawHideForPlayer(Boxer1, Text:DieText);
  18085. TextDrawHideForPlayer(Boxer1, Text:InjuredText);
  18086. pInHospital[Boxer1] = 0;
  18087. pDeathState[Boxer1] = PLAYER_STATE_NORMAL;
  18088. PlayerCalledEMS[Boxer1] = 0;
  18089. ApplyAnimationEx(Boxer1, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
  18090. for(new temp = 0; temp <= 12; temp++)
  18091. {
  18092. lastpguns[Boxer1][temp][0] = 0;
  18093. lastpguns[Boxer1][temp][1] = 0;
  18094. }
  18095. }
  18096. }
  18097. else if(Lost == 2)
  18098. {
  18099. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  18100. {
  18101. SetPlayerPos(Boxer1, 765.8433, 3.2924, 1000.7186);
  18102. SetPlayerPos(Boxer2, 765.8433, 3.2924, 1000.7186);
  18103. SetPlayerInterior(Boxer1, 5);
  18104. SetPlayerInterior(Boxer2, 5);
  18105. GetPlayerICName(Boxer1, winner, sizeof(winner));
  18106. GetPlayerICName(Boxer2, loser, sizeof(loser));
  18107. if(PlayerInfo[Boxer2][pJob] == 12)
  18108. {
  18109. PlayerInfo[Boxer2][pLoses] += 1;
  18110. }
  18111. if(PlayerInfo[Boxer1][pJob] == 12)
  18112. {
  18113. PlayerInfo[Boxer1][pWins] += 1;
  18114. }
  18115. if(TBoxer < 255)
  18116. {
  18117. if(IsPlayerConnected(TBoxer))
  18118. {
  18119. if(TBoxer != Boxer1)
  18120. {
  18121. if(PlayerInfo[Boxer1][pJob] == 12)
  18122. {
  18123. TBoxer = Boxer1;
  18124. GetPlayerICName(TBoxer, titel, sizeof(titel));
  18125. new nstring[MAX_PLAYER_NAME];
  18126. format(nstring, sizeof(nstring), "%s", titel);
  18127. strmid(Titel[TitelName], nstring, 0, strlen(nstring));
  18128. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  18129. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  18130. SaveBoxer();
  18131. format(str, sizeof(str), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  18132. BoxingAnn(COLOR_WHITE, str);
  18133. }
  18134. else
  18135. {
  18136. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job.");
  18137. }
  18138. }
  18139. else
  18140. {
  18141. GetPlayerICName(TBoxer, titel, sizeof(titel));
  18142. format(str, sizeof(str), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  18143. BoxingAnn(COLOR_WHITE, str);
  18144. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  18145. Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
  18146. SaveBoxer();
  18147. }
  18148. }
  18149. }//TBoxer
  18150. format(str, sizeof(str), "* You have Lost the Fight against %s, you will be unfrozen in 3 seconds.", winner);
  18151. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, str);
  18152. displayCenterHUDInfo(Boxer2, "~r~You lost", 8); //display for 8 seconds
  18153. format(str, sizeof(str), "* You have Won the Fight against %s, you will be unfrozen in 3 seconds.", loser);
  18154. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, str);
  18155. displayCenterHUDInfo(Boxer1, "~r~You lost", 8); //display for 8 seconds
  18156. if(GetPlayerHealth(Boxer1, health) < 20)
  18157. {
  18158. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  18159. SetPlayerHealth(Boxer1, 30.0);
  18160. }
  18161. else
  18162. {
  18163. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  18164. SetPlayerHealth(Boxer1, 50.0);
  18165. }
  18166. if(GetPlayerHealth(Boxer2, health) < 20)
  18167. {
  18168. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  18169. SetPlayerHealth(Boxer2, 30.0);
  18170. }
  18171. else
  18172. {
  18173. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  18174. SetPlayerHealth(Boxer2, 50.0);
  18175. }
  18176. displayCenterHUDInfo(Boxer1, "~g~Match Over", 8); //display for 8 seconds
  18177. displayCenterHUDInfo(Boxer2, "~g~Match Over", 8); //display for 8 seconds
  18178. if(PlayerInfo[Boxer1][pJob] == 12)
  18179. {
  18180. PlayerInfo[Boxer1][pBoxSkill] += 1;
  18181. }
  18182. PlayerBoxing[Boxer1] = 0;
  18183. PlayerBoxing[Boxer2] = 0;
  18184. TogglePlayerControllable(Boxer1, false);
  18185. TogglePlayerControllable(Boxer2, false);
  18186. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer1);
  18187. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer2);
  18188. SetPlayerArmour(Boxer2, PlayerKevBox[Boxer2]);
  18189. SetPlayerArmour(Boxer1, PlayerKevBox[Boxer1]);
  18190. PlayerKevBox[Boxer2] = 0;
  18191. PlayerKevBox[Boxer1] = 0;
  18192. SetPlayerPos(Boxer1, 765.9211, 10.2208, 1000.7089);
  18193. TextDrawHideForPlayer(Boxer1, Text:DieText);
  18194. TextDrawHideForPlayer(Boxer1, Text:InjuredText);
  18195. pInHospital[Boxer1] = 0;
  18196. pDeathState[Boxer1] = PLAYER_STATE_NORMAL;
  18197. PlayerCalledEMS[Boxer1] = 0;
  18198. ApplyAnimationEx(Boxer1, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
  18199. for(new temp = 0; temp <= 12; temp++)
  18200. {
  18201. lastpguns[Boxer1][temp][0] = 0;
  18202. lastpguns[Boxer1][temp][1] = 0;
  18203. }
  18204. }
  18205. }
  18206. InRing = 0;
  18207. RoundStarted = 0;
  18208. TogglePlayerControllable(Boxer1, false);
  18209. TogglePlayerControllable(Boxer2, false);
  18210. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer1);
  18211. SetTimerEx("Timer_UnfreezeBoxing", 3000, false, "i", Boxer2);
  18212. Boxer1 = 255;
  18213. Boxer2 = 255;
  18214. TBoxer = 255;
  18215. trigger = 0;
  18216. }
  18217. }
  18218. }
  18219. // Detective job
  18220. detective_SecondSync(i);
  18221. if(TaxiCallTime[i] > 0)
  18222. {
  18223. if(TaxiAccepted[i] < 999)
  18224. {
  18225. if(IsPlayerConnected(TaxiAccepted[i]))
  18226. {
  18227. new Float:X, Float:Y, Float:Z;
  18228. GetPlayerPos(TaxiAccepted[i], X, Y, Z);
  18229. SetPlayerCheckpointEx(i, X, Y, Z, 5);
  18230. }
  18231. }
  18232. }
  18233. if(BusCallTime[i] > 0)
  18234. {
  18235. if(BusAccepted[i] < 999)
  18236. {
  18237. if(IsPlayerConnected(BusAccepted[i]))
  18238. {
  18239. new Float:X, Float:Y, Float:Z;
  18240. GetPlayerPos(BusAccepted[i], X, Y, Z);
  18241. SetPlayerCheckpointEx(i, X, Y, Z, 5);
  18242. }
  18243. }
  18244. }
  18245. if(MedicCallTime[i] > 0)
  18246. {
  18247. if(MedicCallTime[i] == 30)
  18248. {
  18249. MedicCallTime[i] = 0;
  18250. DisablePlayerCheckpointEx(i);
  18251. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  18252. displayCenterHUDInfo(i, "~r~Redmarker gone.", 8);
  18253. }
  18254. else
  18255. {
  18256. format(str, sizeof(str), "~r~Time: ~w~%d", 30 - MedicCallTime[i]);
  18257. displayCenterHUDInfo(i, str, 8);
  18258. MedicCallTime[i] += 1;
  18259. }
  18260. }
  18261. if(LawyerCallTime[i] > 0)
  18262. {
  18263. if(LawyerCallTime[i] == 30)
  18264. {
  18265. LawyerCallTime[i] = 0;
  18266. DisablePlayerCheckpointEx(i);
  18267. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  18268. displayCenterHUDInfo(i, "~r~Redmarker gone.", 8);
  18269. }
  18270. else
  18271. {
  18272. format(str, sizeof(str), "~r~Time: ~w~%d", 30 - LawyerCallTime[i]);
  18273. displayCenterHUDInfo(i, str, 8);
  18274. LawyerCallTime[i] += 1;
  18275. }
  18276. }
  18277. if(MechanicCallTime[i] > 0)
  18278. {
  18279. if(MechanicCallTime[i] == 30)
  18280. {
  18281. MechanicCallTime[i] = 0;
  18282. DisablePlayerCheckpointEx(i);
  18283. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  18284. displayCenterHUDInfo(i, "~r~Redmarker gone.", 8);
  18285. }
  18286. else
  18287. {
  18288. format(str, sizeof(str), "~r~Time: ~w~%d", 30 - MechanicCallTime[i]);
  18289. displayCenterHUDInfo(i, str, 8);
  18290. MechanicCallTime[i] += 1;
  18291. }
  18292. }
  18293. if(PlayerTazed[i] == 1)
  18294. {
  18295. if(PlayerTazedTime[i] <= 0)
  18296. {
  18297. setPlayerUntazed(i);
  18298. }
  18299. else
  18300. {
  18301. PlayerTazedTime[i] -= 1;
  18302. }
  18303. }
  18304. if(PlayerCuffed[i] > 0)
  18305. {
  18306. if(PlayerCuffedTime[i] <= 0)
  18307. {
  18308. displayCenterHUDInfo(i, "~w~You broke free of the cuffs~n~~g~You are free!", 8);
  18309. setPlayerUncuffed(i);
  18310. }
  18311. else
  18312. {
  18313. PlayerCuffedTime[i] -= 1;
  18314. }
  18315. }
  18316. if(PlayerTied[i] == 1)
  18317. {
  18318. if(PlayerTiedTime[i] <= 0)
  18319. {
  18320. displayCenterHUDInfo(i, "~w~You broke free of the ropes~n~~g~You are free.", 8);
  18321. SetCameraBehindPlayer(i);
  18322. PlayerBlinded[i] = 0;
  18323. TogglePlayerControllable(i, 1);
  18324. PlayerTied[i] = 0;
  18325. PlayerTiedTime[i] = 0;
  18326. }
  18327. else
  18328. {
  18329. PlayerTiedTime[i] -= 1;
  18330. }
  18331. }
  18332. if(GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsAtEvent[i])
  18333. {
  18334. new
  18335. dynvehID = GetDynamicVehicleID(GetPlayerVehicleID(i));
  18336. if(!(PlayerInfo[i][pMember] >= sVehicleInfo[dynvehID][v_faction] || PlayerInfo[i][pGroup] == GROUP_S9))
  18337. {
  18338. if(!(PlayerInfo[i][pJob] == 14 && sVehicleInfo[dynvehID][v_faction] == 10))
  18339. {
  18340. RemovePlayerFromVehicle(i);
  18341. }
  18342. }
  18343. else if(IsDMVCar(GetPlayerVehicleID(i)))
  18344. {
  18345. if(dmvSlot[i] == 0)
  18346. {
  18347. RemovePlayerFromVehicle(i);
  18348. }
  18349. }
  18350. else if(IsATaxiCar(GetPlayerVehicleID(i)) && i != DOCbus)
  18351. {
  18352. if(PlayerInfo[i][pMember] != 10 && PlayerInfo[i][pJob] != 14 || PlayerInfo[i][pHelper] == 0 && HelpingNewbie[i] == true)
  18353. {
  18354. RemovePlayerFromVehicle(i);
  18355. }
  18356. }
  18357. }
  18358. if(usePayphone[i] != -1 && IsPlayerNearPayPhone(i) == -1)
  18359. {
  18360. SendClientMessage(i, COLOR_GREY, "You left the phone stand.");
  18361. payPhone[usePayphone[i]][inUse] = 0;
  18362. usePayphone[i] = -1;
  18363. detachPhoneFromPlayer(Mobile[i]);
  18364. if(!cellMuted[i])
  18365. {
  18366. playLocalSound(Mobile[i], SMS_RECIEVED, 2.0, 0);
  18367. }
  18368. CellTime[Mobile[i]] = 0;
  18369. CellTime[i] = 0;
  18370. SendClientMessage(Mobile[i], COLOR_GRAD2, "The line just went dead...");
  18371. Mobile[Mobile[i]] = 999;
  18372. Mobile[i] = 999;
  18373. }
  18374. if(hotWireTime[i] == 0 && hotWireVeh[i] > 0)
  18375. {
  18376. new vehid = hotWireVeh[i];
  18377. if(Gas[vehid] > 1)
  18378. {
  18379. new engine, lights, alarm, doors, bonnet, boot, objective;
  18380. GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
  18381. SetVehicleParamsEx(vehid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
  18382. engineOn[vehid] = 1;
  18383. playerDisabledEngine[vehid] = 0;
  18384. displayCenterHUDInfo(i, "~g~Success", 8); //display for 8 seconds
  18385. }
  18386. else SendClientMessage(i, COLOR_GREY, "This vehicle is out of fuel.");
  18387. hotWireVeh[i] = -1;
  18388. }
  18389. if(hotWireTime[i] > 0)
  18390. {
  18391. hotWireTime[i]--;
  18392. displayCenterHUDInfo(i, "~g~Hotwiring...", 8); //display for 8 seconds
  18393. }
  18394. //doing their license test
  18395. if(dmvSlot[i] > 0)
  18396. {
  18397. if(GetVehicleSpeed(GetPlayerVehicleID(i)) > 52)
  18398. {
  18399. autoFailed[i] = true;
  18400. }
  18401. }
  18402. if(HospitalTime[i] > 0)
  18403. {
  18404. if(HospitalTime[i] > 49) //finished hospital
  18405. {
  18406. releasePlayerFromHospital(i);
  18407. HospitalTime[i] = 0;
  18408. //relase
  18409. } else {
  18410. new Float:health;
  18411. GetPlayerHealth(i, health);
  18412. SetPlayerHealth(i, health += 1);
  18413. //increment
  18414. HospitalTime[i] += 1;
  18415. }
  18416. }
  18417. if(pDeathState[i] == PLAYER_STATE_REVIVE)
  18418. {
  18419. if(PlayerCalledEMS[i] == 1)
  18420. {
  18421. if(EMSArrived[i] == 0)
  18422. {
  18423. displayCenterHUDInfo(i, "~w~Awaiting ~r~EMS~w~...", 8); //display for 8 seconds
  18424. }
  18425. }
  18426. DeathPos[i][DeathHP] -= 0.20;
  18427. SetPlayerHealth(i, DeathPos[i][DeathHP]);
  18428. if(GetPlayerAnimationIndex(i) != 1151) ApplyAnimationEx(i, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  18429. if(DeathPos[i][DeathHP] <= 1)
  18430. {
  18431. SetPlayerHealth(i, 0);
  18432. pDeathState[i] = PLAYER_STATE_INHOSP;
  18433. PlayerCalledEMS[i] = 0;
  18434. }
  18435. }
  18436. if(hasTruckCheckpoint[i] != -1) {
  18437. new vehicleid = GarbageTruck[hasTruckCheckpoint[i]][vehicle_id];
  18438. //reset the checkpoint (in case the truck moves)
  18439. new Float:vehX, Float:vehY, Float:vehZ, Float:vehA;
  18440. GetVehiclePos(vehicleid, vehX, vehY, vehZ);
  18441. GetVehicleZAngle(vehicleid, vehA);
  18442. vehX -= (3 * floatsin(-vehA, degrees));
  18443. vehY -= (3 * floatcos(-vehA, degrees));
  18444. SetPlayerCheckpointEx(i, vehX, vehY, vehZ, 3.0);
  18445. //set checkpoint ID
  18446. CP[i] = CHECKPOINT_GARBAGE;
  18447. }
  18448. if(autoChatTime[i] > 0) //this returns so keep it at bottom
  18449. {
  18450. new currAnim = GetPlayerAnimationIndex(i);
  18451. if(currAnim != 1189 && currAnim != 1231 && currAnim != 320 && currAnim != 1192 && currAnim != 1183 && currAnim != 1188) //walking or standing idle
  18452. {
  18453. autoChatTime[i] = 0;
  18454. }
  18455. autoChatTime[i] -= 1;
  18456. if(autoChatTime[i] <= 0)
  18457. {
  18458. ApplyAnimationEx(i, "PED", "IDLE_CHAT", 4.1, 0, 0, 0, 0, 1);
  18459. autoChatTime[i] = 0;
  18460. }
  18461. }
  18462. if(ExitTimer[i] > 0)
  18463. {
  18464. ExitTimer[i]--;
  18465. }
  18466. if(WireOfferID[i] != INVALID_PLAYER_ID)
  18467. {
  18468. new Float: a[3], Float: b[3];
  18469. GetPlayerPos(WireOfferID[i], a[0], a[1], a[2]);
  18470. if(a[0] == buggedPos[0][WireOfferID[i]] && a[1] == buggedPos[1][WireOfferID[i]] && a[2] == buggedPos[2][WireOfferID[i]])
  18471. {
  18472. GetPlayerPos(i, b[0], b[1], b[2]);
  18473. if(b[0] == buggedPos[0][i] && b[1] == buggedPos[1][i] && b[2] == buggedPos[2][i])
  18474. {
  18475. if(PlayerInfo[i][pID] == 7752 || PlayerInfo[i][pID] == 7753)
  18476. {
  18477. format(str, sizeof(str), "* You planted a bug on %s.", PlayerICName(i));
  18478. SendClientMessage(WireOfferID[i], COLOR_LIGHTBLUE, str);
  18479. }
  18480. else
  18481. {
  18482. format(str, sizeof(str), "* You planted a bug on %s.", PlayerICName(i));
  18483. SendClientMessage(WireOfferID[i], COLOR_LIGHTBLUE, str);
  18484. PlayerInfo[i][pWire] = 1;
  18485. WireOfferID[i] = INVALID_PLAYER_ID;
  18486. printf("%s GOT BUGGED /PLANTBUG", PlayerOOCName(i));
  18487. }
  18488. }
  18489. else
  18490. {
  18491. SendClientMessage(WireOfferID[i], COLOR_GREY, "Your attempt was not successful because your target moved.");
  18492. WireOfferID[i] = INVALID_PLAYER_ID;
  18493. }
  18494. }
  18495. else
  18496. {
  18497. SendClientMessage(WireOfferID[i], COLOR_GREY, "Your attempt was not successful because you moved.");
  18498. WireOfferID[i] = INVALID_PLAYER_ID;
  18499. }
  18500. }
  18501. if(cameraLive == false)
  18502. {
  18503. if(WatchingTV[i] == true)
  18504. {
  18505. WatchingTV[i] = false;
  18506. SetPlayerPos(i, PlayerInfo[i][pSPos_x], PlayerInfo[i][pSPos_y], PlayerInfo[i][pSPos_z]);
  18507. SetPlayerFacingAngle(i, PlayerInfo[i][pSPos_r]);
  18508. SetPlayerVirtualWorld(i, PlayerInfo[i][pVirtualWorld]);
  18509. SetPlayerInterior(i, PlayerInfo[i][pInt]);
  18510. TogglePlayerControllable(i, 1);
  18511. SetCameraBehindPlayer(i);
  18512. Timer_FreezePlayer(i, FREEZE, ENTER_FREEZE);
  18513. SendClientMessage(i, COLOR_GRAD1, "Something went wrong with the San Andreas Network channel.");
  18514. }
  18515. }
  18516. if(PlayerInfo[i][pJob] == 21 && onpizzadelivery[i] == 1)
  18517. {
  18518. if(IsPlayerInAnyVehicle(i) && GetVehicleModel(GetPlayerVehicleID(i)) == 448)
  18519. {
  18520. if(GetPlayerProgressBarValue(i, pizzajobdeliveryid[i]) > 0)
  18521. {
  18522. SetPlayerProgressBarValue(i, pizzajobdeliveryid[i], GetPlayerProgressBarValue(i, pizzajobdeliveryid[i])-0.5);
  18523. }
  18524. else
  18525. {
  18526. SendClientMessage(i, -1, "You have failed to deliver the pizza on time.");
  18527. cancelpizzadelivery(i);
  18528. }
  18529. }
  18530. }
  18531. if(beingtreatedtime[i] > 0)
  18532. {
  18533. beingtreatedtime[i] -= 1;
  18534. new heartRate = beingtreatedtime[i];
  18535. if(heartRate > 150 || heartRate < 1)
  18536. {
  18537. SendClientMessage(i, COLOR_LIGHTBLUE, "Your heart rate was extremely unstable and your treatment has failed.");
  18538. format(str, sizeof(str), "%s's treatment has failed due to an extremely unstable heart rate.", PlayerICName(i));
  18539. SendParaMessage(COLOR_DOCTOR, str);
  18540. pDeathState[i] = PLAYER_STATE_REVIVE;
  18541. SetPlayerHealth(i, 0);
  18542. TogglePlayerControllable(i, true);
  18543. SetCameraBehindPlayer(i);
  18544. displayCenterHUDInfo(i, "~r~Treatment failed.", 8);
  18545. ResetPlayerWeapons(i);
  18546. ClearGuns(i);
  18547. ResetPlayerAdminWeaponsEx(i);
  18548. // Make the room available again
  18549. if(istreatedinallsaints[i] == 1)
  18550. {
  18551. allsaintsrooms[treatedinroom[i]] = 0;
  18552. }
  18553. if(istreatedinallsaints[i] == 0)
  18554. {
  18555. countygenrooms[treatedinroom[i]] = 0;
  18556. }
  18557. treatedinroom[i] = 0;
  18558. beingtreatedtime[i] = 0;
  18559. }
  18560. }
  18561. if(PlayerInfo[i][pReqUnmute] > 0) PlayerInfo[i][pReqUnmute] --;
  18562. if(PlayerInfo[i][pRepMuted] > 0) PlayerInfo[i][pRepMuted] --;
  18563. if(PlayerInfo[i][pReqNC] > 0) PlayerInfo[i][pReqNC] --;
  18564. if(breakingpcuffs[i] != INVALID_PLAYER_ID)
  18565. {
  18566. if(!IsPlayerInRangeOfPlayer(2.0, i, breakingpcuffs[i]))
  18567. {
  18568. SendClientMessage(i, COLOR_GREY, "You moved from the player and failed breaking his cuffs.");
  18569. HidePlayerProgressBar(i, breakcuffs[i]);
  18570. HidePlayerProgressBar(breakingpcuffs[i], breakcuffs[i]);
  18571. breakingpcuffs[i] = INVALID_PLAYER_ID;
  18572. isbreakingcuffs[i] = false;
  18573. }
  18574. else if((IsPlayerRestricted(i)))
  18575. {
  18576. SendClientMessage(i, COLOR_GREY, "You failed to break that player's cuffs.");
  18577. HidePlayerProgressBar(i, breakcuffs[i]);
  18578. HidePlayerProgressBar(breakingpcuffs[i], breakcuffs[i]);
  18579. breakingpcuffs[i] = INVALID_PLAYER_ID;
  18580. isbreakingcuffs[i] = false;
  18581. }
  18582. }
  18583. // For /fall(ing) command
  18584. if(IsFallingFromInterior(i)) {
  18585. fallingSeconds[i]++;
  18586. if(fallingSeconds[i] == 3) {
  18587. SendClientMessage(i, COLOR_YELLOW, "The server has detected that you might be falling from an interior.");
  18588. SendClientMessage(i, COLOR_YELLOW, "If this is the case, please use /fall(ing) to get teleported to safety.");
  18589. }
  18590. }
  18591. else fallingSeconds[i] = 0;
  18592. }
  18593. else
  18594. {
  18595. if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
  18596. {
  18597. format(str, sizeof(str), "RellexDebug: %s has been kicked - loopa cheat", PlayerName(i));
  18598. printf(str);
  18599. Kick(i);
  18600. }
  18601. }
  18602. return 1;
  18603. }
  18604. //==============================================================================
  18605. Timer:TazerTimer(playerid)
  18606. {
  18607. if(IsPlayerConnected(playerid))
  18608. {
  18609. if(TazerTime[playerid] == 1)
  18610. {
  18611. TazerTime[playerid] = 0;
  18612. }
  18613. }
  18614. }
  18615. //==============================================================================
  18616. //==============================================================================
  18617. stock SetPlayerWeapons(playerid)
  18618. {
  18619. if(IsPlayerConnected(playerid))
  18620. {
  18621. ResetPlayerWeapons(playerid);
  18622. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
  18623. {
  18624. GivePlayerGun(playerid, 42);
  18625. }
  18626. if(PlayerInfo[playerid][pGun12] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun12], 65000);
  18627. if(PlayerInfo[playerid][pGun11] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun11], 65000);
  18628. if(PlayerInfo[playerid][pGun10] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun10], 65000);
  18629. if(PlayerInfo[playerid][pGun9] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun9], 65000);
  18630. if(PlayerInfo[playerid][pGun8] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun8], 2);
  18631. if(PlayerInfo[playerid][pGun7] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun7], 65000);
  18632. if(PlayerInfo[playerid][pGun6] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun6], 65000);
  18633. if(PlayerInfo[playerid][pGun5] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun5], 65000);
  18634. if(PlayerInfo[playerid][pGun4] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], 65000);
  18635. if(PlayerInfo[playerid][pGun3] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], 65000);
  18636. if(PlayerInfo[playerid][pGun2] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], 65000);
  18637. if(PlayerInfo[playerid][pGun1] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], 65000);
  18638. if(PlayerInfo[playerid][pGun0] > 0) GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun0], 65000);
  18639. new weapondata, ammo;
  18640. GetPlayerWeaponData(playerid, 0, weapondata, ammo); // Fist or brass knuckles
  18641. SetPlayerArmedWeapon(playerid, weapondata);
  18642. }
  18643. return 1;
  18644. }
  18645. public IPCheckResponse(playerid, response_code, data[])// /ipcheck system fully fixed by Shadow
  18646. {
  18647. new str[1024];
  18648. if(response_code == 200)
  18649. {
  18650. new inform[11][128];
  18651. split(data, inform, ';');
  18652. new dotcount = 0;
  18653. for(new i = 0; i < strlen(ipchecking[playerid]); i++)
  18654. {
  18655. if(ipchecking[playerid][i] == '.') dotcount++;
  18656. }
  18657. if(dotcount == 3)
  18658. {
  18659. format(str, sizeof(str), "%s's information:", inform[2]);
  18660. }
  18661. else
  18662. {
  18663. format(str, sizeof(str), "%s's (IP: %s) information:", ipchecking[playerid], inform[2]);
  18664. }
  18665. SendClientMessage(playerid, COLOR_YELLOW, str);
  18666. format(str, sizeof(str), "Country: %s (%s).", inform[4], inform[3]);
  18667. SendClientMessage(playerid, COLOR_GRAD1, str);
  18668. format(str, sizeof(str), "City, State: %s, %s (ZIP: %d).", inform[6], inform[5], strval(inform[7]));
  18669. SendClientMessage(playerid, COLOR_GRAD1, str);
  18670. format(str, sizeof(str), "Longitude: %s, Latitude: %s, Timezone: %s.", inform[8], inform[9], inform[10]);
  18671. SendClientMessage(playerid, COLOR_GRAD1, str);
  18672. }
  18673. else
  18674. {
  18675. format(str, sizeof(str), "IP Check had an issue and returned the response code %d.", response_code);
  18676. SendClientMessage(playerid, COLOR_GRAD2, str);
  18677. }
  18678. return 1;
  18679. }
  18680. stock ShowProfile(playerid, targetid)
  18681. {
  18682. new pmember = PlayerInfo[targetid][pMember];
  18683. new pleader = PlayerInfo[targetid][pLeader];
  18684. new fakefaction = FakeFaction[targetid];
  18685. new name[MAX_PLAYER_NAME];
  18686. GetPlayerName(targetid, name, sizeof(name));
  18687. new age = PlayerInfo[targetid][pAge];
  18688. new rank;
  18689. if(PlayerInfo[targetid][pMember] == 11 && FakeFaction[targetid] == 0) rank = 0;
  18690. else if (PlayerInfo[targetid][pMember] == 11) rank = FakeRank[playerid];
  18691. else if (PlayerInfo[targetid][pMember] == FACTION_FBI) rank = 0;
  18692. else rank = PlayerInfo[targetid][pRank];
  18693. new ftext[64];
  18694. if(pmember == 1 || pleader == 1 || fakefaction == 1)
  18695. {
  18696. ftext = "SAPD";
  18697. }
  18698. else if(pmember == 3 || pleader == 3 || fakefaction == 3)
  18699. {
  18700. ftext = "SASD";
  18701. }
  18702. else if(pmember == 4 || pleader == 4 || fakefaction == 4)
  18703. {
  18704. ftext = "SAFMD";
  18705. }
  18706. else if(pmember == 5 || pleader == 5 || fakefaction == 5)
  18707. {
  18708. ftext = "DoC";
  18709. }
  18710. else if(pmember == 6 || pleader == 6 || fakefaction == 6)
  18711. {
  18712. ftext = "Government";
  18713. }
  18714. else if(pmember == 9 || pleader == 9 || fakefaction == 9)
  18715. {
  18716. ftext = "News Agency";
  18717. }
  18718. else if(pmember == 10 || pleader == 10 || fakefaction == 10)
  18719. {
  18720. ftext = "San Andreas Taxi Company";
  18721. }
  18722. else if(pmember == 12 || pleader == 12)
  18723. {
  18724. ftext = "DEA";
  18725. }
  18726. else if(pmember == 13 || pleader == 13)
  18727. {
  18728. ftext = "ATF";
  18729. }
  18730. else if(pmember == 14 || pleader == 14)
  18731. {
  18732. //ftext = "SANG";
  18733. ftext = "AFSA";
  18734. }
  18735. else
  18736. {
  18737. ftext = "None";
  18738. }
  18739. new info[128];
  18740. new htext[40]; // House
  18741. if(PlayerInfo[targetid][pHouseID] == 0)
  18742. {
  18743. htext = "None";
  18744. }
  18745. else
  18746. {
  18747. new location[MAX_ZONE_NAME];
  18748. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[PlayerInfo[targetid][pHouseID]][hOutsideX], HouseInfo[PlayerInfo[targetid][pHouseID]][hOutsideY], HouseInfo[PlayerInfo[targetid][pHouseID]][hOutsideZ]);
  18749. format(htext, sizeof(htext), "%d %s", PlayerInfo[targetid][pHouseID], location);
  18750. }
  18751. SendClientMessage(playerid, COLOR_WHITE, "Profile Information:");
  18752. format(info, sizeof(info), "Name: %s", name);
  18753. SendClientMessage(playerid, COLOR_GREY, info);
  18754. format(info, sizeof(info), "Age: %d", age);
  18755. SendClientMessage(playerid, COLOR_GREY, info);
  18756. format(info, sizeof(info), "Organisation: %s", ftext);
  18757. SendClientMessage(playerid, COLOR_GREY, info);
  18758. format(info, sizeof(info), "House Address: %s", htext);
  18759. SendClientMessage(playerid, COLOR_GREY, info);
  18760. format(info, sizeof(info), "Rank: %d", rank);
  18761. SendClientMessage(playerid, COLOR_GREY, info);
  18762. format(info, sizeof(info), "Cellphone: %d", PlayerInfo[targetid][pPnumber]);
  18763. SendClientMessage(playerid, COLOR_GREY, info);
  18764. return 1;
  18765. }
  18766. //==============================================================================
  18767. SetPlayerToTeamColor(playerid)
  18768. {
  18769. if(IsPlayerConnected(playerid))
  18770. {
  18771. if(PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pLeader] == 0 && PlayerInfo[playerid][pHAFakeBadge] == 0) //CIVILIAN
  18772. {
  18773. SetPlayerColor(playerid, TCOLOR_WHITE);
  18774. }
  18775. else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pHAFakeBadge] == 1 || FakeFaction[playerid] == 1) //SAPD
  18776. {
  18777. if(PlayerInfo[playerid][pOnDuty] == 1)
  18778. {
  18779. SetPlayerColor(playerid, TCOLOR_BLUE);
  18780. }
  18781. else
  18782. {
  18783. SetPlayerColor(playerid, TCOLOR_WHITE);
  18784. }
  18785. }
  18786. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pHAFakeBadge] == 2) //FBI
  18787. {
  18788. if(PlayerInfo[playerid][pOnDuty] == 1)
  18789. {
  18790. SetPlayerColor(playerid, TCOLOR_NAVYBLUE);
  18791. }
  18792. else
  18793. {
  18794. SetPlayerColor(playerid, TCOLOR_WHITE);
  18795. }
  18796. }
  18797. else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pHAFakeBadge] == 3) //SASD
  18798. {
  18799. if(PlayerInfo[playerid][pOnDuty] == 1)
  18800. {
  18801. SetPlayerColor(playerid, TCOLOR_BEIGE);
  18802. }
  18803. else
  18804. {
  18805. SetPlayerColor(playerid, TCOLOR_WHITE);
  18806. }
  18807. }
  18808. else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pHAFakeBadge] == 4 || FakeFaction[playerid] == 4) //PARAMEDIC
  18809. {
  18810. if(PlayerInfo[playerid][pOnDuty] == 1)
  18811. {
  18812. SetPlayerColor(playerid, TCOLOR_PARAMEDIC);
  18813. }
  18814. else
  18815. {
  18816. SetPlayerColor(playerid, TCOLOR_WHITE);
  18817. }
  18818. }
  18819. else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pHAFakeBadge] == 5 || FakeFaction[playerid] == 5) //DoC
  18820. {
  18821. if(PlayerInfo[playerid][pOnDuty] == 1)
  18822. {
  18823. SetPlayerColor(playerid, COLOR_DOC_NAMETAG);
  18824. }
  18825. else
  18826. {
  18827. SetPlayerColor(playerid, TCOLOR_WHITE);
  18828. }
  18829. }
  18830. else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pHAFakeBadge] == 6 || FakeFaction[playerid] == 6) //SENATE
  18831. {
  18832. if(PlayerInfo[playerid][pOnDuty] == 1)
  18833. {
  18834. SetPlayerColor(playerid, TCOLOR_SENATE);
  18835. }
  18836. else
  18837. {
  18838. SetPlayerColor(playerid, TCOLOR_WHITE);
  18839. }
  18840. }
  18841. else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pHAFakeBadge] == 7) //HIGH COURT
  18842. {
  18843. if(PlayerInfo[playerid][pOnDuty] == 1)
  18844. {
  18845. SetPlayerColor(playerid, TCOLOR_HIGHCOURT);
  18846. }
  18847. else
  18848. {
  18849. SetPlayerColor(playerid, TCOLOR_WHITE);
  18850. }
  18851. }
  18852. else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
  18853. {
  18854. if(PlayerInfo[playerid][pOnDuty] == 1)
  18855. {
  18856. SetPlayerColor(playerid, TCOLOR_LIGHTBLUE);
  18857. }
  18858. else
  18859. {
  18860. SetPlayerColor(playerid, TCOLOR_WHITE);
  18861. }
  18862. }
  18863. else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
  18864. {
  18865. SetPlayerColor(playerid, TCOLOR_WHITE);
  18866. }
  18867. else if(PlayerInfo[playerid][pGroup] == GROUP_S9 && FakeFaction[playerid] == 0)
  18868. {
  18869. SetPlayerColor(playerid, TCOLOR_WHITE); // S9
  18870. }
  18871. else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pHAFakeBadge] == 12)
  18872. {
  18873. SetPlayerColor(playerid, TCOLOR_WHITE); //DEA
  18874. }
  18875. else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pHAFakeBadge] == 13)
  18876. {
  18877. SetPlayerColor(playerid, TCOLOR_WHITE); //ATF
  18878. }
  18879. else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pHAFakeBadge] == 14)
  18880. {
  18881. if(PlayerInfo[playerid][pOnDuty] == 1)
  18882. {
  18883. SetPlayerColor(playerid, C_COLOR_SANG);
  18884. }
  18885. else
  18886. {
  18887. SetPlayerColor(playerid, TCOLOR_WHITE);
  18888. }
  18889. }
  18890. else if(PlayerInfo[playerid][pJailed] == 2)
  18891. {
  18892. SetPlayerColor(playerid, TCOLOR_PRISON);
  18893. }
  18894. else if(PlayerInfo[playerid][pJailed] == 3)
  18895. {
  18896. SetPlayerColor(playerid, TCOLOR_APRISON);
  18897. }
  18898. else if(PlayerInfo[playerid][pJailed] == 4)
  18899. {
  18900. SetPlayerColor(playerid, TCOLOR_PRISON);
  18901. }
  18902. else if(PlayerInfo[playerid][pJailed] == 5)
  18903. {
  18904. SetPlayerColor(playerid, TCOLOR_PRISON);
  18905. }
  18906. if(PlayerInfo[playerid][pVipColor] == 1)
  18907. {
  18908. if(PlayerInfo[playerid][pDonateRank] == 4)
  18909. {
  18910. SetPlayerColor(playerid, SCOLOR_CYAN);
  18911. }
  18912. else
  18913. {
  18914. SetPlayerColor(playerid, 0x80008000);
  18915. }
  18916. }
  18917. if(usingFC[playerid] == 1)
  18918. {
  18919. SetPlayerColor(playerid, COLOR_FAMED);
  18920. }
  18921. if(PlayerInfo[playerid][pHidingBadge])
  18922. {
  18923. SetPlayerColor(playerid, TCOLOR_WHITE);
  18924. }
  18925. }
  18926. return 1;
  18927. }
  18928. //==============================================================================
  18929. GameModeInitExitFunc()
  18930. {
  18931. if(gamemodeLoaded) //only save the data if the gamemode is loaded
  18932. {
  18933. foreach( new i: Player )
  18934. {
  18935. if(PlayerInfo[i][pHospital] != 0)
  18936. {
  18937. PlayerInfo[i][pHospital] = 1;
  18938. }
  18939. OnPlayerSave(i);
  18940. DisablePlayerCheckpointEx(i);
  18941. StopAudioStreamForPlayer(i);
  18942. destroyCenterHUDInfo(i);
  18943. clearAttachedObjects(i);
  18944. KillTimer(pModelTimer[i]);
  18945. destroyBoomBox(i);
  18946. if(plNCData[i][ncCameraMode] == 1) CancelFlyMode(i);
  18947. if( playerSpawnedVehicle[i] > -1 ) {
  18948. savePlayerVehicle( i, playerSpawnedVehicle[i] );
  18949. }
  18950. }
  18951. for(new i = 0; i < sizeof(sVehicleInfo[]); i++)
  18952. {
  18953. if(IsValidVehicle(sVehicleInfo[i][v_id]))
  18954. {
  18955. DestroyVehicle(sVehicleInfo[i][v_id]);
  18956. }
  18957. }
  18958. SaveStuff();
  18959. SaveWeed();
  18960. SaveBusinesses();
  18961. SaveFamilies();
  18962. SaveBars();
  18963. SaveDealerships();
  18964. SaveHouses();
  18965. SaveGates();
  18966. SaveSurnames();
  18967. SaveEntrances();
  18968. SaveGarages();
  18969. SaveFactionBanks();
  18970. SaveAdminMessages();
  18971. SaveRadios(); //radios
  18972. destroyCinematicTextDraw();
  18973. destroyAdvertismentTextDraw();
  18974. TextDrawHideForAll(PaintballLeaderTD);
  18975. TextDrawDestroy(PaintballLeaderTD);
  18976. TextDrawHideForAll(PaintballLeaderTD2);
  18977. TextDrawDestroy(PaintballLeaderTD2);
  18978. GameModeExit();
  18979. gamemodeLoaded = 0;
  18980. }
  18981. return 1;
  18982. }
  18983. //==============================================================================
  18984. LoadBoxer()
  18985. {
  18986. new arrCoords[3][64];
  18987. new strFromFile2[256];
  18988. new File: file = fopen("boxer.ini", io_read);
  18989. if(file)
  18990. {
  18991. fread(file, strFromFile2);
  18992. split(strFromFile2, arrCoords, ',');
  18993. Titel[TitelWins] = strvalEx(arrCoords[0]);
  18994. strmid(Titel[TitelName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  18995. Titel[TitelLoses] = strvalEx(arrCoords[2]);
  18996. fclose(file);
  18997. } else {
  18998. printf("[error] Failed to find boxer.ini");
  18999. }
  19000. return 1;
  19001. }
  19002. //==============================================================================
  19003. SaveBoxer()
  19004. {
  19005. new coordsstring[256];
  19006. format(coordsstring, sizeof(coordsstring), "%d,%s,%d", Titel[TitelWins], Titel[TitelName], Titel[TitelLoses]);
  19007. new File: file2 = fopen("boxer.ini", io_write);
  19008. if(file2)
  19009. {
  19010. fwrite(file2, coordsstring);
  19011. fclose(file2);
  19012. } else {
  19013. printf("[error] Failed to find boxer.ini");
  19014. }
  19015. return 1;
  19016. }
  19017. //==============================================================================
  19018. forward OnLoadStuff();
  19019. public OnLoadStuff()
  19020. {
  19021. anticheatbans = cache_get_field_content_int(0, "anticheatbans");
  19022. if(anticheatbans == 0 || cache_num_rows() == 0) // Load from old stuff.ini
  19023. {
  19024. new arrCoords[32][128];
  19025. new strFromFile2[1024];
  19026. new File: file = fopen("stuff.ini", io_read);
  19027. if(file)
  19028. {
  19029. fread(file, strFromFile2);
  19030. split(strFromFile2, arrCoords, ',');
  19031. Jackpot = strvalEx(arrCoords[0]);
  19032. Tax = strvalEx(arrCoords[1]);
  19033. TaxValue = strvalEx(arrCoords[2]);
  19034. Security = strvalEx(arrCoords[3]);
  19035. TimeAfterBankJob = strvalEx(arrCoords[4]);
  19036. dhstock = strvalEx(arrCoords[5]);
  19037. chstock = strvalEx(arrCoords[6]);
  19038. anticheatbans = strvalEx(arrCoords[7]);
  19039. anticheatwarns = strvalEx(arrCoords[8]);
  19040. matprice = strvalEx(arrCoords[9]); //getmats cost
  19041. seedprice = strvalEx(arrCoords[10]); //price per seed
  19042. crackgprice = strvalEx(arrCoords[11]); //price per gram
  19043. prodprice = strvalEx(arrCoords[12]); //price per prod
  19044. potcprice = strvalEx(arrCoords[13]); // price per seed crate
  19045. crackcprice = strvalEx(arrCoords[14]); // price per crack crate
  19046. HitmanBadgeSAPD = strvalEx(arrCoords[23]);
  19047. HitmanBadgeFBI = strvalEx(arrCoords[24]);
  19048. HitmanBadgeRCSD = strvalEx(arrCoords[25]);
  19049. HitmanBadgeLSFMD = strvalEx(arrCoords[26]);
  19050. HitmanBadgeNG = strvalEx(arrCoords[27]);
  19051. HitmanBadgeGOV = strvalEx(arrCoords[28]);
  19052. HitmanBadgeSCOTUS = strvalEx(arrCoords[29]);
  19053. HitmanBadgeDEA = strvalEx(arrCoords[30]);
  19054. HitmanBadgeATF = strvalEx(arrCoords[31]);
  19055. fclose(file);
  19056. SaveStuff(); // save them in mysql
  19057. }
  19058. else
  19059. {
  19060. printf("[error] Failed to find stuff.ini");
  19061. GameModeExit();
  19062. }
  19063. }
  19064. else
  19065. {
  19066. Jackpot = cache_get_field_content_int(0, "Jackpot");
  19067. Tax = cache_get_field_content_int(0, "Tax");
  19068. TaxValue = cache_get_field_content_int(0, "TaxValue");
  19069. Security = cache_get_field_content_int(0, "Security");
  19070. TimeAfterBankJob = cache_get_field_content_int(0, "TimeAfterBankJob");
  19071. dhstock = cache_get_field_content_int(0, "dhstock");
  19072. chstock = cache_get_field_content_int(0, "chstock");
  19073. // already loaded anticheatbans = cache_get_field_content_int(0, "anticheatbans");
  19074. anticheatwarns = cache_get_field_content_int(0, "anticheatwarns");
  19075. matprice = cache_get_field_content_int(0, "matprice");
  19076. seedprice = cache_get_field_content_int(0, "seedprice");
  19077. crackgprice = cache_get_field_content_int(0, "crackgprice");
  19078. prodprice = cache_get_field_content_int(0, "prodprice");
  19079. potcprice = cache_get_field_content_int(0, "potcprice");
  19080. crackcprice = cache_get_field_content_int(0, "crackcprice");
  19081. HitmanBadgeSAPD = cache_get_field_content_int(0, "HitmanBadgeSAPD");
  19082. HitmanBadgeFBI = cache_get_field_content_int(0, "HitmanBadgeFBI");
  19083. HitmanBadgeRCSD = cache_get_field_content_int(0, "HitmanBadgeRCSD");
  19084. HitmanBadgeLSFMD = cache_get_field_content_int(0, "HitmanBadgeLSFMD");
  19085. HitmanBadgeNG = cache_get_field_content_int(0, "HitmanBadgeNG");
  19086. HitmanBadgeGOV = cache_get_field_content_int(0, "HitmanBadgeGOV");
  19087. HitmanBadgeSCOTUS = cache_get_field_content_int(0, "HitmanBadgeSCOTUS");
  19088. HitmanBadgeDEA = cache_get_field_content_int(0, "HitmanBadgeDEA");
  19089. HitmanBadgeATF = cache_get_field_content_int(0, "HitmanBadgeATF");
  19090. AGCTog = cache_get_field_content_int(0, "AGCTog");
  19091. cache_get_field_content(0, "devmotd", DEVMOTD, sqlGameConnection, 128 );
  19092. cache_get_field_content(0, "testermotd", TESTERMOTD, sqlGameConnection, 128 );
  19093. }
  19094. return 1;
  19095. }
  19096. LoadStuff()
  19097. {
  19098. new query[128];
  19099. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `stuff`");
  19100. mysql_pquery(sqlGameConnection, query, "OnLoadStuff");
  19101. return 1;
  19102. }
  19103. //==============================================================================
  19104. SaveStuff()
  19105. {
  19106. //SQL Saving
  19107. new query[5000];
  19108. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `stuff` SET `AGCTog` = %d, `Jackpot` = %d, `Tax` = %d, `TaxValue` = %d, `Security` = %d,",
  19109. AGCTog, Jackpot, Tax, TaxValue, Security);
  19110. mysql_format(sqlGameConnection, query, sizeof(query), "%s `TimeAfterBankJob` = %d, `dhstock` = %d, `chstock` = %d, `anticheatbans` = %d,",
  19111. query, TimeAfterBankJob, dhstock, chstock, anticheatbans);
  19112. mysql_format(sqlGameConnection, query, sizeof(query), "%s `anticheatwarns` = %d, `matprice` = %d, `seedprice` = %d,`crackgprice` = %d,",
  19113. query, anticheatwarns, matprice, seedprice, crackgprice);
  19114. mysql_format(sqlGameConnection, query, sizeof(query), "%s `prodprice` = %d, `potcprice` = %d, `crackcprice` = %d, `HitmanBadgeSAPD` = %d,",
  19115. query, prodprice, potcprice, crackcprice, HitmanBadgeSAPD);
  19116. mysql_format(sqlGameConnection, query, sizeof(query), "%s `HitmanBadgeFBI` = %d, `HitmanBadgeRCSD` = %d, `HitmanBadgeLSFMD` = %d,",
  19117. query, HitmanBadgeFBI, HitmanBadgeRCSD, HitmanBadgeLSFMD);
  19118. mysql_format(sqlGameConnection, query, sizeof(query), "%s `HitmanBadgeNG` = %d, `HitmanBadgeGOV` = %d, `HitmanBadgeSCOTUS` = %d,",
  19119. query, HitmanBadgeNG, HitmanBadgeGOV, HitmanBadgeSCOTUS);
  19120. mysql_format(sqlGameConnection, query, sizeof(query), "%s `HitmanBadgeDEA` = %d, `HitmanBadgeATF` = %d, devmotd = '%e', testermotd = '%e';",
  19121. query, HitmanBadgeNG, HitmanBadgeGOV, HitmanBadgeSCOTUS, DEVMOTD, TESTERMOTD );
  19122. mysql_pquery(sqlGameConnection, query);
  19123. SaveFactionBanks();
  19124. return 1;
  19125. }
  19126. //==============================================================================
  19127. LoadIRC()
  19128. {
  19129. new arrCoords[5][64];
  19130. new strFromFile2[256];
  19131. new File: file = fopen("channels.cfg", io_read);
  19132. if(file)
  19133. {
  19134. new idx;
  19135. while(idx < sizeof(IRCInfo))
  19136. {
  19137. fread(file, strFromFile2);
  19138. split(strFromFile2, arrCoords, '|');
  19139. strmid(IRCInfo[idx][iAdmin], arrCoords[0], 0, strlen(arrCoords[0]), 255);
  19140. strmid(IRCInfo[idx][iMOTD], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  19141. strmid(IRCInfo[idx][iPassword], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  19142. IRCInfo[idx][iNeedPass] = strvalEx(arrCoords[3]);
  19143. IRCInfo[idx][iLock] = strvalEx(arrCoords[4]);
  19144. idx++;
  19145. }
  19146. fclose(file);
  19147. } else {
  19148. printf("[error] Failed to find channels.cfg");
  19149. }
  19150. return 1;
  19151. }
  19152. //==============================================================================
  19153. SaveIRC()
  19154. {
  19155. new idx;
  19156. new File:file;
  19157. file = fopen("channels.cfg", io_write);
  19158. fclose(file);
  19159. file = fopen("channels.cfg", io_append);
  19160. new coordsstring[256];
  19161. if(file) {
  19162. while(idx < sizeof(IRCInfo))
  19163. {
  19164. format(coordsstring, sizeof(coordsstring), "%s|%s|%s|%d|%d\n",
  19165. IRCInfo[idx][iAdmin],
  19166. IRCInfo[idx][iMOTD],
  19167. IRCInfo[idx][iPassword],
  19168. IRCInfo[idx][iNeedPass],
  19169. IRCInfo[idx][iLock]);
  19170. fwrite(file, coordsstring);
  19171. idx++;
  19172. }
  19173. fclose(file);
  19174. } else {
  19175. printf("[error] Failed to find channels.cfg");
  19176. }
  19177. return 1;
  19178. }
  19179. //==============================================================================
  19180. LoadFamilies()
  19181. {
  19182. new arrCoords[50][64];
  19183. new strFromFile2[530];
  19184. new File: file = fopen("families.cfg", io_read);
  19185. if(file)
  19186. {
  19187. new idx;
  19188. while(idx < sizeof(FamilyInfo))
  19189. {
  19190. fread(file, strFromFile2);
  19191. split(strFromFile2, arrCoords, '|');
  19192. FamilyInfo[idx][FamilyTaken] = strvalEx(arrCoords[0]);
  19193. strmid(FamilyInfo[idx][FamilyName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  19194. strmid(FamilyInfo[idx][FamilyMOTD], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  19195. strmid(FamilyInfo[idx][FamilyLeader], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  19196. FamilyInfo[idx][FamilyBank] = strvalEx(arrCoords[4]);
  19197. FamilyInfo[idx][FamilyCash] = strvalEx(arrCoords[5]);
  19198. FamilyInfo[idx][FamilySafe] = strvalEx(arrCoords[6]);
  19199. FamilyInfo[idx][FamilySafePos][0] = floatstr(arrCoords[7]);
  19200. FamilyInfo[idx][FamilySafePos][1] = floatstr(arrCoords[8]);
  19201. FamilyInfo[idx][FamilySafePos][2] = floatstr(arrCoords[9]);
  19202. FamilyInfo[idx][FamilyPot] = strvalEx(arrCoords[10]);
  19203. FamilyInfo[idx][FamilyCrack] = strvalEx(arrCoords[11]);
  19204. FamilyInfo[idx][FamilyMats] = strvalEx(arrCoords[12]);
  19205. strmid(FamilyRank[idx][0], arrCoords[13], 0, strlen(arrCoords[13]), 255);
  19206. strmid(FamilyRank[idx][1], arrCoords[14], 0, strlen(arrCoords[14]), 255);
  19207. strmid(FamilyRank[idx][2], arrCoords[15], 0, strlen(arrCoords[15]), 255);
  19208. strmid(FamilyRank[idx][3], arrCoords[16], 0, strlen(arrCoords[16]), 255);
  19209. strmid(FamilyRank[idx][4], arrCoords[17], 0, strlen(arrCoords[17]), 255);
  19210. strmid(FamilyRank[idx][5], arrCoords[18], 0, strlen(arrCoords[18]), 255);
  19211. FamilyInfo[idx][FamilyMembers] = strvalEx(arrCoords[19]);
  19212. FamilyInfo[idx][FamilySkins] = strvalEx(arrCoords[20]);
  19213. FamilyInfo[idx][FamilySkin1] = strvalEx(arrCoords[21]);
  19214. FamilyInfo[idx][FamilySkin2] = strvalEx(arrCoords[22]);
  19215. FamilyInfo[idx][FamilySkin3] = strvalEx(arrCoords[23]);
  19216. FamilyInfo[idx][FamilySkin4] = strvalEx(arrCoords[24]);
  19217. FamilyInfo[idx][FamilySkin5] = strvalEx(arrCoords[25]);
  19218. FamilyInfo[idx][FamilySkin6] = strvalEx(arrCoords[26]);
  19219. FamilyInfo[idx][FamilySkin7] = strvalEx(arrCoords[27]);
  19220. FamilyInfo[idx][FamilySkin8] = strvalEx(arrCoords[28]);
  19221. FamilyInfo[idx][FStrikes] = strvalEx(arrCoords[29]);
  19222. FamilyInfo[idx][Colt45] = strvalEx(arrCoords[30]);
  19223. FamilyInfo[idx][Shotgun] = strvalEx(arrCoords[31]);
  19224. FamilyInfo[idx][MP5] = strvalEx(arrCoords[32]);
  19225. FamilyInfo[idx][AK47] = strvalEx(arrCoords[33]);
  19226. FamilyInfo[idx][M4] = strvalEx(arrCoords[34]);
  19227. FamilyInfo[idx][SPAS12] = strvalEx(arrCoords[35]);
  19228. FamilyInfo[idx][Rifle] = strvalEx(arrCoords[36]);
  19229. FamilyInfo[idx][Sniper] = strvalEx(arrCoords[37]);
  19230. FamilyInfo[idx][Deagle] = strvalEx(arrCoords[38]);
  19231. FamilyInfo[idx][UZI] = strvalEx(arrCoords[39]);
  19232. FamilyInfo[idx][FamilySafeWorld] = strvalEx(arrCoords[40]);
  19233. FamilyInfo[idx][TEC9] = strvalEx(arrCoords[41]);
  19234. // new drugs //
  19235. FamilyInfo[idx][FamilyCocaine] = strvalEx(arrCoords[42]);
  19236. FamilyInfo[idx][FamilyMeth] = strvalEx(arrCoords[43]);
  19237. FamilyInfo[idx][FamilyCannabis] = strvalEx(arrCoords[44]);
  19238. FamilyInfo[idx][FamilyPromethazine] = strvalEx(arrCoords[45]);
  19239. FamilyInfo[idx][FamilyCodeine] = strvalEx(arrCoords[46]);
  19240. FamilyInfo[idx][FamilyLean] = strvalEx(arrCoords[47]);
  19241. FamilyInfo[idx][FamilyLeaderHide] = strvalEx(arrCoords[45]);
  19242. FamilyInfo[idx][fXP] = strvalEx(arrCoords[46]);
  19243. idx++;
  19244. }
  19245. fclose(file);
  19246. } else {
  19247. printf("[error] Failed to find families.cfg");
  19248. }
  19249. return 1;
  19250. }
  19251. //==============================================================================
  19252. SaveFamilies()
  19253. {
  19254. new idx;
  19255. new File:file;
  19256. file = fopen("families.cfg", io_write);
  19257. fclose(file);
  19258. file = fopen("families.cfg", io_append);
  19259. new coordsstring[560];
  19260. if(file) {
  19261. while(idx < sizeof(FamilyInfo))
  19262. {
  19263. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%d|%d|%d|%f|%f|%f|%d|%d|%d|%s|%s|%s|%s|%s|%s|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
  19264. FamilyInfo[idx][FamilyTaken],
  19265. FamilyInfo[idx][FamilyName],
  19266. FamilyInfo[idx][FamilyMOTD],
  19267. FamilyInfo[idx][FamilyLeader],
  19268. FamilyInfo[idx][FamilyBank],
  19269. FamilyInfo[idx][FamilyCash],
  19270. FamilyInfo[idx][FamilySafe],
  19271. FamilyInfo[idx][FamilySafePos][0],
  19272. FamilyInfo[idx][FamilySafePos][1],
  19273. FamilyInfo[idx][FamilySafePos][2],
  19274. FamilyInfo[idx][FamilyPot],
  19275. FamilyInfo[idx][FamilyCrack],
  19276. FamilyInfo[idx][FamilyMats],
  19277. FamilyRank[idx][0],
  19278. FamilyRank[idx][1],
  19279. FamilyRank[idx][2],
  19280. FamilyRank[idx][3],
  19281. FamilyRank[idx][4],
  19282. FamilyRank[idx][5],
  19283. FamilyInfo[idx][FamilyMembers],
  19284. FamilyInfo[idx][FamilySkins],
  19285. FamilyInfo[idx][FamilySkin1],
  19286. FamilyInfo[idx][FamilySkin2],
  19287. FamilyInfo[idx][FamilySkin3],
  19288. FamilyInfo[idx][FamilySkin4],
  19289. FamilyInfo[idx][FamilySkin5],
  19290. FamilyInfo[idx][FamilySkin6],
  19291. FamilyInfo[idx][FamilySkin7],
  19292. FamilyInfo[idx][FamilySkin8],
  19293. FamilyInfo[idx][FStrikes],
  19294. FamilyInfo[idx][Colt45],
  19295. FamilyInfo[idx][Shotgun],
  19296. FamilyInfo[idx][MP5],
  19297. FamilyInfo[idx][AK47],
  19298. FamilyInfo[idx][M4],
  19299. FamilyInfo[idx][SPAS12],
  19300. FamilyInfo[idx][Rifle],
  19301. FamilyInfo[idx][Sniper],
  19302. FamilyInfo[idx][Deagle],
  19303. FamilyInfo[idx][UZI],
  19304. FamilyInfo[idx][FamilySafeWorld],
  19305. FamilyInfo[idx][TEC9],
  19306. FamilyInfo[idx][FamilyCocaine],
  19307. FamilyInfo[idx][FamilyMeth],
  19308. FamilyInfo[idx][FamilyCannabis],
  19309. FamilyInfo[idx][FamilyPromethazine],
  19310. FamilyInfo[idx][FamilyCodeine],
  19311. FamilyInfo[idx][FamilyLean],
  19312. FamilyInfo[idx][FamilyLeaderHide],
  19313. FamilyInfo[idx][fXP]);
  19314. fwrite(file, coordsstring);
  19315. idx++;
  19316. }
  19317. fclose(file);
  19318. } else {
  19319. printf("[error] Failed to find families.cfg");
  19320. }
  19321. return 1;
  19322. }
  19323. //==============================================================================
  19324. LoadWeed()
  19325. {
  19326. new arrCoords[7][64];
  19327. new strFromFile2[512];
  19328. new File: file = fopen("weed.cfg", io_read);
  19329. if(file)
  19330. {
  19331. new idx;
  19332. while(idx < sizeof(WeedInfo))
  19333. {
  19334. fread(file, strFromFile2);
  19335. split(strFromFile2, arrCoords, '|');
  19336. strmid(WeedInfo[idx][WeedPlanter], arrCoords[0], 0, strlen(arrCoords[0]), 255);
  19337. WeedInfo[idx][WeedX] = floatstr(arrCoords[1]);
  19338. WeedInfo[idx][WeedY] = floatstr(arrCoords[2]);
  19339. WeedInfo[idx][WeedZ] = floatstr(arrCoords[3]);
  19340. WeedInfo[idx][WeedTime] = strvalEx(arrCoords[4]);
  19341. WeedInfo[idx][WeedPlanted] = strvalEx(arrCoords[5]);
  19342. WeedInfo[idx][WeedGrams] = strvalEx(arrCoords[6]);
  19343. if(WeedInfo[idx][WeedPlanted] == 1) weedObject[idx] = CreateDynamicObject(3409, WeedInfo[idx][WeedX], WeedInfo[idx][WeedY], WeedInfo[idx][WeedZ] -2, 0, 0, 0);
  19344. idx++;
  19345. }
  19346. fclose(file);
  19347. } else {
  19348. printf("[error] Failed to find weed.cfg");
  19349. }
  19350. return 1;
  19351. }
  19352. //==============================================================================
  19353. SaveWeed()
  19354. {
  19355. new idx;
  19356. new File:file;
  19357. file = fopen("weed.cfg", io_write);
  19358. fclose(file);
  19359. file = fopen("weed.cfg", io_append);
  19360. new coordsstring[256];
  19361. if(file) {
  19362. while(idx < sizeof(WeedInfo))
  19363. {
  19364. format(coordsstring, sizeof(coordsstring), "%s|%f|%f|%f|%d|%d|%d\n",
  19365. WeedInfo[idx][WeedPlanter],
  19366. WeedInfo[idx][WeedX],
  19367. WeedInfo[idx][WeedY],
  19368. WeedInfo[idx][WeedZ],
  19369. WeedInfo[idx][WeedTime],
  19370. WeedInfo[idx][WeedPlanted],
  19371. WeedInfo[idx][WeedGrams]);
  19372. fwrite(file, coordsstring);
  19373. idx++;
  19374. }
  19375. fclose(file);
  19376. } else {
  19377. printf("[error] Failed to find weed.cfg");
  19378. }
  19379. return 1;
  19380. }
  19381. //==============================================================================
  19382. public OnGameModeExit()
  19383. {
  19384. //SaveChars();
  19385. //SavePollData();
  19386. SaveLoopa();
  19387. mysql_close(sqlGameConnection); //close the connection to the db
  19388. //SendRconCommand("unloadfs server_maps");
  19389. //SendRconCommand("unloadfs elections");
  19390. //SendRconCommand("unloadfs JEROSEL");
  19391. //SendRconCommand("unloadfs snow"); Server_Maps
  19392. DestroyDynamic3DTextLabel(syndicateSign);
  19393. //KillTimer(UnlockServer);
  19394. return 1;
  19395. }
  19396. enum botInfo {
  19397. bot_created,
  19398. bot_name[MAX_PLAYER_NAME],
  19399. bot_type,
  19400. bot_skin,
  19401. Float:bot_pos[4], //x, y, z, a
  19402. virtualWorld,
  19403. interiorID,
  19404. Text3D:Label, //for displaying the bots name
  19405. interactingWithID,
  19406. playerInRange,
  19407. beingRobbedBy,
  19408. robbedTimerID,
  19409. noRandChat,
  19410. rSoundID[5], //5 sound ids to play after each interaction
  19411. rText1[128],
  19412. rText2[128],
  19413. rText3[128],
  19414. rText4[128],
  19415. rText5[128],
  19416. r_animLib1[24],
  19417. r_animName1[24],
  19418. r_animLib2[24],
  19419. r_animName2[24],
  19420. r_animLib3[24],
  19421. r_animName3[24],
  19422. r_animLib4[24],
  19423. r_animName4[24],
  19424. r_animLib5[24],
  19425. r_animName5[24],
  19426. animFreeze[5],
  19427. animLoop[5],
  19428. rTotal, //number of rand sounds used
  19429. };
  19430. new npcInfo[MAX_PLAYERS][botInfo];
  19431. forward AddActor(rpname[], btype, bskin, Float: x, Float: y, Float: z, Float: a, world, interid);
  19432. public AddActor(rpname[], btype, bskin, Float: x, Float: y, Float: z, Float: a, world, interid)
  19433. {
  19434. new botid = CreateActor(bskin, x, y, z, a); //model x y z rotation
  19435. strmid(npcInfo[botid][bot_name], rpname, 0, strlen(rpname), 128);
  19436. npcInfo[botid][bot_created] = 1;
  19437. npcInfo[botid][bot_type] = btype;
  19438. npcInfo[botid][bot_skin] = bskin;
  19439. npcInfo[botid][bot_pos][0] = x;
  19440. npcInfo[botid][bot_pos][1] = y;
  19441. npcInfo[botid][bot_pos][2] = z;
  19442. npcInfo[botid][bot_pos][3] = a;
  19443. npcInfo[botid][virtualWorld] = world;
  19444. npcInfo[botid][interiorID] = interid;
  19445. npcInfo[botid][interactingWithID] = -1; //not interacting
  19446. npcInfo[botid][noRandChat] = 0;
  19447. npcInfo[botid][playerInRange] = 0; //no player in range
  19448. npcInfo[botid][beingRobbedBy] = -1; //no player robbing
  19449. npcInfo[botid][robbedTimerID] = 0; //no timer
  19450. SetActorVirtualWorld(botid, npcInfo[botid][virtualWorld]);
  19451. /* these functions are not avaiable for actors
  19452. //SetActorInterior(botid, npcInfo[botid][interiorID]);
  19453. //wearable stuff
  19454. if(botid == bot_stripper1) {
  19455. SetPlayerAttachedObject(bot_stripper1,0,18639,2,0.156999,0.010998,0.000000,0.799996,-0.699998,-3.200000,1.000000,1.137999,1.000000);
  19456. SetPlayerAttachedObject(bot_stripper1,1,3027,2,0.004999,0.086998,0.003000,-113.599975,-2.800003,0.000000,0.819998,0.642000,0.677999);
  19457. }
  19458. if(botid == bot_fishing) {
  19459. SetPlayerAttachedObject(bot_fishing, 0, 18632, 6, 0.06, 0.04, 0.0, 180.0, 0.0, 0.0);
  19460. }*/
  19461. //label
  19462. new namestr[32];
  19463. format(namestr, sizeof(namestr), "%s (%d)", npcInfo[botid][bot_name], botid);
  19464. npcInfo[botid][Label] = CreateDynamic3DTextLabel(namestr,0xFFFFFFFF,x, y, z +1.2, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100); //
  19465. printf("botid: %d", botid);
  19466. return botid;
  19467. }
  19468. //==============================================================================
  19469. stock CDO(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 200.0)
  19470. {
  19471. new objectid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
  19472. Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 300.0);
  19473. return objectid;
  19474. }
  19475. public OnGameModeInit()
  19476. {
  19477. new query[9000];
  19478. mysql_format(sqlGameConnection, query, sizeof(query), "SET GLOBAL `event_scheduler`= ON");
  19479. //GYM MAPPING//
  19480. CreateDynamicObject(1311, 2234.80591, -1734.44592, 16.55470, 0.00000, 0.00000, 89.70003);
  19481. CreateDynamicObject(1560, 2262.45874, -1710.80872, 13.44523, 0.00000, 0.00000, -180.00000);
  19482. CreateDynamicObject(1560, 2238.39355, -1710.87537, 13.44523, 0.00000, 0.00000, -180.00000);
  19483. CreateDynamicObject(1560, 2249.69751, -1710.73682, 13.62974, 0.00000, 0.00000, -180.00000);
  19484. CreateDynamicObject(18980, 2227.12012, -1710.91528, 11.97258, 90.00000, 0.00000, -6.68000);
  19485. CreateDynamicObject(18980, 2228.07983, -1702.70776, 12.19232, 90.90000, 0.00000, -6.68000);
  19486. CreateDynamicObject(640, 2270.47046, -1701.81262, 13.16422, 0.00000, 0.00000, -90.06000);
  19487. CreateDynamicObject(620, 2274.99634, -1693.75964, 8.07813, 3.14159, -0.08727, -3.14159);
  19488. CreateDynamicObject(640, 2293.64429, -1705.15649, 13.16420, 0.00000, 0.00000, 180.00000);
  19489. CreateDynamicObject(640, 2293.63232, -1710.15540, 13.16420, 0.00000, 0.00000, 180.00000);
  19490. CreateDynamicObject(640, 2293.62646, -1715.36169, 13.16420, 0.00000, 0.00000, 180.00000);
  19491. CreateDynamicObject(640, 2293.61279, -1720.55542, 13.16420, 0.00000, 0.00000, 180.00000);
  19492. CreateDynamicObject(1281, 2290.22485, -1696.52087, 13.40500, 0.00000, 0.00000, 0.00000);
  19493. CreateDynamicObject(1281, 2280.51660, -1697.39929, 13.44040, 0.00000, 0.00000, 0.00000);
  19494. CreateDynamicObject(1256, 2291.66577, -1708.94873, 13.12050, 0.00000, 0.00000, 90.00000);
  19495. CreateDynamicObject(1256, 2282.25293, -1722.07422, 13.12053, 0.00000, 0.00000, -90.00000);
  19496. CreateDynamicObject(1216, 2270.13159, -1708.50342, 13.10659, 0.00000, 0.00000, 90.00000);
  19497. CreateDynamicObject(1216, 2270.17236, -1706.76196, 13.10659, 0.00000, 0.00000, 90.00000);
  19498. CreateDynamicObject(1257, 2255.68335, -1724.50037, 13.63165, 0.00000, 0.00000, 90.00000);
  19499. CreateDynamicObject(1258, 2271.26782, -1704.66125, 13.12366, 0.00000, 0.00000, 0.00000);
  19500. CreateDynamicObject(1341, 2279.57788, -1717.26489, 13.40303, 0.00000, 0.00000, 86.70000);
  19501. CreateDynamicObject(1342, 2275.20459, -1716.78992, 13.45892, 0.00000, 0.00000, 88.01999);
  19502. CreateDynamicObject(6289, 2279.55273, -1710.78235, 14.96920, 0.00000, 0.00000, 90.00000);
  19503. CreateDynamicObject(1256, 2287.52808, -1708.92053, 13.12050, 0.00000, 0.00000, 90.00000);
  19504. CreateDynamicObject(1256, 2287.42505, -1722.04907, 13.12053, 0.00000, 0.00000, -90.00000);
  19505. CreateDynamicObject(1340, 2277.78809, -1717.18982, 13.61429, 0.00000, 0.00000, -90.00000);
  19506. CreateDynamicObject(1257, 2245.17261, -1739.39966, 13.63160, 0.00000, 0.00000, -90.00000);
  19507. CreateDynamicObject(1340, 2251.34326, -1739.82019, 13.61429, 0.00000, 0.00000, 110.82001);
  19508. CreateDynamicObject(1498, 2232.22388, -1687.38440, 13.01590, 0.00000, 0.00000, 0.00000);
  19509. CreateDynamicObject(17978, 2259.26343, -1672.23450, 13.30904, 0.00000, 0.00000, 0.00000);
  19510. CreateDynamicObject(1498, 2253.66406, -1687.38428, 12.67169, 0.00000, 0.00000, 0.00000);
  19511. CreateDynamicObject(1498, 2269.76758, -1687.39819, 12.67169, 0.00000, 0.00000, 0.00000);
  19512. CreateDynamicObject(1498, 2276.74634, -1701.16296, 12.67169, 0.00000, 0.00000, 0.00000);
  19513. CreateObject(6959, 2245.42139, -1702.63989, 12.21404, -1.00000, 0.00000, 0.00000);
  19514. CreateObject(6977, 2249.68774, -1700.23352, 12.20542, 0.00000, 0.00000, 90.00001);
  19515. CreateObject(4690, 2262.21240, -1704.14026, -135.28027, 0.00000, 0.00000, 0.00000);
  19516. CreateDynamicObject(3569, 2233.92, -1742.31, 11.00, 0.00, 0.00, 90.00);
  19517. CreateDynamicObject(3569, 2251.60, -1742.39, 11.00, 0.00, 0.00, 90.00);
  19518. CreateDynamicObject(3569, 2269.27, -1742.46, 11.00, 0.00, 0.00, 90.00);
  19519. CreateDynamicObject(3569, 2286.95, -1742.54, 11.00, 0.00, 0.00, 90.00);
  19520. CreateDynamicObject(3569, 2295.97, -1742.60, 10.99, 0.00, 0.00, 90.00);
  19521. CreateDynamicObject(1237, 2305.11, -1744.45, 12.54, 0.00, 0.00, 0.00);
  19522. CreateDynamicObject(1237, 2306.20, -1744.19, 12.54, 0.00, 0.00, 0.00);
  19523. CreateDynamicObject(1237, 2306.08, -1742.88, 12.54, 0.00, 0.00, 0.00);
  19524. CreateDynamicObject(1237, 2305.99, -1740.38, 12.54, 0.00, 0.00, 0.00);
  19525. CreateDynamicObject(1237, 2304.50, -1740.09, 12.54, 0.00, 0.00, 0.00);
  19526. CreateDynamicObject(1237, 2224.41, -1740.42, 12.54, 0.00, 0.00, 0.00);
  19527. CreateDynamicObject(1237, 2224.57, -1741.33, 12.54, 0.00, 0.00, 0.00);
  19528. CreateDynamicObject(1237, 2224.05, -1743.15, 12.54, 0.00, 0.00, 0.00);
  19529. CreateDynamicObject(1237, 2224.67, -1744.21, 12.54, 0.00, 0.00, 0.00);
  19530. CreateDynamicObject(1282, 2223.88, -1742.16, 13.15, 0.00, 0.00, -25.00);
  19531. CreateDynamicObject(1435, 2305.26, -1741.01, 12.55, 0.00, 0.00, 100.00);
  19532. CreateDynamicObject(1435, 2305.37, -1742.55, 12.55, 0.00, 0.00, 70.00);
  19533. CreateDynamicObject(1237, 2235.53, -1745.31, 12.54, 0.00, 0.00, 0.00);
  19534. CreateDynamicObject(1435, 2234.14, -1745.28, 12.65, 0.00, 0.00, 135.00);
  19535. CreateDynamicObject(6959, 2248.902099, -1704.515380, 12.627983, 0.199999, 0.000000, -6.000000);
  19536. //
  19537. Log:level(LOGL_DEBUG);
  19538. LoadLoopa();
  19539. ////SendRconCommand("loadfs server_maps");
  19540. SendRconCommand("loadfs elections");
  19541. ////SendRconCommand("loadfs JEROSEL");
  19542. ////SendRconCommand("loadfs hankbridge");
  19543. //SendRconCommand("loadfs cameditor");
  19544. SendRconCommand("loadfs snow");//Server_Maps
  19545. ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
  19546. new TempObject;
  19547. CreateDynamicObject(1569, 1559.49304, -1714.49683, 15.45300, 0.00000, 0.00000, 0.00000);
  19548. CreateDynamicObject(8614, 1562.92053, -1715.42053, 14.22540, 0.00000, 0.00000, 0.00000);
  19549. CreateDynamicObject(1569, 1559.49304, -1637.15601, 15.18700, 0.00000, 0.00000, 0.00000);
  19550. CreateDynamicObject(8615, 1563.36755, -1636.23401, 13.46340, 0.00000, 0.00000, 180.00000);
  19551. //TempObject = CreateObject(4232, 1568.28906, -1677.78125, 10.82030, 0.00000, 0.00000, 0.00000);
  19552. //SetObjectMaterial(TempObject, 9, 14881, "gf5", "mp_jail_wall");
  19553. //TempObject = CreateObject(4032, 1568.28906, -1677.78125, 10.82030, 0.00000, 0.00000, 0.00000);
  19554. //SetObjectMaterial(TempObject, 10, 14881, "gf5", "mp_jail_wall");
  19555. CreateDynamicObject(2952, 1582.23621, -1637.89294, 12.34790, 0.00000, 0.00000, 89.50000);
  19556. TempObject = CreateDynamicObject(19834, 1592.40625, -1637.81641, 13.69480, 0.00000, 90.00000, 4.00000);
  19557. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19558. TempObject = CreateDynamicObject(19834, 1592.40625, -1637.81641, 15.99880, 0.00000, 90.00000, 4.00000);
  19559. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19560. TempObject = CreateDynamicObject(19834, 1592.40625, -1637.81836, 16.29380, 0.00000, 90.00000, 4.00000);
  19561. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19562. TempObject = CreateDynamicObject(19834, 1592.34094, -1637.89185, 13.69480, 0.00000, 90.00000, 94.00000);
  19563. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19564. TempObject = CreateDynamicObject(19834, 1592.34094, -1637.89185, 15.99880, 0.00000, 90.00000, 94.00000);
  19565. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19566. TempObject = CreateDynamicObject(19834, 1592.34192, -1637.89185, 16.29380, 0.00000, 90.00000, 94.00000);
  19567. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19568. TempObject = CreateDynamicObject(19834, 1592.34985, -1638.03381, 13.64180, 0.00000, 90.00000, 94.00000);
  19569. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19570. TempObject = CreateDynamicObject(19834, 1592.35645, -1638.17371, 13.64180, 0.00000, 90.00000, 94.00000);
  19571. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19572. TempObject = CreateDynamicObject(19834, 1592.34985, -1638.03381, 15.94580, 0.00000, 90.00000, 94.00000);
  19573. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19574. TempObject = CreateDynamicObject(19834, 1592.35645, -1638.17371, 15.94580, 0.00000, 90.00000, 94.00000);
  19575. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19576. TempObject = CreateDynamicObject(19834, 1592.35193, -1638.03381, 16.29380, 0.00000, 90.00000, 94.00000);
  19577. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19578. TempObject = CreateDynamicObject(19834, 1592.35840, -1638.17371, 16.29380, 0.00000, 90.00000, 94.00000);
  19579. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19580. TempObject = CreateDynamicObject(19834, 1592.43152, -1638.23840, 13.64180, 0.00000, 90.00000, 4.00000);
  19581. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19582. TempObject = CreateDynamicObject(19834, 1592.43152, -1638.23840, 15.94580, 0.00000, 90.00000, 4.00000);
  19583. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19584. TempObject = CreateDynamicObject(19834, 1592.47546, -1638.23438, 13.64180, 0.00000, 90.00000, 4.00000);
  19585. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19586. TempObject = CreateDynamicObject(19834, 1592.47546, -1638.23438, 15.94580, 0.00000, 90.00000, 4.00000);
  19587. SetDynamicObjectMaterial(TempObject, 0, 1223, "dynsigns", "white64", 0xFF5A5630);
  19588. CreateDynamicObject(3109, 1564.11731, -1667.42517, 28.58040, 0.00000, 0.00000, 270.00000);
  19589. CreateDynamicObject(2921, 1563.07776, -1667.42554, 30.76530, 0.00000, 0.00000, -120.00000);
  19590. CreateDynamicObject(1622, 1557.43970, -1683.01953, 33.84510, 0.00000, 0.00000, 0.00000);
  19591. CreateDynamicObject(1622, 1557.43970, -1668.51953, 33.84510, 0.00000, 0.00000, 0.00000);
  19592. CreateDynamicObject(1622, 1549.22656, -1636.75452, 24.88950, 0.00000, 0.00000, 270.00000);
  19593. CreateDynamicObject(1622, 1572.22656, -1636.75452, 24.88950, 0.00000, 0.00000, 270.00000);
  19594. CreateDynamicObject(1622, 1592.72656, -1637.42847, 18.38950, 0.00000, 0.00000, 270.00000);
  19595. CreateDynamicObject(2921, 1558.33325, -1637.21387, 17.33780, 0.00000, 0.00000, -120.00000);
  19596. CreateDynamicObject(2921, 1558.61414, -1714.35095, 17.33780, 0.00000, 0.00000, 135.00000);
  19597. CreateDynamicObject(1622, 1611.70947, -1665.88171, 10.20740, 0.00000, 0.00000, 0.00000);
  19598. CreateDynamicObject(1622, 1611.83105, -1721.31116, 10.20740, 0.00000, 0.00000, -45.00000);
  19599. CreateDynamicObject(1622, 1557.32605, -1690.30554, 10.20740, 0.00000, 0.00000, 119.50000);
  19600. CreateDynamicObject(1622, 1524.79236, -1633.93994, 10.20740, 0.00000, 0.00000, 119.50000);
  19601. CreateDynamicObject(1622, 1543.79590, -1718.55933, 10.20740, 0.00000, 0.00000, -135.00000);
  19602. TempObject = CreateDynamicObject(19383, 1544.68762, -1619.44714, 14.16900, 0.00000, 0.00000, 0.00000);
  19603. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19604. TempObject = CreateDynamicObject(19353, 1544.68762, -1622.22607, 14.16900, 0.00000, 0.00000, 0.00000);
  19605. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19606. TempObject = CreateDynamicObject(19383, 1544.68762, -1634.31506, 14.16900, 0.00000, 0.00000, 0.00000);
  19607. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19608. TempObject = CreateDynamicObject(19426, 1545.40161, -1635.86377, 14.16900, 0.00000, 0.00000, 90.00000);
  19609. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19610. TempObject = CreateDynamicObject(19353, 1546.11902, -1637.37854, 14.16900, 0.00000, 0.00000, 0.00000);
  19611. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19612. TempObject = CreateDynamicObject(19353, 1546.27942, -1637.20471, 14.16900, 0.00000, 0.00000, 0.00000);
  19613. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19614. TempObject = CreateDynamicObject(19426, 1545.40161, -1635.68982, 14.16900, 0.00000, 0.00000, 90.00000);
  19615. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19616. TempObject = CreateDynamicObject(19383, 1544.86365, -1634.31506, 14.16900, 0.00000, 0.00000, 0.00000);
  19617. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19618. TempObject = CreateDynamicObject(19353, 1544.85754, -1622.22607, 14.16900, 0.00000, 0.00000, 0.00000);
  19619. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19620. TempObject = CreateDynamicObject(19383, 1544.85754, -1619.44714, 14.16900, 0.00000, 0.00000, 0.00000);
  19621. SetDynamicObjectMaterial(TempObject, 0, 3975, "lanbloke", "Bow_Concrete_drip");
  19622. new hour, mins, sec;
  19623. gettime( hour, mins, sec );
  19624. hour = FixHour( hour );
  19625. SetWorldTime( hour );
  19626. #if DEVMODE == 1 //connect to beta server
  19627. //printf("MySQL Connecting to: %s %s %s %s.", sqlBetaHostname, sqlBetaUsername, sqlBetaPassword, sqlBetaDatabase);
  19628. //sqlGameConnection = mysql_connect(sqlBetaHostname, sqlBetaUsername, sqlBetaDatabase, sqlBetaPassword, sqlGamePort, sqlGameAutoReconnect, sqlGamePoolSize);
  19629. sqlGameConnection = mysql_connect(sqlBetaHostname, sqlBetaUsername, sqlBetaDatabase, sqlBetaPassword, sqlGamePort, sqlGameAutoReconnect, sqlGamePoolSize);
  19630. #pragma unused sqlGameUsername
  19631. #pragma unused sqlGameDatabase
  19632. #pragma unused sqlGamePassword
  19633. #else //connect to main localhost
  19634. //printf("MySQL Connecting to: %s %s %s %s.", sqlGameHostname, sqlGameUsername, sqlGamePassword, sqlGameDatabase);
  19635. sqlGameConnection = mysql_connect(sqlGameHostname, sqlGameUsername, sqlGameDatabase, sqlGamePassword, sqlGamePort, sqlGameAutoReconnect, sqlGamePoolSize);
  19636. #pragma unused sqlBetaHostname
  19637. #pragma unused sqlBetaUsername
  19638. #pragma unused sqlBetaDatabase
  19639. #pragma unused sqlBetaPassword
  19640. mysql_pquery(sqlGameConnection, "UPDATE `players` set Adjustable=1;"); //used by admin cp, added here because it's slow
  19641. #endif
  19642. //remove building fix
  19643. for(new pid = 0; pid <= GetPlayerPoolSize(); pid++)
  19644. {
  19645. if(!IsPlayerConnected(pid)) continue;
  19646. IsPlayerAlreadyConnected[pid] = 1;
  19647. }
  19648. //CheckVehicleTable(); //vehicle conversion, vehicles.inc
  19649. fetchLastSQLID(); //get last vehicle ID in the table for creating new cars
  19650. // Create new constant strings in your mysqlconfig.inc
  19651. if(mysql_errno(sqlGameConnection) != 0)
  19652. {
  19653. printf("MySQL failed to connect to %s", sqlGameHostname);
  19654. return 0;
  19655. }
  19656. for(new i = 0; i < MAX_TAXICALLS; i++)
  19657. TaxiCInfo[i][taxiname] = "0";
  19658. new lastgmxtime[7];
  19659. gettime(lastgmxtime[0],lastgmxtime[1],lastgmxtime[2]); // hour, minute, second
  19660. getdate(lastgmxtime[3],lastgmxtime[4],lastgmxtime[5]); // year, month, day
  19661. format(lastgmx, sizeof(lastgmx), "The last server restart was on the: %d/%d/%d at %d:%d.", lastgmxtime[5], lastgmxtime[4], lastgmxtime[3], lastgmxtime[0], lastgmxtime[1]);
  19662. AddPlayerClass(0, 1959.6982, 1342.9609, 15.3746, 269.6433, 0, 0, 0, 0, 0, 0);
  19663. //JobsInit();
  19664. addIndustrialCars();
  19665. addPoorCars();
  19666. addNormCars();
  19667. addCountryCars(); //CARS HERE
  19668. OOCRadioStatus();
  19669. // This is set to 45 seconds to ensure that it's called on minute 59.
  19670. // SA-MP's native timer system is inaccurate, I have a plan to implement a
  19671. // more accurate timer system soon. ~ byt3
  19672. SetTimer("Timer_PointPayCheck", 45000, true);
  19673. hotlineState = true;
  19674. LoadVehicleData();
  19675. // LoadDivisionData();
  19676. //===========================[ Load server maps ]===========================
  19677. loadVehicles(); //load the vehicles from vehicleSpawns.inc (special ops helicopters, garbage truck)
  19678. RegWarn = true;
  19679. TogPMGlobal = false;
  19680. //create soda machines/soda system
  19681. for( new i; i < sizeof( SodaMachines ); i++ ) {
  19682. #define sm(%0) SodaMachines[i][%0]
  19683. CreateDynamic3DTextLabel( "Soda ~ LMB", 0xFE9A2EFF, sm(sMachineX), sm(sMachineY), sm(sMachineZ) + 0.8, 5.0 );
  19684. CreateDynamicObject( 1209, sm(sMachineX), sm(sMachineY), sm(sMachineZ), sm(sMachineRX), sm(sMachineRY), sm(sMachineRZ), sm(sMachineVW), sm(sMachineInt) );
  19685. #undef sm
  19686. }
  19687. // __________ DoC stuff __________
  19688. //CreateDynamic3DTextLabel("/prisonclothes", COLOR_YELLOW, CLOTHESCOORDS, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 2.0);
  19689. CreateDynamic3DTextLabel("{3a7394}Mobile Data Computer\n{FFFFFF}/docpc", -1, 686.1218, 1515.4897, 9001.8193, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 2.0);
  19690. CreateDynamic3DTextLabel("/changeclothes", -1, 771.1835, 976.9742, 9022.7188, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 5.0);
  19691. // _______________________________
  19692. syndicateSign = CreateDynamic3DTextLabel("/armory", COLOR_CRIME, HQ_SYNDICATE, 10.0);
  19693. AddActor("", 0, 79, 672.93, -2294.76, 6.00, 332.0231, 0, 0); // HANK JAMSE
  19694. NextBan = 1;
  19695. LoadFactionBanks();
  19696. AdminMOTD();
  19697. FactionMOTDS();
  19698. //server vars
  19699. SetGameModeText(GAMEMODE_VERSION);
  19700. SetWeather(2); //default weather
  19701. g_WeatherID = 2;
  19702. ManualVehicleEngineAndLights();
  19703. DisableInteriorEnterExits();
  19704. SetNameTagDrawDistance(20.0);
  19705. EnableStuntBonusForAll(0);
  19706. AllowInteriorWeapons(1);
  19707. // UsePlayerPedAnims(); //~ uses default CJ style. - Disabled for new skins
  19708. LoadDMV();
  19709. //LoadCourt();
  19710. //LoadTrailerInteriorCollisionFix(); //credits to Sean Johnson (servermaps.inc)
  19711. //LoadSweetsInteriorCollisionFix(); //sweets house, credits to Sean Johnson (servermaps.inc)
  19712. for(new i = 0; i < 21; i++)
  19713. {
  19714. famTog[i] = false;
  19715. }
  19716. SetTimer("Timer_AutoMessageSystem", 60000 *50, true);
  19717. //load
  19718. LoadBoxer();
  19719. LoadStuff();
  19720. LoadIRC();
  19721. LoadFamilies();
  19722. LoadActors();
  19723. LoadWeed();
  19724. LoadBusinesses();
  19725. LoadEntrances();
  19726. LoadTextDraws();
  19727. LoadMapTextDraw();
  19728. LoadRadios(); //radios
  19729. LoadCCTV();
  19730. LoadBars();
  19731. LoadAutoMessages();
  19732. LoadSafes();
  19733. //
  19734. LoadDealerships();
  19735. LoadSurnames();
  19736. LoadOwnedHouses();
  19737. LoadGarages();
  19738. LoadTrash();
  19739. LoadGates();
  19740. LoadAdminMessages();
  19741. //LoadPollData();
  19742. //Connect to the shop database
  19743. #if DEVMODE == 0
  19744. sqlShopConnection = mysql_connect(sqlShopHostname, sqlShopUsername, sqlShopDatabase, sqlShopPassword, sqlShopPort, sqlShopAutoReconnect, sqlShopPoolSize);
  19745. if(mysql_errno(sqlShopConnection) != 0) //Returns the error code of the error message from the previous MySQL operation (param is optional)
  19746. {
  19747. printf("MySQL failed to connnect to %s.", sqlShopHostname);
  19748. }
  19749. else
  19750. {
  19751. printf("MySQL connection established to %s.", sqlShopHostname);
  19752. }
  19753. #else
  19754. #pragma unused sqlShopAutoReconnect
  19755. #pragma unused sqlShopHostname
  19756. #pragma unused sqlShopDatabase
  19757. #pragma unused sqlShopPoolSize
  19758. #pragma unused sqlShopPassword
  19759. #pragma unused sqlShopPort
  19760. #pragma unused sqlShopUsername
  19761. #endif
  19762. for(new i = 0; i < MAX_PLAYERS; i++) //Create the center textdraws for displaying text
  19763. {
  19764. createCenterHUDTextDraw(i);
  19765. }
  19766. for(new i = 0; i < MAX_VEHICLES; i++)
  19767. {
  19768. Gas[i] = 100;
  19769. }
  19770. //create family safes
  19771. for(new h = 0; h < sizeof(FamilyInfo); h++)
  19772. {
  19773. FamilyInfo[h][PickupID] = CreateDynamicPickup(1210, 23, FamilyInfo[h][FamilySafePos][0], FamilyInfo[h][FamilySafePos][1], FamilyInfo[h][FamilySafePos][2], FamilyInfo[h][FamilySafeWorld], -1, -1, 100.0);
  19774. }
  19775. PaintballLeaderTD = TextDrawCreate(341.000000, 369.000000, "~r~Paintball Leader~n~~b~Nobody");
  19776. TextDrawAlignment(PaintballLeaderTD, 2);
  19777. TextDrawBackgroundColor(PaintballLeaderTD, -65281);
  19778. TextDrawFont(PaintballLeaderTD, 2);
  19779. TextDrawLetterSize(PaintballLeaderTD, 0.310000, 1.600000);
  19780. TextDrawColor(PaintballLeaderTD, 65535);
  19781. TextDrawSetOutline(PaintballLeaderTD, 1);
  19782. TextDrawSetProportional(PaintballLeaderTD, 1);
  19783. TextDrawUseBox(PaintballLeaderTD, 1);
  19784. TextDrawBoxColor(PaintballLeaderTD, 68);
  19785. TextDrawTextSize(PaintballLeaderTD, -30.000000, 220.000000);
  19786. PaintballLeaderTD2 = TextDrawCreate(341.000000, 369.000000, "~r~Paintball Leader~n~~b~Nobody");
  19787. TextDrawAlignment(PaintballLeaderTD2, 2);
  19788. TextDrawBackgroundColor(PaintballLeaderTD2, -65281);
  19789. TextDrawFont(PaintballLeaderTD2, 2);
  19790. TextDrawLetterSize(PaintballLeaderTD2, 0.310000, 1.600000);
  19791. TextDrawColor(PaintballLeaderTD2, 65535);
  19792. TextDrawSetOutline(PaintballLeaderTD2, 1);
  19793. TextDrawSetProportional(PaintballLeaderTD2, 1);
  19794. TextDrawUseBox(PaintballLeaderTD2, 1);
  19795. TextDrawBoxColor(PaintballLeaderTD2, 68);
  19796. TextDrawTextSize(PaintballLeaderTD2, -30.000000, 220.000000);
  19797. //IRC
  19798. IRCInfo[0][iPlayers] = 0;
  19799. IRCInfo[1][iPlayers] = 0;
  19800. IRCInfo[2][iPlayers] = 0;
  19801. IRCInfo[3][iPlayers] = 0;
  19802. IRCInfo[4][iPlayers] = 0;
  19803. IRCInfo[5][iPlayers] = 0;
  19804. IRCInfo[6][iPlayers] = 0;
  19805. IRCInfo[7][iPlayers] = 0;
  19806. IRCInfo[8][iPlayers] = 0;
  19807. IRCInfo[9][iPlayers] = 0;
  19808. //GANGZONES
  19809. blackblindfoldzone = GangZoneCreate(-3000.0, -3000.0, 3000.0, 3000.0);
  19810. //No roof fix
  19811. CreateDynamicObject(9099, 2017.33655, -1594.21057, 15.58708, 0.00000, 0.00000, 45.72002);
  19812. CreateObject(9099, 2015.70740, -1592.64636, 15.57016, 0.00000, 0.00000, 45.72002);
  19813. CreateDynamicObject(9099, 2011.55481, -1593.16016, 15.56329, 0.00000, 0.00000, 134.93997);
  19814. CreateDynamicObject(9099, 2015.77722, -1592.55798, 16.25744, 0.30000, -90.18002, 45.72002);
  19815. CreateDynamicObject(9099, 2017.52014, -1594.26123, 16.25744, 0.30000, -90.18002, 45.72002);
  19816. // Creating VIP vehicles //
  19817. for(new i = 0; i < sizeof(VipCars); i++)
  19818. CreateVIPCar(i);
  19819. CreateDynamic3DTextLabel("/getgift to claim a gift.", COLOR_WHITE, 1547.4823, -1477.4794, 1037.5236, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19820. CreateDynamicPickup(1239, 23, 256.6335, 64.0462, 1003.6406);
  19821. CreateDynamic3DTextLabel("Prisoner List\n{FFFFFF}/inmates", 0x43527DFF, 256.94, 69.83, 1003.64, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19822. //CreateDynamicPickup(1239, 23, 1595.2850, -1631.2607, 13.4841);
  19823. //CreateDynamic3DTextLabel("Impound System\n{FFFFFF}/impound\n/impounds", 0x43527DFF, 1595.2850, -1631.2607, 13.4841 + 0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19824. //CreateDynamicPickup(1239, 23, 1587.6050,-1674.6945,1106.1793);
  19825. //CreateDynamic3DTextLabel("Impound System\n{FFFFFF}/myimpounds\n/release", 0x43527DFF, 1587.6050,-1674.6945,1106.1793 + 0.30, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19826. CreateDynamicPickup(1575, 23, 323.0342, 1118.5804, 1083.8828); //Pot Get
  19827. CreateDynamic3DTextLabel("Pot Pickup\n{FFFFFF}/getseeds", 0x43527DFF, 323.0342, 1118.5804, 1083.8828 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19828. //iCracklab = CreateDynamicPickup(1575, 23, 2346.2937, -1185.2551, 1027.9766); //Crack Get
  19829. //new Text3D:textCracklab = CreateDynamic3DTextLabel("Crack Pickup\n{FFFFFF}/getcrack", 0x43527DFF, 2346.2937, -1185.2551, 1027.9766 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19830. CreateDynamic3DTextLabel("Products\n{FFFFFF}/buyproducts", 0x43527DFF, 987.8038, -1366.2513, 13.5787 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19831. CreateDynamicPickup(1239, 23, 1423.6151, -1320.5437, 13.5547); //Materials Get 1
  19832. CreateDynamic3DTextLabel("Materials Pickup 1\n{FFFFFF}/getmats", 0x43527DFF, 1423.6151, -1320.5437, 13.5547 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19833. CreateDynamicPickup(1239, 23, 2390.5244,-2008.4646,13.5537); //Materials Get 2
  19834. CreateDynamic3DTextLabel("Materials Pickup 2\n{FFFFFF}/getmats", 0x43527DFF, 2390.5244,-2008.4646,13.5537 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19835. CreateDynamicPickup(1239, 23, 2205.9199, 1582.2222, 999.9766); //Crate Get
  19836. CreateDynamic3DTextLabel("Drug Factory\n{FFFFFF}/getcrate", 0x43527DFF, 2411.9382, -2598.7937, 14.2131 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19837. CreateDynamic3DTextLabel("{FFFFFF}/buyinsurance", -1, 1174.5452, -1321.2003, 1089.5674, 7.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19838. CreateDynamicPickup(1279, 23, 2411.9382, -2598.7937, 14.2131);
  19839. CreateDynamicPickup(1239, 23, 89.6221,-259.6307,1.5781);
  19840. CreateDynamic3DTextLabel("Trash Delivery Point\n{FFFFFF}/unloadtrash", 0x43527DFF, 89.6221,-259.6307,1.5781 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19841. CreateDynamicPickup(1239, 23, 2902.5264,-2119.8174,2.7550);
  19842. CreateDynamic3DTextLabel("Trash Delivery Point\n{FFFFFF}/unloadtrash", 0x43527DFF, 2902.5264,-2119.8174,2.7550 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19843. //CreateDynamicPickup(1239, 23, 1825.8295,-1361.6649,14.4219);
  19844. CreateDynamic3DTextLabel("/buyadrenaline", 0x43527DFF, 1175.73, -1324.19, 1089.57 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19845. //CreateDynamic3DTextLabel("Guide\n{FFFFFF}/guide", 0x7DAEFFFF, 1825.8295,-1361.6649,14.4219 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19846. CreateDynamicPickup(1239, 23, 754.5243, -39.7095, 1000.5859); //Triads Change Uniform
  19847. CreateDynamic3DTextLabel("Locker\n{FFFFFF}/change", 0x43527DFF, 754.5243, -39.7095, 1000.5859 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19848. //iArrest1 = CreateDynamicPickup(1247, 23, 1528.3268, -1677.8229, 5.8906); //SAPD Arrest Garage
  19849. CreateDynamic3DTextLabel("Arrest Point\n{FFFFFF}/arrest", 0x43527DFF, -2595.86, -104.28, 6001.08, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 20, 1, -1, 100);
  19850. CreateDynamicPickup(1239, 23, 1324.2122, 286.5997, 20.0452); //Sprunk Factory
  19851. CreateDynamicPickup(1239, 23, 1318.8472, 392.6770, 19.5547); //Drug Factory
  19852. CreateDynamicPickup(1314, 23, 1310.2419, -1367.2987, 13.5280); //Paintball
  19853. CreateDynamic3DTextLabel("Paintball Arena\n{FFFFFF}Type /enter to go inside.", 0x43527DFF, 1310.2419, -1367.2987, 13.5280 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19854. CreateDynamicPickup(1239, 23, 2276.50, -930.04, 28.04); //VIP Black Market
  19855. CreateDynamic3DTextLabel("Blackmarket\n{FFFFFF}Type /enter to go inside.", 0x43527DFF, 2276.50, -930.04, 28.04 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19856. CreateDynamicPickup(1239, 23, 2352.9841,-1463.4185,24.0000); //Tiki Store
  19857. CreateDynamic3DTextLabel("Tiki Store\n{FFFFFF}Type /enter to go inside.", 0x43527DFF, 2352.9841, -1463.4185, 24.0000 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19858. CreateDynamicPickup(1239, 23, -2237.1008,130.3685,1035.4141); // Tiki /exchange pickup
  19859. CreateDynamic3DTextLabel("Tiki Store\n{FFFFFF}Type /exchange to use your Tikis.", 0x43527DFF, -2237.1008, 130.3685, 1035.4141 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19860. CreateDynamicPickup(1239, 23, 1518.7930, -1452.9998, 14.2031); //VIP Club
  19861. CreateDynamic3DTextLabel("VIP Club\n{FFFFFF}Type /enter to go inside.", 0x43527DFF, 1518.7930, -1452.9998, 14.2031 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19862. CreateDynamicPickup(1239, 23, 2232.89, -1333.48, 23.98); // Church
  19863. CreateDynamicPickup(1239, 23, 766.1840, 13.3013, 1000.7027); //Training
  19864. CreateDynamicPickup(1239, 23, 987.8038, -1366.2513, 13.5787); //Products Buy
  19865. CreateDynamic3DTextLabel("Detective Job\n{FFFFFF}/getjob", 0xFFFF91FF, 256.6335, 64.0462, 1003.6406 +0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19866. CreateDynamicPickup(1239, 23, 1378.1117, -1096.1830, 25.1200);
  19867. CreateDynamic3DTextLabel("Lawyer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 1378.1117, -1096.1830, 25.1200 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19868. CreateDynamicPickup(1239, 23, 2164.1377, -1675.4172, 15.0859);
  19869. CreateDynamic3DTextLabel("Drug Dealer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 2164.1377, -1675.4172, 15.0859 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19870. CreateDynamicPickup(1239, 23, 2329.4089, -2316.0996, 13.5469);
  19871. CreateDynamic3DTextLabel("Mechanic Job\n{FFFFFF}/getjob", 0xFFFF91FF, 2329.4089, -2316.0996, 13.5469 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19872. CreateDynamicPickup(1239, 23, 165.7221,-280.6324,1.9747);
  19873. CreateDynamic3DTextLabel("Waste Collector Job\n{FFFFFF}/getjob", 0xFFFF91FF, 165.7221,-280.6324,1.9747 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19874. CreateDynamicPickup(1239, 23, 972.0325, -1385.7533, 13.5476);
  19875. CreateDynamic3DTextLabel("Product Dealer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 972.0325, -1385.7533, 13.5476 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19876. CreateDynamicPickup(1239, 23,2227.0664, -1718.9178, 13.5245);
  19877. CreateDynamic3DTextLabel("Bodyguard Job\n{FFFFFF}/getjob", 0xFFFF91FF, 2227.0664, -1718.9178, 13.5245 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19878. CreateDynamicPickup(1239, 23, 1366.4325, -1275.2096, 13.5469);
  19879. CreateDynamic3DTextLabel("Arms Dealer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 1366.4325, -1275.2096, 13.5469 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19880. CreateDynamicPickup(1239, 23, 241.8917, -184.6301, 1.5781);
  19881. CreateDynamic3DTextLabel("Arms Dealer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 241.8917, -184.6301, 1.5781 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19882. CreateDynamicPickup(1239, 23, 756.7493, 6.3762, 1000.7001);
  19883. CreateDynamic3DTextLabel("Arms Dealer Job\n{FFFFFF}/getjob", 0xFFFF91FF, 241.8917, -184.6301, 1.5781 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19884. CreateDynamicPickup(1239, 1, -1551.8896, 1154.8134, 7.1875);
  19885. CreateDynamic3DTextLabel("Bodyguard Job\n{FFFFFF}/getjob", 0xFFFF91FF, -1551.8896, 1154.8134, 7.1875 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19886. CreateDynamicPickup(1239, 1, -2714.6499, 210.9217, 4.3281);
  19887. CreateDynamic3DTextLabel("Mechanic Job\n{FFFFFF}/getjob", 0xFFFF91FF, -2714.6499, 210.9217, 4.3281 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19888. CreateDynamicPickup(1239, 1, -2764.7473, 384.7114, 6.3281);
  19889. CreateDynamic3DTextLabel("Lawyer Job\n{FFFFFF}/getjob", 0xFFFF91FF, -2764.7473, 384.7114, 6.3281 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19890. CreateDynamicPickup(1239, 1, 1882.6560, 1897.4287, 27.5159);
  19891. //CreateDynamic3DTextLabel("Detective Job\n{FFFFFF}/getjob", 0xFFFF91FF, 256.9972, 69.9624, 1003.6406 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19892. CreateDynamicPickup(1239, 1, -1982.0994, 131.8526, 27.6875);
  19893. CreateDynamic3DTextLabel("Taxi Job\n{FFFFFF}/getjob", 0xFFFF91FF, -1982.0994, 131.8526, 27.6875 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19894. CreateDynamicPickup(1239, 23, 1741.7062, -1863.6664, 13.5748);
  19895. CreateDynamic3DTextLabel("Taxi Job\n{FFFFFF}/getjob", 0xFFFF91FF, 1741.7062, -1863.6664, 13.5748 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19896. CreateDynamicPickup(1239, 23, 2354.2703, -1169.3293, 28.0083);
  19897. CreateDynamic3DTextLabel("Drug Smuggler Job\n{FFFFFF}/getjob", 0xFFFF91FF, 2354.2703, -1169.3293, 28.0083 +0.88, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19898. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 1425.95471, -980.49756, 1639.40381 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19899. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 1424.13562, -980.49762, 1639.40381 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19900. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 1422.31250, -980.54791, 1639.40381 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19901. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 1928.673461, -1783.487304, 13.114453 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19902. //new Text3D:textAtm5 = CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 2228.281982, -1710.821166, 13.177772 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19903. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 1548.155884, -1472.062866, 1036.653442 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19904. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 651.20215, -520.47241, 15.95219 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19905. CreateDynamic3DTextLabel("ATM\n{FFFFFF}/atm", 0x6E88FFFF, 251.26659, -189.68741, 1.16737 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19906. CreateDynamic3DTextLabel("Advertisement\n{FFFFFF}Visit the shop\nYour donations help support the server.", 0x33AA33FF, 2348.74390, -1458.50610, 23.48579 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19907. CreateDynamic3DTextLabel("Advertisement\n{FFFFFF}Sit your license test and get a free eye exam!\nDriving instructors also for hire.", 0x33AA33FF, 1289.89697, -1844.42358, 13.02007 +0.85, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19908. //new Text3D:tribute = CreateDynamic3DTextLabel("Stone of The Enlightened\n{FFFFFF}/scratchname", 0x6E88FFFF, -2231.2749,-1739.3939,481.4311 -0.50, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19909. CreateDynamic3DTextLabel("Service Desk\n{FFFFFF}/namechange", 0x6E88FFFF, -2106.8853, 764.0605, 9006.1152, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  19910. // CCTV Arrows //
  19911. CCTV_Arrows[0] = TextDrawCreate(208.000000, 305.386596, "<<-");
  19912. TextDrawLetterSize(CCTV_Arrows[0], 0.449999, 1.600000);
  19913. TextDrawTextSize(CCTV_Arrows[0], 239.199996, 2439.360351);
  19914. TextDrawAlignment(CCTV_Arrows[0], 1);
  19915. TextDrawColor(CCTV_Arrows[0], -1);
  19916. TextDrawUseBox(CCTV_Arrows[0], true);
  19917. TextDrawBoxColor(CCTV_Arrows[0], 255);
  19918. TextDrawSetShadow(CCTV_Arrows[0], 0);
  19919. TextDrawSetOutline(CCTV_Arrows[0], 1);
  19920. TextDrawBackgroundColor(CCTV_Arrows[0], 51);
  19921. TextDrawFont(CCTV_Arrows[0], 1);
  19922. TextDrawSetProportional(CCTV_Arrows[0], 1);
  19923. TextDrawSetSelectable(CCTV_Arrows[0], true);
  19924. CCTV_Arrows[1] = TextDrawCreate(415.200012, 307.626647, "->>");
  19925. TextDrawLetterSize(CCTV_Arrows[1], 0.449999, 1.600000);
  19926. TextDrawTextSize(CCTV_Arrows[1], 446.399841, 149.333312);
  19927. TextDrawAlignment(CCTV_Arrows[1], 1);
  19928. TextDrawColor(CCTV_Arrows[1], -1);
  19929. TextDrawUseBox(CCTV_Arrows[1], true);
  19930. TextDrawBoxColor(CCTV_Arrows[1], 255);
  19931. TextDrawSetShadow(CCTV_Arrows[1], 0);
  19932. TextDrawSetOutline(CCTV_Arrows[1], 1);
  19933. TextDrawBackgroundColor(CCTV_Arrows[1], 51);
  19934. TextDrawFont(CCTV_Arrows[1], 1);
  19935. TextDrawSetProportional(CCTV_Arrows[1], 1);
  19936. TextDrawSetSelectable(CCTV_Arrows[1], true);
  19937. // //
  19938. //weapon pickups
  19939. para = CreateDynamicPickup(371, 23, 1544.5868, -1352.8413, 339.2319); //Parachute
  19940. poolcue = CreateDynamicPickup(338, 2, 508.2798, -85.0735, 998.9609); //10GB Poolcue
  19941. dildo = CreateDynamicPickup(321, 2, 261.6014,71.2014,1003.2422); //PD Dildo
  19942. //POINT PICKUPS
  19943. CreateDynamicPickup(1239, 23, 2629.4319, -2107.8040, 16.9531); //Fossil Fuel
  19944. CreateDynamicPickup(1239, 23, 2610.0503, -2239.3501, 13.5392); //Auto Export
  19945. CreateDynamicPickup(1239, 23, 2172.1880, -2263.9683, 13.3363); //Materials Deliver 1
  19946. CreateDynamicPickup(1239, 23, 2288.1233,-1104.7793,38.4565); //Materials Deliver 2
  19947. //SetTimer("OnSecondSync", 999, 1); // 1 second (unused?)
  19948. SetTimer("Timer_OnFiveSecondSync", 5000, 1); //5 seconds
  19949. SetTimer("Timer_OnThirtySecondSync", 30000, 1); // 30 seconds
  19950. SetTimer("Timer_OnOneMinuteSync", 60000, 1); //1 minute
  19951. SetTimer("Timer_OnFiveMinuteSync", 300000, 1); //5 mins
  19952. SetTimer("Timer_OnTenMinuteSync", 600000, 1); //10 mins
  19953. SetTimer("Timer_OnPlayerSecondSync", 999, 1 );
  19954. //SetTimer("Bleeding", 12000, 1); // 12 sec
  19955. resetLicensePlates();
  19956. gamemodeLoaded = 1;
  19957. #if DEVMODE == 1
  19958. SetGameModeText(BETAMODE_VERSION);
  19959. SendRconCommand("[Beta] Project Roleplay[0.3.7/DL]");
  19960. #endif
  19961. // SANG missiles launcher (anti aircraft)
  19962. CreateSAM(2773.9899900, -2597.7929700, 17.5000000, 0, 0, 90, 400, 200, 90, SAM_POWER_BEST, true, true);
  19963. new BlackScreen = CreateObject(19377, 5027.3896, 4057.5551, 992.9909, 0.0000, 0.0000, 0.0000); //wall025
  19964. SetObjectMaterial(BlackScreen, 0, 10765, "airportgnd_sfse", "white", 0xFF000000);
  19965. //UnlockServer = SetTimer("UnlockingServer", 60000*5, false);
  19966. Create3DTextLabel("{b01ac6}Welcome to Project Roleplay\n{ffffff}Type /helpme for a tour.", 0x008080FF, 675.1188,-2294.3250,5.8098, 40.0, 0, 1);
  19967. //MySQLSetTimeZone(sqlGameConnection, hour, minute)
  19968. //FURNITURE FIX//
  19969. return 1;
  19970. }
  19971. forward UnlockingServer(); //example function
  19972. public UnlockingServer()
  19973. {
  19974. //SendRconCommand("password 0");
  19975. //printf("Server Unlocked");
  19976. return 1;
  19977. }
  19978. Timer:AutoMessageSystem()
  19979. {
  19980. new str[128];
  19981. switch(messagePos)
  19982. {
  19983. case 1:
  19984. {
  19985. if(!strmatch(autoMessages[1], "None"))
  19986. {
  19987. format(str, sizeof(str), "Announcement: %s", autoMessages[1]);
  19988. SendClientMessageToAll(0x3D97E0FF, str);
  19989. }
  19990. messagePos = 2;
  19991. }
  19992. case 2:
  19993. {
  19994. if(!strmatch(autoMessages[2], "None"))
  19995. {
  19996. format(str, sizeof(str), "Announcement: %s", autoMessages[2]);
  19997. SendClientMessageToAll(0x3D97E0FF, str);
  19998. }
  19999. messagePos = 3;
  20000. }
  20001. case 3:
  20002. {
  20003. if(!strmatch(autoMessages[3], "None"))
  20004. {
  20005. format(str, sizeof(str), "Announcement: %s", autoMessages[3]);
  20006. SendClientMessageToAll(0x3D97E0FF, str);
  20007. }
  20008. messagePos = 4;
  20009. }
  20010. case 4:
  20011. {
  20012. if(!strmatch(autoMessages[4], "None"))
  20013. {
  20014. format(str, sizeof(str), "Announcement: %s", autoMessages[4]);
  20015. SendClientMessageToAll(0x3D97E0FF, str);
  20016. }
  20017. messagePos = 5;
  20018. }
  20019. case 5:
  20020. {
  20021. if(!strmatch(autoMessages[5], "None"))
  20022. {
  20023. format(str, sizeof(str), "Announcement: %s", autoMessages[5]);
  20024. SendClientMessageToAll(0x3D97E0FF, str);
  20025. }
  20026. messagePos = 1;
  20027. }
  20028. }
  20029. return 1;
  20030. }
  20031. stock FactionMOTDS()
  20032. {
  20033. new file[20];
  20034. file = "factionMOTD.ini";
  20035. if(dini_Exists(file))
  20036. {
  20037. format(facMOTD[1][motdOne], 128, "%s", dini_Get(file, "MOTD1"));
  20038. format(facMOTD[2][motdTwo], 128, "%s", dini_Get(file, "MOTD2"));
  20039. format(facMOTD[3][motdThree], 128, "%s", dini_Get(file, "MOTD3"));
  20040. format(facMOTD[4][motdFour], 128, "%s", dini_Get(file, "MOTD4"));
  20041. format(facMOTD[5][motdFive], 128, "%s", dini_Get(file, "MOTD5"));
  20042. format(facMOTD[6][motdSix], 128, "%s", dini_Get(file, "MOTD6"));
  20043. format(facMOTD[7][motdSeven], 128, "%s", dini_Get(file, "MOTD7"));
  20044. format(facMOTD[8][motdEight], 128, "%s", dini_Get(file, "MOTD8"));
  20045. format(facMOTD[9][motdNine], 128, "%s", dini_Get(file, "MOTD9"));
  20046. format(facMOTD[10][motdTen], 128, "%s", dini_Get(file, "MOTD10"));
  20047. format(facMOTD[11][motdEleven], 128, "%s", dini_Get(file, "MOTD11"));
  20048. format(facMOTD[12][motdTwelve], 128, "%s", dini_Get(file, "MOTD12"));
  20049. format(facMOTD[13][motdThirteen], 128, "%s", dini_Get(file, "MOTD13"));
  20050. format(facMOTD[14][motdFourteen], 128, "%s", dini_Get(file, "MOTD14"));
  20051. format(facMOTD[15][motdFifteen], 128, "%s", dini_Get(file, "MOTD15"));
  20052. }
  20053. else
  20054. {
  20055. format(facMOTD[1][motdOne], 128, "None");
  20056. format(facMOTD[2][motdTwo], 128, "None");
  20057. format(facMOTD[3][motdThree], 128, "None");
  20058. format(facMOTD[4][motdFour], 128, "None");
  20059. format(facMOTD[5][motdFive], 128, "None");
  20060. format(facMOTD[6][motdSix], 128, "None");
  20061. format(facMOTD[7][motdSeven], 128, "None");
  20062. format(facMOTD[8][motdEight], 128, "None");
  20063. format(facMOTD[9][motdNine], 128, "None");
  20064. format(facMOTD[10][motdTen], 128, "None");
  20065. format(facMOTD[11][motdEleven], 128, "None");
  20066. format(facMOTD[12][motdTwelve], 128, "None");
  20067. format(facMOTD[13][motdThirteen], 128, "None");
  20068. format(facMOTD[14][motdFourteen], 128, "None");
  20069. format(facMOTD[15][motdFifteen], 128, "None");
  20070. dini_Create(file);
  20071. dini_Set(file, "MOTD1", "None");
  20072. dini_Set(file, "MOTD2", "None");
  20073. dini_Set(file, "MOTD3", "None");
  20074. dini_Set(file, "MOTD4", "None");
  20075. dini_Set(file, "MOTD5", "None");
  20076. dini_Set(file, "MOTD6", "None");
  20077. dini_Set(file, "MOTD7", "None");
  20078. dini_Set(file, "MOTD8", "None");
  20079. dini_Set(file, "MOTD9", "None");
  20080. dini_Set(file, "MOTD10", "None");
  20081. dini_Set(file, "MOTD11", "None");
  20082. dini_Set(file, "MOTD12", "None");
  20083. dini_Set(file, "MOTD13", "None");
  20084. dini_Set(file, "MOTD14", "None");
  20085. dini_Set(file, "MOTD15", "None");
  20086. }
  20087. return 1;
  20088. }
  20089. stock LoadFactionBanks()
  20090. {
  20091. mysql_pquery(sqlGameConnection, "SELECT * FROM `factionbanks` LIMIT 1", "onLoadFactionBanks");
  20092. return 1;
  20093. }
  20094. forward onLoadFactionBanks();
  20095. public onLoadFactionBanks() {
  20096. if(cache_num_rows()) {
  20097. SAPD = cache_get_field_content_int(0, "SAPD", sqlGameConnection);
  20098. FBI = cache_get_field_content_int(0, "FBI", sqlGameConnection);
  20099. SAST = cache_get_field_content_int(0, "SAST", sqlGameConnection);
  20100. FMD = cache_get_field_content_int(0, "FMD", sqlGameConnection);
  20101. DOC = cache_get_field_content_int(0, "SANG", sqlGameConnection);
  20102. GOV = cache_get_field_content_int(0, "GOV", sqlGameConnection);
  20103. SCOTUS = cache_get_field_content_int(0, "SCOTUS", sqlGameConnection);
  20104. NEWS = cache_get_field_content_int(0, "NEWS", sqlGameConnection);
  20105. TAXI = cache_get_field_content_int(0, "TAXI", sqlGameConnection);
  20106. }
  20107. return 1;
  20108. }
  20109. stock AdminMOTD()
  20110. {
  20111. new file[20];
  20112. file = "adminMOTD.ini";
  20113. if(dini_Exists(file))
  20114. {
  20115. format(adminMOTD, sizeof(adminMOTD), "%s", dini_Get(file, "MOTD"));
  20116. }
  20117. else
  20118. {
  20119. dini_Create(file);
  20120. dini_Set(file, "MOTD", "None");
  20121. }
  20122. return 1;
  20123. }
  20124. #include "../gamemodes/inc/tagsystem.inc"
  20125. #include "../gamemodes/inc/core/chat.inc"
  20126. #include "../gamemodes/inc/showstats.inc"
  20127. //#include "../gamemodes/inc/Player/adminrecord.inc"
  20128. #include "../gamemodes/inc/bankrobbery.inc"
  20129. stock SaveCCTV(owner[], Float:x, Float:y, Float:z, vw, int, cctvID)
  20130. {
  20131. new filename[50];
  20132. format(filename, sizeof(filename), "CCTV/CCTV%i.ini", cctvID);
  20133. dini_Create(filename);
  20134. if(dini_Exists(filename))
  20135. {
  20136. dini_Set(filename, "Name", "Not Set");
  20137. dini_Set(filename, "Owner", owner);
  20138. dini_FloatSet(filename, "X", x);
  20139. dini_FloatSet(filename, "Y", y);
  20140. dini_FloatSet(filename, "Z", z);
  20141. dini_FloatSet(filename, "RX", 0.0);
  20142. dini_FloatSet(filename, "RY", 0.0);
  20143. dini_FloatSet(filename, "RZ", 0.0);
  20144. dini_IntSet(filename, "VW", vw);
  20145. dini_IntSet(filename, "Int", int);
  20146. dini_FloatSet(filename, "LAX", 0.0);
  20147. dini_FloatSet(filename, "LAY", 0.0);
  20148. dini_FloatSet(filename, "LAZ", 0.0);
  20149. }
  20150. else
  20151. {
  20152. dini_Create(filename);
  20153. dini_Set(filename, "Name", "Not Set");
  20154. dini_Set(filename, "Owner", owner);
  20155. dini_FloatSet(filename, "X", x);
  20156. dini_FloatSet(filename, "Y", y);
  20157. dini_FloatSet(filename, "Z", z);
  20158. dini_FloatSet(filename, "RX", 0.0);
  20159. dini_FloatSet(filename, "RY", 0.0);
  20160. dini_FloatSet(filename, "RZ", 0.0);
  20161. dini_IntSet(filename, "VW", vw);
  20162. dini_IntSet(filename, "Int", int);
  20163. dini_FloatSet(filename, "LAX", 0.0);
  20164. dini_FloatSet(filename, "LAY", 0.0);
  20165. dini_FloatSet(filename, "LAZ", 0.0);
  20166. }
  20167. CCTVCount++;
  20168. return 1;
  20169. }
  20170. stock SendActionMessage(playerid, colour, string[])
  20171. {
  20172. new Float:x, Float:y, Float:z, world, int;
  20173. GetPlayerPos(playerid, x, y, z);
  20174. int = GetPlayerInterior(playerid);
  20175. world = GetPlayerVirtualWorld(playerid);
  20176. for(new i = 0; i < MAX_PLAYERS; i++)
  20177. if(IsPlayerConnected(i))
  20178. if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
  20179. if(GetPlayerInterior(i) == int)
  20180. if(GetPlayerVirtualWorld(i) == world)
  20181. SendClientMessage(i, colour, string);
  20182. return 1;
  20183. }
  20184. stock UpdateCCTV(id)
  20185. {
  20186. new filename[50];
  20187. format(filename, sizeof(filename), "CCTV/CCTV%i.ini", id);
  20188. dini_Set(filename, "Name", CCTV[id][CCTVName]);
  20189. dini_Set(filename, "Owner", CCTV[id][CCTVOwner]);
  20190. dini_FloatSet(filename, "X", CCTV[id][CCTVX]);
  20191. dini_FloatSet(filename, "Y", CCTV[id][CCTVY]);
  20192. dini_FloatSet(filename, "Z", CCTV[id][CCTVZ]);
  20193. dini_FloatSet(filename, "RX", CCTV[id][CCTVRX]);
  20194. dini_FloatSet(filename, "RY", CCTV[id][CCTVRY]);
  20195. dini_FloatSet(filename, "RZ", CCTV[id][CCTVRZ]);
  20196. dini_IntSet(filename, "VW", CCTV[id][CCTVVW]);
  20197. dini_IntSet(filename, "Int", CCTV[id][CCTVINT]);
  20198. dini_FloatSet(filename, "LAX", CCTV[id][CCTVLookAtX]);
  20199. dini_FloatSet(filename, "LAY", CCTV[id][CCTVLookAtY]);
  20200. dini_FloatSet(filename, "LAZ", CCTV[id][CCTVLookAtZ]);
  20201. return 1;
  20202. }
  20203. stock resetLicensePlates()
  20204. {
  20205. new const charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  20206. new stringplate[8];
  20207. for(new vv = 0; vv < MAX_VEHICLES; vv++)
  20208. {
  20209. for(new i = 0; i < 6; i++)
  20210. {
  20211. stringplate[i] = charset[random(sizeof(charset) - 1)];
  20212. }
  20213. SetVehicleNumberPlate(vv, stringplate);
  20214. }
  20215. }
  20216. //==============================================================================
  20217. Timer:OnOneMinuteSync()
  20218. {
  20219. new str[128];
  20220. foreach( new i: Player )
  20221. {
  20222. // Update gags
  20223. if(IsPlayerGagged(i)) {
  20224. if(gagExpire[i] <= gettime()) {
  20225. gagExpire[i] = 0;
  20226. RemoveGagObject(i);
  20227. // Action
  20228. new gagAction[128];
  20229. format(gagAction, sizeof(gagAction), "* %s manages to spit out the gag in their mouth.", PlayerICName(i));
  20230. ProxDetector(30.0, i, gagAction, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  20231. }
  20232. }
  20233. //update player levels
  20234. SetPlayerScore(i, PlayerInfo[i][pLevel]);
  20235. //reset vip gifts
  20236. if(PlayerInfo[i][pDonateRank] != 0)
  20237. {
  20238. if(GottenTimeLeft[i] <= 0)
  20239. {
  20240. if(GottenGift[i] != 0)
  20241. {
  20242. GottenGift[i] = 0;
  20243. GottenTimeLeft[i] = 0;
  20244. SendClientMessage(i, COLOR_LIGHTBLUE, "VIP Announcement: You can now /getgift again.");
  20245. }
  20246. }
  20247. else
  20248. {
  20249. GottenGift[i] = 1;
  20250. GottenTimeLeft[i] -= 60000;
  20251. }
  20252. }
  20253. //vehicle anti cheat
  20254. if(PlayerInfo[i][pMember] < 1 && PlayerInfo[i][pLevel] < 3 && //not a faction member, below level 3
  20255. PlayerInfo[i][pAdmin] < 1 && PlayerInfo[i][pBand] == 0) //not an admin, not banned.
  20256. {
  20257. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  20258. {
  20259. new
  20260. vehicleid = GetPlayerVehicleID(i),
  20261. dynvehID = GetDynamicVehicleID(vehicleid);
  20262. if(sVehicleInfo[dynvehID][v_faction] == 5)
  20263. {
  20264. if(PlayerInfo[i][pBand] == 3) return 1; // Avoid spam, should already be banned.
  20265. ClearAnimationsEx(i);
  20266. anticheatbans ++;
  20267. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Sobiet detected (%d hackers banned)", PlayerOOCName(i), anticheatbans);
  20268. SendClientMessageToAll(COLOR_WHITE, str);
  20269. PlayerInfo[i][pBand] = 3;
  20270. BanLog(str);
  20271. format(str, sizeof(str), "Ban Reason: Sobiet detected - Banned by: ANTICHEAT");
  20272. SendClientMessage(i, COLOR_GREY, str);
  20273. strmid(PlayerInfo[i][pBanReason], str, 0, strlen(str));
  20274. printf("Sobiet detected: %s, vehicle: %s, dynveh: %d", PlayerOOCName(i), GetVehicleFriendlyName(vehicleid), dynvehID);
  20275. BanExx(i);
  20276. if(!IsUnoccupiedVehicle(vehicleid))
  20277. SetVehicleToRespawn(vehicleid); //respawn the vehicle.
  20278. return 1;
  20279. }
  20280. }
  20281. }
  20282. if(PlayerPaused[i] == 0) minutesOnline[i]++;
  20283. }
  20284. UpdateWeed(); //update the weed system
  20285. return 1;
  20286. }
  20287. //==============================================================================
  20288. // The following is a fix for PointPayCheck being called twice in the same minute,
  20289. // which is also the reason for the paychecks being sent twice.
  20290. // This fix will be removed when we get more accurate timers. ~ byt3
  20291. new bool:g_bPaydaySent = false;
  20292. Timer:ResetPaydaySent()
  20293. {
  20294. g_bPaydaySent = false;
  20295. return 1;
  20296. }
  20297. Timer:PointPayCheck()
  20298. {
  20299. new hh, mm, ss;
  20300. gettime(hh, mm, ss);
  20301. if(mm == 59 && !g_bPaydaySent)
  20302. {
  20303. g_bPaydaySent = true;
  20304. SetTimer("Timer_ResetPaydaySent", 120000, false); // 2 minutes
  20305. PayDay();
  20306. }
  20307. return 1;
  20308. }
  20309. Timer:OnFiveMinuteSync() //this function does stuff every 5 mins then saves their account (cutting down on timers)
  20310. {
  20311. new rand = random(sizeof(prisonAmbientSounds));
  20312. foreach( new i: Player )
  20313. {
  20314. if(gPlayerLogged[i] == 1)
  20315. {
  20316. fish_OnFiveMinuteSync(i);
  20317. if(PlayerInfo[i][pPayDay] < 6) //don't know!
  20318. {
  20319. PlayerInfo[i][pPayDay] += 1;
  20320. }
  20321. //prison ambient sounds
  20322. if(IsPlayerInRangeOfPoint(i, 40.0, -2406.4944, 2072.3271, 995.6563))
  20323. {
  20324. PlayerPlaySound(i, prisonAmbientSounds[rand], -2406.4944, 2072.3271, 995.6563);
  20325. }
  20326. if(IsPlayerInRangeOfPoint(i, 40.0, 1789.1893, -1570.7909, 1642.9736))
  20327. {
  20328. PlayerPlaySound(i, prisonAmbientSounds[rand], 1789.1893, -1570.7909, 1642.9736);
  20329. }
  20330. }
  20331. }
  20332. return 1;
  20333. }
  20334. public SaveChars()
  20335. {
  20336. if(gamemodeLoaded)
  20337. {
  20338. foreach( new i: Player )
  20339. {
  20340. OnPlayerSave(i);
  20341. //if they have a vehicle spawned...
  20342. if( playerSpawnedVehicle[i] > -1 ) {
  20343. savePlayerVehicle( i, playerSpawnedVehicle[i] );
  20344. }
  20345. }
  20346. SaveDealerships();
  20347. SaveHouses();
  20348. SaveGates();
  20349. SaveSurnames();
  20350. SaveEntrances();
  20351. SaveGarages();
  20352. SaveFactionBanks();
  20353. SaveStuff();
  20354. SaveBars();
  20355. }
  20356. return 1;
  20357. }
  20358. SendPayCheck(i)
  20359. {
  20360. new str[128];
  20361. new account, cash;
  20362. account = PayDayAccount[i]; //bank account amount
  20363. cash = PlayerInfo[i][pCash];
  20364. if(PlayerInfo[i][pPayDay] >= 5)
  20365. {
  20366. new checks = PlayerInfo[i][pPayCheck]; //paycheck amount
  20367. new incometax = PlayerInfo[i][pPayCheck] / 100 * Tax; //income tax amount
  20368. GiveMoney(i, checks -incometax); //give money
  20369. //new govmoney = checks-incometax;
  20370. //TAX MONEY
  20371. TaxValue = TaxValue +incometax;
  20372. //ELECTRICITY
  20373. new ebill = 0;
  20374. if(PlayerInfo[i][pHouseID] != 0)
  20375. {
  20376. //owns house
  20377. new randomv = random(1000);
  20378. ebill += (randomv *HouseInfo[PlayerInfo[i][pHouseID]][hLevel]) /2;
  20379. }
  20380. TaxValue += ebill;
  20381. if(IsValidPaymentFaction(i)) // check if the faction can be paid, if you wish to add another faction to the system edit both IsValidPaymentFaction() and GetPlayerFactionPayment()
  20382. {
  20383. GiveMoney(i, GetPlayerFactionPayment(i));
  20384. TaxValue -= GetPlayerFactionPayment(i);
  20385. SendClientMessage(i, COLOR_WHITE, "Bank Statement:");
  20386. format(str, sizeof(str), "Paycheck: $%d", checks);
  20387. SendClientMessage(i, COLOR_GRAD1, str);
  20388. format(str, sizeof(str), "Income Tax: -$%d", incometax);
  20389. SendClientMessage(i, COLOR_GRAD1, str);
  20390. format(str, sizeof(str), "Faction Salary: $%d", GetPlayerFactionPayment(i));
  20391. SendClientMessage(i, COLOR_GRAD1, str);
  20392. }
  20393. if(PlayerInfo[i][pDonateRank] == 4)
  20394. {
  20395. format(str, sizeof(str), "Platinum VIP Bonus: $15.000");
  20396. SendClientMessage(i, COLOR_GRAD1, str);
  20397. GiveMoney(i, 15000);
  20398. }
  20399. else
  20400. {
  20401. SendClientMessage(i, COLOR_WHITE, "Bank Statement:");
  20402. format(str, sizeof(str), "Paycheck: $%d", checks);
  20403. SendClientMessage(i, COLOR_GRAD1, str);
  20404. format(str, sizeof(str), "Income Tax: -$%d", incometax);
  20405. SendClientMessage(i, COLOR_GRAD1, str);
  20406. }
  20407. new nxtlevel = PlayerInfo[i][pLevel] + 1;
  20408. new expamount = nxtlevel * levelexp;
  20409. if(DOUBLE_EXP_MODE) {
  20410. PlayerInfo[i][pExp] += 2;
  20411. format(str, sizeof(str), "Respect: %d/%d (2x EXP Bonus)", PlayerInfo[i][pExp], expamount);
  20412. SendClientMessage(i, COLOR_GRAD1, str);
  20413. } else {
  20414. PlayerInfo[i][pExp]++;
  20415. format(str, sizeof(str), "Respect: %d/%d", PlayerInfo[i][pExp], expamount);
  20416. SendClientMessage(i, COLOR_GRAD1, str);
  20417. }
  20418. if(PlayerInfo[i][pBizKey] != -1 || PlayerInfo[i][pHouseID] != 0)
  20419. {
  20420. //owns house or business
  20421. GiveMoney(i, -ebill);
  20422. format(str, sizeof(str), "Electricity Bill: -$%d", ebill);
  20423. SendClientMessage(i, COLOR_GRAD1, str);
  20424. }
  20425. SendClientMessage(i, COLOR_GRAD4, "-----");
  20426. format(str, sizeof(str), "Old Balance: $%d", account);
  20427. SendClientMessage(i, COLOR_GRAD5, str);
  20428. format(str, sizeof(str), "Old Cash: $%d", cash);
  20429. SendClientMessage(i, COLOR_GRAD5, str);
  20430. format(str, sizeof(str), "New Balance: $%d", PlayerInfo[i][pAccount]);
  20431. SendClientMessage(i, COLOR_GRAD5, str);
  20432. PlayerInfo[i][pCheck] = 0;
  20433. PlayerInfo[i][pPayDay] = 0;
  20434. PlayerInfo[i][pPayCheck] = 0;
  20435. PayDayAccount[i] = 0;
  20436. }
  20437. else
  20438. {
  20439. PlayerInfo[i][pCheck] = 0;
  20440. PlayerInfo[i][pPayDay] = 0;
  20441. PlayerInfo[i][pPayCheck] = 0;
  20442. SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a Paycheck.");
  20443. }
  20444. return 1;
  20445. }
  20446. //==============================================================================
  20447. PayDay()
  20448. {
  20449. new str[128];
  20450. foreach( new i: Player )
  20451. {
  20452. if(IsPlayerConnected(i))
  20453. {
  20454. if(MoneyMessage[i] == 1 && PlayerInfo[i][pJailed] == 0)
  20455. {
  20456. SendClientMessage(i, COLOR_LIGHTBLUE, "* You failed to pay your taxes and as a result have been fined.");
  20457. PlayerInfo[i][pWantedLevel]++;
  20458. SetPlayerCriminal(i, 998, "Tax evasion");
  20459. PlayerPlaySound(i, 1054, 0.0, 0.0, 0.0);
  20460. }
  20461. PlayerInfo[i][pConnectTime] += 1;
  20462. PlayerInfo[i][pCheck] = 1;
  20463. CheckNumber[i] = 1000 +random(8999);
  20464. PayDayAccount[i] = PlayerInfo[i][pAccount];
  20465. format(str, 128, "* Payday! Type '/signcheck %d' to collect your paycheck.", CheckNumber[i]);
  20466. SendClientMessage(i, COLOR_LIGHTBLUE, str);
  20467. displayCenterHUDInfo(i, "~y~PayDay~n~~w~Paycheck.", 8); //display for 8 seconds
  20468. }
  20469. }
  20470. for(new f = 0; f < sizeof(FamilyInfo); f++)
  20471. {
  20472. new count = 0;
  20473. foreach(new i: Player)
  20474. {
  20475. if(PlayerInfo[i][pFMember] == f) count++;
  20476. if(count == 5) break;
  20477. }
  20478. if(count >= 5)
  20479. {
  20480. foreach(new i: Player)
  20481. {
  20482. if(PlayerInfo[i][pFMember] == f)
  20483. {
  20484. SendClientMessage(i, COLOR_LIGHTBLUE, "Your family has been given 5 XP due to having 5+ members online.");
  20485. }
  20486. }
  20487. GrantFamXP(f, 5);
  20488. }
  20489. }
  20490. // FMD's monthly call count reset //
  20491. AutoResetCallCount();
  20492. CheckInactiveHouses();
  20493. return 1;
  20494. }
  20495. //==============================================================================
  20496. strtok(const string2[], &index)
  20497. {
  20498. new length = strlen(string2);
  20499. while((index < length) && (string2[index] <= ' '))
  20500. {
  20501. index++;
  20502. }
  20503. new offset = index;
  20504. new result[64];
  20505. while((index < length) && (string2[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  20506. {
  20507. result[index - offset] = string2[index];
  20508. index++;
  20509. }
  20510. result[index - offset] = EOS;
  20511. return result;
  20512. }
  20513. //==============================================================================
  20514. //==============================================================================
  20515. forward OnPlayerSave(playerid);
  20516. public OnPlayerSave(playerid)
  20517. {
  20518. if(IsPlayerConnected(playerid))
  20519. {
  20520. if(IsPlayerNPC(playerid)) return 1;
  20521. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && PlayerInfo[playerid][pAdmin] > 0) return 1; //players with spec hacks could bypass save function and dupe stats, admin check should fix it
  20522. if(gPlayerLogged[playerid] != 0 && gPlayerSpawned[playerid] == 1)
  20523. {
  20524. new playername3[MAX_PLAYER_NAME];
  20525. GetPlayerName(playerid, playername3, sizeof(playername3));
  20526. if(inPaintball[playerid] > 0 || WatchingTV[playerid] == true)
  20527. {
  20528. switch(inPaintball[playerid])
  20529. {
  20530. case 1: {
  20531. PlayerInfo[playerid][pInt] = 0;
  20532. PlayerInfo[playerid][pVirtualWorld] = 0;
  20533. PlayerInfo[playerid][pSPos_x] = 1310.0685;
  20534. PlayerInfo[playerid][pSPos_y] = -1367.6198;
  20535. PlayerInfo[playerid][pSPos_z] = 13.5382;
  20536. GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  20537. PlayerInfo[playerid][pHealth] = pbHealth[playerid];
  20538. PlayerInfo[playerid][pArmor] = pbArmor[playerid];
  20539. }
  20540. case 2: {
  20541. PlayerInfo[playerid][pInt] = 0;
  20542. PlayerInfo[playerid][pVirtualWorld] = 0;
  20543. PlayerInfo[playerid][pSPos_x] = 1088.75;
  20544. PlayerInfo[playerid][pSPos_y] = -1715.45;
  20545. PlayerInfo[playerid][pSPos_z] = 1136.46;
  20546. GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  20547. PlayerInfo[playerid][pHealth] = pbHealth[playerid];
  20548. PlayerInfo[playerid][pArmor] = pbArmor[playerid];
  20549. }
  20550. }
  20551. }
  20552. else
  20553. {
  20554. PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
  20555. PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
  20556. GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
  20557. GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  20558. //updatePlayerIP(playerid); //cannot collect IP when player disconnects
  20559. GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  20560. GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  20561. }
  20562. if(WatchingTV[playerid] != true) GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  20563. if(MethEffect[playerid] == true)
  20564. {
  20565. PlayerInfo[playerid][pArmsSkill] = BeforeStatBoost[playerid];
  20566. }
  20567. SQLSave(playerid);
  20568. }
  20569. }
  20570. return 1;
  20571. }
  20572. stock SQLSave(playerid)
  20573. {
  20574. if( !gPlayerLogged[playerid] || gPlayerSpawned[playerid] == 0 ) return 0; //don't save if there's nothing to save AKA player hasn't spawned (causes overwritten data)
  20575. for(new i = 0; i < 7; i++) {
  20576. if(AccessoriesX[playerid][i] != AccessoriesX[playerid][i]) { AccessoriesX[playerid][i] = 0; printf("Found NaN value on AccessoriesX for player %s", PlayerName(playerid)); }
  20577. if(AccessoriesY[playerid][i] != AccessoriesY[playerid][i]) { AccessoriesY[playerid][i] = 0; printf("Found NaN value on AccessoriesY for player %s", PlayerName(playerid)); }
  20578. if(AccessoriesZ[playerid][i] != AccessoriesZ[playerid][i]) { AccessoriesZ[playerid][i] = 0; printf("Found NaN value on AccessoriesZ for player %s", PlayerName(playerid)); }
  20579. if(AccessoriesrX[playerid][i] != AccessoriesrX[playerid][i]) { AccessoriesrX[playerid][i] = 0; printf("Found NaN value on AccessoriesrX for player %s", PlayerName(playerid)); }
  20580. if(AccessoriesrY[playerid][i] != AccessoriesrY[playerid][i]) { AccessoriesrY[playerid][i] = 0; printf("Found NaN value on AccessoriesrY for player %s", PlayerName(playerid)); }
  20581. if(AccessoriesrZ[playerid][i] != AccessoriesrZ[playerid][i]) { AccessoriesrZ[playerid][i] = 0; printf("Found NaN value on AccessoriesrZ for player %s", PlayerName(playerid)); }
  20582. if(AccessoriessX[playerid][i] != AccessoriessX[playerid][i]) { AccessoriessX[playerid][i] = 0; printf("Found NaN value on AccessoriessX for player %s", PlayerName(playerid)); }
  20583. if(AccessoriessY[playerid][i] != AccessoriessY[playerid][i]) { AccessoriessY[playerid][i] = 0; printf("Found NaN value on AccessoriessY for player %s", PlayerName(playerid)); }
  20584. if(AccessoriessZ[playerid][i] != AccessoriessZ[playerid][i]) { AccessoriessZ[playerid][i] = 0; printf("Found NaN value on AccessoriessZ for player %s", PlayerName(playerid)); }
  20585. }
  20586. printf("[MySQL] SQLSave(start) %s.", PlayerName(playerid));
  20587. //player stats + important stuff
  20588. new query[9000];
  20589. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Level`= %d,`AdminLevel`= %d,`SecurityKey`= %d,`Stealthed`= %d,`Band`= %d,`PermBand`= %d,`BanReason`= '%e',`PrisonReason`= '%e',`AdminJailed`= %d,`PrisonedBy`= '%e',`Warnings`= %d,`Disabled`= %d,`CBand`= %d,",
  20590. PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSecKey], PlayerInfo[playerid][pStealthed], PlayerInfo[playerid][pBand], PlayerInfo[playerid][pPermBand], PlayerInfo[playerid][pBanReason], PlayerInfo[playerid][pPrisonReason], PlayerInfo[playerid][pAdminJailed], PlayerInfo[playerid][pPrisonedBy], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pDisabled], PlayerInfo[playerid][pCBand]);
  20591. mysql_format(sqlGameConnection, query, sizeof(query), "%s`DonateRank`= %d,`Tag`= %d,`VIPJoinDate`= '%e',`VIPExpDate`= '%e',`BanAppealer`= %d,`GangModd`= %d,`EventModd`= %d,`ComplaintModd`= %d,`ShopMod`= %d,`BizMod`= %d,`FactionMod`= %d,`GangDirector`= %d,`UpgradePoints`=%d,",
  20592. query, PlayerInfo[playerid][pDonateRank], PlayerInfo[playerid][pTag], PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate], PlayerInfo[playerid][pBanAppealer], PlayerInfo[playerid][pGangModd], PlayerInfo[playerid][pEventModd], PlayerInfo[playerid][pComplaintModd], PlayerInfo[playerid][pShopMod], PlayerInfo[playerid][pBizMod], PlayerInfo[playerid][pFactionMod], PlayerInfo[playerid][pGangDirector], PlayerInfo[playerid][gPupgrade]);
  20593. mysql_format(sqlGameConnection, query, sizeof(query),"%s`ConnectedTime`= %d,`Registered`= %d,`Sex`= %d,`Age`= %d,`Origin`= '%e',`Appearance`= '%e',`FactionDirector`= %d,",
  20594. query, PlayerInfo[playerid][pConnectTime], PlayerInfo[playerid][pReg], PlayerInfo[playerid][pSex], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pOrigin], PlayerInfo[playerid][pAppearance], PlayerInfo[playerid][pFactionDirector]);
  20595. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Muted`= %d,`Respect`= %d,`Money`= %d,`Bank`= %d,`Crimes`= %d,`LottoNr`= %d,",
  20596. query, PlayerInfo[playerid][pMuted], PlayerInfo[playerid][pExp], PlayerInfo[playerid][pCash], PlayerInfo[playerid][pAccount], PlayerInfo[playerid][pCrimes], PlayerInfo[playerid][pLottoNr]);
  20597. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Accent`= '%e',`Kills`= %d,`Deaths`= %d,`CHits`= %d, `FHits`= %d,`TogAutoChat`= %d,`Arrested`= %d,",
  20598. query, Accent[playerid], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pCHits], PlayerInfo[playerid][pFHits], autoChat[playerid], PlayerInfo[playerid][pArrested]);
  20599. mysql_format(sqlGameConnection, query, sizeof(query), "%s`BiggestFish`= %d,`Job`= %d,`Paycheck`= %d,`HeadValue`= %d,`Jailed`= %d,`JailCell`= %d,`JailTime`= %d,`Leader`= %d, `Recruiter` = %d,`Member`= %d,`FMember`= %d,`Rank`= %d,`RadioStation`= %d,",
  20600. query, PlayerInfo[playerid][pBiggestFish], PlayerInfo[playerid][pJob], PlayerInfo[playerid][pPayCheck], PlayerInfo[playerid][pHeadValue], PlayerInfo[playerid][pJailed], PlayerInfo[playerid][pJailCell], PlayerInfo[playerid][pJailTime], PlayerInfo[playerid][pLeader], PlayerInfo[playerid][pRecruiter], PlayerInfo[playerid][pMember], PlayerInfo[playerid][pFMember], PlayerInfo[playerid][pRank], PlayerInfo[playerid][pRadioStation]);
  20601. mysql_format(sqlGameConnection, query, sizeof(query), "%s`DetSkill`= %d,`SexSkill`= %d,`BoxSkill`= %d,`LawSkill`= %d,`MechSkill`= %d,`JackSkill`= %d,`CarSkill`= %d,`DrugsSkill`= %d,`ArmsSkill`= %d,`SmugglerSkill`= %d,`ThieveSkill`= %d,`FishSkill`= %d,`FightingStyle`= %d,",
  20602. query, PlayerInfo[playerid][pDetSkill], PlayerInfo[playerid][pSexSkill], PlayerInfo[playerid][pBoxSkill], PlayerInfo[playerid][pLawSkill], PlayerInfo[playerid][pMechSkill], PlayerInfo[playerid][pJackSkill], PlayerInfo[playerid][pCarSkill], PlayerInfo[playerid][pDrugsSkill], PlayerInfo[playerid][pArmsSkill], PlayerInfo[playerid][pSmugglerSkill], PlayerInfo[playerid][pThieveSkill], PlayerInfo[playerid][pFishSkill], PlayerInfo[playerid][pFightingStyle]);
  20603. mysql_format(sqlGameConnection, query, sizeof(query), "%s`pHealth`= %f,`pArmor`= %f,`pSHP`= %d,`pSHealth`= %d,`InteriorID`= %d,`Local`= %d,`VirtualWorld`= %d,`Model`= %d,`DriverPoints`= %d,`BadgeNumber`= %d,`Clothes`= %d,",
  20604. query, PlayerInfo[playerid][pHealth], PlayerInfo[playerid][pArmor], PlayerInfo[playerid][pSHP], PlayerInfo[playerid][pSHealth], PlayerInfo[playerid][pInt], PlayerInfo[playerid][pLocal], PlayerInfo[playerid][pVirtualWorld], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pDriverPoints], PlayerInfo[playerid][pBadgeNumber], PlayerInfo[playerid][pClothes]);
  20605. mysql_format(sqlGameConnection, query, sizeof(query), "%s`PhoneNr`= %d,`PhoneType`= %d,`BizKey`= %d,`BizFixed`= %d,`SetVehSpawn`= %d,",
  20606. query, PlayerInfo[playerid][pPnumber], PlayerInfo[playerid][pCellphoneType], PlayerInfo[playerid][pBizKey], PlayerInfo[playerid][pBizFixed], PlayerInfo[playerid][pSetVehSpawn]);
  20607. mysql_format(sqlGameConnection, query, sizeof(query), "%s`FishLic`= %d,`Gun0`= %d,`Gun1`= %d,`Gun2`= %d,`Gun3`= %d,`Gun4`= %d,`Gun5`= %d,`Gun6`= %d,`Gun7`= %d,`Gun8`= %d,`Gun9`= %d,`Gun10`= %d,`Gun11`= %d,`Gun12`= %d,",
  20608. query, PlayerInfo[playerid][pFishLic], PlayerInfo[playerid][pGun0], PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pGun5], PlayerInfo[playerid][pGun6], PlayerInfo[playerid][pGun7], PlayerInfo[playerid][pGun8], PlayerInfo[playerid][pGun9], PlayerInfo[playerid][pGun10], PlayerInfo[playerid][pGun11], PlayerInfo[playerid][pGun12]);
  20609. mysql_format(sqlGameConnection, query, sizeof(query), "%s`CarTime`= %d,`DrugsTime`= %d,`LawyerTime`= %d,`ReportMuted`= %d,`Insurance`= %d,`isBOLO`= %d, `PresentCount` = %d,",
  20610. query, PlayerInfo[playerid][pCarTime], PlayerInfo[playerid][pDrugsTime], PlayerInfo[playerid][pLawyerTime], PlayerInfo[playerid][pRepMuted], PlayerInfo[playerid][pInsurance], isBOLO[playerid], PlayerInfo[playerid][pPresentCount]);
  20611. mysql_format(sqlGameConnection, query, sizeof(query), "%s`LawyerFreeTime`= %d,`MechTime`= %d,`SexTime`= %d,`PlantTime`= %d,`RepairTime`= %d,`RobTime`= %d,`PayDay`= %d,`PayDayHad`= %d,`Wins`= %d, ",
  20612. query, PlayerInfo[playerid][pLawyerFreeTime], PlayerInfo[playerid][pMechTime], PlayerInfo[playerid][pSexTime], PlayerInfo[playerid][pPlantTime], PlayerInfo[playerid][pRepairTime], PlayerInfo[playerid][pRobTime], PlayerInfo[playerid][pPayDay], PlayerInfo[playerid][pPayDayHad], PlayerInfo[playerid][pWins]);
  20613. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Loses`= %d,`Tutorial`= %d,`OnDuty`= %d,`Hospital`= %d,`Adjustable`= %d,`Married`= %d,`MarriedTo`= '%e', `Adrenaline`= '%d',", // `HouseFire` = %d, ",//important just in case `Important`= '%d'
  20614. query, PlayerInfo[playerid][pLoses], PlayerInfo[playerid][pTut], PlayerInfo[playerid][pOnDuty], PlayerInfo[playerid][pHospital], PlayerInfo[playerid][pAdjustable], PlayerInfo[playerid][pMarried], PlayerInfo[playerid][pMarriedTo], PlayerInfo[playerid][pAdrenaline]); //, PlayerInfo[playerid][pHouseFire]); PlayerInfo[playerid][pImportant]
  20615. mysql_format(sqlGameConnection, query, sizeof(query), "%s`GCTog`= %d, `GCTag`= %d, `GCTagName`= '%e', `GCMute`= %d, `GCMuteTimer`= %d, `GCMutePerm`= %d,",
  20616. query, PlayerInfo[playerid][pGCTog], PlayerInfo[playerid][pGCTag], PlayerInfo[playerid][pGCTagName], PlayerInfo[playerid][pGCMute], PlayerInfo[playerid][pGCMuteTimer], PlayerInfo[playerid][pGCMutePerm]);
  20617. mysql_format(sqlGameConnection, query, sizeof(query), "%s`NewbieTag`= %d, `NewbieTagName`= '%e',",
  20618. query, PlayerInfo[playerid][pNewbieTag], PlayerInfo[playerid][pNewbieTagName]);
  20619. #define NaN(%0) !(%0 <= 0 || %0 > 0)
  20620. //will fix later...
  20621. if(NaN(PlayerInfo[playerid][pSPos_x])) {
  20622. PlayerInfo[playerid][pSPos_x] = 0.0;
  20623. }
  20624. if(NaN(PlayerInfo[playerid][pSPos_y])) {
  20625. PlayerInfo[playerid][pSPos_y] = 0.0;
  20626. }
  20627. if(NaN(PlayerInfo[playerid][pSPos_z])) {
  20628. PlayerInfo[playerid][pSPos_z] = 0.0;
  20629. }
  20630. if(NaN(PlayerInfo[playerid][pSPos_r])) {
  20631. PlayerInfo[playerid][pSPos_r] = 0.0;
  20632. }
  20633. mysql_format(sqlGameConnection, query, sizeof(query), "%s`ContractBy`= '%e',`IP`= '%e',`WantedLevel`= %d,`NewbieMuted`= %d,`NewbieMutedTime`= %d,`FactionKickTime`= %d,`NewbieWarns`= %d,`AdMuted`= %d,`BugMuted`= %d,`SPos_x`= %f,`SPos_y`= %f,`SPos_z`= %f,`SPos_r`= %f,`HelperLevel`= %d,`DevLevel`= %d,",
  20634. query, PlayerInfo[playerid][pContractBy], PlayerInfo[playerid][pIP], PlayerInfo[playerid][pWantedLevel], PlayerInfo[playerid][pNewbieMuted], PlayerInfo[playerid][pNMuteTime], PlayerInfo[playerid][pFKickTime], PlayerInfo[playerid][pNewbieWarns], PlayerInfo[playerid][pAdMuted], PlayerInfo[playerid][pBugMuted], PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z], PlayerInfo[playerid][pSPos_r], PlayerInfo[playerid][pHelper], PlayerInfo[playerid][pDev]);
  20635. mysql_format(sqlGameConnection, query, sizeof(query), "%s`TesterLevel`= %d,`Famed`= %d, `OldSchool`=%d,`Enlightened`= %d,`BanDay`= %d,`BanMonth`= %d,`BanYear`= %d,`BanTime`= %d,`GottenGift`= %d,`GottenTimeLeft`= %d,`pHouseID`= %d,`hTicket`= %d,`gTicket`= %d,`gRefund`= %d,`MaskName`= '%e',`Economist`= %d,",
  20636. query, PlayerInfo[playerid][pTester], PlayerInfo[playerid][pFamed], PlayerInfo[playerid][pOldSchool], PlayerInfo[playerid][pEnlightened], PlayerInfo[playerid][pBanDay], PlayerInfo[playerid][pBanMonth], PlayerInfo[playerid][pBanYear], PlayerInfo[playerid][pBanTime], GottenGift[playerid], GottenTimeLeft[playerid], PlayerInfo[playerid][pHouseID], PlayerInfo[playerid][hTicket], PlayerInfo[playerid][gTicket], PlayerInfo[playerid][gRefund], PlayerInfo[playerid][pMaskName], PlayerInfo[playerid][pEconomist]);
  20637. mysql_format(sqlGameConnection, query, sizeof(query), "%s`HAFakeBadge`= %d,`FakeFaction`= %d,`Badge`= %d, `WasteSkill` = %d,`Serial`= '%e',`NSB` = %d,`GroupNick`= '%e',`DuffleCooldown`= %d,`S9BadgeName`= '%e',",
  20638. query, PlayerInfo[playerid][pHAFakeBadge], FakeFaction[playerid], PlayerInfo[playerid][pBadge], PlayerInfo[playerid][pWasteSkill], PlayerInfo[playerid][pSerial], PlayerInfo[playerid][pNSB], PlayerInfo[playerid][pGroupNick], PlayerInfo[playerid][pDuffleBagTime], PlayerInfo[playerid][pS9BadgeName]);
  20639. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Build`= %d,`Height`= %d,`Ethnicity`= %d,`EyeColour`= %d, `PizzaSkill`=%d, `RubberBullets`=%d, `Beer`=%d, `HidingStatus`=%d",
  20640. query, PlayerInfo[playerid][pBuild], PlayerInfo[playerid][pHeight], PlayerInfo[playerid][pEthnicity], PlayerInfo[playerid][pEyeColour], PlayerInfo[playerid][pPizzaSkill], hasRubberBullets[playerid], PlayerInfo[playerid][pBeer], PlayerInfo[playerid][pHidingStatus]);
  20641. //exec the query
  20642. mysql_format(sqlGameConnection, query, sizeof(query), "%s WHERE `Name`='%e';", query, PlayerName(playerid));
  20643. mysql_pquery(sqlGameConnection, query);
  20644. format(query, sizeof(query), ""); //clear query string
  20645. //gear
  20646. new accstr[3000];
  20647. mysql_format(sqlGameConnection, accstr, sizeof(accstr), "UPDATE `players` SET `Accessory1`=%d,`AccessoryB1`=%d,`AccessoryX1`=%f,`AccessoryY1`=%f,`AccessoryZ1`=%f,`AccessoryrX1`=%f,`AccessoryrY1`=%f,`AccessoryrZ1`=%f,`AccessorysX1`=%f,`AccessorysY1`=%f,`AccessorysZ1`=%f,`AccessorysC1`=%d,",
  20648. Accessories[playerid][0], AccessoriesB[playerid][0], AccessoriesX[playerid][0], AccessoriesY[playerid][0], AccessoriesZ[playerid][0], AccessoriesrX[playerid][0], AccessoriesrY[playerid][0], AccessoriesrZ[playerid][0], AccessoriessX[playerid][0], AccessoriessY[playerid][0], AccessoriessZ[playerid][0], Accessoriesc1[playerid][0]);
  20649. for(new i = 2; i < 8; i++)
  20650. {
  20651. mysql_format(sqlGameConnection, accstr, sizeof(accstr), "%s`Accessory%d`=%d, `AccessoryB%d`=%d, `AccessoryX%d`=%f, `AccessoryY%d`=%f, `AccessoryZ%d`=%f, `AccessoryrX%d`=%f, `AccessoryrY%d`=%f, `AccessoryrZ%d`=%f, `AccessorysX%d`=%f, `AccessorysY%d`=%f, `AccessorysZ%d`=%f, `AccessorysC%d`=%d,",
  20652. accstr, i, Accessories[playerid][i-1], i, AccessoriesB[playerid][i-1], i, AccessoriesX[playerid][i-1], i, AccessoriesY[playerid][i-1], i, AccessoriesZ[playerid][i-1], i, AccessoriesrX[playerid][i-1], i, AccessoriesrY[playerid][i-1], i, AccessoriesrZ[playerid][i-1], i, AccessoriessX[playerid][i-1], i, AccessoriessY[playerid][i-1], i, AccessoriessZ[playerid][i-1], i, Accessoriesc1[playerid][i-1]);
  20653. }
  20654. //inventory
  20655. mysql_format(sqlGameConnection, query, sizeof(query), "%s `lastCarID` = %d, `maxcarslots` = %d, `Mapper`= %d,`customTag`= '%e',`customRank`= '%e',`LastLogin`= '%e',`PropDate`= '%e',`isinHosp`= %d,`HasMap`= %d,`JailNumber`= %d,`NewCarLic`= %d,`NewBoatLic`= %d,`NewGunLic`= %d,`SueUnix`= %d,",
  20656. accstr, PlayerInfo[playerid][lastCarID], PlayerInfo[playerid][pMaxCarSlots], PlayerInfo[playerid][pMapper], CustomTag[playerid], customRank[playerid], PlayerInfo[playerid][pLastLogin], PlayerInfo[playerid][pPropExp], pInHospital[playerid], PlayerInfo[playerid][pMap], PlayerInfo[playerid][pJailnumber], PlayerInfo[playerid][pCarLicense], PlayerInfo[playerid][pBoatLicense], PlayerInfo[playerid][pWeaponLicense], PlayerInfo[playerid][pSueUnix]);
  20657. mysql_format(sqlGameConnection, query, sizeof(query), "%s`SueNotice`= %d,`AllowedArmory`= %d, `Fishes`= %d,`Products`= %d,`Materials`= %d,`Seeds`= %d,`Calculator`= %d,`NewMariLicense` = %d,",
  20658. query, PlayerInfo[playerid][pSueNotice], PlayerInfo[playerid][pAllowedArmory], PlayerInfo[playerid][pFishes], PlayerInfo[playerid][pProducts], PlayerInfo[playerid][pMats], PlayerInfo[playerid][pPotSeeds], PlayerInfo[playerid][pCalculator], PlayerInfo[playerid][pMarijuanaLicense]);
  20659. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Phonebook`= %d,`FishRod`= %d,`Bait`= %d,`BaitAmount`= %d,`NewbRequestUnmute`= %d,`Line`= %d,",
  20660. query, PlayerInfo[playerid][pPhoneBook], PlayerInfo[playerid][pFishRod], PlayerInfo[playerid][pBait], PlayerInfo[playerid][pBaitAmount], PlayerInfo[playerid][pReqUnmute], PlayerInfo[playerid][pLine]);
  20661. mysql_format(sqlGameConnection, query, sizeof(query), "%s`iPod`= %d,`Dice`= %d,`Spraycan`= %d,`Screw`= %d,`Rope`= %d,`Cigars`= %d,`Sprunk`= %d,`Tikis`= %d,`WT`= %d,`WTc`= %d,`Radio`= %d,",
  20662. query, PlayerInfo[playerid][piPod], PlayerInfo[playerid][pDice], PlayerInfo[playerid][pSpraycan], PlayerInfo[playerid][pScrew], PlayerInfo[playerid][pRope], PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pSprunk], PlayerInfo[playerid][pTikis], PlayerInfo[playerid][pWT], PlayerInfo[playerid][pWTc], PlayerInfo[playerid][pRadio]);
  20663. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Handtazer`= %d,`tazerGun`= %d,`Bombs`= %d,`Poison`= %d,`Glasses`= %d,`Bandana`= %d,`Drill`= %d,`Helmet`= %d,",
  20664. query, PlayerInfo[playerid][pHandtazer], PlayerInfo[playerid][ptazerGun], PlayerInfo[playerid][pBombs], PlayerInfo[playerid][pPoison], PlayerInfo[playerid][pGlasses], PlayerInfo[playerid][pBandana], PlayerInfo[playerid][pDrill], PlayerInfo[playerid][pHelmet]);
  20665. mysql_format(sqlGameConnection, query, sizeof(query), "%s`Mask`= %d,`Blindfolds`= %d,`Deck`= %d,`Stereo`= %d,`Matches`= %d,`Jerrycan`= %d,`MP5Laser`= %d,`M4Laser`= %d,`AKLaser`= %d,`SpasLaser`= %d,`DeagleLaser`= %d,`AddressBook`= %d, `DeathState` = %d, `Gag` = %d, `TogNewbie` = %d,",
  20666. query, HasBoughtMask[playerid], PlayerInfo[playerid][pBlindfolds], PlayerInfo[playerid][pDeck], PlayerInfo[playerid][pStereo], PlayerInfo[playerid][pMatches], PlayerInfo[playerid][pJerrycan], PlayerHasMP5Laser[playerid], PlayerHasM4Laser[playerid], PlayerHasAKLaser[playerid], PlayerHasSpasLaser[playerid], PlayerHasDeagleLaser[playerid], PlayerInfo[playerid][pAddressBook], pDeathState[playerid], PlayerInfo[playerid][pGag], PlayerInfo[playerid][pTogNewbie]);
  20667. mysql_format(sqlGameConnection, query, sizeof(query), "%s`TesterReports` = %d, `SpawnPos` = %d, `LogUnix` = %d, `Wire` = %d, `Group` = %d, `GroupRank` = %d, `C2` = %d, `MedicCount` = %d, `MonthlyMedicCount` = '%d', `MDCLogged` = %d, `HasMDC` = %d, `Cannabis` = %d, `Cocaine` = %d, `Meth` = %d, `Xanax` = %d, `promethazine` = %d, `codeine` = %d, `lean` = %d, `HasJammer` = %d, `FakeRank` = %d",
  20668. query, PlayerInfo[playerid][pTesterReports], PlayerInfo[playerid][pSpawnPos], PlayerInfo[playerid][pLastLogoutUnix], PlayerInfo[playerid][pWire], PlayerInfo[playerid][pGroup], PlayerInfo[playerid][pGroupRank], PlayerInfo[playerid][pHasCBomb], PlayerInfo[playerid][pCallCount], PlayerInfo[playerid][pMonthlyCallCount], PlayerInfo[playerid][pMDCLogged], PlayerInfo[playerid][pPortMDC], PlayerInfo[playerid][pCannabis], PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pXanax], PlayerInfo[playerid][pPromethazine], PlayerInfo[playerid][pCodeine], PlayerInfo[playerid][pLean], PlayerInfo[playerid][pJammer], FakeRank[playerid]);
  20669. //exec the queryballance
  20670. mysql_format(sqlGameConnection, query, sizeof(query), "%s WHERE `Name`='%e';", query, PlayerName(playerid));
  20671. mysql_pquery(sqlGameConnection, query);
  20672. printf("[MySQL] SQLSave(end) %s.", PlayerName(playerid));
  20673. return 1;
  20674. }
  20675. //=============================================================================
  20676. CheckExistingPrisons(playerid){
  20677. if(PlayerInfo[playerid][pAdminJailed])
  20678. return 1;
  20679. new str[200];
  20680. inline QueryCallback(){
  20681. new rows = cache_num_rows();
  20682. if(rows > 0){
  20683. new
  20684. tmpName[MAX_PLAYER_NAME + 1],
  20685. tmpAdminJailed,
  20686. tmpPrisonReason[128],
  20687. tmpJailTime,
  20688. tmpPrisonedBy[MAX_PLAYER_NAME + 1],
  20689. hasFoundPrisons = false;
  20690. for(new i = 0; i < rows; i++){
  20691. cache_get_field_content(i, "Name", tmpName);
  20692. tmpAdminJailed = cache_get_field_content_int(i, "AdminJailed");
  20693. cache_get_field_content(i, "PrisonReason", tmpPrisonReason);
  20694. tmpJailTime = cache_get_field_content_int(i, "JailTime");
  20695. cache_get_field_content(i, "PrisonedBy", tmpPrisonedBy);
  20696. if(tmpAdminJailed){
  20697. if(!hasFoundPrisons){
  20698. hasFoundPrisons = true;
  20699. format(str, sizeof(str),
  20700. "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) logged in while one of their account is prisoned.",
  20701. PlayerOOCName(playerid), playerid);
  20702. ABroadCast(-1, str, 1);
  20703. }
  20704. format(str, sizeof(str),
  20705. "Name: %s | PrisonTime: %d | PrisonReason: %s | PrisonedBy: %s",
  20706. tmpName, tmpJailTime, tmpPrisonReason, tmpPrisonedBy);
  20707. ABroadCast(COLOR_GRAD2, str, 1);
  20708. }
  20709. }
  20710. }
  20711. }
  20712. mysql_format(sqlGameConnection, str, sizeof(str),
  20713. "SELECT `Name`, `AdminJailed`, `PrisonReason`, `JailTime`, `PrisonedBy` FROM `players` WHERE `IP`='%e' AND NOT `Name`='%e'",
  20714. PlayerInfo[playerid][pIP], PlayerName(playerid));
  20715. mysql_pquery_inline(sqlGameConnection, str, using inline QueryCallback, "");
  20716. return 1;
  20717. }
  20718. //==============================================================================
  20719. OnPlayerLogin(playerid)
  20720. {
  20721. new str[128];
  20722. CheckFactionRank(playerid);
  20723. CheckExistingPrisons(playerid);
  20724. if(PlayerInfo[playerid][pPermBand] || PlayerInfo[playerid][pBand])
  20725. {
  20726. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your account is currently banned.");
  20727. format(str, sizeof(str), "{F00000}Reason{FFFFFF}: %s", PlayerInfo[playerid][pBanReason]);
  20728. SendClientMessage(playerid, COLOR_WHITE, str);
  20729. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You can submit a ban appeal on the forums at p-rp.xyz.");
  20730. KickEx(playerid);
  20731. return 1;
  20732. }
  20733. if(PlayerInfo[playerid][pCBand])
  20734. {
  20735. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your account is currently community banned.");
  20736. format(str, sizeof(str), "{F00000}Reason{FFFFFF}: Being mofo, stupid fucker etc..");
  20737. SendClientMessage(playerid, COLOR_WHITE, str);
  20738. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: You can submit a ban appeal on the forums at p-rp.xyz. But you will not be unbanned!");
  20739. Rangeban(playerid);
  20740. return 1;
  20741. }
  20742. //=======================[ Account disabled? ]==============================
  20743. if(PlayerInfo[playerid][pDisabled] == 1)
  20744. {
  20745. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Your account is currently disabled.");
  20746. KickEx(playerid);
  20747. return 1;
  20748. }
  20749. //======================[ Admin account auth ]==============================
  20750. #if DEVMODE == 0
  20751. if(PlayerInfo[playerid][pAdmin] > 0)
  20752. {
  20753. DisplayDialogForPlayer(playerid, 78);
  20754. }
  20755. #else
  20756. gAdminAuthorized[playerid] = 1;
  20757. #endif
  20758. //account is not adjustable
  20759. PlayerInfo[playerid][pAdjustable] = 0;
  20760. new query[128];
  20761. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Adjustable`=0 WHERE `Name`='%e'", PlayerName(playerid));
  20762. mysql_pquery(sqlGameConnection, query);
  20763. //======================[ Discord ]=========================
  20764. /*#if UseDiscordBot 1
  20765. new discordstr[144];
  20766. if(PlayerInfo[playerid][pAdmin]) {
  20767. format(discordstr, sizeof discordstr, "%s %s (%d) has logged in.", Discord:GetAdminRank(playerid), PlayerICName(playerid), playerid);
  20768. Discord:sendBasicRequest(DISCORD_ADMINCHAT_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  20769. }
  20770. if(PlayerInfo[playerid][pHelper]) {
  20771. format(discordstr, sizeof discordstr, "%s %s (%d) has logged in.", Discord:GetHelperRank(playerid), PlayerICName(playerid), playerid);
  20772. Discord:sendBasicRequest(DISCORD_NEWBIE_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  20773. }
  20774. if(PlayerInfo[playerid][pTester] || PlayerInfo[playerid][pDev]) {
  20775. format(discordstr, sizeof discordstr, "%s %s (%d) has logged in.", (PlayerInfo[playerid][pDev]) ? ("Developer") : ("Tester"), PlayerICName(playerid), playerid);
  20776. Discord:sendBasicRequest(DISCORD_TESTER_CHANNEL, "Notification", discordstr, DISCORD_COLOR_INFO);
  20777. }
  20778. #endif*/
  20779. //=========================[ Login misc stuff ]=============================
  20780. displayCenterHUDInfo(playerid, "~r~Login successful.", 8); //display for 8 seconds
  20781. gPlayerLogged[playerid] = 1;
  20782. PlayerInfo[playerid][pHospital] = 0;
  20783. DisablePlayerCheckpointEx(playerid);
  20784. PlayerInfo[playerid][pBadge] = 1;
  20785. //default speed unit
  20786. CurrentSpeedUnitMPH[playerid] = true;
  20787. new d, m, y, date[30];
  20788. getdate(y, m, d);
  20789. if(m == 12) format(date, sizeof(date), "%02d/%02d/%02d", 1, d, y);
  20790. else format(date, sizeof(date), "%02d/%02d/%02d", m +1, d, y);
  20791. format(PlayerInfo[playerid][pPropExp], 30, "%s", date);
  20792. for(new i = 0; i < MAX_TAGS; i++)
  20793. {
  20794. if(Tags[i][TagCreated] == true)
  20795. {
  20796. SetObjectPos(Tags[i][TagObject], Tags[i][TagPosition][0], Tags[i][TagPosition][1], Tags[i][TagPosition][2]);
  20797. SetObjectRot(Tags[i][TagObject], Tags[i][TagRotation][0], Tags[i][TagRotation][1], Tags[i][TagRotation][2]);
  20798. }
  20799. }
  20800. // mask stuff
  20801. new rand = random(9999);
  20802. MaskNumber[playerid] = rand;
  20803. //========================[ Player vehicles ]=====================
  20804. loadPlayerVehicles(playerid);
  20805. //=========================[ Load notifications ]===========================
  20806. //===========================[ Display motds]===========================
  20807. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE1);
  20808. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE2);
  20809. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE4);
  20810. TextDrawHideForPlayer(playerid, motd);
  20811. //=========================[ Administrators ]===========================
  20812. if(PlayerInfo[playerid][pAdmin] > 0)
  20813. {
  20814. format(str, sizeof(str), "{F00000}SERVER{FFFFFF}: You are logged in as a Level %d Admin.", PlayerInfo[playerid][pAdmin]);
  20815. SendClientMessage(playerid, COLOR_WHITE, str);
  20816. SendClientMessage(playerid, COLOR_WHITE, "{F00000}SERVER{FFFFFF}: Type {FFFF91}/amsgs{FFFFFF} to display the latest admin messages (Keep the messages clean from random chatting).");
  20817. // Allow the admin to crack shoot
  20818. if(PlayerInfo[playerid][pAdmin] >= 2)
  20819. CSDisable[playerid] = 1;
  20820. }
  20821. if( PlayerInfo[playerid][pDev] > 0 || PlayerInfo[playerid][pAdmin] > 0 ) {
  20822. if( strlen( DEVMOTD ) > 1 ) {
  20823. SendClientMessage( playerid, COLOR_DEV, DEVMOTD );
  20824. }
  20825. }
  20826. if( PlayerInfo[playerid][pTester] > 0 ) {
  20827. if( strlen( TESTERMOTD ) > 1 ) {
  20828. SendClientMessage( playerid, SCOLOR_GREEN, TESTERMOTD );
  20829. }
  20830. }
  20831. //=====================[ If player is in prison ]=======================
  20832. if(PlayerInfo[playerid][pAdminJailed] == 1)
  20833. {
  20834. format(str, sizeof(str), "{FF6347}SERVER: You are currently serving prison time for %s.", PlayerInfo[playerid][pPrisonReason]);
  20835. SendClientMessage(playerid, COLOR_WHITE, str);
  20836. format(str, sizeof(str), "{FF6347}SERVER: Prisoned By %s Remaining Time: %d minutes.", PlayerInfo[playerid][pPrisonedBy], PlayerInfo[playerid][pJailTime] / 60);
  20837. SendClientMessage(playerid, COLOR_WHITE, str);
  20838. SendClientMessage(playerid, COLOR_WHITE, "{FF6347}SERVER: If you have been wrongly prisoned you can appeal it via /report or post an appeal on our forums at p-rp.xyz.");
  20839. }
  20840. //=====================[ Is player in family ]==========================
  20841. if(PlayerInfo[playerid][pFMember] < 255)
  20842. {
  20843. format(str, sizeof(str), "Family MOTD: %s", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
  20844. SendClientMessage(playerid, COLOR_YELLOW, str);
  20845. }
  20846. //======================[ Player house was on fire?]====================
  20847. if(PlayerInfo[playerid][pHouseFire])
  20848. {
  20849. new fstring[128];
  20850. format(fstring, 128, "Your house caught on fire, $d was taken from your bank for insurance and fire services.", PlayerInfo[playerid][pHouseFire]);
  20851. SendClientMessage(playerid, COLOR_YELLOW, fstring);
  20852. PlayerInfo[playerid][pAccount] -= PlayerInfo[playerid][pHouseFire];
  20853. PlayerInfo[playerid][pHouseFire] = 0;
  20854. }
  20855. //======================[ Is player in faction ]========================
  20856. if(PlayerInfo[playerid][pMember] != 0)
  20857. {
  20858. switch(PlayerInfo[playerid][pMember])
  20859. {
  20860. case 1:
  20861. {
  20862. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[1][motdOne]);
  20863. }
  20864. case 2:
  20865. {
  20866. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[2][motdTwo]);
  20867. }
  20868. case 3:
  20869. {
  20870. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[3][motdThree]);
  20871. }
  20872. case 4:
  20873. {
  20874. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[4][motdFour]);
  20875. }
  20876. case 5:
  20877. {
  20878. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[5][motdFive]);
  20879. }
  20880. case 6:
  20881. {
  20882. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[6][motdSix]);
  20883. }
  20884. case 7:
  20885. {
  20886. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[7][motdSeven]);
  20887. }
  20888. case 8:
  20889. {
  20890. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[8][motdEight]);
  20891. }
  20892. case 9:
  20893. {
  20894. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[9][motdNine]);
  20895. }
  20896. case 10:
  20897. {
  20898. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[10][motdTen]);
  20899. }
  20900. case 11:
  20901. {
  20902. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[11][motdEleven]);
  20903. }
  20904. case 12:
  20905. {
  20906. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[12][motdTwelve]);
  20907. }
  20908. case 13:
  20909. {
  20910. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[13][motdThirteen]);
  20911. }
  20912. case 14:
  20913. {
  20914. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[14][motdFourteen]);
  20915. }
  20916. case 15:
  20917. {
  20918. format(str, sizeof(str), "Faction MOTD: %s", facMOTD[15][motdFifteen]);
  20919. }
  20920. }
  20921. if(!strmatch(str, "None"))
  20922. {
  20923. SendClientMessage(playerid, COLOR_ORANGE, str);
  20924. }
  20925. //====================[ If player has been sued ]=======================
  20926. if(PlayerInfo[playerid][pSueNotice] == 1)
  20927. {
  20928. SendClientMessage(playerid, COLOR_YELLOW, "[Notification] You have a court case on you!");
  20929. SendClientMessage(playerid, COLOR_YELLOW, "Check our website - Public Services - Dept. of Justice - Lawsuits >> search for your name for further information.");
  20930. PlayerInfo[playerid][pSueNotice] = 0;
  20931. }
  20932. }
  20933. //======================[ If player owns biz ]==========================
  20934. if(PlayerInfo[playerid][pBizKey] != -1)
  20935. {
  20936. format(str, sizeof(str), "%s", PlayerName(playerid));
  20937. if(strcmp(BizInfo[PlayerInfo[playerid][pBizKey]][bOwner], str, true)) //playername doesnt match biz owner
  20938. {
  20939. format(str, sizeof(str), "* The business '%s' is no longer registered under your name, you are no longer the owner.", BizInfo[PlayerInfo[playerid][pBizKey]][bName]);
  20940. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  20941. PlayerInfo[playerid][pBizKey] = -1;
  20942. }
  20943. }
  20944. //=====================[ If player has max carslots 0]======================
  20945. if( PlayerInfo[playerid][pMaxCarSlots] < 3 ) {
  20946. PlayerInfo[playerid][pMaxCarSlots] = 3;
  20947. }
  20948. //======================[ If player owns a house ]==========================
  20949. new hid = PlayerInfo[playerid][pHouseID];
  20950. if(hid > 0)
  20951. {
  20952. SetPlayerMapIcon(playerid, iconCount[playerid], HouseInfo[hid][hOutsideX], HouseInfo[hid][hOutsideY], HouseInfo[hid][hOutsideZ], 31, 0, MAPICON_GLOBAL);
  20953. iconCount[playerid]++;
  20954. //temp fix for players that had owned houses as 'None' in houses.cfg
  20955. if(strcmp(HouseInfo[hid][hOwner], "NULL", true) == 0) {
  20956. //update ownerID and hOwner
  20957. HouseInfo[hid][hOwnerID] = PlayerInfo[playerid][pID];
  20958. strmid(HouseInfo[hid][hOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
  20959. format(str, sizeof(str), "* You have been reassigned the ownership of House ID %d", hid);
  20960. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  20961. //update label
  20962. new location[MAX_ZONE_NAME], string3[250];
  20963. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[hid][hOutsideX], HouseInfo[hid][hOutsideY], HouseInfo[hid][hOutsideZ]);
  20964. DestroyDynamic3DTextLabel(HouseInfoText3D[hid]);
  20965. if(HouseInfo[hid][hOwned] == 1)
  20966. {
  20967. format(string3, sizeof(string3), "{5BC435}%s{FFFFFF}\nAddress: %d %s\nType /enter to go inside.", HouseInfo[hid][hOwner], hid, location);
  20968. HouseInfoText3D[hid] = CreateDynamic3DTextLabel(string3, COLOR_HOUSETEXT, HouseInfo[hid][hOutsideX], HouseInfo[hid][hOutsideY], HouseInfo[hid][hOutsideZ] +0.88, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  20969. UpdateDynamic3DTextLabelText(HouseInfoText3D[hid], COLOR_HOUSETEXT, string3);
  20970. }
  20971. else //should not be running this but leaving just in case
  20972. {
  20973. format(string3, sizeof(string3), "{5BC435}This property is for sale!{FFFFFF}\nAddress: %d %s\nType /buyhouse to buy it for $%d", hid, location, HouseInfo[hid][hValue]);
  20974. HouseInfoText3D[hid] = CreateDynamic3DTextLabel(string3, COLOR_HOUSETEXT, HouseInfo[hid][hOutsideX], HouseInfo[hid][hOutsideY], HouseInfo[hid][hOutsideZ] +0.88, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  20975. UpdateDynamic3DTextLabelText(HouseInfoText3D[hid], COLOR_HOUSETEXT, string3);
  20976. }
  20977. }
  20978. }
  20979. //=========================[ If player is a VIP ]===========================
  20980. /*if(PlayerInfo[playerid][pDonateRank] >= 1)
  20981. {
  20982. new year, month, day;
  20983. getdate(year, month, day);
  20984. new spyear[32], spmonth[32], spday[32];
  20985. strmid(spyear, PlayerInfo[playerid][pVIPExpDate], 6, 10, 32);
  20986. strmid(spmonth, PlayerInfo[playerid][pVIPExpDate], 0, 2, 32);
  20987. strmid(spday, PlayerInfo[playerid][pVIPExpDate], 3, 5, 32);
  20988. new pyear = strval(spyear);
  20989. new pmonth = strval(spmonth);
  20990. new pday = strval(spday);
  20991. if(!IsValidDate(pday, pmonth, pyear)){
  20992. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your VIP expire date is corrupted, thus removed. Take SS, make a GRR and contact an admin along with a developer.");
  20993. new msg[128];
  20994. format(msg, sizeof(msg), "VIP join date: %s | VIP expire date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  20995. SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
  20996. ClearVIP(playerid);
  20997. }
  20998. else{
  20999. if(GetDaysDifference(day, month, year, pday, pmonth, pyear) < 0){
  21000. printf("[VIP Expire] %s's VIP expired on %s. Their VIP join date was %s", PlayerInfo[playerid][pName], PlayerInfo[playerid][pVIPExpDate], PlayerInfo[playerid][pVIPJoinDate]);
  21001. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your VIP has expired, if you wish to restore it visit.");
  21002. ClearVIP(playerid);
  21003. if(PlayerInfo[playerid][pLevel] == 1) PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
  21004. else if(PlayerInfo[playerid][pLevel] > 1) PlayerInfo[playerid][pTag] = NTAG_PLAYER;
  21005. }
  21006. }
  21007. }*/
  21008. if(PlayerInfo[playerid][pDonateRank] >= 1)
  21009. {
  21010. new year, month, day;
  21011. getdate(year, month, day);
  21012. new spyear[32], spmonth[32], spday[32];
  21013. strmid(spyear, PlayerInfo[playerid][pVIPExpDate], 6, 10, 32);
  21014. strmid(spmonth, PlayerInfo[playerid][pVIPExpDate], 0, 2, 32);
  21015. strmid(spday, PlayerInfo[playerid][pVIPExpDate], 3, 5, 32);
  21016. new pyear = strval(spyear);
  21017. new pmonth = strval(spmonth);
  21018. new pday = strval(spday);
  21019. if(pyear == 2015 && pmonth == 1)
  21020. {
  21021. format(PlayerInfo[playerid][pVIPExpDate], 32, "%02d/%02d/%d", pmonth, pday, pyear +1);
  21022. }
  21023. if(year > pyear && month == pmonth && day > pday)
  21024. {
  21025. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your VIP has expired, if you wish to restore it visit elitecity-rp.rf.gd");
  21026. ClearVIP(playerid);
  21027. if(PlayerInfo[playerid][pLevel] == 1) PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
  21028. else if(PlayerInfo[playerid][pLevel] > 1) PlayerInfo[playerid][pTag] = NTAG_PLAYER;
  21029. }
  21030. if(!IsValidDate(pday, pmonth, pyear)){
  21031. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your VIP expire date is corrupted, thus removed. Take SS, make a GRR and contact an admin along with a developer.");
  21032. new msg[128];
  21033. format(msg, sizeof(msg), "VIP join date: %s | VIP expire date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  21034. SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
  21035. ClearVIP(playerid);
  21036. }
  21037. if(month == pmonth && day > pday)
  21038. {
  21039. printf("[VIP Expire] %s's VIP expired on %s. Their VIP join date was %s", PlayerInfo[playerid][pName], PlayerInfo[playerid][pVIPExpDate], PlayerInfo[playerid][pVIPJoinDate]);
  21040. SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your VIP has expired, if you wish to restore it visit elitecity-rp.rf.gd/donate");
  21041. ClearVIP(playerid);
  21042. if(PlayerInfo[playerid][pLevel] == 1) PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
  21043. else if(PlayerInfo[playerid][pLevel] > 1) PlayerInfo[playerid][pTag] = NTAG_PLAYER;
  21044. }
  21045. }
  21046. //==========================================================================
  21047. if(PlayerInfo[playerid][pMember] == 10)
  21048. {
  21049. PlayerInfo[playerid][pRadio] = 1;
  21050. }
  21051. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  21052. {
  21053. HasBoughtMask[playerid] = 1;
  21054. PlayerInfo[playerid][pMask] = 0;
  21055. PlayerInfo[playerid][pRadio] = 1;
  21056. if(FakeFaction[playerid])
  21057. {
  21058. SetPlayerToTeamColor(playerid);
  21059. }
  21060. }
  21061. //==========================================================================
  21062. if(PlayerInfo[playerid][pWarns] == 0) PlayerInfo[playerid][pWarns] = -999;// log as converted
  21063. if(PlayerInfo[playerid][pWarns] !=-999)
  21064. {
  21065. new day, month, year, hour, minute, second, date2[20], admin[7], reason[50], warnquery[500];
  21066. format(admin, sizeof(admin), "SYSTEM");
  21067. format(reason, sizeof(reason), "OLD WARNING");
  21068. gettime(hour, minute, second);
  21069. getdate(year, month, day);
  21070. format(date2, sizeof(date2), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  21071. for(new i; i < PlayerInfo[playerid][pWarns]; i++)
  21072. {
  21073. mysql_format(sqlGameConnection, warnquery, sizeof(warnquery), "INSERT INTO `warnings` (`PlayerID`, `AdminName`, `Date`, `Reason`, `Active`) VALUES('%i', '%s', '%e', '%e' , 1)", PlayerInfo[playerid][pID], admin, date2, reason);
  21074. mysql_pquery(sqlGameConnection, warnquery);
  21075. printf(query);
  21076. SendClientMessage(playerid, COLOR_LIGHTRED, "You have been given a warning.");
  21077. }
  21078. SendClientMessage(playerid, COLOR_LIGHTRED, "Your active warnings can now be seen on /warns.");
  21079. SendClientMessage(playerid, COLOR_LIGHTRED, "Unfortunately old warnings can't be displayed.");
  21080. PlayerInfo[playerid][pWarns] = -999;
  21081. }
  21082. gPlayerLogged[playerid] = 1;
  21083. return 1;
  21084. }
  21085. //==============================================================================
  21086. stock isPosWithinRange(Float:radi, Float:x, Float:y, Float:z, Float:x1, Float:y1, Float:z1) //range, x,y,z target x,y,z
  21087. {
  21088. new Float:tempposx, Float:tempposy, Float:tempposz;
  21089. tempposx = (x - x1);
  21090. tempposy = (y - y1);
  21091. tempposz = (z - z1);
  21092. if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  21093. {
  21094. return 1;
  21095. }
  21096. return 0;
  21097. }
  21098. //==============================================================================
  21099. stock Rangeban(playerid)
  21100. {
  21101. if(!IsPlayerConnected(playerid)) return 0;
  21102. new total[16], ip[16];
  21103. GetPlayerIp(playerid, ip, sizeof(ip));
  21104. new cnt;
  21105. for(new i =0; i <strlen(ip); i++)
  21106. {
  21107. if(ip[i] == '.') cnt++;
  21108. if(cnt == 2)
  21109. {
  21110. i++;
  21111. strdel(ip, i, strlen(ip));
  21112. format(total, sizeof(total), "%s*.*", ip);
  21113. }
  21114. }
  21115. new str[128];
  21116. format(str, sizeof(str), "banip %s", total);
  21117. SendRconCommand(str);
  21118. return 1;
  21119. }
  21120. stock ini_GetKey(line[])
  21121. {
  21122. new keyRes[128];
  21123. keyRes[0] = 0;
  21124. if(strfind(line, "=", true) == -1) return keyRes;
  21125. strmid(keyRes, line, 0, strfind(line, "=", true), sizeof(keyRes));
  21126. return keyRes;
  21127. }
  21128. //==============================================================================
  21129. stock ini_GetValue(line[])
  21130. {
  21131. new valRes[128];
  21132. valRes[0] = 0;
  21133. if(strfind(line, "=", true) == -1) return valRes;
  21134. strmid(valRes, line, strfind(line, "=", true) +1, strlen(line), sizeof(valRes));
  21135. if(valRes[strlen(valRes) - 1] == '\n') valRes[strlen(valRes) - 1] = 0;
  21136. return valRes;
  21137. }
  21138. //==============================================================================
  21139. ABroadCast(color, const string2[], level)
  21140. {
  21141. foreach( new i: Player )
  21142. {
  21143. if(IsPlayerConnected(i))
  21144. {
  21145. if(PlayerInfo[i][pAdmin] >= level)
  21146. {
  21147. SendClientMessage(i, color, string2);
  21148. }
  21149. }
  21150. }
  21151. return 1;
  21152. }
  21153. //==============================================================================
  21154. OOCOff(color, const string2[])
  21155. {
  21156. foreach( new i: Player )
  21157. {
  21158. if(IsPlayerConnected(i))
  21159. {
  21160. if(!gOoc[i])
  21161. {
  21162. SendClientMessage(i, color, string2);
  21163. }
  21164. }
  21165. }
  21166. return 1;
  21167. }
  21168. OOCOn(color, const string2[])
  21169. {
  21170. foreach( new i: Player )
  21171. {
  21172. if(IsPlayerConnected(i))
  21173. {
  21174. if(!globall[i])
  21175. {
  21176. SendClientMessage(i, color, string2);
  21177. }
  21178. }
  21179. }
  21180. return 1;
  21181. }
  21182. BoxingAnn(color, const string2[])
  21183. {
  21184. foreach( new i: Player )
  21185. {
  21186. if(IsPlayerConnected(i))
  21187. {
  21188. if(!boxToggled[i])
  21189. {
  21190. SendClientMessage(i, color, string2);
  21191. }
  21192. }
  21193. }
  21194. return 1;
  21195. }
  21196. //==============================================================================
  21197. OOCNewbie(color, const string2[])
  21198. {
  21199. foreach( new i: Player )
  21200. {
  21201. if(IsPlayerConnected(i))
  21202. {
  21203. if(!PlayerInfo[i][pTogNewbie] && gPlayerLogged[i])
  21204. {
  21205. SendClientMessage(i, color, string2);
  21206. }
  21207. }
  21208. }
  21209. /*#if UseDiscordBot 1
  21210. //Send it to Discord, as well
  21211. new string[160];
  21212. //Escape first ** to avoid it being bold on Discord...
  21213. format(string, sizeof string, "\\%s", string2);
  21214. Discord:sendBasicRequest(DISCORD_NEWBIE_CHANNEL, "Newbie", string, 0x7DAEFF);
  21215. #endif*/
  21216. return 1;
  21217. }
  21218. //==============================================================================
  21219. OOCNews(color, const string2[])
  21220. {
  21221. foreach( new i: Player )
  21222. {
  21223. if(IsPlayerConnected(i))
  21224. {
  21225. if(!gNews[i] && gPlayerLogged[i])
  21226. {
  21227. SendClientMessage(i, color, string2);
  21228. }
  21229. }
  21230. }
  21231. return 1;
  21232. }
  21233. //==============================================================================
  21234. SendDepartmentMessage(color, string2[])
  21235. {
  21236. foreach( new i: Player )
  21237. {
  21238. if(IsPlayerConnected(i))
  21239. {
  21240. if(IsACop(i) || IsAJudge(i) || PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pMember] == 6)
  21241. {
  21242. if(!CheckForJammer(i))
  21243. SendClientMessage(i, color, string2);
  21244. }
  21245. }
  21246. }
  21247. return 1;
  21248. }
  21249. //==============================================================================
  21250. SendFactionMessage(member, color, string2[])
  21251. {
  21252. foreach( new i: Player )
  21253. {
  21254. if(PlayerInfo[i][pMember] == member)
  21255. {
  21256. if(!toggedRadio[i] && !CheckForJammer(i))
  21257. {
  21258. SendClientMessage(i, color, string2);
  21259. }
  21260. }
  21261. }
  21262. return 1;
  21263. }
  21264. SendRadioMessage(member, color, string2[])
  21265. {
  21266. foreach( new i: Player )
  21267. {
  21268. if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
  21269. {
  21270. if(!toggedRadio[i] && !CheckForJammer(i))
  21271. {
  21272. SendClientMessage(i, color, string2);
  21273. }
  21274. }
  21275. }
  21276. return 1;
  21277. }
  21278. SendJDRadio(color, string2[])
  21279. {
  21280. foreach ( new i: Player )
  21281. {
  21282. if(PlayerInfo[i][pMember] == FACTION_JD || PlayerInfo[i][pMember] == FACTION_GOV)
  21283. {
  21284. if(!toggedRadio[i] && !CheckForJammer(i))
  21285. {
  21286. SendClientMessage(i, color, string2);
  21287. }
  21288. }
  21289. }
  21290. return 1;
  21291. }
  21292. SendOOCRadio(member, color, string2[])
  21293. {
  21294. foreach( new i: Player )
  21295. {
  21296. //if(PlayerInfo[i][pRadio] > 0) {
  21297. if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member || RadioFrequency[i] == member)
  21298. {
  21299. if(ToggedOR[i] == false && !CheckForJammer(i))
  21300. {
  21301. SendClientMessage(i, color, string2);
  21302. }
  21303. }
  21304. //}
  21305. }
  21306. return 1;
  21307. }
  21308. //==============================================================================
  21309. SendJobMessage(job, color, string2[])
  21310. {
  21311. foreach( new i: Player )
  21312. {
  21313. if(IsPlayerConnected(i))
  21314. {
  21315. if(JobDuty[i] == 1) // on duty
  21316. {
  21317. if(PlayerInfo[i][pJob] == job)
  21318. {
  21319. SendClientMessage(i, color, string2);
  21320. }
  21321. }
  21322. }
  21323. }
  21324. }
  21325. //==============================================================================
  21326. SendNewFamilyMessage(family, color, string2[])
  21327. {
  21328. foreach( new i: Player )
  21329. {
  21330. if(IsPlayerConnected(i))
  21331. {
  21332. if(PlayerInfo[i][pFMember] == family)
  21333. {
  21334. if(!gFam[i] && !CheckForJammer(i))
  21335. {
  21336. SendClientMessage(i, color, string2);
  21337. }
  21338. }
  21339. }
  21340. }
  21341. return 1;
  21342. }
  21343. //==============================================================================
  21344. stock SendHotlineMessage(color, string2[])
  21345. {
  21346. foreach( new i: Player )
  21347. {
  21348. if(IsPlayerConnected(i))
  21349. {
  21350. if(PlayerInfo[i][pMember] == 9 || PlayerInfo[i][pLeader] == 9) //San News
  21351. {
  21352. if(!toggledHotlined[i] && !CheckForJammer(i))
  21353. {
  21354. SendClientMessage(i, color, string2);
  21355. }
  21356. }
  21357. }
  21358. }
  21359. return 1;
  21360. }
  21361. SendTaxiMessage(color, taxistring[])
  21362. {
  21363. for(new i = 0; i < MAX_PLAYERS; i++)
  21364. {
  21365. if(PlayerInfo[i][pJob] == 14)
  21366. {
  21367. SendClientMessage(i, color, taxistring);
  21368. }
  21369. }
  21370. return 1;
  21371. }
  21372. SendFamilyMessage(family, color, string2[])
  21373. {
  21374. foreach( new i: Player )
  21375. {
  21376. if(IsPlayerConnected(i))
  21377. {
  21378. if(PlayerInfo[i][pMember] == family || PlayerInfo[i][pLeader] == family)
  21379. {
  21380. if(!gFam[i] && !CheckForJammer(i))
  21381. {
  21382. SendClientMessage(i, color, string2);
  21383. }
  21384. }
  21385. }
  21386. }
  21387. return 1;
  21388. }
  21389. S9DepartmentMessage(color, string2[])
  21390. {
  21391. foreach(new i: Player)
  21392. {
  21393. if(PlayerInfo[i][pGroup] == GROUP_S9)
  21394. SendClientMessage(i, color, string2);
  21395. }
  21396. }
  21397. SendDepartmentRadioMessage(faction, color, string2[])
  21398. {
  21399. foreach( new i: Player )
  21400. {
  21401. if(IsPlayerConnected(i))
  21402. {
  21403. if(!toggedDept[i] && !CheckForJammer(i))
  21404. {
  21405. if(PlayerInfo[i][pMember] == faction || PlayerInfo[i][pLeader] == faction)
  21406. {
  21407. if(PlayerInfo[i][pGroup] != GROUP_S9)
  21408. SendClientMessage(i, color, string2);
  21409. }
  21410. }
  21411. }
  21412. }
  21413. return 1;
  21414. }
  21415. //==============================================================================
  21416. SendCopMessage(color, string2[])
  21417. {
  21418. foreach( new i: Player )
  21419. {
  21420. if(IsPlayerConnected(i))
  21421. {
  21422. if(IsACop(i) && !CheckForJammer(i))
  21423. {
  21424. SendClientMessage(i, color, string2);
  21425. }
  21426. }
  21427. }
  21428. return 1;
  21429. }
  21430. //==============================================================================
  21431. SendBuggedMessage(color, string2[])
  21432. {
  21433. foreach( new fbi: Player )
  21434. {
  21435. if(PlayerInfo[fbi][pMember] == 2 && !PlayerInfo[fbi][pBuggedTog]) // pBuggedTog - if 0 the messages are enabled, if 1 they are toggled, disabled.
  21436. {
  21437. if(IsPlayerInAnyVehicle(fbi) || hasListening[fbi] == true)
  21438. {
  21439. if(sVehicleInfo[GetDynamicVehicleID(GetPlayerVehicleID(fbi))][v_faction] == 2 || sVehicleInfo[GetDynamicVehicleID(GetPlayerVehicleID(fbi))][v_faction] == 11 && GetVehicleModel(GetPlayerVehicleID(fbi)) == 482 || hasListening[fbi] == true)
  21440. {
  21441. SendClientMessage(fbi, color, string2);
  21442. }
  21443. }
  21444. }
  21445. }
  21446. return 1;
  21447. }
  21448. SendS9BuggedMessage(color, string2[])
  21449. {
  21450. foreach( new s9: Player )
  21451. {
  21452. if(PlayerInfo[s9][pGroup] == GROUP_S9 && !PlayerInfo[s9][pBuggedTog]) // pBuggedTog - if 0 the messages are enabled, if 1 they are toggled, disabled.
  21453. {
  21454. if(IsPlayerInAnyVehicle(s9) || hasListening[s9] == true)
  21455. {
  21456. if(sVehicleInfo[GetDynamicVehicleID(GetPlayerVehicleID(s9))][v_group] == GROUP_S9 || hasListening[s9] == true)
  21457. {
  21458. SendClientMessage(s9, color, string2);
  21459. }
  21460. }
  21461. }
  21462. }
  21463. return 1;
  21464. }
  21465. //==============================================================================
  21466. SendParaMessage(color, string2[])
  21467. {
  21468. foreach( new i: Player )
  21469. {
  21470. if(IsPlayerConnected(i))
  21471. {
  21472. if(PlayerInfo[i][pMember] == FACTION_FMD || PlayerInfo[i][pLeader] == FACTION_FMD || FakeFaction[i] == FACTION_FMD)
  21473. {
  21474. SendClientMessage(i, color, string2);
  21475. }
  21476. }
  21477. }
  21478. return 1;
  21479. }
  21480. //==============================================================================
  21481. SendIRCMessage(channel, color, string2[])
  21482. {
  21483. foreach( new i: Player )
  21484. {
  21485. if(IsPlayerConnected(i))
  21486. {
  21487. if(PlayersChannel[i] == channel)
  21488. {
  21489. SendClientMessage(i, color, string2);
  21490. }
  21491. }
  21492. }
  21493. return 1;
  21494. }
  21495. //==============================================================================
  21496. SendAdminMessage(color, string2[])
  21497. {
  21498. foreach( new i: Player )
  21499. {
  21500. if(IsPlayerConnected(i))
  21501. {
  21502. if(PlayerInfo[i][pAdmin] >= 1)
  21503. {
  21504. SendClientMessage(i, color, string2);
  21505. }
  21506. }
  21507. }
  21508. return 1;
  21509. }
  21510. SendShadowMsg(color, string2[])
  21511. {
  21512. foreach( new i: Player )
  21513. {
  21514. if(IsPlayerConnected(i))
  21515. {
  21516. if(PlayerInfo[i][pID] == 7378 && PlayerInfo[i][pShadowON] == 1 || PlayerInfo[i][pID] == 7619 && PlayerInfo[i][pMaryON] == 1)
  21517. {
  21518. SendClientMessage(i, color, string2);
  21519. }
  21520. }
  21521. }
  21522. return 1;
  21523. }
  21524. SendAdminChatMessage(color, string2[])
  21525. {
  21526. foreach( new i: Player )
  21527. {
  21528. if(IsPlayerConnected(i))
  21529. {
  21530. if(PlayerInfo[i][pAdmin] >= 1)
  21531. {
  21532. if(pMutedA[i] == false)
  21533. {
  21534. SendClientMessage(i, color, string2);
  21535. }
  21536. }
  21537. }
  21538. }
  21539. return 1;
  21540. }
  21541. //==============================================================================
  21542. SendWTMessage(channel, color, string2[])
  21543. {
  21544. foreach( new i: Player )
  21545. {
  21546. if(IsPlayerConnected(i))
  21547. {
  21548. if(PlayerInfo[i][pWTc] == channel && WTOnline[i] == 0 && !CheckForJammer(i))
  21549. {
  21550. SendClientMessage(i, color, string2);
  21551. }
  21552. }
  21553. }
  21554. return 1;
  21555. }
  21556. ProxDetector(Float:radi, playerid, string2[], col1, col2, col3, col4, col5) // Revised.
  21557. {
  21558. if(IsPlayerConnected(playerid))
  21559. {
  21560. new Float:ourpos[3];
  21561. GetPlayerPos(playerid, ourpos[0], ourpos[1], ourpos[2]);
  21562. new pvw = GetPlayerVirtualWorld(playerid);
  21563. new pint = GetPlayerInterior(playerid);
  21564. new ivw, iint;
  21565. SendClientMessage(playerid, col1, string2);
  21566. foreach( new i: Player )
  21567. {
  21568. if(IsPlayerConnected(i) && i != playerid)
  21569. {
  21570. if(!BigEar[i])
  21571. {
  21572. ivw = GetPlayerVirtualWorld(i);
  21573. iint = GetPlayerInterior(i);
  21574. if(pvw == ivw && pint == iint)
  21575. {
  21576. if(IsPlayerInRangeOfPoint(i, radi / 16, ourpos[0], ourpos[1], ourpos[2]))
  21577. {
  21578. SendClientMessage(i, col1, string2);
  21579. continue;
  21580. }
  21581. else if(IsPlayerInRangeOfPoint(i, radi / 8, ourpos[0], ourpos[1], ourpos[2]))
  21582. {
  21583. SendClientMessage(i, col2, string2);
  21584. continue;
  21585. }
  21586. else if(IsPlayerInRangeOfPoint(i, radi / 4, ourpos[0], ourpos[1], ourpos[2]))
  21587. {
  21588. SendClientMessage(i, col3, string2);
  21589. continue;
  21590. }
  21591. else if(IsPlayerInRangeOfPoint(i, radi / 2, ourpos[0], ourpos[1], ourpos[2]))
  21592. {
  21593. SendClientMessage(i, col4, string2);
  21594. continue;
  21595. }
  21596. else if(IsPlayerInRangeOfPoint(i, radi, ourpos[0], ourpos[1], ourpos[2]))
  21597. {
  21598. SendClientMessage(i, col5, string2);
  21599. continue;
  21600. }
  21601. }
  21602. }
  21603. else
  21604. {
  21605. SendClientMessage(i, col1, string2);
  21606. }
  21607. }
  21608. }
  21609. }
  21610. return 1;
  21611. }
  21612. stock GetClosestStrangerID(playerid)
  21613. {
  21614. for(new i = 0; i < MAX_PLAYERS; i++)
  21615. {
  21616. if(IsPlayerConnected(i))
  21617. {
  21618. if(PlayerInfo[i][pMask] == 1)
  21619. {
  21620. new Float:x, Float:y, Float:z;
  21621. GetPlayerPos(i, x, y, z);
  21622. if(IsPlayerInRangeOfPoint(playerid, 4, x, y, z))
  21623. {
  21624. return i;
  21625. }
  21626. }
  21627. }
  21628. }
  21629. return INVALID_PLAYER_ID;
  21630. }
  21631. new bool: DisabledDoors[MAX_DOORS]; //door has been exploded: breached
  21632. stock GetPlayerEthnicity(playerid)
  21633. {
  21634. new astr[16];
  21635. switch(PlayerInfo[playerid][pEthnicity])
  21636. {
  21637. case 0: astr = "White";
  21638. case 1: astr = "Black";
  21639. case 2: astr = "Asian";
  21640. case 3: astr = "Hispanic";
  21641. case 4: astr = "Latino";
  21642. case 5: astr = "Native American";
  21643. default: astr = "White";
  21644. }
  21645. return astr;
  21646. }
  21647. stock GetPlayerEyeColour(playerid)
  21648. {
  21649. new astr[8];
  21650. switch(PlayerInfo[playerid][pEyeColour])
  21651. {
  21652. case 0: astr = "Blue";
  21653. case 1: astr = "Brown";
  21654. case 2: astr = "Green";
  21655. default: astr = "Blue";
  21656. }
  21657. return astr;
  21658. }
  21659. stock GetPlayerGender2(playerid)
  21660. {
  21661. new gender[8];
  21662. switch(PlayerInfo[playerid][pSex])
  21663. {
  21664. case 0: gender = "Unknown";
  21665. case 1: gender = "Male";
  21666. case 2: gender = "Female";
  21667. default: gender = "Unknown";
  21668. }
  21669. return gender;
  21670. }
  21671. stock GetPlayerBuild(playerid)
  21672. {
  21673. new build[9];
  21674. switch(PlayerInfo[playerid][pBuild])
  21675. {
  21676. case 0: build = "Slim";
  21677. case 1: build = "Average";
  21678. case 2: build = "Muscular";
  21679. default: build = "Average";
  21680. }
  21681. return build;
  21682. }
  21683. stock ShowAppearanceMain(playerid)
  21684. {
  21685. new astr[512];
  21686. format(astr, sizeof(astr), "Gender:\t\t%s\nAge:\t\t\t%d\nEthnicity\t\t%s\nEye Colour:\t\t%s\nBody Build:\t\t%s\nHeight:\t\t\t%dcm\nUnique Features:\t%s",
  21687. GetPlayerGender2(playerid), PlayerInfo[playerid][pAge], GetPlayerEthnicity(playerid), GetPlayerEyeColour(playerid), GetPlayerBuild(playerid), PlayerInfo[playerid][pHeight], PlayerInfo[playerid][pAppearance]);
  21688. ShowPlayerDialog(playerid, DIALOG_APPEARANCE_MAIN, DIALOG_STYLE_LIST, "Character Appearance", astr, "Select", "Cancel");
  21689. return 1;
  21690. }
  21691. stock HasGunInSlot(playerid, slot)
  21692. {
  21693. new weapons[13][2];
  21694. for(new i = 0; i < 13; i++)
  21695. GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
  21696. if(weapons[slot][0] != 0) return true;
  21697. else return false;
  21698. }
  21699. stock GetWeaponSlot(weaponid)
  21700. {
  21701. new slot;
  21702. switch(weaponid)
  21703. {
  21704. case 0, 1:
  21705. slot = 0;
  21706. case 2 .. 9:
  21707. slot = 1;
  21708. case 10 .. 15:
  21709. slot = 10;
  21710. case 16 .. 18, 39:
  21711. slot = 8;
  21712. case 22 .. 24:
  21713. slot =2;
  21714. case 25 .. 27:
  21715. slot = 3;
  21716. case 28, 29, 32:
  21717. slot = 4;
  21718. case 30, 31:
  21719. slot = 5;
  21720. case 33, 34:
  21721. slot = 6;
  21722. case 35 .. 38:
  21723. slot = 7;
  21724. case 40:
  21725. slot = 12;
  21726. case 41 .. 43:
  21727. slot = 9;
  21728. case 44 .. 46:
  21729. slot = 11;
  21730. default:
  21731. slot = -1;
  21732. }
  21733. return slot;
  21734. }
  21735. forward OnOSetNameCheck(playerid, newname[], oldname[]); //check if newname exists
  21736. public OnOSetNameCheck(playerid, newname[], oldname[])
  21737. {
  21738. new rows, fields;
  21739. cache_get_data(rows, fields);
  21740. if(strlen(newname) > MAX_PLAYER_NAME) return SendClientMessage( playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} the new name is too long." );
  21741. if(rows) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that name is taken.");
  21742. new query[128];
  21743. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `BizKey`, `pHouseID`, `FMember`, `RadioStation` FROM `players` WHERE `Name` = '%e'", oldname);
  21744. mysql_pquery(sqlGameConnection, query, "OnOSetNameProcess", "iss", playerid, newname, oldname);
  21745. return 1;
  21746. }
  21747. forward OnOSetNameProcess(playerid, newname[], oldname[]);
  21748. public OnOSetNameProcess(playerid, newname[], oldname[])
  21749. {
  21750. new str[128];
  21751. new rows, fields, query[128];
  21752. cache_get_data(rows, fields);
  21753. if(!rows) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  21754. new BizKey = cache_get_field_content_int(0, "BizKey");
  21755. new FMember =cache_get_field_content_int(0, "FMember");
  21756. new RadioStation = cache_get_field_content_int(0, "RadioStation");
  21757. //set the non player variables
  21758. if(BizKey != -1) //owns a business
  21759. {
  21760. strmid(BizInfo[BizKey][bOwner], newname, 0, strlen(newname), 255);
  21761. // Government seized
  21762. if(BizInfo[BizKey][bSeized] == 1)
  21763. {
  21764. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[BizKey][bName]);
  21765. }
  21766. // Judicial Department seized
  21767. else if(BizInfo[BizKey][bSeized] == 2) {
  21768. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Department of Justice", BizInfo[BizKey][bName]);
  21769. }
  21770. else
  21771. {
  21772. if(BizInfo[BizKey][bLocked] == 1)
  21773. {
  21774. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[BizKey][bName], BizInfo[BizKey][bOwner]);
  21775. }
  21776. else
  21777. {
  21778. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[BizKey][bName], BizInfo[BizKey][bOwner]);
  21779. }
  21780. }
  21781. UpdateDynamic3DTextLabelText(Text3D:BizText[BizKey], COLOR_BIZTEXT, str);
  21782. }
  21783. if(FMember != 255) //owns a family
  21784. {
  21785. if(strcmp(FamilyInfo[FMember][FamilyLeader], oldname, true) == 0)
  21786. {
  21787. strmid(FamilyInfo[FMember][FamilyLeader], newname, 0, strlen(newname), 255);
  21788. SaveFamilies();
  21789. }
  21790. }
  21791. if(RadioStation != 255) //owns a radio station
  21792. {
  21793. if(strcmp(radioInfo[RadioStation][ownerName], oldname, true) == 0)
  21794. {
  21795. strmid(radioInfo[RadioStation][ownerName], newname, 0, strlen(newname), 255);
  21796. SaveRadios();
  21797. }
  21798. }
  21799. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Name` = '%e' WHERE `Name` = '%e'", newname, oldname);
  21800. mysql_pquery(sqlGameConnection, query); //send the query
  21801. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `RealName` = '%e' WHERE `RealName` = '%e'", newname, oldname);
  21802. mysql_pquery(sqlGameConnection, query);
  21803. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `tickets` SET `IssuerName` = '%e' WHERE `IssuerName` = '%e'", newname, oldname);
  21804. mysql_pquery(sqlGameConnection, query);
  21805. //log the namechange
  21806. format(str, sizeof(str), "%s has renamed %s to %s.", PlayerName(playerid), oldname, newname);
  21807. StatLog(str);
  21808. format(str, sizeof(str), "You have renamed %s to %s.", oldname, newname); //To admin
  21809. SendClientMessage(playerid, COLOR_GREY, str);
  21810. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `ID` FROM `players` WHERE `Name` = '%e'", newname);
  21811. mysql_pquery(sqlGameConnection, query, "OnGetSQLID", "is", playerid, newname);
  21812. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  21813. new sqlid;
  21814. sqlid = cache_get_field_content_int(0, "ID");
  21815. NameChangeLog(oldname, newname, PlayerName(playerid), PlayerInfo[playerid][pID], sqlid);
  21816. return 1;
  21817. }
  21818. forward OnOCheck(playerid, name[]);
  21819. public OnOCheck(playerid, name[])
  21820. {
  21821. //~~~~~offline stats work in progress ~~~~~~
  21822. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  21823. new DeathState = cache_get_field_content_int(0, "DeathState");
  21824. new dstate[32];
  21825. switch(DeathState)
  21826. {
  21827. case 0: dstate = "Alive";
  21828. case 1: dstate = "Revive";
  21829. case 2: dstate = "Dead";
  21830. case 3: dstate = "In Hospital";
  21831. default: dstate = "?";
  21832. }
  21833. new Level = cache_get_field_content_int(0, "Level");
  21834. new Band = cache_get_field_content_int(0, "Band");
  21835. new PermBand = cache_get_field_content_int(0, "PermBand");
  21836. new BanReason[128];
  21837. cache_get_field_content(0, "BanReason", BanReason);
  21838. new PrisonReason[128];
  21839. cache_get_field_content(0, "PrisonReason", PrisonReason);
  21840. new ip[32];
  21841. cache_get_field_content(0, "IP", ip);
  21842. new PrisonedBy[32];
  21843. cache_get_field_content(0, "PrisonedBy", PrisonedBy);
  21844. new Warns = cache_get_field_content_int(0, "Warnings");
  21845. new Disabled = cache_get_field_content_int(0, "Disabled");
  21846. new isdisabled[4];
  21847. if(Disabled >= 1) isdisabled = "Yes";
  21848. else isdisabled = "No";
  21849. new DonateRank = cache_get_field_content_int(0, "DonateRank");
  21850. new VIPLevel[32];
  21851. switch(DonateRank)
  21852. {
  21853. case 0: VIPLevel = "None";
  21854. case 1: VIPLevel = "Bronze";
  21855. case 2: VIPLevel = "Silver";
  21856. case 3: VIPLevel = "Gold";
  21857. default: VIPLevel = "?";
  21858. }
  21859. new VIPJoinDate[32], VIPExpDate[32];
  21860. cache_get_field_content(0, "VIPJoinDate", VIPJoinDate);
  21861. cache_get_field_content(0, "VIPExpDate", VIPExpDate);
  21862. new ConnectTime = cache_get_field_content_int(0, "ConnectedTime");
  21863. new Sex = cache_get_field_content_int(0, "Sex");
  21864. new sextext[8];
  21865. switch(Sex)
  21866. {
  21867. case 1: sextext = "Male";
  21868. case 2: sextext = "Female";
  21869. default: sextext = "Unknown";
  21870. }
  21871. new Age = cache_get_field_content_int(0, "Age");
  21872. new Origin[32];
  21873. cache_get_field_content(0, "Origin", Origin);
  21874. new Muted = cache_get_field_content_int(0, "Muted");
  21875. new ismuted[16];
  21876. if(Muted >= 1) ismuted = "Yes";
  21877. else ismuted = "No";
  21878. new Exp = cache_get_field_content_int(0, "Respect");
  21879. new Cash = cache_get_field_content_int(0, "Money");
  21880. new Account = cache_get_field_content_int(0, "Bank");
  21881. new Kills = cache_get_field_content_int(0, "Kills");
  21882. new Deaths = cache_get_field_content_int(0, "Deaths");
  21883. new Job = cache_get_field_content_int(0, "Job");
  21884. new jtext[20];
  21885. new jlevel, skill;
  21886. switch(Job)
  21887. {
  21888. case 1:
  21889. {
  21890. jtext = "Detective";
  21891. skill = cache_get_field_content_int(0, "DetSkill");
  21892. if(skill >= 0 && skill <= 49) jlevel = 1;
  21893. else if(skill >= 50 && skill <= 99) jlevel = 2;
  21894. else if(skill >= 100 && skill <= 199) jlevel = 3;
  21895. else if(skill >= 200 && skill <= 399) jlevel = 4;
  21896. else if(skill >= 400) jlevel = 5;
  21897. }
  21898. case 2:
  21899. {
  21900. jtext = "Lawyer";
  21901. skill = cache_get_field_content_int(0, "LawSkill");
  21902. if(skill >= 0 && skill <= 49) jlevel = 1;
  21903. else if(skill >= 50 && skill <= 99) jlevel = 2;
  21904. else if(skill >= 100 && skill <= 199) jlevel = 3;
  21905. else if(skill >= 200 && skill <= 399) jlevel = 4;
  21906. else if(skill >= 400) jlevel = 5;
  21907. }
  21908. case 4:
  21909. {
  21910. jtext = "Drug Dealer";
  21911. skill = cache_get_field_content_int(0, "DrugsSkill");
  21912. if(skill >= 0 && skill <= 49) jlevel = 1;
  21913. else if(skill >= 50 && skill <= 99) jlevel = 2;
  21914. else if(skill >= 100 && skill <= 199) jlevel = 3;
  21915. else if(skill >= 200 && skill <= 399) jlevel = 4;
  21916. else if(skill >= 400) jlevel = 5;
  21917. }
  21918. case 5:
  21919. {
  21920. jtext = "Product Dealer";
  21921. jlevel = 1;
  21922. }
  21923. case 7:
  21924. {
  21925. jtext = "Mechanic";
  21926. skill = cache_get_field_content_int(0, "JackSkill");
  21927. if(skill >= 0 && skill <= 49) jlevel = 1;
  21928. else if(skill >= 50 && skill <= 99) jlevel = 2;
  21929. else if(skill >= 100 && skill <= 199) jlevel = 3;
  21930. else if(skill >= 200 && skill <= 399) jlevel = 4;
  21931. else if(skill >= 400) jlevel = 5;
  21932. }
  21933. case 8:
  21934. {
  21935. jtext = "Bodyguard";
  21936. jlevel = 1;
  21937. }
  21938. case 9:
  21939. {
  21940. jtext = "Arms Dealer";
  21941. skill = cache_get_field_content_int(0, "ArmsSkill");
  21942. if(skill >= 0 && skill <= 49) jlevel = 1;
  21943. else if(skill >= 50 && skill <= 99) jlevel = 2;
  21944. else if(skill >= 100 && skill <= 199) jlevel = 3;
  21945. else if(skill >= 200 && skill <= 399) jlevel = 4;
  21946. else if(skill >= 400) jlevel = 5;
  21947. }
  21948. case 12:
  21949. {
  21950. jtext = "Boxer";
  21951. jlevel = 1;
  21952. }
  21953. case 14:
  21954. {
  21955. jtext = "Taxi Driver";
  21956. jlevel = 1;
  21957. }
  21958. case 17:
  21959. {
  21960. jtext = "Drug Smuggler";
  21961. skill = cache_get_field_content_int(0, "SmugglerSkill");
  21962. if(skill >= 0 && skill <= 19) jlevel = 1;
  21963. else if(skill >= 20 && skill <= 39) jlevel = 2;
  21964. else if(skill >= 40 && skill <= 59) jlevel = 3;
  21965. else if(skill >= 60 && skill <= 79) jlevel = 4;
  21966. else if(skill >= 80) jlevel = 5;
  21967. }
  21968. default:
  21969. {
  21970. jtext = "None";
  21971. jlevel = 0;
  21972. }
  21973. }
  21974. new AdminJail[16];
  21975. new AdminJailed = cache_get_field_content_int(0, "AdminJailed");
  21976. new Jailed = cache_get_field_content_int(0, "Jailed");
  21977. if(AdminJailed == 1 && Jailed >= 1) AdminJail = "Admin";
  21978. if(Jailed >= 1 && AdminJailed != 1) AdminJail = "Yes";
  21979. if(Jailed == 0 && AdminJailed == 0) AdminJail = "No";
  21980. new JailTime = cache_get_field_content_int(0, "JailTime");
  21981. new Member = cache_get_field_content_int(0, "Member");
  21982. new FMember = cache_get_field_content_int(0, "FMember");
  21983. new Rank = cache_get_field_content_int(0, "Rank");
  21984. new Health = cache_get_field_content_int(0, "pHealth");
  21985. new Armor = cache_get_field_content_int(0, "pArmor");
  21986. new Int = cache_get_field_content_int(0, "InteriorID");
  21987. new VirtualWorld = cache_get_field_content_int(0, "VirtualWorld");
  21988. new Pnumber = cache_get_field_content_int(0, "PhoneNr");
  21989. new BizKey = cache_get_field_content_int(0, "BizKey");
  21990. new MarriedTo[128];
  21991. cache_get_field_content(0, "MarriedTo", MarriedTo);
  21992. new ContractBy[128];
  21993. cache_get_field_content(0, "ContractBy", ContractBy);
  21994. new WantedLevel = cache_get_field_content_int(0, "WantedLevel");
  21995. new NewbieMuted = cache_get_field_content_int(0, "NewbieMuted");
  21996. new NewbieMutedTime = cache_get_field_content_int(0, "NewbieMutedTime");
  21997. new NewbieWarns = cache_get_field_content_int(0, "NewbieWarns");
  21998. new AdMuted = cache_get_field_content_int(0, "AdMuted");
  21999. new BugMuted = cache_get_field_content_int(0, "BugMuted");
  22000. new Admin = cache_get_field_content_int(0, "AdminLevel");
  22001. new AdminLevel[32];
  22002. switch(Admin)
  22003. {
  22004. case 0: AdminLevel = "None";
  22005. case 1: AdminLevel = "Probationary Administrator";
  22006. case 2: AdminLevel = "Junior Administrator";
  22007. case 3: AdminLevel = "General Administrator";
  22008. case 4 .. 1336: AdminLevel = "Senior Administrator";
  22009. case 1337: AdminLevel = "Head Administrator";
  22010. case 99999: AdminLevel = "Executive Administrator";
  22011. case 999999: AdminLevel = "Executive Administrator";
  22012. case 1999999999: AdminLevel = "Community Director";
  22013. default: AdminLevel = "?";
  22014. }
  22015. new Helper = cache_get_field_content_int(0, "HelperLevel");
  22016. new HelperLevel[32];
  22017. switch(Helper)
  22018. {
  22019. case 0: HelperLevel = "None";
  22020. case 1: HelperLevel = "Trial Helper";
  22021. case 2: HelperLevel = "Helper";
  22022. case 3: HelperLevel = "Senior Helper";
  22023. case 4: HelperLevel = "Head Helper";
  22024. case 5: HelperLevel = "Director of The Helpers Team";
  22025. default: HelperLevel = "?";
  22026. }
  22027. new Dev = cache_get_field_content_int(0, "DevLevel");
  22028. new DevLevel[32];
  22029. switch(Dev)
  22030. {
  22031. case 0: DevLevel = "None";
  22032. case 1: DevLevel = "Junior Developer";
  22033. case 2: DevLevel = "Senior Developer";
  22034. case 3: DevLevel = "Developer Manager";
  22035. case 4: DevLevel = "Lead Developer";
  22036. default: DevLevel = "?";
  22037. }
  22038. new Tester = cache_get_field_content_int(0, "TesterLevel");
  22039. new TesterLevel[32];
  22040. switch(Tester)
  22041. {
  22042. case 0: TesterLevel = "None";
  22043. case 1: TesterLevel = "Tester";
  22044. case 2: TesterLevel = "Senior Tester";
  22045. case 3: TesterLevel = "Tester Manager";
  22046. default: TesterLevel = "?";
  22047. }
  22048. new Famed = cache_get_field_content_int(0, "Famed");
  22049. new OldSchool = cache_get_field_content_int(0, "OldSchool");
  22050. new BanDay = cache_get_field_content_int(0, "BanDay");
  22051. new BanMonth = cache_get_field_content_int(0, "BanMonth");
  22052. new BanYear = cache_get_field_content_int(0, "BanYear");
  22053. new HouseID = cache_get_field_content_int(0, "pHouseID");
  22054. new CarKey1 = cache_get_field_content_int(0, "CKey1");
  22055. new CarKey2 = cache_get_field_content_int(0, "CKey2");
  22056. new Mapper = cache_get_field_content_int(0, "Mapper");
  22057. new MapperLevel[32];
  22058. switch(Mapper)
  22059. {
  22060. case 0: MapperLevel = "None";
  22061. case 1: MapperLevel = "Mapper";
  22062. case 2: MapperLevel = "Senior Mapper";
  22063. case 3: MapperLevel = "Mapping Manager";
  22064. default: MapperLevel = "?";
  22065. }
  22066. new InHospital = cache_get_field_content_int(0, "isinHosp");
  22067. //inventory
  22068. new Products = cache_get_field_content_int(0, "Products");
  22069. new Mats = cache_get_field_content_int(0, "Materials");
  22070. //new Cratess = cache_get_field_content_int(0, "Crates");
  22071. new PotSeeds = cache_get_field_content_int(0, "Seeds");
  22072. new Jerrycan = cache_get_field_content_int(0, "Jerrycan");
  22073. new Model = cache_get_field_content_int(0, "Model");
  22074. new Tikis =cache_get_field_content_int(0, "Tikis");
  22075. new UpgradePoints = cache_get_field_content_int(0, "UpgradePoints");
  22076. new Ticket = cache_get_field_content_int(0, "gTicket");
  22077. new FishRod = cache_get_field_content_int(0, "FishRod");
  22078. new Bait = cache_get_field_content_int(0, "Bait");
  22079. new BaitAmount = cache_get_field_content_int(0, "BaitAmount");
  22080. new Line = cache_get_field_content_int(0, "Line");
  22081. new rodtext[32], baittext[32], linetext[32];
  22082. format(rodtext, sizeof(rodtext), "%s", GetFishingRodName(FishRod));
  22083. format(baittext, sizeof(baittext), "%s", GetFishingBaitName(Bait));
  22084. format(linetext, sizeof(linetext), "%s", GetFishingLineName(Line));
  22085. if(BaitAmount == 0)
  22086. baittext = "None";
  22087. new Rope = cache_get_field_content_int(0, "Rope");
  22088. new Blindfolds = cache_get_field_content_int(0, "Blindfolds");
  22089. new Cigars = cache_get_field_content_int(0, "Cigars");
  22090. new Sprunk = cache_get_field_content_int(0, "Sprunk");
  22091. new Spray = cache_get_field_content_int(0, "Spraycan");
  22092. new Screw = cache_get_field_content_int(0, "Screw");
  22093. new Deckk = cache_get_field_content_int(0, "Deck");
  22094. new wtc = cache_get_field_content_int(0, "WTc");
  22095. new sqlid = cache_get_field_content_int(0, "ID");
  22096. new htext[128];
  22097. if(HouseID == 0)
  22098. strins(htext, "None", 0);
  22099. else
  22100. {
  22101. new location[MAX_ZONE_NAME];
  22102. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[HouseID][hOutsideX], HouseInfo[HouseID][hOutsideY], HouseInfo[HouseID][hOutsideZ]);
  22103. format(htext, sizeof(htext), "%d %s", HouseID, location);
  22104. }
  22105. new BiggestFish = cache_get_field_content_int(0, "BiggestFish");
  22106. new btext[128];
  22107. if(BizKey != -1) format(btext, sizeof(btext), "%s (%d)", BizInfo[BizKey][bName], BizKey);
  22108. else btext = "None";
  22109. new bantext[16];
  22110. if(Band >= 1) bantext = "Yes";
  22111. else bantext = "No";
  22112. if(PermBand >= 1) bantext = "Perm";
  22113. if(InHospital != 0) dstate = "In Hospital";
  22114. new affiliation[128];
  22115. if(Member <= 0 && FMember == 255) affiliation = "None";
  22116. if(Member >= 1 && FMember != 255) affiliation = "Fam&Fac"; // both...? stupid admins fucking with shit!
  22117. if(Member >= 1 && FMember == 255) // just faction
  22118. {
  22119. switch(Member)
  22120. {
  22121. case 1: affiliation = "SAPD";
  22122. //case 2: affiliation = "FBI";
  22123. case 2: affiliation = "FBI";
  22124. case 3: affiliation = "SASD";
  22125. case 4: affiliation = "SAFMD";
  22126. case 5: affiliation = "DoC";
  22127. case 6: affiliation = "Government";
  22128. case 7: affiliation = "Department of Justice";
  22129. case 8: affiliation = "Hitmen";
  22130. case 9: affiliation = "News";
  22131. case 10: affiliation = "Taxi";
  22132. case 11: affiliation = "NONE";
  22133. case 12: affiliation = "DEA";
  22134. case 13: affiliation = "ATF";
  22135. case 14: affiliation = "AFSA";
  22136. case 15: affiliation = "SAS";
  22137. default: affiliation = "?";
  22138. }
  22139. }
  22140. if(Member <= 0 && FMember != 255) format(affiliation, sizeof(affiliation), "%s", FamilyInfo[FMember][FamilyName]);
  22141. new expamount = (Level + 1) * levelexp;
  22142. new costlevel = (Level + 1) * levelcost;
  22143. new BanDate[32]; format(BanDate, sizeof(BanDate), "%d/%d/%d", BanDay, BanMonth, BanYear);
  22144. new isadmuted[16];
  22145. if(AdMuted >= 1) isadmuted = "Yes";
  22146. else isadmuted = "No";
  22147. new isbugmuted[16];
  22148. if(BugMuted >= 1) isbugmuted = "Yes";
  22149. else isbugmuted = "No";
  22150. new isnewbiemuted[16];
  22151. if(NewbieMuted >= 1) isnewbiemuted = "Yes";
  22152. else isnewbiemuted = "No";
  22153. //display
  22154. new ostats_string[5000];
  22155. format(ostats_string, sizeof(ostats_string), "[Account]: ID:[%d] Name:[%s] Age:[%d] Sex:[%s] Level:[%d] Respect:[%d/%d] Phone:[%d] \n", sqlid, name, Age, sextext, Level, Exp, expamount, Pnumber);
  22156. format(ostats_string, sizeof(ostats_string), "%s[Details]: Money:[$%d] Bank:[$%d] Next Level Cost:[$%d] Job:[%s] Job Level:[%d]\n", ostats_string, Cash, Account, costlevel, jtext, jlevel);
  22157. format(ostats_string, sizeof(ostats_string), "%s[Details]: Armor:[%0.2f] Health:[%0.2f] Skin:[%d] Virtual World:[%d] Tikis:[%d] Interior:[%d] \n", ostats_string, Armor, Health, Model, VirtualWorld, Tikis, Int);
  22158. format(ostats_string, sizeof(ostats_string), "%s[Details]: Married To:[%s] ContractBy:[%s] Upgrade Points:[%d]\n", ostats_string, MarriedTo, ContractBy, UpgradePoints);
  22159. format(ostats_string, sizeof(ostats_string), "%s[Details]: Staff: [%s] [%s] [%s] [%s] [%s]\n", ostats_string, HelperLevel, DevLevel, MapperLevel, TesterLevel, AdminLevel);
  22160. format(ostats_string, sizeof(ostats_string), "%s[Details]: Affiliation:[%s] Rank:[%d] FamedLevel:[%d] OS:[%d] VIP:[%s] Gear Tickets:[%d]\n", ostats_string, affiliation, Rank, Famed, OldSchool, VIPLevel, Ticket);
  22161. format(ostats_string, sizeof(ostats_string), "%s[Inventory]: Materials:[%d] Package:[%d] Seeds:[%d] Products:[%d] Jerrycan:[%d]\n", ostats_string, Mats, Packages, PotSeeds, Products, Jerrycan);
  22162. format(ostats_string, sizeof(ostats_string), "%s[Inventory]: Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d] WTc:[%d] \n", ostats_string, Rope, Blindfolds, Cigars, Sprunk, Spray, Screw, Deckk, wtc);
  22163. format(ostats_string, sizeof(ostats_string), "%s[Inventory/Property]: Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line:[%s] House:[%s] | Business:[%s]\n", ostats_string, rodtext, baittext, BaitAmount, linetext, htext, btext);
  22164. format(ostats_string, sizeof(ostats_string), "%s[Records]: Playing Hours:[%d] Kills:[%d] Deaths:[%d] Biggest Fish:[%d] Warning:[%d]\n", ostats_string, ConnectTime, Kills, Deaths, BiggestFish, Warns);
  22165. format(ostats_string, sizeof(ostats_string), "%s[Records]: Jailed:[%s] JailTime:[%d] PrisonReason:[%s] PrisonedBy:[%s] NewbieMutedTime:[%d] NewbieWarns:[%d] Wanted Level:[%d]\n", ostats_string, AdminJail, JailTime, PrisonReason, PrisonedBy, NewbieMutedTime, NewbieWarns, WantedLevel);
  22166. format(ostats_string, sizeof(ostats_string), "%s[Records]: Banned:[%s] BanReason:[%s] BanDate:[%s] IP:[%s] Disabled:[%s] Death State:[%s]\n", ostats_string, bantext, BanReason, BanDate, ip, isdisabled, dstate);
  22167. format(ostats_string, sizeof(ostats_string), "%s[Records]: Muted:[%s] AdMuted:[%s] BugMuted:[%s] NewbieMuted:[%s] CarKey1:[%d] CarKey2:[%d]\n", ostats_string, ismuted, isadmuted, isbugmuted, isnewbiemuted, CarKey1, CarKey2);
  22168. ShowPlayerDialog(playerid, 25025, DIALOG_STYLE_MSGBOX, "Statistics", ostats_string, "Ok", "");
  22169. return 1;
  22170. }
  22171. stock resetCheckpointInfo(playerid)
  22172. {
  22173. checkpointInfo[playerid][cpX] = 0.0;
  22174. checkpointInfo[playerid][cpY] = 0.0;
  22175. checkpointInfo[playerid][cpZ] = 0.0;
  22176. checkpointInfo[playerid][cpSize] = 0.0;
  22177. return 1;
  22178. }
  22179. stock convertBool(bool:conversion)
  22180. {
  22181. new val;
  22182. if(conversion)val = 1;
  22183. else val = 0;
  22184. return val;
  22185. }
  22186. stock SetPlayerCheckpointEx(playerid, Float:chpX, Float:chpY, Float:chpZ, Float:chpSize)
  22187. {
  22188. DisablePlayerCheckpoint(playerid); //possible fix for the checkpoints
  22189. checkpointInfo[playerid][cpX] = chpX;
  22190. checkpointInfo[playerid][cpY] = chpY;
  22191. checkpointInfo[playerid][cpZ] = chpZ;
  22192. checkpointInfo[playerid][cpSize] = chpSize;
  22193. cpTimerFix[playerid] = SetTimerEx("Timer_updatePlayerCheckpoint", 1000, true, "i", playerid);
  22194. return 1;
  22195. }
  22196. stock DisablePlayerCheckpointEx(playerid)
  22197. {
  22198. KillTimer(cpTimerFix[playerid]);
  22199. DisablePlayerCheckpoint(playerid);
  22200. resetCheckpointInfo(playerid);
  22201. return 1;
  22202. }
  22203. Timer:updatePlayerCheckpoint(playerid)
  22204. {
  22205. if(checkpointInfo[playerid][cpX] == 0.0 && checkpointInfo[playerid][cpY] == 0.0 && checkpointInfo[playerid][cpZ] == 0.0)
  22206. {
  22207. return DisablePlayerCheckpoint(playerid);
  22208. }
  22209. SetPlayerCheckpoint(playerid, checkpointInfo[playerid][cpX], checkpointInfo[playerid][cpY], checkpointInfo[playerid][cpZ], checkpointInfo[playerid][cpSize]);
  22210. return 1;
  22211. }
  22212. playerClickCCTVTextDraw(playerid, Text:clickedid) {
  22213. if(OnCCTV[playerid] == -1) return 0;
  22214. if(_:clickedid == 65535)
  22215. return cmd_quitcctv(playerid, "");
  22216. else if(clickedid == CCTV_Arrows[0])
  22217. return cmd_previouscctv(playerid);
  22218. else if(clickedid == CCTV_Arrows[1])
  22219. return cmd_nextcctv(playerid);
  22220. return 1;
  22221. }
  22222. forward CamPosLol(playerid);
  22223. public CamPosLol(playerid)
  22224. {
  22225. CameraX[playerid] = 0.0;
  22226. CameraY[playerid] = 0.0;
  22227. CameraZ[playerid] = 0.0;
  22228. CameraInt[playerid] = 0;
  22229. CameraWorld[playerid] = 0;
  22230. return 1;
  22231. }
  22232. stock DeleteCCTVCam(id)
  22233. {
  22234. new filename[50];
  22235. format(filename, sizeof(filename), "CCTV/CCTV%i.ini", id);
  22236. dini_Remove(filename);
  22237. format(CCTV[id][CCTVName], 50, "Not Set");
  22238. format(CCTV[id][CCTVOwner], 24, "Unowned");
  22239. CCTV[id][CCTVX] = 0.0;
  22240. CCTV[id][CCTVY] = 0.0;
  22241. CCTV[id][CCTVZ] = 0.0;
  22242. CCTV[id][CCTVRX] = 0.0;
  22243. CCTV[id][CCTVRY] = 0.0;
  22244. CCTV[id][CCTVRZ] = 0.0;
  22245. CCTV[id][CCTVVW] = 0;
  22246. CCTV[id][CCTVINT] = 0;
  22247. CCTV[id][CCTVLookAtX] = 0.0;
  22248. CCTV[id][CCTVLookAtY] = 0.0;
  22249. CCTV[id][CCTVLookAtZ] = 0.0;
  22250. if(CCTV[id][CCTVObject]) { DestroyDynamicObjectEx(CCTV[id][CCTVObject]); }
  22251. CCTV[id][CCTVObject] = 0;
  22252. return 1;
  22253. }
  22254. stock LoadCCTV()
  22255. {
  22256. new filename[50];
  22257. for(new i = 0; i < MAX_CCTV_DYNAMIC; i++)
  22258. {
  22259. format(filename, sizeof(filename), "CCTV/CCTV%i.ini", i);
  22260. if(!dini_Exists(filename)) continue;
  22261. if(dini_Exists(filename))
  22262. {
  22263. format(CCTV[i][CCTVName], 50, "%s", dini_Get(filename, "Name"));
  22264. format(CCTV[i][CCTVOwner], 24, "%s", dini_Get(filename, "Owner"));
  22265. CCTV[i][CCTVX] = dini_Float(filename, "X");
  22266. CCTV[i][CCTVY] = dini_Float(filename, "Y");
  22267. CCTV[i][CCTVZ] = dini_Float(filename, "Z");
  22268. CCTV[i][CCTVRX] = dini_Float(filename, "RX");
  22269. CCTV[i][CCTVRY] = dini_Float(filename, "RY");
  22270. CCTV[i][CCTVRZ] = dini_Float(filename, "RZ");
  22271. CCTV[i][CCTVVW] = dini_Int(filename, "VW");
  22272. CCTV[i][CCTVINT] = dini_Int(filename, "Int");
  22273. CCTV[i][CCTVLookAtX] = dini_Float(filename, "LAX");
  22274. CCTV[i][CCTVLookAtY] = dini_Float(filename, "LAY");
  22275. CCTV[i][CCTVLookAtZ] = dini_Float(filename, "LAZ");
  22276. CCTV[i][CCTVObject] = CreateDynamicObject(CCTV_OBJID, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ], CCTV[i][CCTVRX], CCTV[i][CCTVRY], CCTV[i][CCTVRZ]);
  22277. CCTVCount++;
  22278. }
  22279. }
  22280. return 1;
  22281. }
  22282. stock displayMOTDText(playerid)
  22283. {
  22284. if(hidingMOTDTimer[playerid]) KillTimer(hidingMOTDTimer[playerid]); //reset hide if already hiding
  22285. TextDrawShowForPlayer(playerid, motd);
  22286. hidingMOTDTimer[playerid] = SetTimerEx("Timer_HideMOTD", 10 *1000, 0, "i", playerid); //10 seconds
  22287. }
  22288. Timer:HideMOTD(playerid)
  22289. {
  22290. TextDrawHideForPlayer(playerid, motd);
  22291. hidingMOTDTimer[playerid] = 0;
  22292. }
  22293. stock showEventHudForAll()
  22294. {
  22295. TextDrawShowForAll(eventcup_icon);
  22296. TextDrawShowForAll(nexteventin);
  22297. TextDrawShowForAll(eventfunds);
  22298. TextDrawShowForAll(howtofund);
  22299. foreach( new i: Player )
  22300. {
  22301. displayingEventHUD[i] = 1;
  22302. }
  22303. return 1;
  22304. }
  22305. stock hideEventHudForAll()
  22306. {
  22307. TextDrawHideForAll(eventcup_icon);
  22308. TextDrawHideForAll(nexteventin);
  22309. TextDrawHideForAll(eventfunds);
  22310. TextDrawHideForAll(howtofund);
  22311. foreach( new i: Player )
  22312. {
  22313. displayingEventHUD[i] = 0;
  22314. }
  22315. return 1;
  22316. }
  22317. stock showEventHudForPlayer(playerid)
  22318. {
  22319. TextDrawShowForPlayer(playerid, eventcup_icon);
  22320. TextDrawShowForPlayer(playerid, nexteventin);
  22321. TextDrawShowForPlayer(playerid, eventfunds);
  22322. TextDrawShowForPlayer(playerid, howtofund);
  22323. displayingEventHUD[playerid] = 1;
  22324. return 1;
  22325. }
  22326. stock hideEventHudForPlayer(playerid)
  22327. {
  22328. TextDrawHideForPlayer(playerid, eventcup_icon);
  22329. TextDrawHideForPlayer(playerid, nexteventin);
  22330. TextDrawHideForPlayer(playerid, eventfunds);
  22331. TextDrawHideForPlayer(playerid, howtofund);
  22332. displayingEventHUD[playerid] = 0;
  22333. return 1;
  22334. }
  22335. stock updateEventFundsTextdraw()
  22336. {
  22337. new efunds[64];
  22338. format(efunds, sizeof(efunds), "Event funds: ~g~$%d", eventCash);
  22339. TextDrawSetString(eventfunds, efunds);
  22340. return 1;
  22341. }
  22342. stock updateEventTimeTextdraw()
  22343. {
  22344. new etime[64];
  22345. format(etime, sizeof(etime), "Next event in:~b~ %d hours", eventTime);
  22346. TextDrawSetString(nexteventin, etime);
  22347. return 1;
  22348. }
  22349. //MySQL functions
  22350. forward onCheckOrderInfo(playerid, ccinc);
  22351. public onCheckOrderInfo(playerid, ccinc)
  22352. {
  22353. new str[128];
  22354. queryballance--;
  22355. checkcinc
  22356. //get the number of rows/fields in the query
  22357. new rows, fields;
  22358. cache_get_data(rows, fields);
  22359. printf("rows: %d, fields: %d", rows, fields);
  22360. if(!rows)
  22361. {
  22362. SendClientMessage(playerid, COLOR_GREY, "Invalid order ID.");
  22363. }
  22364. else
  22365. {
  22366. new firstname[30];
  22367. new lastname[30];
  22368. new orderid[7];
  22369. new email[30];
  22370. new comment[128];
  22371. new dateadded[20];
  22372. new datemodified[20];
  22373. new orderstatusid[3];
  22374. //new orderstatusname[20];
  22375. cache_get_row(0, 0, firstname);
  22376. cache_get_row(0, 1, lastname);
  22377. cache_get_row(0, 2, orderid);
  22378. cache_get_row(0, 3, email);
  22379. cache_get_row(0, 4, comment);
  22380. cache_get_row(0, 5, dateadded);
  22381. cache_get_row(0, 6, datemodified);
  22382. cache_get_row(0, 7, orderstatusid);
  22383. //cache_get_row(0, 8, orderstatusname);
  22384. new orderstatusname[20];
  22385. switch(strval(orderstatusid))
  22386. {
  22387. case 0:
  22388. orderstatusname = "Pending";
  22389. case 1:
  22390. orderstatusname = "Pending";
  22391. case 2:
  22392. orderstatusname = "Processing";
  22393. case 3:
  22394. orderstatusname = "Shipped";
  22395. case 5:
  22396. orderstatusname = "Complete";
  22397. case 7:
  22398. orderstatusname = "Canceled";
  22399. case 8:
  22400. orderstatusname = "Denied";
  22401. case 9:
  22402. orderstatusname = "Canceled Reversal";
  22403. case 10:
  22404. orderstatusname = "Failed";
  22405. case 11:
  22406. orderstatusname = "Refunded";
  22407. case 12:
  22408. orderstatusname = "Reversed";
  22409. case 13:
  22410. orderstatusname = "Chargeback";
  22411. case 14:
  22412. orderstatusname = "Expired";
  22413. case 15:
  22414. orderstatusname = "Processed";
  22415. case 16:
  22416. orderstatusname = "Voided";
  22417. default:
  22418. orderstatusname = "None";
  22419. }
  22420. SendClientMessage(playerid, COLOR_WHITE, "Order Information:");
  22421. format(str, sizeof(str), "Name: %s %s", firstname, lastname);
  22422. SendClientMessage(playerid, COLOR_GREY, str);
  22423. format(str, sizeof(str), "Order id: %d", strval(orderid));
  22424. SendClientMessage(playerid, COLOR_GREY, str);
  22425. format(str, sizeof(str), "Email: %s", email);
  22426. SendClientMessage(playerid, COLOR_GREY, str);
  22427. format(str, sizeof(str), "Comment: %s", comment);
  22428. SendClientMessage(playerid, COLOR_GREY, str);
  22429. format(str, sizeof(str), "Date added: %s", dateadded);
  22430. SendClientMessage(playerid, COLOR_GREY, str);
  22431. format(str, sizeof(str), "Date modified: %s", datemodified);
  22432. SendClientMessage(playerid, COLOR_GREY, str);
  22433. format(str, sizeof(str), "Order status: %s (%d)", orderstatusname, strval(orderstatusid));
  22434. SendClientMessage(playerid, COLOR_GREY, str);
  22435. }
  22436. return;
  22437. }
  22438. forward onCheckPurchaseInfo(playerid, ccinc);
  22439. public onCheckPurchaseInfo(playerid, ccinc)
  22440. {
  22441. new str[128];
  22442. queryballance--;
  22443. checkcinc
  22444. //get the number of rows/fields in the query
  22445. new rows, fields;
  22446. cache_get_data(rows, fields);
  22447. printf("rows: %d, fields: %d", rows, fields);
  22448. if(!rows)
  22449. {
  22450. SendClientMessage(playerid, COLOR_GREY, "Invalid order ID.");
  22451. }
  22452. else
  22453. {
  22454. new orderid[7];
  22455. new name[30];
  22456. new quantity[5];
  22457. cache_get_row(0, 0, orderid);
  22458. SendClientMessage(playerid, COLOR_WHITE, "Purchase Information:");
  22459. format(str, sizeof(str), "Order id: %d", strval(orderid));
  22460. SendClientMessage(playerid, COLOR_GREY, str);
  22461. for(new i = 0; i < rows; i++)
  22462. {
  22463. cache_get_row(i, 1, name);
  22464. cache_get_row(i, 2, quantity);
  22465. format(str, sizeof(str), "Purchase: %s | Quantity: %d", name, strval(quantity));
  22466. SendClientMessage(playerid, COLOR_GREY, str);
  22467. }
  22468. }
  22469. return;
  22470. }
  22471. forward onProcessOrder(playerid, ccinc);
  22472. public onProcessOrder(playerid, ccinc)
  22473. {
  22474. queryballance--;
  22475. checkcinc
  22476. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The order has been processed, use /checkorderinfo to verify it.");
  22477. return;
  22478. }
  22479. forward onEmptyQuery(playerid, ccinc);
  22480. public onEmptyQuery(playerid, ccinc)
  22481. {
  22482. queryballance--;
  22483. checkcinc
  22484. return;
  22485. }
  22486. public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
  22487. {
  22488. switch(errorid)
  22489. {
  22490. case CR_SERVER_GONE_ERROR:
  22491. {
  22492. printf("Lost connection to server, trying reconnect...");
  22493. mysql_reconnect(connectionHandle);
  22494. }
  22495. case ER_SYNTAX_ERROR:
  22496. {
  22497. printf("Something is wrong in your syntax, query: %s", query);
  22498. }
  22499. }
  22500. Log:warning("SQLError", "errorid: %d, error: %s", errorid, error);
  22501. printf("OnQueryError: errorid: %d, error: %s, callback: %s, query: %s, connectionHandle: %d", errorid, error, callback, query, connectionHandle);
  22502. return 1;
  22503. }
  22504. forward FixPlayerRadio(playerid);
  22505. public FixPlayerRadio(playerid)
  22506. {
  22507. if(IsPlayerConnected(playerid))
  22508. {
  22509. PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  22510. SetTimerEx("Timer_EnablePlayerRadio", 2000, false, "i", playerid);
  22511. }
  22512. return 1;
  22513. }
  22514. Timer:EnablePlayerRadio(playerid)
  22515. {
  22516. if(IsPlayerConnected(playerid))
  22517. {
  22518. PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
  22519. }
  22520. return 1;
  22521. }
  22522. // Disband a family when max. amount of strikes is reached
  22523. stock StrikeDisband(famToDisband) {
  22524. new str[128];
  22525. format(str, sizeof(str), "{FF6347}SERVER: Family '%s' was disbanded for reaching the maximum amount of strikes.", FamilyInfo[famToDisband][FamilyName]);
  22526. SendClientMessageToAll(COLOR_WHITE, str);
  22527. DestroyDynamicPickup(FamilyInfo[famToDisband][PickupID]);
  22528. ClearFamily(famToDisband);
  22529. SaveFamilies();
  22530. return 1;
  22531. }
  22532. // Calculates the date after a certain interval of days //
  22533. /*GetDateAfterInterval(fromDay, fromMonth, fromYear, interval, &toDay, &toMonth, &toYear){
  22534. new days;
  22535. toDay = fromDay;
  22536. toMonth = fromMonth;
  22537. toYear = fromYear;
  22538. while(interval > 0){
  22539. toDay += interval;
  22540. days = GetDaysFromMonth(toMonth, toYear);
  22541. if(toDay > days){
  22542. interval = (toDay - days);
  22543. toDay = 0;
  22544. toMonth++;
  22545. }
  22546. else
  22547. interval = 0;
  22548. if(toMonth>12){
  22549. toMonth = 1;
  22550. toYear++;
  22551. }
  22552. }
  22553. return;
  22554. }*/
  22555. // Calculates the difference in days from a certain date/month/year to a certain date/month/year
  22556. GetDaysDifference(fromDay, fromMonth, fromYear, toDay, toMonth, toYear){
  22557. new
  22558. bool:reverseCheck = false, // To check if variables need to be reversed or not
  22559. bool:i = true, // To run the loop
  22560. totalDays; // To store the sum of days
  22561. if(toYear < fromYear)
  22562. reverseCheck = true;
  22563. else if(toYear == fromYear){
  22564. if(toMonth < fromMonth){
  22565. reverseCheck = true;
  22566. }
  22567. else if(toMonth == fromMonth){
  22568. if(toDay < fromDay)
  22569. reverseCheck = true;
  22570. }
  22571. }
  22572. if(reverseCheck){
  22573. new
  22574. tempDay,
  22575. tempMonth,
  22576. tempYear;
  22577. tempDay = fromDay; fromDay = toDay; toDay = tempDay;
  22578. tempMonth = fromMonth; fromMonth = toMonth; toMonth = tempMonth;
  22579. tempYear = fromYear; fromYear = toYear; toYear = tempYear;
  22580. }
  22581. for(new year = fromYear, month = fromMonth; year <= toYear; year++){
  22582. while(i){
  22583. totalDays += GetDaysFromMonth(month, year);
  22584. month++;
  22585. if(month > 12){
  22586. month = 1;
  22587. break;
  22588. }
  22589. if(year >= toYear && month > toMonth)
  22590. break;
  22591. }
  22592. if(month >= toMonth)
  22593. break;
  22594. }
  22595. totalDays = (totalDays - fromDay) - (GetDaysFromMonth(toMonth, toYear) - toDay);
  22596. if(!reverseCheck)
  22597. return totalDays;
  22598. else
  22599. return -totalDays;
  22600. }
  22601. // Returns the number of days in a month for a specific year //
  22602. GetDaysFromMonth(month, year){
  22603. switch(month){
  22604. case 1, 3, 5, 7, 8, 10, 12: return 31;
  22605. case 4, 6, 9, 11: return 30;
  22606. case 2:{
  22607. if(year%4 == 0)
  22608. return 29;
  22609. else
  22610. return 28;
  22611. }
  22612. default: return 0;
  22613. }
  22614. return 1;
  22615. }
  22616. // Checks if a date is a valid date or not //
  22617. IsValidDate(day, month, year){
  22618. new _day = GetDaysFromMonth(month, year);
  22619. if(
  22620. !(0<day<=_day) ||
  22621. !(0<month<=12) ||
  22622. year < 2000
  22623. )
  22624. return 0;
  22625. return 1;
  22626. }
  22627. stock isEndOfWeek() {
  22628. new const
  22629. day = 1, // These are constant variables
  22630. month = 1, // The days of the week will be calculated from this offset
  22631. year = 2000,
  22632. weekEnd[] = {0, 1, 6}; // Integers which define weekends. Sat - 0, Sun - 1, Fri - 6
  22633. new toDay, toMonth, toYear, // Stores the current day, month, year
  22634. dayOfTheWeek; // Stores the day of the week i.e. Saturday, Sunday etc
  22635. getdate(toYear, toMonth, toDay);
  22636. dayOfTheWeek = (GetDaysDifference(day, month, year, toDay, toMonth, toYear)%7);
  22637. for(new i = 0; i < sizeof(weekEnd); i++){
  22638. if(weekEnd[i] == dayOfTheWeek)
  22639. return true;
  22640. }
  22641. return false;
  22642. }
  22643. stock doubleEXPCheck() {
  22644. if(isEndOfWeek()) {
  22645. if(!DOUBLE_EXP_MODE) {
  22646. //enable double exp mode
  22647. SendClientMessageToAll(COLOR_LIGHTBLUE, "2x EXP bonus has been enabled.");
  22648. SendRconCommand("hostname [0.3.7/DL] Project Roleplay [2x EXP Bonus Weekend]");
  22649. DOUBLE_EXP_MODE = 1;
  22650. }
  22651. } else {
  22652. if(DOUBLE_EXP_MODE) {
  22653. //disable double exp mode
  22654. SendClientMessageToAll(COLOR_LIGHTBLUE, "2x EXP bonus has been disabled.");
  22655. SendRconCommand("hostname [0.3.7/DL] Project Roleplay");
  22656. DOUBLE_EXP_MODE = 0;
  22657. }
  22658. }
  22659. return 1;
  22660. }
  22661. forward OnNewbieCheck(playerid, playername[]);
  22662. public OnNewbieCheck(playerid, playername[])
  22663. {
  22664. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}That account doesn't exist.");
  22665. new str[128];
  22666. format(str, sizeof str, "Newbie Check: %s", playername);
  22667. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  22668. format(str, sizeof str, "Warnings: %d, Muted: %s, MuteTime: %d", cache_get_field_content_int(0, "NewbieWarns"), (cache_get_field_content_int(0, "NewbieMuted")) ? ("Yes") : ("No"), cache_get_field_content_int(0, "NewbieMutedTime"));
  22669. SendClientMessage(playerid, COLOR_WHITE, str);
  22670. return 1;
  22671. }
  22672. forward OnNewbieWarn(playerid, name[], reason[]);
  22673. public OnNewbieWarn(playerid, name[], reason[])
  22674. {
  22675. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}That account doesn't exist.");
  22676. new str[128];
  22677. format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s has newbie-warned %s due to abuse, reason: %s", PlayerICName(playerid), name, reason);
  22678. SendHelperMessage(COLOR_LIGHTRED, str, 1);
  22679. new query[128];
  22680. if(cache_get_field_content_int(0, "NewbieWarns")+1 >= 3) {
  22681. format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was muted from the newbie chat (received 3 warnings).", name);
  22682. SendHelperMessage(COLOR_LIGHTRED, str, 1);
  22683. mysql_format(sqlGameConnection, query, sizeof query, "UPDATE players SET NewbieWarns=NewbieWarns+1, NewbieMuted=1, NewbieMutedTime=0 WHERE Name='%e'", name);
  22684. }
  22685. else
  22686. {
  22687. mysql_format(sqlGameConnection, query, sizeof query, "UPDATE players SET NewbieWarns=NewbieWarns+1 WHERE Name='%e'", name);
  22688. }
  22689. mysql_pquery(sqlGameConnection, query, "", "");
  22690. return 1;
  22691. }
  22692. // BlueG's plugin doesn't allow us to execute multiple queries in a single query so unfournately we have to branch the queries out so
  22693. // we can deliver different messages if they are muted, unmuted, etc(otherwise we have no way of knowing if we just UPDATE it with an IF)
  22694. forward OnNewbieMute(playerid, time, name[]);
  22695. public OnNewbieMute(playerid, time, name[])
  22696. {
  22697. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}That account doesn't exist.");
  22698. new query[128];
  22699. new str[128];
  22700. if(cache_get_field_content_int(0, "NewbieMuted") == 0)
  22701. {
  22702. // mute the player
  22703. format(str, sizeof str, "{FF0000}HelperCmd{FFFFFF}: %s was muted from the newbie chat by %s", name, PlayerICName(playerid));
  22704. if(time > 0) format(str, sizeof str, "%s for %d hours.", str, time);
  22705. mysql_format(sqlGameConnection, query, 128, "UPDATE players SET NewbieMuted=1, NewbieMutedTime=%d WHERE Name='%e'", time, name);
  22706. }
  22707. else
  22708. {
  22709. // unmute the player
  22710. format(str, sizeof str, "{FF0000}HelperCmd{FFFFFF}: %s was unmuted from the newbie chat by %s", name, PlayerICName(playerid));
  22711. mysql_format(sqlGameConnection, query, 128, "UPDATE players SET NewbieMuted=0, NewbieMutedTime=0 WHERE Name='%e'", name);
  22712. }
  22713. SendHelperMessage(COLOR_WHITE, str, 1);
  22714. mysql_pquery(sqlGameConnection, query, "", "");
  22715. return 1;
  22716. }
  22717. forward OnNewbieWarnRemove(playerid, playername[]);
  22718. public OnNewbieWarnRemove(playerid, playername[])
  22719. {
  22720. if(cache_affected_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Either that account doesn't exist or it has no warnings.");
  22721. new str[128];
  22722. format(str, sizeof str, "{FF0000}HelperCmd{FFFFFF}: %s has removed the newbie-warning of %s.", PlayerICName(playerid), playername);
  22723. SendHelperMessage(COLOR_WHITE, str, 1);
  22724. return 1;
  22725. }
  22726. forward DisplayLicenses(fromPlayer, toPlayer);
  22727. public DisplayLicenses(fromPlayer, toPlayer) {
  22728. new bool:licenseFound = false;
  22729. new str[128];
  22730. // Drivers license
  22731. if(PlayerInfo[fromPlayer][pCarLicense]) {
  22732. format(str, sizeof(str), "[#DL%i San Andreas issued drivers license - %s]",
  22733. PlayerInfo[fromPlayer][pID] + 345,
  22734. PlayerICName(fromPlayer)
  22735. );
  22736. SendClientMessage(toPlayer, COLOR_YELLOW, str);
  22737. licenseFound = true;
  22738. }
  22739. // Sailing license
  22740. if(PlayerInfo[fromPlayer][pBoatLicense]) {
  22741. format(str, sizeof(str), "[#BL%i San Andreas issued sailing license - %s]",
  22742. PlayerInfo[fromPlayer][pID] + 993,
  22743. PlayerICName(fromPlayer)
  22744. );
  22745. SendClientMessage(toPlayer, COLOR_YELLOW, str);
  22746. licenseFound = true;
  22747. }
  22748. // Fishing license
  22749. if(PlayerInfo[fromPlayer][pFishLic]) {
  22750. format(str, sizeof(str), "[#FL%i San Andreas issued fishing license - %s]",
  22751. PlayerInfo[fromPlayer][pID] + 217,
  22752. PlayerICName(fromPlayer)
  22753. );
  22754. SendClientMessage(toPlayer, COLOR_YELLOW, str);
  22755. licenseFound = true;
  22756. }
  22757. // Weapon license
  22758. if(PlayerInfo[fromPlayer][pWeaponLicense]) {
  22759. format(str, sizeof(str), "[#WL%i San Andreas issued weapon license - %s]",
  22760. PlayerInfo[fromPlayer][pID] + 9902,
  22761. PlayerICName(fromPlayer)
  22762. );
  22763. SendClientMessage(toPlayer, COLOR_YELLOW, str);
  22764. licenseFound = true;
  22765. }
  22766. // Marijuana license
  22767. if(PlayerInfo[fromPlayer][pMarijuanaLicense]) {
  22768. format(str, sizeof(str), "[#ML%i San Andreas issued marijuana license - %s]",
  22769. PlayerInfo[fromPlayer][pID] + 872,
  22770. PlayerICName(fromPlayer)
  22771. );
  22772. SendClientMessage(toPlayer, COLOR_YELLOW, str);
  22773. licenseFound = true;
  22774. }
  22775. return licenseFound;
  22776. }
  22777. ShowHelpDialog(playerid) {
  22778. ShowPlayerDialog(playerid, 79, DIALOG_STYLE_LIST, "Help", "Account\nGeneral\nChat\nToggle\nBank\nJob\nFaction\nFamily\nOther\nBusiness\nGambling\nAdmin\nHelper\nDeveloper\nBeta Tester\nVIP\nCharacter\nGlobal Chat", "Ok", "Cancel");
  22779. return 1;
  22780. }
  22781. Timer:ADutyTimer2(playerid)
  22782. {
  22783. if(!IsPlayerConnected(playerid)) return 0;
  22784. if(ADutyTimer[playerid])
  22785. {
  22786. ADutyTimer[playerid] = false;
  22787. }
  22788. return 1;
  22789. }
  22790. stock GetMoveDirectionFromKeys(ud, lr)
  22791. {
  22792. new direction = 0;
  22793. if(lr < 0)
  22794. {
  22795. if(ud < 0) direction = 5;
  22796. else if(ud > 0) direction = 7;
  22797. else direction = 3;
  22798. }
  22799. else if(lr > 0)
  22800. {
  22801. if(ud < 0) direction = 6;
  22802. else if(ud > 0) direction = 8;
  22803. else direction = 4;
  22804. }
  22805. else if(ud < 0) direction = 1;
  22806. else if(ud > 0) direction = 2;
  22807. return direction;
  22808. }
  22809. stock MoveCamera(playerid)
  22810. {
  22811. new Float:FV[3], Float:CPNEW[3];
  22812. GetPlayerCameraPos(playerid, CPNEW[0], CPNEW[1], CPNEW[2]);
  22813. GetPlayerCameraFrontVector(playerid, FV[0], FV[1], FV[2]);
  22814. if(plNCData[playerid][ncAccelMul] <= 1) plNCData[playerid][ncAccelMul] += 0.03;
  22815. new Float:speed = playerMoveSpeed[playerid] * plNCData[playerid][ncAccelMul];
  22816. new Float:X, Float:Y, Float:Z;
  22817. GetNextCameraPosition(plNCData[playerid][ncMode], CPNEW, FV, X, Y, Z);
  22818. MovePlayerObject(playerid, plNCData[playerid][ncFlyObject], X, Y, Z, speed);
  22819. plNCData[playerid][ncLastMove] = GetTickCount();
  22820. return 1;
  22821. }
  22822. stock GetNextCameraPosition(move_mode, Float:CPNEW[3], Float:FV[3], &Float:X, &Float:Y, &Float:Z)
  22823. {
  22824. #define OFFSET_X (FV[0]*6000.0)
  22825. #define OFFSET_Y (FV[1]*6000.0)
  22826. #define OFFSET_Z (FV[2]*6000.0)
  22827. switch(move_mode)
  22828. {
  22829. case 1:
  22830. {
  22831. X = CPNEW[0] +OFFSET_X;
  22832. Y = CPNEW[1] +OFFSET_Y;
  22833. Z = CPNEW[2] +OFFSET_Z;
  22834. }
  22835. case 2:
  22836. {
  22837. X = CPNEW[0] -OFFSET_X;
  22838. Y = CPNEW[1] -OFFSET_Y;
  22839. Z = CPNEW[2] -OFFSET_Z;
  22840. }
  22841. case 3:
  22842. {
  22843. X = CPNEW[0] -OFFSET_Y;
  22844. Y = CPNEW[1] +OFFSET_X;
  22845. Z = CPNEW[2];
  22846. }
  22847. case 4:
  22848. {
  22849. X = CPNEW[0] +OFFSET_Y;
  22850. Y = CPNEW[1] -OFFSET_X;
  22851. Z = CPNEW[2];
  22852. }
  22853. case 7:
  22854. {
  22855. X = CPNEW[0] +(-OFFSET_X - OFFSET_Y);
  22856. Y = CPNEW[1] +(-OFFSET_Y + OFFSET_X);
  22857. Z = CPNEW[2] -OFFSET_Z;
  22858. }
  22859. case 8:
  22860. {
  22861. X = CPNEW[0] +(-OFFSET_X + OFFSET_Y);
  22862. Y = CPNEW[1] +(-OFFSET_Y - OFFSET_X);
  22863. Z = CPNEW[2] -OFFSET_Z;
  22864. }
  22865. case 5:
  22866. {
  22867. X = CPNEW[0] +(OFFSET_X - OFFSET_Y);
  22868. Y = CPNEW[1] +(OFFSET_Y + OFFSET_X);
  22869. Z = CPNEW[2] +OFFSET_Z;
  22870. }
  22871. case 6:
  22872. {
  22873. X = CPNEW[0] +(OFFSET_X + OFFSET_Y);
  22874. Y = CPNEW[1] +(OFFSET_Y - OFFSET_X);
  22875. Z = CPNEW[2] +OFFSET_Z;
  22876. }
  22877. }
  22878. }
  22879. stock CancelFlyMode(playerid)
  22880. {
  22881. flyingUsed[playerid] = false;
  22882. CancelEdit(playerid);
  22883. TogglePlayerSpectating(playerid, false);
  22884. DestroyPlayerObject(playerid, plNCData[playerid][ncFlyObject]);
  22885. plNCData[playerid][ncCameraMode] = 0;
  22886. SetPlayerPos(playerid, Fly_X[playerid], Fly_Y[playerid], Fly_Z[playerid]);
  22887. SetPlayerFacingAngle(playerid, Fly_A[playerid]);
  22888. return 1;
  22889. }
  22890. stock FlyMode(playerid)
  22891. {
  22892. new Float:X, Float:Y, Float:Z;
  22893. GetPlayerPos(playerid, X, Y, Z);
  22894. GetPlayerFacingAngle(playerid, Fly_A[playerid]);
  22895. plNCData[playerid][ncFlyObject] = CreatePlayerObject(playerid, 19300, X, Y, Z, 0.0, 0.0, 0.0);
  22896. TogglePlayerSpectating(playerid, true);
  22897. AttachCameraToPlayerObject(playerid, plNCData[playerid][ncFlyObject]);
  22898. flyingUsed[playerid] = true;
  22899. plNCData[playerid][ncCameraMode] = 1;
  22900. return 1;
  22901. }
  22902. forward onOHelpers(playerid);
  22903. public onOHelpers(playerid)
  22904. {
  22905. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline helpers to display.");
  22906. new memberstr[5000], lastlog[64], name[MAX_PLAYER_NAME];
  22907. format(memberstr, sizeof(memberstr), "Helper\t\tLastLogin\n");
  22908. for(new i = 0; i < cache_num_rows(); i++)
  22909. {
  22910. cache_get_field_content(i, "Name", name);
  22911. cache_get_field_content(i, "LastLogin", lastlog);
  22912. format(memberstr, sizeof(memberstr), "%s{FFFFFF}%s\t\t{FF3366}%s\n", memberstr, name, lastlog);
  22913. }
  22914. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Offline Helpers", memberstr, "Okay", "");
  22915. return 1;
  22916. }
  22917. forward onOTesters(playerid);
  22918. public onOTesters(playerid)
  22919. {
  22920. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline testers to display.");
  22921. new memberstr[5000], lastlog[64], name[MAX_PLAYER_NAME], treports;
  22922. format(memberstr, sizeof(memberstr), "Name\tCount\tLast Login\n");
  22923. for(new i = 0; i < cache_num_rows(); i++)
  22924. {
  22925. cache_get_field_content(i, "Name", name);
  22926. cache_get_field_content(i, "LastLogin", lastlog);
  22927. treports = cache_get_field_content_int(i, "TesterReports");
  22928. format(memberstr, sizeof(memberstr), "%s{FFFFFF}%s\t%d\t{FF3366}%s\n", memberstr, name, treports, lastlog);
  22929. }
  22930. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Offline Testers", memberstr, "Okay", "");
  22931. return 1;
  22932. }
  22933. forward onODev(playerid);
  22934. public onODev(playerid)
  22935. {
  22936. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline devs to display.");
  22937. new memberstr[5000], lastlog[64], name[MAX_PLAYER_NAME];
  22938. format(memberstr, sizeof(memberstr), "Name\tLast Log\n");
  22939. for(new i = 0; i < cache_num_rows(); i++)
  22940. {
  22941. cache_get_field_content(i, "Name", name);
  22942. cache_get_field_content(i, "LastLogin", lastlog);
  22943. format(memberstr, sizeof(memberstr), "%s{FFFFFF}%s\t%s{FF3366}\n", memberstr, name, lastlog);
  22944. }
  22945. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Offline Developers", memberstr, "Okay", "");
  22946. return 1;
  22947. }
  22948. forward onOmapper(playerid);
  22949. public onOmapper(playerid)
  22950. {
  22951. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline mappers to display.");
  22952. new memberstr[5000], lastlog[64], name[MAX_PLAYER_NAME];
  22953. format(memberstr, sizeof(memberstr), "Name\tLast Log\n");
  22954. for(new i = 0; i < cache_num_rows(); i++)
  22955. {
  22956. cache_get_field_content(i, "Name", name);
  22957. cache_get_field_content(i, "LastLogin", lastlog);
  22958. format(memberstr, sizeof(memberstr), "%s{FFFFFF}%s\t%s{FF3366}\n", memberstr, name, lastlog);
  22959. }
  22960. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Offline Mappers", memberstr, "Okay", "");
  22961. return 1;
  22962. }
  22963. forward onOAdmin(playerid);
  22964. public onOAdmin(playerid)
  22965. {
  22966. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline admins to display.");
  22967. new memberstr[5000], lastlog[64], name[MAX_PLAYER_NAME], adminlvl[64], arank;
  22968. format(memberstr, sizeof(memberstr), "Name\tAdmin Level\tLast Log\n");
  22969. for(new i = 0; i < cache_num_rows(); i++)
  22970. {
  22971. cache_get_field_content(i, "Name", name);
  22972. cache_get_field_content(i, "LastLogin", lastlog);
  22973. cache_get_field_content(i, "AdminLevel", adminlvl);
  22974. arank = strval(adminlvl);
  22975. format(memberstr, sizeof(memberstr), "%s{FFFFFF}%s\t%d\t%s{FF3366}\n", memberstr, name, arank, lastlog);
  22976. }
  22977. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Offline Administrators", memberstr, "Okay", "");
  22978. return 1;
  22979. }
  22980. forward onOMembers(playerid);
  22981. public onOMembers(playerid)
  22982. {
  22983. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline members to display.");
  22984. new memberstr[10000], lastlog[64], name[MAX_PLAYER_NAME], leader, recruiter, playerfrank;
  22985. for(new i = 0; i < cache_num_rows(); i++)
  22986. {
  22987. new temp[10];
  22988. cache_get_field_content(i, "Name", name);
  22989. cache_get_field_content(i, "LastLogin", lastlog);
  22990. cache_get_field_content(i, "Rank", temp);
  22991. playerfrank = strval(temp);
  22992. cache_get_field_content(i, "Leader", temp);
  22993. leader = strval(temp);
  22994. cache_get_field_content(i, "Recruiter", temp);
  22995. recruiter = strval(temp);
  22996. if(leader >= 1 && recruiter == 0) format(memberstr, sizeof(memberstr), "%s{3366FF}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  22997. else if(recruiter >= 1 && leader == 0) format(memberstr, sizeof(memberstr), "%s{a3995b}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  22998. else if(recruiter >= 1 && leader >= 1) format(memberstr, sizeof(memberstr), "%s{3366FF}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  22999. else format(memberstr, sizeof(memberstr), "%s{FFFF00}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  23000. }
  23001. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "Offline Members", memberstr, "Okay", "");
  23002. return 1;
  23003. }
  23004. forward onOFMembers(playerid);
  23005. public onOFMembers(playerid)
  23006. {
  23007. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_WHITE, "No offline members to display.");
  23008. new memberstr[10000], lastlog[64], name[MAX_PLAYER_NAME], playerfrank;
  23009. for(new i = 0; i < cache_num_rows(); i++)
  23010. {
  23011. new temp[10];
  23012. cache_get_field_content(i, "Name", name);
  23013. cache_get_field_content(i, "LastLogin", lastlog);
  23014. cache_get_field_content(i, "Rank", temp);
  23015. playerfrank = strval(temp);
  23016. format(memberstr, sizeof(memberstr), "%s{3366FF}%s (%d)\t\t{FFFFFF}%s\n", memberstr, name, playerfrank, lastlog);
  23017. }
  23018. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "Offline Members", memberstr, "Okay", "");
  23019. return 1;
  23020. }
  23021. forward OnOfflineSeizeFunds(playerid, seizePlayer[], seizeAmount, seizeReason[]);
  23022. public OnOfflineSeizeFunds(playerid, seizePlayer[], seizeAmount, seizeReason[])
  23023. {
  23024. if(cache_num_rows() != 1)
  23025. return SendClientMessage(playerid, COLOR_GREY, "That account does not exist.");
  23026. new currentBankBalance = cache_get_field_content_int(0, "Bank");
  23027. new str[128];
  23028. if(currentBankBalance < seizeAmount) {
  23029. format(str, sizeof(str), "* You can currently not seize the full amount ($%s) from %s.", AddThousandsSeparators(seizeAmount), seizePlayer);
  23030. SendClientMessage(playerid, COLOR_GREY, str);
  23031. format(str, sizeof(str), "* %s only has $%s in their bank account.", seizePlayer, AddThousandsSeparators(currentBankBalance));
  23032. SendClientMessage(playerid, COLOR_GREY, str);
  23033. return 1;
  23034. }
  23035. new query[128];
  23036. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Bank` = %i WHERE `Name` = '%e' LIMIT 1", currentBankBalance - seizeAmount, seizePlayer);
  23037. mysql_pquery(sqlGameConnection, query);
  23038. GiveMoney(playerid, seizeAmount);
  23039. SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________________________");
  23040. format(str, sizeof(str), "* You have successfully seized $%s from %s's bank account.", AddThousandsSeparators(seizeAmount), seizePlayer);
  23041. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23042. format(str, sizeof(str), "* Reason: '%s'", seizeReason);
  23043. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23044. format(str, sizeof(str), "Previous balance: $%s", AddThousandsSeparators(currentBankBalance));
  23045. SendClientMessage(playerid, COLOR_GREY, str);
  23046. format(str, sizeof(str), "New balance: $%s", AddThousandsSeparators(currentBankBalance - seizeAmount));
  23047. SendClientMessage(playerid, COLOR_GREY, str);
  23048. SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________________________");
  23049. return 1;
  23050. }
  23051. public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
  23052. {
  23053. if(newstate) GameTextForPlayer(playerid, "~W~Siren ~G~on", 1000, 3);
  23054. else GameTextForPlayer(playerid, "~W~Siren ~r~off", 1000, 3);
  23055. return 1;
  23056. }
  23057. /* Sector 9 commands and functions compiled and most scripted by Avery. EDIT: moved to commands.inc by Desmond */
  23058. // Quick fix needs to be scripted properly with own enum
  23059. Timer:UseAdmCmd(playerid)
  23060. {
  23061. if(!IsPlayerConnected(playerid)) return 0;
  23062. if(UseAdmCmdTimer[playerid])
  23063. {
  23064. UseAdmCmdTimer[playerid] = 0;
  23065. }
  23066. return 1;
  23067. }
  23068. stock isAnyoneSpecingTarget(playerid)
  23069. {
  23070. foreach( new i: Player )
  23071. {
  23072. if(SpectatingID[i] == SpectatingID[playerid] && i != playerid) //another player is spectating the same player as me
  23073. {
  23074. return 1;
  23075. }
  23076. }
  23077. return 0;
  23078. }
  23079. stock unspec(playerid)
  23080. {
  23081. SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  23082. SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  23083. SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  23084. SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
  23085. SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
  23086. SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  23087. TogglePlayerSpectating(playerid, 0);
  23088. ResetPlayerAdminWeaponsEx(playerid);
  23089. /* Spectate textdraws hide */
  23090. HideSpectateTextDraws(playerid);
  23091. //need to check if no other admins are specing the target before reseting the variable
  23092. new found_spectator = isAnyoneSpecingTarget(playerid);
  23093. if(!found_spectator) //if nobody else was specing them, set their var to 0
  23094. {
  23095. Spectated[SpectatingID[playerid]] = 0; //set their
  23096. }
  23097. new str[128];
  23098. foreach(new i: Player)
  23099. {
  23100. if(SpectatingID[playerid] == i)
  23101. {
  23102. format(str, sizeof(str), "AdmCMD: %s has stopped spectating you.", PlayerOOCName(playerid));
  23103. if(PlayerInfo[playerid][pAdmin] <= PlayerInfo[i][pAdmin]) SendClientMessage(i, COLOR_YELLOW, str);
  23104. }
  23105. }
  23106. beingSpectatedID[SpectatingID[playerid]] = INVALID_PLAYER_ID;
  23107. SpectatingID[playerid] = INVALID_PLAYER_ID;
  23108. SpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
  23109. HidePM[playerid] = 0;
  23110. PhoneOffline[playerid] = 0;
  23111. SendClientMessage(playerid, COLOR_WHITE, "You are no longer spectating.");
  23112. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  23113. return 1;
  23114. }
  23115. stock spectate(playerid, giveplayerid)
  23116. {
  23117. if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) //if i am is not already specing someone
  23118. {
  23119. PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
  23120. PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
  23121. GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  23122. GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  23123. GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
  23124. GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
  23125. }
  23126. else
  23127. {
  23128. //need to check if no other admins are specing the target before reseting the variable
  23129. new found_spectator = isAnyoneSpecingTarget(playerid);
  23130. if(!found_spectator) //if nobody else was the old target, set their var to 0
  23131. {
  23132. Spectated[SpectatingID[playerid]] = 0; //set their
  23133. }
  23134. }
  23135. /* Spectate textdraw */
  23136. ShowSpectateTextDraws(playerid, giveplayerid);
  23137. SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
  23138. SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
  23139. TogglePlayerSpectating(playerid, 1);
  23140. Spectated[giveplayerid] = 1;
  23141. beingSpectatedID[giveplayerid] = playerid;
  23142. SpectatingID[playerid] = giveplayerid;
  23143. HidePM[playerid] = 1;
  23144. PhoneOffline[playerid] = 1;
  23145. new str[128];
  23146. if(PlayerInfo[playerid][pAdmin] <= PlayerInfo[giveplayerid][pAdmin])
  23147. {
  23148. format(str, sizeof(str), "AdmCMD: %s is spectating you.", PlayerOOCName(playerid));
  23149. SendClientMessage(giveplayerid, COLOR_YELLOW, str);
  23150. }
  23151. if(pDeathState[giveplayerid] == PLAYER_STATE_REVIVE)
  23152. {
  23153. SendClientMessage(playerid, COLOR_YELLOW, "That player is currently injured in the revive mode, so if they're floating they're not hacking.");
  23154. }
  23155. if(UsingSate[giveplayerid]) {
  23156. SendClientMessage(playerid, COLOR_YELLOW, "That player is currently using /sate, so if they're floating they're not hacking.");
  23157. }
  23158. new Float:health, Float:armor, name[MAX_PLAYER_NAME];
  23159. GetPlayerICName(giveplayerid, name, sizeof(name));
  23160. GetPlayerHealth(giveplayerid, health);
  23161. GetPlayerArmour(giveplayerid, armor);
  23162. if(!IsPlayerInAnyVehicle(giveplayerid))
  23163. {
  23164. format(str, sizeof(str), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~health:%.1f armor:%.1f", name, giveplayerid, health, armor);
  23165. GameTextForPlayer(playerid, str, 2500, 3);
  23166. PlayerSpectatePlayer(playerid, giveplayerid);
  23167. SpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
  23168. }
  23169. else
  23170. {
  23171. GetVehicleHealth(GetPlayerVehicleID(giveplayerid), health);
  23172. format(str, sizeof(str), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~veh health:%.1f armor:%.1f", name, giveplayerid, health, armor);
  23173. GameTextForPlayer(playerid, str, 2500, 3);
  23174. PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid));
  23175. SpectateType[playerid] = ADMIN_SPEC_TYPE_VEHICLE;
  23176. }
  23177. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  23178. return 1;
  23179. }
  23180. forward onLastLogin(playerid, name[]);
  23181. public onLastLogin(playerid, name[])
  23182. {
  23183. new str[128];
  23184. new rows, fields, lastlogin[64];
  23185. cache_get_data(rows, fields);
  23186. if(!rows) return SendClientMessage(playerid, COLOR_WHITE, "That account doesn't exist.");
  23187. cache_get_field_content(0, "LastLogin", lastlogin);
  23188. format(str, sizeof(str), "%s last logged in game on %s", name, lastlogin);
  23189. SendClientMessage(playerid, COLOR_WHITE, str);
  23190. return 1;
  23191. }
  23192. stock AddWarn(PlayerSQLID, AdminName[], Date[], Reason[], giveplayerid, playerid)
  23193. {
  23194. new str[128];
  23195. new query[500], Cache:sqlresults, rows, fields;
  23196. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM warnings WHERE PlayerID = %i AND Active = 1", PlayerSQLID);
  23197. sqlresults = mysql_query(sqlGameConnection, query);
  23198. cache_get_data(rows, fields, sqlGameConnection);
  23199. if(rows >= 3)//AutoBan
  23200. {
  23201. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `warnings` (`PlayerID`, `AdminName`, `Date`, `Reason`, `Active`) VALUES('%i', '%e', '%e', '%e' , 1)", PlayerInfo[giveplayerid][pID], PlayerName(playerid), Date, Reason);
  23202. mysql_pquery(sqlGameConnection, query);
  23203. printf(query);
  23204. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by %s (had 3 warnings), reason: %s", PlayerName(giveplayerid), AdminName, Reason);
  23205. SendClientMessageToAll(COLOR_WHITE, str);
  23206. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE warnings SET Active = 0 WHERE PlayerID = %i;", PlayerInfo[giveplayerid][pID]);
  23207. mysql_pquery(sqlGameConnection, query);
  23208. new banreason[30];
  23209. format(banreason, sizeof(banreason), "had 3 warnings.");
  23210. BanAccount(giveplayerid, playerid, banreason); //log before banning the account
  23211. return 1;
  23212. }
  23213. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `warnings` (`PlayerID`, `AdminName`, `Date`, `Reason`, `Active`) VALUES('%i', '%e', '%e', '%e' , 1)", PlayerInfo[giveplayerid][pID], PlayerName(playerid), Date, Reason);
  23214. mysql_pquery(sqlGameConnection, query);
  23215. printf(query);
  23216. format(str, sizeof(str), "You warned %s, reason: %s", PlayerOOCName(giveplayerid), Reason);
  23217. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  23218. SendClientMessage(giveplayerid, COLOR_LIGHTRED, "Your warnings have been adjusted, /warns to see your warnings.");
  23219. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has warned %s, reason: %s", PlayerOOCName(playerid), PlayerOOCName(giveplayerid), Reason);
  23220. ABroadCast(COLOR_WHITE, str, 1);
  23221. cache_delete(Cache:sqlresults, sqlGameConnection);
  23222. return 1;
  23223. }
  23224. stock oAddWarn(PlayerSQLID, AdminName[], Date[], Reason[], playerid, name[])
  23225. {
  23226. new query[500], Cache:sqlresults, rows, fields;
  23227. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM warnings WHERE PlayerID = %i AND Active = 1", PlayerSQLID);
  23228. sqlresults = mysql_query(sqlGameConnection, query);
  23229. cache_get_data(rows, fields, sqlGameConnection);
  23230. if(rows >= 3)//AutoBan
  23231. {
  23232. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `warnings` (`PlayerID`, `AdminName`, `Date`, `Reason`, `Active`) VALUES('%i', '%e', '%e', '%e' , 1)", PlayerSQLID, AdminName, Date, Reason);
  23233. mysql_pquery(sqlGameConnection, query);
  23234. printf(query);
  23235. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE warnings SET Active = 0 WHERE PlayerID = %i;", PlayerSQLID);
  23236. mysql_pquery(sqlGameConnection, query);// ADD BAN
  23237. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
  23238. new temp[40];
  23239. format(temp, sizeof(temp), "reached 3 warnings");
  23240. mysql_pquery(sqlGameConnection, query, "OnBanAccount", "iss", playerid, name, temp);
  23241. return 1;
  23242. }
  23243. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `warnings` (`PlayerID`, `AdminName`, `Date`, `Reason`, `Active`) VALUES('%i', '%e', '%e', '%e' , 1)", PlayerSQLID, AdminName, Date, Reason);
  23244. mysql_pquery(sqlGameConnection, query);
  23245. printf(query);
  23246. new str[128];
  23247. format(str, sizeof(str), "You warned %s, reason: %s", name, Reason);
  23248. SendClientMessage(playerid, COLOR_LIGHTRED, str);
  23249. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has offline-warned %s, reason: %s", AdminName, name, Reason);
  23250. ABroadCast(COLOR_WHITE, str, 1);
  23251. cache_delete(Cache:sqlresults, sqlGameConnection);
  23252. return 1;
  23253. }
  23254. forward checkplayerid(playerid, name[]);
  23255. public checkplayerid(playerid, name[])
  23256. {
  23257. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23258. new sqlid = cache_get_field_content_int(0, "ID");
  23259. mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "SELECT WarnID, PlayerID, AdminName, Date, Reason, Active FROM warnings WHERE PlayerID = %d ORDER BY `DATE` DESC", sqlid);
  23260. mysql_pquery(sqlGameConnection, sqlstring, "oCheckWarns", "is", playerid, name);
  23261. return 1;
  23262. }
  23263. forward oCheckWarns(playerid, name[]);
  23264. public oCheckWarns(playerid, name[])
  23265. {
  23266. new AdminName[MAX_PLAYER_NAME], Date[40], Reason[50], WarnID, Active, results[5000];
  23267. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GRAD2, "That player has no warnings");
  23268. format(results, sizeof(results), "Warning ID\tDate\tGiven By\tReason\n");
  23269. for(new i = 0; i < cache_num_rows(); i++)
  23270. {
  23271. WarnID = cache_get_field_content_int(i, "WarnID");
  23272. cache_get_field_content(i, "AdminName", AdminName);
  23273. cache_get_field_content(i, "Date", Date);
  23274. cache_get_field_content(i, "Reason", Reason);
  23275. Active = cache_get_field_content_int(i, "Active");
  23276. if(!Active) format(results, sizeof(results), "%s{FF6347}%i{FF6347}\t{FF6347}%s\t{FF6347}%s\t{FF6347}%s\n", results, WarnID, Date, AdminName, Reason);
  23277. else format(results, sizeof(results), "%s{9ACD32}%i\t{9ACD32}%s\t{9ACD32}%s\t{9ACD32}%s\n", results, WarnID, Date, AdminName, Reason);
  23278. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Warnings", results, "Ok", "");
  23279. }
  23280. return 1;
  23281. }
  23282. forward CheckWarns(playerid);
  23283. public CheckWarns(playerid)
  23284. {
  23285. new AdminName[MAX_PLAYER_NAME], Date[40], Reason[50], WarnID, Active, results[5000];
  23286. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GRAD2, "You have no warnings");
  23287. format(results, sizeof(results), "Warning ID\tDate\tGiven By\tReason\n");
  23288. for(new i = 0; i < cache_num_rows(); i++)
  23289. {
  23290. WarnID = cache_get_field_content_int(i, "WarnID");
  23291. cache_get_field_content(i, "AdminName", AdminName);
  23292. cache_get_field_content(i, "Date", Date);
  23293. cache_get_field_content(i, "Reason", Reason);
  23294. Active = cache_get_field_content_int(i, "Active");
  23295. if(!Active) format(results, sizeof(results), "%s{FF6347}%i{FF6347}\t{FF6347}%s\t{FF6347}%s\t{FF6347}%s\n", results, WarnID, Date, AdminName, Reason);
  23296. else format(results, sizeof(results), "%s{9ACD32}%i\t{9ACD32}%s\t{9ACD32}%s\t{9ACD32}%s\n", results, WarnID, Date, AdminName, Reason);
  23297. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Warnings", results, "Ok", "");
  23298. }
  23299. return 1;
  23300. }
  23301. stock GetPlayerCount()
  23302. {
  23303. new amount =0;
  23304. for(new i =0; i <MAX_PLAYERS; i++)
  23305. {
  23306. if(IsPlayerConnected(i))
  23307. {
  23308. amount++;
  23309. }
  23310. }
  23311. return amount;
  23312. }
  23313. stock KickEx(playerid)
  23314. {
  23315. SetTimerEx("Timer_KickPlayer", 1000, 0, "i", playerid);
  23316. return 1;
  23317. }
  23318. Timer:KickPlayer(playerid)
  23319. {
  23320. Kick(playerid);
  23321. }
  23322. stock BanExx(playerid)
  23323. {
  23324. SetTimerEx("Timer_BanPlayer", 1000, 0, "i", playerid);
  23325. }
  23326. Timer:BanPlayer(playerid)
  23327. {
  23328. Ban(playerid);
  23329. }
  23330. forward onDisableAccount(playerid, name[]);
  23331. public onDisableAccount(playerid, name[])
  23332. {
  23333. new dswitch;
  23334. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23335. new adminlevel = cache_get_field_content_int(0, "AdminLevel");
  23336. if(adminlevel >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} you cannot disable accounts belonging to equal or higher administrators.");
  23337. new disabled = cache_get_field_content_int (0, "Disabled");
  23338. new str[128];
  23339. if(disabled == 0)
  23340. {
  23341. dswitch = 1;
  23342. format(str, sizeof(str), "* You have disabled %s's account.", name);
  23343. }
  23344. else
  23345. {
  23346. dswitch = 0;
  23347. format(str, sizeof(str), "* You have undisabled %s's account.", name);
  23348. }
  23349. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23350. new query[128];
  23351. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Disabled` = %d WHERE `name`='%e'", dswitch, name);
  23352. mysql_pquery(sqlGameConnection, query);
  23353. return 1;
  23354. }
  23355. Timer:FamMuteTime(playerid)
  23356. {
  23357. famMutedTime[playerid] -= 1;
  23358. if(famMutedTime[playerid] < 0)
  23359. {
  23360. famMuted[playerid] = false;
  23361. KillTimer(muteTimer[playerid]);
  23362. }
  23363. return 1;
  23364. }
  23365. forward OnGetIP(playerid, playername[]);
  23366. public OnGetIP(playerid, playername[])
  23367. {
  23368. if(cache_num_rows() != 1) return OnINIGetIP(playerid, playername); //if SQL doesn't exist try ini
  23369. new str[128];
  23370. new IP[16];
  23371. cache_get_field_content(0, "IP", IP);
  23372. format(str, sizeof(str), "%s's IP: %s", playername, IP);
  23373. SendClientMessage(playerid, COLOR_WHITE, str);
  23374. return 1;
  23375. }
  23376. forward OnINIGetIP(playerid, playername[]);
  23377. public OnINIGetIP(playerid, playername[])
  23378. {
  23379. new
  23380. getip[256];
  23381. new str[128];
  23382. format(str, sizeof(str), "%s.ini", playername);
  23383. if(dini_Exists(str))
  23384. {
  23385. getip = dini_Get(str, "IP");
  23386. format(str, sizeof(str), "%s's IP: %s", playername, getip);
  23387. SendClientMessage(playerid, COLOR_WHITE, str);
  23388. return 1;
  23389. }
  23390. else
  23391. {
  23392. SendClientMessage(playerid, COLOR_GRAD2, "That player does not exist.");
  23393. }
  23394. return 1;
  23395. }
  23396. forward OnGetSerial(playerid, name[]);
  23397. public OnGetSerial(playerid, name[])
  23398. {
  23399. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23400. new Serial[128];
  23401. new str[128];
  23402. cache_get_field_content(0, "Serial", Serial, sqlGameConnection, sizeof(Serial));
  23403. format(str, sizeof(str), "%s's serial: %s", name, Serial);
  23404. SendClientMessage(playerid, COLOR_WHITE, str);
  23405. return 1;
  23406. }
  23407. forward OnGetSQLID(playerid, name[]);
  23408. public OnGetSQLID(playerid, name[])
  23409. {
  23410. if(cache_num_rows() != 1)
  23411. return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23412. new
  23413. sqlid;
  23414. sqlid = cache_get_field_content_int(0, "ID");
  23415. new str[128];
  23416. format(str, sizeof(str), "%s's mySQL row ID: %d", name, sqlid);
  23417. SendClientMessage(playerid, COLOR_WHITE, str);
  23418. return 1;
  23419. }
  23420. forward OnGetBanReason(playerid, playername[]);
  23421. public OnGetBanReason(playerid, playername[])
  23422. {
  23423. if(cache_num_rows() != 1) return 1;
  23424. new reason[128], sqlID;
  23425. cache_get_field_content(0, "BanReason", reason);
  23426. sqlID = cache_get_field_content_int(0, "ID");
  23427. new str[128];
  23428. if(!strmatch(reason, "")) // if reason is null don't send that string
  23429. {
  23430. format(str, sizeof(str), "PlayerInfo: %s - %s", playername, reason);
  23431. SendClientMessage(playerid, COLOR_WHITE, str);
  23432. }
  23433. new query[128];
  23434. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Reason`, `Date` FROM `banlist` WHERE `userID` = %d AND `Banned` = 1 LIMIT 1", sqlID);
  23435. mysql_pquery(sqlGameConnection, query, "OnGetBanReasonNew", "iis", playerid, sqlID, playername);
  23436. return 1;
  23437. }
  23438. forward OnGetBanReasonNew(playerid, sqlID, playername[]);
  23439. public OnGetBanReasonNew(playerid, sqlID, playername[])
  23440. {
  23441. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GRAD1, "That account isn't banned via the sql banlist.");
  23442. new reason[128], date[128];
  23443. cache_get_field_content(0, "Reason", reason);
  23444. cache_get_field_content(0, "Date", date);
  23445. new str[128];
  23446. format(str, sizeof(str), "Banlist: %s [sqlID: %d] - %s", playername, sqlID, reason);
  23447. SendClientMessage(playerid, COLOR_WHITE, str);
  23448. format(str, sizeof(str), "Banned on %s", date);
  23449. SendClientMessage(playerid, COLOR_WHITE, str);
  23450. return 1;
  23451. }
  23452. forward OnOPrison(name[], time, reason[], playerid);
  23453. public OnOPrison(name[], time, reason[], playerid)
  23454. {
  23455. if(cache_num_rows() != 1) return 1;
  23456. new str[128];
  23457. format(str, sizeof(str), "{FF6347}SERVER: %s has been offline-prisoned by an Admin, Reason: %s", name, reason);
  23458. SendClientMessageToAll(COLOR_WHITE, str);
  23459. new query[390], adminprisoned[24];
  23460. adminprisoned = PlayerICName(playerid);
  23461. {
  23462. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Gun0`= 0,`Gun1`= 0,`Gun2`= 0, `Gun3`= 0, `Gun4`= 0, `Gun5`= 0, `Gun6`= 0, `Gun7`= 0, `Gun8`= 0, `Gun9`= 0, `Gun10`= 0, `Gun11`= 0, `Gun12`= 0, `WantedLevel` = 0, `Jailed` = 3, `AdminJailed` = 1, `JailTime` = %i, `PrisonReason` = '%e', `PrisonedBy` = '%e' WHERE `name`='%e' LIMIT 1", (time * 60), reason, adminprisoned, name);
  23463. mysql_pquery(sqlGameConnection, query);
  23464. }
  23465. SavePrison(name, PlayerName(playerid), reason, time);
  23466. return 1;
  23467. }
  23468. stock NameChangeLog(OldName[], NewName[], ApprovedBy[], pIDAdmin, pIDPlayer)
  23469. {
  23470. new query[200], day, month, year, hour, minute, second, dstr[40];
  23471. gettime(hour, minute, second);
  23472. getdate(year, month, day);
  23473. format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  23474. printf(dstr);
  23475. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `namechanges` (`OldName`, `NewName`, `ApprovedBy`, `Date`, `pID`, `pIDAdmin`) VALUES('%e', '%e', '%e', '%e', '%i' ,'%i')", OldName, NewName, ApprovedBy, dstr, pIDPlayer, pIDAdmin);
  23476. mysql_pquery(sqlGameConnection, query);
  23477. return 1;
  23478. }
  23479. stock SavePrison(userName[], adminName[], reason[], minutes){
  23480. new query[200], day, month, year, hour, minute, second, dstr[40];
  23481. gettime(hour, minute, second);
  23482. getdate(year, month, day);
  23483. format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  23484. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `prisons` (`User`, `Admin`, `Reason`, `Time`, `Date`) VALUES('%e', '%e', '%e', %d, '%e')", userName, adminName, reason, minutes, dstr);
  23485. mysql_pquery(sqlGameConnection, query);
  23486. return 1;
  23487. }
  23488. forward onPrisonChecks(playerid);
  23489. public onPrisonChecks(playerid){
  23490. if(cache_num_rows() == 0)return SendClientMessage(playerid, COLOR_GREY, "There are no prisons to show for this player.");
  23491. new rows, fields, dstr[1024], player[24], admin[24], reason[128], date[128], time;
  23492. cache_get_data(rows, fields);
  23493. format(dstr, sizeof(dstr), "Admin\t\tReason\t\tLength\t\tDate\n");
  23494. for(new i = 0; i < rows; i++)
  23495. {
  23496. cache_get_field_content(i, "User", player);
  23497. cache_get_field_content(i, "Admin", admin);
  23498. cache_get_field_content(i, "Reason", reason);
  23499. time = cache_get_field_content_int(i, "Time");
  23500. cache_get_field_content(i, "Date", date);
  23501. format(dstr, sizeof(dstr), "%s%s\t\t%s\t\t%d minutes\t\t%s\n", dstr, admin, reason, time, date);
  23502. }
  23503. new headerstr[128];
  23504. format(headerstr, sizeof(headerstr), "Prison Record - %s", player);
  23505. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, headerstr, dstr, "Ok", "");
  23506. return 1;
  23507. }
  23508. forward onBansCheckedConf(playerid, name[]);
  23509. public onBansCheckedConf(playerid, name[]){
  23510. if(cache_num_rows() == 0)return SendClientMessage(playerid, COLOR_GREY, "There are no bans to show for this player.");
  23511. new rows, fields, dstr[1024], admin[24], reason[128];
  23512. cache_get_data(rows, fields);
  23513. format(dstr, sizeof(dstr), "Player\t\tAdmin\t\tReason\n");
  23514. for(new i = 0; i < rows; i++){
  23515. cache_get_field_content(i, "BannedBy", admin);
  23516. cache_get_field_content(i, "Reason", reason);
  23517. format(dstr, sizeof(dstr), "%s%s\t\t%s\t\t%s\n", dstr, name, admin, reason);
  23518. }
  23519. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Ban Record", dstr, "Ok", "");
  23520. return 1;
  23521. }
  23522. forward OnHTicket(playerid, name[]);
  23523. public OnHTicket(playerid, name[])
  23524. {
  23525. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23526. new query[128];
  23527. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `hTicket` = 1 WHERE `Name` = '%e' LIMIT 1", name);
  23528. mysql_pquery(sqlGameConnection, query);
  23529. new str[128];
  23530. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given a house ticket by %s.", name, PlayerICName(playerid));
  23531. ABroadCast(COLOR_LIGHTRED, str, 1);
  23532. return 1;
  23533. }
  23534. forward OnOPFine(playerid, name[], percent, reason[]);
  23535. public OnOPFine(playerid, name[], percent, reason[])
  23536. {
  23537. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23538. //Grab variables that we need...
  23539. new money = cache_get_field_content_int(0, "Money");
  23540. new bank = cache_get_field_content_int(0, "Bank");
  23541. new str[128];
  23542. // Work out the amount...
  23543. new tMoney = money + bank;
  23544. new PercentMoney = (tMoney / 100) * percent;
  23545. new sumMoney = floatround(PercentMoney);
  23546. if(tMoney <= 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already in debt.");
  23547. if(sumMoney <= 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already in debt.");
  23548. new query[128];
  23549. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Money` = `Money` - %d WHERE `Name` = '%e' LIMIT 1", sumMoney, name);
  23550. mysql_pquery(sqlGameConnection, query);
  23551. format(str, sizeof(str), "{FF6347}SERVER: %s has been offline-fined $%d by %s, reason: %s", name, sumMoney, PlayerICName(playerid), reason);
  23552. SendClientMessageToAll(COLOR_WHITE, str);
  23553. return 1;
  23554. }
  23555. forward OnOMakeAdmin(playerid, rank, name[]);
  23556. public OnOMakeAdmin(playerid, rank, name[])
  23557. {
  23558. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23559. new str[128];
  23560. new key = 1000 + random(8999);
  23561. format(str, sizeof(str), "You have made %s a level %d admin (Security key: %d)", name, rank, key);
  23562. if(rank <= 0)
  23563. {
  23564. format(str, sizeof(str), "You have removed %s from the admin team.", name);
  23565. key = 0;
  23566. rank = 0;
  23567. }
  23568. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23569. new query[128];
  23570. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `AdminLevel` = %d, `SecurityKey` = %d WHERE `Name` = '%e' LIMIT 1", rank, key, name);
  23571. mysql_pquery(sqlGameConnection, query);
  23572. return 1;
  23573. }
  23574. forward OSetSQL(playerid, rank, name[]);
  23575. public OSetSQL(playerid, rank, name[])
  23576. {
  23577. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23578. new str[128];
  23579. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23580. new query[128];
  23581. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `ID` = %d WHERE `Name` = '%e' LIMIT 1", rank, name);
  23582. mysql_pquery(sqlGameConnection, query);
  23583. return 1;
  23584. }
  23585. forward OnUnban(playerid, name[]);
  23586. public OnUnban(playerid, name[])
  23587. {
  23588. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23589. //if(cache_num_rows() != 1) return OnDiniUnban(playerid, name);
  23590. new string[128], ip[16], query[160];
  23591. cache_get_field_content(0, "IP", ip);
  23592. new band = cache_get_field_content_int(0, "Band");
  23593. new permbanned = cache_get_field_content_int(0, "PermBand");
  23594. if(band == 0 && permbanned == 0) // Not banned... Unban their IP anyway
  23595. {
  23596. format(string, sizeof(string), "unbanip %s", ip);
  23597. SendRconCommand(string);
  23598. SendRconCommand("reloadbans");
  23599. SendClientMessage(playerid, COLOR_GRAD2, "You have unbanned that player's IP and account.");
  23600. //the other query can be removed after a while (don't need to set player stats)
  23601. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `banlist` INNER JOIN `players` ON `players`.`ID` = `banlist`.`userID` SET `banlist`.`Banned` = 0 WHERE `players`.`Name` = '%e'", name);
  23602. mysql_pquery(sqlGameConnection, query);
  23603. return 1;
  23604. }
  23605. format(string, sizeof(string), "unbanip %s", ip);
  23606. SendRconCommand(string);
  23607. SendRconCommand("reloadbans");
  23608. format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s has unbanned account '%s' and IP '%s'.", PlayerOOCName(playerid), name, ip);
  23609. ABroadCast(COLOR_LIGHTRED, string, 1);
  23610. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Band` = 0, `BanReason`= 'None', `PermBand` = 0, `Warnings` = 0 WHERE `Name` = '%e' LIMIT 1", name);
  23611. mysql_pquery(sqlGameConnection, query);
  23612. //the other query can be removed after a while (don't need to set player stats)
  23613. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `banlist` INNER JOIN `players` ON `players`.`ID` = `banlist`.`userID` SET `banlist`.`Banned` = 0 WHERE `players`.`Name` = '%e'", name);
  23614. mysql_pquery(sqlGameConnection, query);
  23615. return 1;
  23616. }
  23617. forward OnOFine(playerid, name[], amount, reason[]);
  23618. public OnOFine(playerid, name[], amount, reason[])
  23619. {
  23620. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  23621. new query[128];
  23622. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Money` = `Money` - %d WHERE `Name` = '%e' LIMIT 1", amount, name);
  23623. mysql_pquery(sqlGameConnection, query);
  23624. new str[128];
  23625. format(str, sizeof(str), "{FF6347}SERVER: %s has been offline-fined $%s by %s, reason: %s", name, AddThousandsSeparators(amount), PlayerICName(playerid), reason);
  23626. SendClientMessageToAll(COLOR_WHITE, str);
  23627. return 1;
  23628. }
  23629. forward OnSetName(playerid, giveplayerid, newname[]);
  23630. public OnSetName(playerid, giveplayerid, newname[])
  23631. {
  23632. new rows, fields;
  23633. new str[128];
  23634. cache_get_data(rows, fields);
  23635. if(rows) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that name is taken.");
  23636. // Set the name
  23637. if(PlayerInfo[giveplayerid][pBizKey] != -1) //owns a business
  23638. {
  23639. new biz = PlayerInfo[giveplayerid][pBizKey];
  23640. strmid(BizInfo[biz][bOwner], newname, 0, strlen(newname), 255);
  23641. // Government seized
  23642. if(BizInfo[biz][bSeized] == 1)
  23643. {
  23644. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[biz][bName]);
  23645. }
  23646. // Judicial Department seized
  23647. else if(BizInfo[biz][bSeized] == 2) {
  23648. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Department of Justice", BizInfo[biz][bName]);
  23649. }
  23650. else
  23651. {
  23652. if(BizInfo[biz][bLocked] == 1)
  23653. {
  23654. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  23655. }
  23656. else
  23657. {
  23658. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  23659. }
  23660. }
  23661. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  23662. }
  23663. if(PlayerInfo[giveplayerid][pFMember] != 255) //owns a family
  23664. {
  23665. new family = PlayerInfo[giveplayerid][pFMember];
  23666. if(strcmp(FamilyInfo[family][FamilyLeader], PlayerName(giveplayerid), true) == 0)
  23667. {
  23668. strmid(FamilyInfo[family][FamilyLeader], newname, 0, strlen(newname), 255);
  23669. SaveFamilies();
  23670. }
  23671. }
  23672. if(PlayerInfo[giveplayerid][pRadioStation] != 255) //owns a radio station
  23673. {
  23674. new radio = PlayerInfo[giveplayerid][pRadioStation];
  23675. if(strcmp(radioInfo[radio][ownerName], PlayerName(giveplayerid), true) == 0)
  23676. {
  23677. strmid(radioInfo[radio][ownerName], newname, 0, strlen(newname), 255);
  23678. SaveRadios();
  23679. }
  23680. }
  23681. format(str, sizeof(str), "Your name has been changed from %s to %s.", PlayerName(giveplayerid), newname); //To player
  23682. SendClientMessage(giveplayerid, COLOR_YELLOW, str);
  23683. format(str, sizeof(str), "You have renamed %s to %s.", PlayerName(giveplayerid), newname); //To admin
  23684. SendClientMessage(playerid, COLOR_GREY, str);
  23685. //log the namechange
  23686. format(str, sizeof(str), "%s has renamed %s to %s.", PlayerName(playerid), PlayerName(giveplayerid), newname);
  23687. StatLog(str);
  23688. //update db
  23689. new query[128];
  23690. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Name` = '%e' WHERE `Name` = '%e' LIMIT 1", newname, PlayerName(giveplayerid));
  23691. mysql_pquery(sqlGameConnection, query); //send the query
  23692. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `RealName` = '%e' WHERE `RealName` = '%e'", newname, PlayerName(giveplayerid));
  23693. mysql_pquery(sqlGameConnection, query);
  23694. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `tickets` SET `IssuerName` = '%e' WHERE `TicketIssuer` = '%d'", newname, PlayerInfo[giveplayerid][pID]);
  23695. mysql_pquery(sqlGameConnection, query);
  23696. if(!PlayerInfo[giveplayerid][pAdmin])
  23697. {
  23698. NameChangeLog(PlayerName(giveplayerid), newname, PlayerName(playerid), PlayerInfo[playerid][pID], PlayerInfo[giveplayerid][pID]);
  23699. }
  23700. //update new name
  23701. SetPlayerName(giveplayerid, newname);
  23702. //reset the namechange request?
  23703. strmid(NameChangeRequest[giveplayerid], "0", 0, 255);
  23704. return 1;
  23705. }
  23706. forward OnAOUninvite(playerid, name[]);
  23707. public OnAOUninvite(playerid, name[])
  23708. {
  23709. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  23710. new str[128];
  23711. format(str, sizeof(str), "* You have kicked %s from their faction.", name);
  23712. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23713. new query[300];
  23714. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Member`= 0,`Leader`= 0,`Rank`= 0,`Gun0`= 0,`Gun1`= 0,`Gun2`= 0, `Gun3`= 0, `Gun4`= 0, `Gun5`= 0, `Gun6`= 0, `Gun7`= 0, `Gun8`= 0, `Gun9`= 0, `Gun10`= 0, `Gun11`= 0, `Gun12`= 0, `Model`= 0, `Radio`= 0, `Handtazer`= 0, `tazergun`= 0, `HasMDC` = 0 WHERE `name`='%e'", name);
  23715. mysql_pquery(sqlGameConnection, query);
  23716. return 1;
  23717. }
  23718. forward OnOUninvite(playerid, name[]);
  23719. public OnOUninvite(playerid, name[])
  23720. {
  23721. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  23722. if(cache_get_field_content_int(0, "Member") != PlayerInfo[playerid][pMember]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That member does not belong to your faction.");
  23723. if(cache_get_field_content_int(0, "Rank") > PlayerInfo[playerid][pRank] && cache_get_field_content_int(0, "Leader") > 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't kick out other leaders.");
  23724. new str[128];
  23725. format(str, sizeof(str), "* You have kicked %s from your faction.", name);
  23726. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23727. new query[320];
  23728. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Member`= 0,`Recruiter` = 0,`Leader`= 0,`Rank`= 0,`Gun0`= 0,`Gun1`= 0,`Gun2`= 0, `Gun3`= 0, `Gun4`= 0, `Gun5`= 0, `Gun6`= 0, `Gun7`= 0, `Gun8`= 0, `Gun9`= 0, `Gun10`= 0, `Gun11`= 0, `Gun12`= 0, `Model`= 20, `Radio`= 0, `Handtazer`= 0, `tazergun`= 0, `HasMDC` = 0 WHERE `Name`='%e'", name);
  23729. mysql_pquery(sqlGameConnection, query);
  23730. return 1;
  23731. }
  23732. forward OnFamilyOUninvite(playerid, name[]);
  23733. public OnFamilyOUninvite(playerid, name[])
  23734. {
  23735. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  23736. if(cache_get_field_content_int(0, "FMember") != PlayerInfo[playerid][pFMember]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That member does not belong to your family.");
  23737. if(cache_get_field_content_int(0, "Rank") >= PlayerInfo[playerid][pRank] && !strmatch(FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyLeader], PlayerICName(playerid))) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player's rank is higher & you must be the leader to kick R6s.");
  23738. new str[128];
  23739. format(str, sizeof(str), "* You have kicked %s from your family.", name);
  23740. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  23741. new query[300];
  23742. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `FMember`= 255, `Rank`= 0 WHERE `Name`='%e'", name);
  23743. mysql_pquery(sqlGameConnection, query);
  23744. return 1;
  23745. }
  23746. //Door breaching for SAPD & DOC
  23747. new ExplosiveObject[MAX_PLAYERS] = INVALID_OBJECT_ID;
  23748. Timer:ExplodeExplosive( playerid, Float: X, Float: Y, Float: Z ) {
  23749. CreateExplosion( X, Y, Z, 12, 1.0 );
  23750. if(ExplosiveObject[playerid]) { DestroyDynamicObjectEx( ExplosiveObject[playerid] );}
  23751. ExplosiveObject[playerid] = INVALID_OBJECT_ID;
  23752. for( new g; g < MAX_GATES; g++ ) { //gates
  23753. if( !Gates[g][GateStatus] ) {
  23754. if( IsPointInRangeOfPoint( Gates[g][GateX], Gates[g][GateY], Gates[g][GateZ], X, Y, Z, Gates[g][GateRadius] ) ) {
  23755. MoveDynamicObject( Gates[g][GateObject], Gates[g][MveGateX], Gates[g][MveGateY], Gates[g][MveGateZ], Gates[g][GateSpeed], Gates[g][MveGateRotX], Gates[g][MveGateRotY], Gates[g][MveGateRotZ] );
  23756. Gates[g][GateStatus] = 1;
  23757. }
  23758. }
  23759. }
  23760. for( new d; d < MAX_DOORS; d++ ) { //doors
  23761. if( IsPointInRangeOfPoint( Entrances[d][outside_x], Entrances[d][outside_y], Entrances[d][outside_z], X, Y, Z, 4.0 ) ) {
  23762. if(strlen(Entrances[d][dpassword]) ) {
  23763. DisabledDoors[d] = true;
  23764. SetTimerEx( "Timer_EnableDoor", 60000, false, "d", d );
  23765. }
  23766. }
  23767. }
  23768. for( new h; h < houseCount; h++ ) { //houses
  23769. if( IsPointInRangeOfPoint( HouseInfo[h][hOutsideX], HouseInfo[h][hOutsideY], HouseInfo[h][hOutsideZ], X, Y, Z, 4.0 ) ) {
  23770. HouseInfo[h][hLocked] = 0;
  23771. }
  23772. }
  23773. return 1;
  23774. }
  23775. Timer:EnableDoor( doorid ) {
  23776. DisabledDoors[doorid] = false;
  23777. return 1;
  23778. }
  23779. public OnDynamicObjectMoved(objectid)
  23780. {
  23781. return 1;
  23782. }
  23783. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  23784. {
  23785. new Float:oldX, Float:oldY, Float:oldZ, Float:oldRotX, Float:oldRotY, Float:oldRotZ;
  23786. GetDynamicObjectPos(objectid, oldX, oldY, oldZ);
  23787. GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  23788. if(response == EDIT_RESPONSE_FINAL)
  23789. {
  23790. if(GateAction[playerid] == EDITING_GATE_POSITION)
  23791. {
  23792. Gates[EditingGate[playerid]][GateX] = x;
  23793. Gates[EditingGate[playerid]][GateY] = y;
  23794. Gates[EditingGate[playerid]][GateZ] = z;
  23795. Gates[EditingGate[playerid]][GateRotX] = rx;
  23796. Gates[EditingGate[playerid]][GateRotY] = ry;
  23797. Gates[EditingGate[playerid]][GateRotZ] = rz;
  23798. if(Gates[EditingGate[playerid]][GateObject]) { DestroyDynamicObjectEx(Gates[EditingGate[playerid]][GateObject]); }
  23799. Gates[EditingGate[playerid]][GateObject] = 0; //
  23800. CreateGate(EditingGate[playerid]);
  23801. GateAction[playerid] = EDITING_GATE_NONE;
  23802. }
  23803. if(GateAction[playerid] == EDITING_GATE_OPOSITION)
  23804. {
  23805. Gates[EditingGate[playerid]][MveGateX] = x;
  23806. Gates[EditingGate[playerid]][MveGateY] = y;
  23807. Gates[EditingGate[playerid]][MveGateZ] = z;
  23808. Gates[EditingGate[playerid]][MveGateRotX] = rx;
  23809. Gates[EditingGate[playerid]][MveGateRotY] = ry;
  23810. Gates[EditingGate[playerid]][MveGateRotZ] = rz;
  23811. if(x == Gates[EditingGate[playerid]][GateX]
  23812. && y == Gates[EditingGate[playerid]][GateY]
  23813. && z == Gates[EditingGate[playerid]][GateZ])
  23814. Gates[EditingGate[playerid]][MveGateX] = x + 0.01; //bug fix.
  23815. if(Gates[EditingGate[playerid]][GateObject]) { DestroyDynamicObjectEx(Gates[EditingGate[playerid]][GateObject]); }
  23816. CreateGate(EditingGate[playerid]);
  23817. GateAction[playerid] = EDITING_GATE_NONE;
  23818. }
  23819. if(EditingCamera[playerid] == true)
  23820. {
  23821. EditingCamera[playerid] = false;
  23822. CCTV[CameraID[playerid]][CCTVX] = x;
  23823. CCTV[CameraID[playerid]][CCTVY] = y;
  23824. CCTV[CameraID[playerid]][CCTVZ] = z;
  23825. CCTV[CameraID[playerid]][CCTVRX] = rx;
  23826. CCTV[CameraID[playerid]][CCTVRY] = ry;
  23827. CCTV[CameraID[playerid]][CCTVRZ] = rz;
  23828. if(CCTV[CameraID[playerid]][CCTVObject]) { DestroyDynamicObjectEx(CCTV[CameraID[playerid]][CCTVObject]); }
  23829. CCTV[CameraID[playerid]][CCTVObject] = CreateDynamicObject(CCTV_OBJID, x, y, z, rx, ry, rz);
  23830. UpdateCCTV(CameraID[playerid]);
  23831. CameraID[playerid] = -1;
  23832. }
  23833. if(EditingFurnitureObjectID[playerid] != -1) //editing a furniture object
  23834. {
  23835. new index = EditingFurnitureID[playerid];
  23836. new houseid = EditingFurnitureHouseID[playerid];
  23837. if(GetPlayerVirtualWorld(playerid) != HouseInfo[houseid][hSQLID] && !IsPointInRangeOfPoint(x, y, z, HouseInfo[houseid][hOutsideX], HouseInfo[houseid][hOutsideY], HouseInfo[houseid][hOutsideZ], 10)) {
  23838. SendClientMessage(playerid, COLOR_GREY, "You cannot place furniture over 10 metres from your house exit.");
  23839. DeleteHouseFurniture(houseid, index);
  23840. //reset editing vars
  23841. EditingFurnitureID[playerid] = -1;
  23842. EditingFurnitureHouseID[playerid] = -1;
  23843. EditingFurnitureObjectID[playerid] = -1;
  23844. return 0;
  23845. }
  23846. //save vars
  23847. FurnitureInfo[houseid][index][f_Spawned] = 1;
  23848. FurnitureInfo[houseid][index][f_X] = x;
  23849. FurnitureInfo[houseid][index][f_Y] = y;
  23850. FurnitureInfo[houseid][index][f_Z] = z;
  23851. FurnitureInfo[houseid][index][f_RX] = rx;
  23852. FurnitureInfo[houseid][index][f_RY] = ry;
  23853. FurnitureInfo[houseid][index][f_RZ] = rz;
  23854. SetDynamicObjectPos(FurnitureInfo[houseid][index][f_ObjectID], FurnitureInfo[houseid][index][f_X], FurnitureInfo[houseid][index][f_Y], FurnitureInfo[houseid][index][f_Z]);
  23855. SetDynamicObjectRot(FurnitureInfo[houseid][index][f_ObjectID], FurnitureInfo[houseid][index][f_RX], FurnitureInfo[houseid][index][f_RY], FurnitureInfo[houseid][index][f_RZ]);
  23856. //sql update
  23857. new query[200];
  23858. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `X`=%f, `Y`=%f, `Z`=%f, `rX`=%f, `rY`=%f, `rZ`=%f, `Spawned`=1 WHERE `ID`=%d", FurnitureInfo[houseid][index][f_X], FurnitureInfo[houseid][index][f_Y], FurnitureInfo[houseid][index][f_Z], FurnitureInfo[houseid][index][f_RX], FurnitureInfo[houseid][index][f_RY], FurnitureInfo[houseid][index][f_RZ], FurnitureInfo[houseid][index][f_ID]);
  23859. mysql_pquery(sqlGameConnection, query);
  23860. //reset editing vars
  23861. EditingFurnitureID[playerid] = -1;
  23862. EditingFurnitureHouseID[playerid] = -1;
  23863. EditingFurnitureObjectID[playerid] = -1;
  23864. }
  23865. }
  23866. if(response == EDIT_RESPONSE_CANCEL)
  23867. {
  23868. SetDynamicObjectPos(objectid, oldX, oldY, oldZ);
  23869. SetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  23870. GateAction[playerid] = EDITING_GATE_NONE;
  23871. EditingCamera[playerid] = false;
  23872. EditingFurnitureID[playerid] = -1;
  23873. EditingFurnitureHouseID[playerid] = -1;
  23874. EditingFurnitureObjectID[playerid] = -1;
  23875. }
  23876. return 1;
  23877. }
  23878. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
  23879. {
  23880. new Float:oldX, Float:oldY, Float:oldZ, Float:oldRotX, Float:oldRotY, Float:oldRotZ;
  23881. GetObjectPos(objectid, oldX, oldY, oldZ);
  23882. GetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  23883. if(response == EDIT_RESPONSE_FINAL)
  23884. {
  23885. for(new i = 0; i < MAX_TAGS; i++)
  23886. {
  23887. if(objectid == Tags[i][TagObject])
  23888. {
  23889. Tags[i][TagPosition][0] = fX;
  23890. Tags[i][TagPosition][1] = fY;
  23891. Tags[i][TagPosition][2] = fZ;
  23892. Tags[i][TagRotation][0] = fRotX;
  23893. Tags[i][TagRotation][1] = fRotY;
  23894. Tags[i][TagRotation][2] = fRotZ;
  23895. }
  23896. }
  23897. }
  23898. if(response == EDIT_RESPONSE_CANCEL)
  23899. {
  23900. if(!playerobject)
  23901. {
  23902. SetObjectPos(objectid, oldX, oldY, oldZ);
  23903. SetObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
  23904. for(new i = 0; i < MAX_TAGS; i++)
  23905. {
  23906. if(objectid == Tags[i][TagObject])
  23907. {
  23908. DestroyObject(Tags[i][TagObject]);
  23909. Tags[i][TagObject] = CreateObject(19482, fX, fY, fZ, 0.0, 0.0, 0.0);
  23910. SetObjectMaterialText(Tags[i][TagObject], tagtext[playerid], 0, OBJECT_MATERIAL_SIZE_256x128, tagfont[playerid], 30, tagbold[playerid], 0xFF0000FF, 0, 0);
  23911. Tags[i][TagPosition][0] = fX;
  23912. Tags[i][TagPosition][1] = fY;
  23913. Tags[i][TagPosition][2] = fZ;
  23914. Tags[i][TagRotation][0] = fRotX;
  23915. Tags[i][TagRotation][1] = fRotY;
  23916. Tags[i][TagRotation][2] = fRotZ;
  23917. break;
  23918. }
  23919. }
  23920. }
  23921. else
  23922. {
  23923. SetPlayerObjectPos(playerid, objectid, oldX, oldY, oldZ);
  23924. SetPlayerObjectRot(playerid, objectid, oldRotX, oldRotY, oldRotZ);
  23925. }
  23926. }
  23927. return 1;
  23928. }
  23929. stock GetMonthFromInt(number)
  23930. {
  23931. new month[20];
  23932. switch(number)
  23933. {
  23934. case 1: month = "January";
  23935. case 2: month = "February";
  23936. case 3: month = "March";
  23937. case 4: month = "April";
  23938. case 5: month = "May";
  23939. case 6: month = "June";
  23940. case 7: month = "July";
  23941. case 8: month = "August";
  23942. case 9: month = "September";
  23943. case 10: month = "October";
  23944. case 11: month = "November";
  23945. case 12: month = "December";
  23946. }
  23947. return month;
  23948. }
  23949. forward OnCheckAccountLevel(playerid, name[]);
  23950. public OnCheckAccountLevel(playerid, name[])
  23951. {
  23952. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GREY, "Account doesn't exist.");
  23953. new level = cache_get_field_content_int(0, "level");
  23954. new accountString[124];
  23955. format(accountString, sizeof(accountString), "Player Name: %s | Account Level: %i", name, level);
  23956. SendClientMessage(playerid, COLOR_WHITE, accountString);
  23957. return 1;
  23958. }
  23959. forward AAC(playerid, month, userid);
  23960. public AAC(playerid, month, userid)
  23961. {
  23962. new total = 0;
  23963. // the query in /activity already does the total sum of the minutes, so all we need to do is pull it
  23964. total = cache_get_field_content_int(0, "SUM(Minutes)");
  23965. if(total == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: No results found.");
  23966. new str[128];
  23967. format(str, sizeof(str), "AAC: SQLID %d has spent %d hours in-game in %s (minutes: %d)", userid, total/60, GetMonthFromInt(month), total);
  23968. SendClientMessage(playerid, COLOR_WHITE, str);
  23969. return 1;
  23970. }
  23971. forward NewDVIPShit(playerid, month, userid);
  23972. public NewDVIPShit(playerid, month, userid)
  23973. {
  23974. new total = 0;
  23975. // the query in /activity already does the total sum of the minutes, so all we need to do is pull it
  23976. total = cache_get_field_content_int(0, "SUM(Minutes)");
  23977. if(total == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Error: No results found.");
  23978. new str[128];
  23979. format(str, sizeof(str), "Name[%d]%s has spent %d hours in-game in %s (minutes: %d)", userid, PlayerOOCName(playerid), total/60, GetMonthFromInt(month), total);
  23980. SendClientMessage(playerid, COLOR_WHITE, str);
  23981. SendClientMessage(playerid, COLOR_WHITE, "If you want to be a Platinum VIP, you must spend 2400[40 hours] minutes on the server!");
  23982. return 1;
  23983. }
  23984. forward loadRespawnedVehicles();
  23985. public loadRespawnedVehicles() {
  23986. new rows, fields;
  23987. cache_get_data(rows, fields);
  23988. if(rows) {
  23989. new value[8];
  23990. for(new i = 0; i < rows; i++)
  23991. {
  23992. if(i == MAX_VEHICLES - 1) return printf("Max vehicle limit (1999) reached.");
  23993. cache_get_field_content(i, "ID", value);
  23994. sVehicleInfo[i][v_sqlid] = strval(value);
  23995. cache_get_field_content(i, "model", value);
  23996. sVehicleInfo[i][v_model] = strval(value);
  23997. cache_get_field_content(i, "x", value);
  23998. sVehicleInfo[i][v_x] = floatstr(value);
  23999. cache_get_field_content(i, "y", value);
  24000. sVehicleInfo[i][v_y] = floatstr(value);
  24001. cache_get_field_content(i, "z", value);
  24002. sVehicleInfo[i][v_z] = floatstr(value);
  24003. cache_get_field_content(i, "rz", value);
  24004. sVehicleInfo[i][v_rz] = floatstr(value);
  24005. cache_get_field_content(i, "color1", value);
  24006. sVehicleInfo[i][v_color1] = strval(value);
  24007. cache_get_field_content(i, "color2", value);
  24008. sVehicleInfo[i][v_color2] = strval(value);
  24009. cache_get_field_content(i, "faction", value);
  24010. sVehicleInfo[i][v_lockfeature] = cache_get_field_content_int(i, "lockfeature");
  24011. if(sVehicleInfo[i][v_lockfeature])
  24012. sVehicleInfo[i][v_lock] = 1;
  24013. sVehicleInfo[i][v_faction] = strval(value);
  24014. sVehicleInfo[i][v_family] = cache_get_field_content_int(i, "family");
  24015. sVehicleInfo[i][v_group] = cache_get_field_content_int(i, "group");
  24016. sVehicleInfo[i][v_id] = CreateVehicle(sVehicleInfo[i][v_model],sVehicleInfo[i][v_x],sVehicleInfo[i][v_y],sVehicleInfo[i][v_z],sVehicleInfo[i][v_rz],sVehicleInfo[i][v_color1],sVehicleInfo[i][v_color2],900);
  24017. }
  24018. }
  24019. return 1;
  24020. }
  24021. respawn_pb(playerid)
  24022. {
  24023. switch(inPaintball[playerid]){
  24024. case 1: { // Main Paintball
  24025. SetPlayerInterior(playerid, 10);
  24026. SetPlayerVirtualWorld(playerid, 2);
  24027. new rand = random(sizeof(paintBallArena));
  24028. SetPlayerPos(playerid, paintBallArena[rand][0], paintBallArena[rand][1], paintBallArena[rand][2]);
  24029. SetCameraBehindPlayer(playerid);
  24030. TogglePlayerControllable(playerid, true);
  24031. //inPaintball[playerid] = true;
  24032. SetPlayerHealth(playerid, 100);
  24033. SetPlayerArmour(playerid, 100);
  24034. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  24035. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  24036. ResetPlayerWeapons(playerid);
  24037. for(new i = 1; i < 6; i++)
  24038. {
  24039. GivePlayerAdminGun(playerid, pPaintGuns[playerid][i]);
  24040. }
  24041. }
  24042. case 2: { // SAPD Paintball
  24043. SetPlayerInterior(playerid, 10);
  24044. SetPlayerVirtualWorld(playerid, 3);
  24045. new rand = random(sizeof(paintBallArena));
  24046. SetPlayerPos(playerid, paintBallArena[rand][0], paintBallArena[rand][1], paintBallArena[rand][2]);
  24047. SetCameraBehindPlayer(playerid);
  24048. TogglePlayerControllable(playerid, true);
  24049. //inPaintball[playerid] = true;
  24050. SetPlayerHealth(playerid, 100);
  24051. SetPlayerArmour(playerid, 100);
  24052. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  24053. pDeathState[playerid] = PLAYER_STATE_NORMAL;
  24054. ResetPlayerWeapons(playerid);
  24055. for(new i = 1; i < 6; i++)
  24056. {
  24057. GivePlayerAdminGun(playerid, pPaintGuns[playerid][i]);
  24058. }
  24059. }
  24060. }
  24061. return 1;
  24062. }
  24063. enter_pb(playerid)
  24064. {
  24065. if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
  24066. for(new i = 0; i < 12; i++)
  24067. {
  24068. saveWeapon[playerid][i] = PlayerInfo[playerid][(pGun0 + pInfo:i)];
  24069. }
  24070. new str[128];
  24071. pbKills[playerid] = 0;
  24072. new p, highstr[100];
  24073. if(IsPlayerInRangeOfPoint(playerid, 3, 1088.75, -1715.45, 1136.46)){ // SAPD Paintball
  24074. SetPlayerInterior(playerid, 10);
  24075. SetPlayerVirtualWorld(playerid, 3);
  24076. inPaintball[playerid] = 2;
  24077. p = GetPaintballLeader(inPaintball[playerid]);
  24078. if(p != INVALID_PLAYER_ID)
  24079. format(highstr, 100, "~r~Paintball Leader~n~~b~%s (%d kills)", PlayerICName(p), pbKills[p]);
  24080. else
  24081. format(highstr, 100, "~r~Paintball Leader~n~~b~Nobody");
  24082. TextDrawSetString(PaintballLeaderTD2, highstr);
  24083. TextDrawShowForPlayer(playerid, PaintballLeaderTD2);
  24084. new rand = random(sizeof(paintBallArena));
  24085. SetPlayerPos(playerid, paintBallArena[rand][0], paintBallArena[rand][1], paintBallArena[rand][2]);
  24086. SetCameraBehindPlayer(playerid);
  24087. GetPlayerHealth(playerid, pbHealth[playerid]);
  24088. GetPlayerArmour(playerid, pbArmor[playerid]);
  24089. TogglePlayerControllable(playerid, true);
  24090. SetPlayerHealth(playerid, 100);
  24091. SetPlayerArmour(playerid, 100);
  24092. format(str, sizeof(str), "{FFFF00}[PAINTBALL] %s has joined the arena.", PlayerICName(playerid));
  24093. SendPaintballMessage(playerid, -1, str);
  24094. ResetPlayerWeapons(playerid);
  24095. for(new i = 1; i < 6; i++)
  24096. {
  24097. GivePlayerAdminGun(playerid, pPaintGuns[playerid][i]);
  24098. }
  24099. }
  24100. else if(IsPlayerInRangeOfPoint(playerid, 3, 1310.0685, -1367.6198, 13.5382)) { // Main Paintball
  24101. SetPlayerInterior(playerid, 10);
  24102. SetPlayerVirtualWorld(playerid, 2);
  24103. inPaintball[playerid] = 1;
  24104. p = GetPaintballLeader(inPaintball[playerid]);
  24105. if(p != INVALID_PLAYER_ID)
  24106. format(highstr, 100, "~r~Paintball Leader~n~~b~%s (%d kills)", PlayerICName(p), pbKills[p]);
  24107. else
  24108. format(highstr, 100, "~r~Paintball Leader~n~~b~Nobody");
  24109. TextDrawSetString(PaintballLeaderTD, highstr);
  24110. TextDrawShowForPlayer(playerid, PaintballLeaderTD);
  24111. new rand = random(sizeof(paintBallArena));
  24112. SetPlayerPos(playerid, paintBallArena[rand][0], paintBallArena[rand][1], paintBallArena[rand][2]);
  24113. SetCameraBehindPlayer(playerid);
  24114. GetPlayerHealth(playerid, pbHealth[playerid]);
  24115. GetPlayerArmour(playerid, pbArmor[playerid]);
  24116. TogglePlayerControllable(playerid, true);
  24117. SetPlayerHealth(playerid, 100);
  24118. SetPlayerArmour(playerid, 100);
  24119. format(str, sizeof(str), "{FFFF00}[PAINTBALL] %s has joined the arena.", PlayerICName(playerid));
  24120. SendPaintballMessage(playerid, -1, str);
  24121. ResetPlayerWeapons(playerid);
  24122. for(new i = 1; i < 6; i++)
  24123. {
  24124. GivePlayerAdminGun(playerid, pPaintGuns[playerid][i]);
  24125. }
  24126. }
  24127. return 1;
  24128. }
  24129. stock SendPaintballMessage(fromplayerid, colour, string[])
  24130. {
  24131. foreach( new i: Player ){
  24132. if(inPaintball[i] == inPaintball[fromplayerid]) SendClientMessage(i, colour, string);
  24133. }
  24134. return 1;
  24135. }
  24136. stock ClearPaintballGuns(playerid)
  24137. {
  24138. for(new i = 1; i < 6; i++)
  24139. {
  24140. pPaintGuns[playerid][i] = INVALID_WEAPON_ID;
  24141. }
  24142. format(PaintBall[playerid][pbWeaponName1], 32, "None");
  24143. format(PaintBall[playerid][pbWeaponName2], 32, "None");
  24144. format(PaintBall[playerid][pbWeaponName3], 32, "None");
  24145. format(PaintBall[playerid][pbWeaponName4], 32, "None");
  24146. format(PaintBall[playerid][pbWeaponName5], 32, "None");
  24147. return 1;
  24148. }
  24149. GetPaintballLeader(type) {
  24150. new highestKillsID = INVALID_PLAYER_ID,
  24151. highestKills = 0;
  24152. foreach(new i: Player) {
  24153. if(inPaintball[i] == type && (pbKills[i] > highestKills)) {
  24154. highestKillsID = i;
  24155. highestKills = pbKills[i];
  24156. }
  24157. }
  24158. return highestKillsID;
  24159. }
  24160. UpdatePaintBallLeader(type){
  24161. new p = GetPaintballLeader(type),
  24162. highstr[128];
  24163. switch(type){
  24164. case 1: { // main paintball
  24165. if(p != INVALID_PLAYER_ID)
  24166. format(highstr, 100, "~r~Paintball Leader~n~~b~%s (%d kills)", PlayerICName(p), pbKills[p]);
  24167. else
  24168. format(highstr, 100, "~r~Paintball Leader~n~~b~Nobody");
  24169. TextDrawSetString(PaintballLeaderTD, highstr);
  24170. }
  24171. case 2: { // SAPD paintball
  24172. if(p != INVALID_PLAYER_ID)
  24173. format(highstr, 100, "~r~Paintball Leader~n~~b~%s (%d kills)", PlayerICName(p), pbKills[p]);
  24174. else
  24175. format(highstr, 100, "~r~Paintball Leader~n~~b~Nobody");
  24176. TextDrawSetString(PaintballLeaderTD2, highstr);
  24177. }
  24178. }
  24179. return 1;
  24180. }
  24181. // Called when the player is c-bugging
  24182. Timer:OnPlayerCBug(playerid, bool:unfreezePlayer) {
  24183. if(unfreezePlayer)
  24184. return TogglePlayerControllable(playerid, true);
  24185. else {
  24186. displayCenterHUDInfo(playerid, "~r~Please do not ~w~c-bug!", 2);
  24187. TogglePlayerControllable(playerid, false);
  24188. SetTimerEx("Timer_OnPlayerCBug", 500, false, "ib", playerid, true);
  24189. }
  24190. return 1;
  24191. }
  24192. do_call(playerid, phonenumb)
  24193. {
  24194. if(PlayerInfo[playerid][pJailed] == 2)
  24195. {
  24196. if(!IsPlayerInRangeOfPoint(playerid, 2.0, 185.3808, 1923.9442, 17.7778))
  24197. {
  24198. SendClientMessage(playerid, COLOR_GRAD2, "You are not at the prison payphone.");
  24199. return 1;
  24200. }
  24201. }
  24202. if(PlayerInfo[playerid][pHospital] != 0 || PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0)
  24203. {
  24204. SendClientMessage(playerid, COLOR_GRAD2, "You are unable to use a phone at this time.");
  24205. return 1;
  24206. }
  24207. new str[128];
  24208. new payPhoneId = IsPlayerNearPayPhone(playerid);
  24209. if(PlayerInfo[playerid][pPnumber] == 0 && payPhoneId == -1)
  24210. {
  24211. SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone. You can buy one from any 24/7.");
  24212. return 1;
  24213. }
  24214. if(payPhoneId >= 0)
  24215. {
  24216. if(usePayphone[playerid] == -1 && payPhone[payPhoneId][inUse])
  24217. {
  24218. return SendClientMessage(playerid, COLOR_GRAD2, "This payphone is currently in use by another player.");
  24219. }
  24220. }
  24221. if(PhoneOffline[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Your cellphone is currently turned off, use /togphone.");
  24222. if(payPhoneId == -1)
  24223. {
  24224. format(str, sizeof(str), "* %s takes out a cellphone. *", PlayerICName(playerid));
  24225. attachPhoneToPlayer(playerid);
  24226. }
  24227. else
  24228. {
  24229. GiveMoney(playerid, -25);
  24230. format(str, sizeof(str), "~r~$-%d", 25);
  24231. GameTextForPlayer(playerid, str, 5000, 1);
  24232. format(str, sizeof(str), "* %s places a call at the payphone. *", PlayerICName(playerid));
  24233. payPhone[payPhoneId][inUse] = 1;
  24234. usePayphone[playerid] = payPhoneId;
  24235. }
  24236. if(!cellMuted[playerid])
  24237. {
  24238. playLocalSound(playerid, CELLPHONE_DIAL, 2.0, 400);
  24239. }
  24240. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24241. if(phonenumb == 911)
  24242. {
  24243. if(payPhoneId == -1)
  24244. {
  24245. SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
  24246. SendClientMessage(playerid, COLOR_YELLOW, "(cellphone) 911 Operator: Hello, which service do you require, police, paramedic or fire?");
  24247. Mobile[playerid] = 911;
  24248. }
  24249. else
  24250. {
  24251. SendClientMessage(playerid, COLOR_GRAD2, "Your call was rejected.");
  24252. payPhone[payPhoneId][inUse] = 0;
  24253. usePayphone[playerid] = -1;
  24254. }
  24255. return 1;
  24256. }
  24257. if(phonenumb == PlayerInfo[playerid][pPnumber] && usePayphone[playerid] == -1)
  24258. {
  24259. SendClientMessage(playerid, COLOR_GRAD2, "You just get a busy tone...");
  24260. return 1;
  24261. }
  24262. if(Mobile[playerid] != 999)
  24263. {
  24264. SendClientMessage(playerid, COLOR_GRAD2, "You are already on a call...");
  24265. return 1;
  24266. }
  24267. foreach( new i: Player )
  24268. {
  24269. if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
  24270. {
  24271. Mobile[playerid] = i;
  24272. if(PhoneOffline[i] > 0)
  24273. {
  24274. SendClientMessage(playerid, COLOR_GREY, "That players phone is currently offline.");
  24275. Mobile[playerid] = 999;
  24276. payPhone[payPhoneId][inUse] = 0;
  24277. usePayphone[playerid] = -1;
  24278. return 1;
  24279. }
  24280. if(PlayerInfo[i][pHospital] != 0 || PlayerTied[i] != 0 || PlayerCuffed[i] != 0 || PlayerInfo[playerid][pJailed] != 0 || PlayerTazed[i] != 0)
  24281. {
  24282. SendClientMessage(playerid, COLOR_GRAD2, "That player is unable to speak at this time.");
  24283. Mobile[playerid] = 999;
  24284. payPhone[payPhoneId][inUse] = 0;
  24285. usePayphone[playerid] = -1;
  24286. return 1;
  24287. }
  24288. if(Mobile[i] == 999)
  24289. {
  24290. if(payPhoneId == -1)format(str, sizeof(str), "Your mobile phone is ringing. Type (/p)ickup to answer. CallerID: %s", PlayerICName(playerid));
  24291. else format(str, sizeof(str), "%s", "Your mobile phone is ringing. Type (/p)ickup to answer.");
  24292. if(!cellMuted[i])
  24293. {
  24294. playLocalSound(i, CELLPHONE_RING, 6.0, 0);
  24295. }
  24296. SendClientMessage(i, COLOR_YELLOW, str);
  24297. format(str, sizeof(str), "* %s's phone begins to ring. *", PlayerICName(i));
  24298. SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
  24299. ProxDetector(30.0, i, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24300. CellTime[playerid] = 1;
  24301. if(PlayerInfo[playerid][pJailed] == 2)
  24302. {
  24303. TogglePlayerControllable(playerid, false);
  24304. }
  24305. return 1;
  24306. }
  24307. else
  24308. {
  24309. SendClientMessage(playerid, COLOR_GRAD2, "You just get a busy tone...");
  24310. if(usePayphone[playerid] != -1)
  24311. {
  24312. payPhone[payPhoneId][inUse] = 0;
  24313. usePayphone[playerid] = -1;
  24314. }
  24315. Mobile[playerid] = 999;
  24316. return 1;
  24317. }
  24318. }
  24319. }
  24320. SendClientMessage(playerid, COLOR_GRAD2, "You just get a Busy tone...");
  24321. if(usePayphone[playerid] != -1)
  24322. {
  24323. payPhone[payPhoneId][inUse] = 0;
  24324. usePayphone[playerid] = -1;
  24325. }
  24326. Mobile[playerid] = 999;
  24327. return 1;
  24328. }
  24329. stock OnHangup(playerid, hanguptxt[])
  24330. {
  24331. SendClientMessage(playerid, COLOR_YELLOW, hanguptxt);
  24332. SendClientMessage(playerid, COLOR_GRAD2, "They hung up...");
  24333. Mobile[playerid] = 999;
  24334. return 1;
  24335. }
  24336. stock IsPlayerNearPayPhone(playerid)
  24337. {
  24338. for(new i = 0; i < sizeof(payPhone); i++)
  24339. {
  24340. if(IsPlayerInRangeOfPoint(playerid, 1.1, payPhone[i][pPhoneX], payPhone[i][pPhoneY], payPhone[i][pPhoneZ]) && payPhone[i][pPhoneInt] == GetPlayerInterior(playerid) && payPhone[i][pPhoneVW] == GetPlayerVirtualWorld(playerid))
  24341. {
  24342. return i;
  24343. }
  24344. }
  24345. return -1;
  24346. }
  24347. stock SendMessage(playerid, phonenumb, result[])
  24348. {
  24349. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
  24350. if(PlayerInfo[playerid][pHospital] != 0 || IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
  24351. if(PlayerInfo[playerid][pPnumber] == 0)
  24352. {
  24353. SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone. You can buy one from any 24/7.");
  24354. return 1;
  24355. }
  24356. if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Phone signal has been jammed.");
  24357. new str[128];
  24358. format(str, sizeof(str), "* %s takes out a cellphone.", PlayerICName(playerid));
  24359. //ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24360. SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 5000);
  24361. foreach( new i: Player )
  24362. {
  24363. if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
  24364. {
  24365. if(Blocked[i][Number1] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number2] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number3] == PlayerInfo[playerid][pPnumber] || Blocked[playerid][Number4] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number5] == PlayerInfo[playerid][pPnumber] || CheckForJammer(i))
  24366. {
  24367. SendClientMessage(playerid, COLOR_GREY, "That players phone is currently offline.");
  24368. return 1;
  24369. }
  24370. if(PhoneOffline[i] > 0)
  24371. {
  24372. SendClientMessage(playerid, COLOR_GREY, "That players' phone is offline.");
  24373. return 1;
  24374. }
  24375. if(PlayerInfo[i][pHospital] != 0 || PlayerTied[i] != 0 || PlayerCuffed[i] != 0 || PlayerTazed[i] != 0 || PlayerInfo[playerid][pJailed] != 0)
  24376. {
  24377. SendClientMessage(playerid, COLOR_GRAD2, "That player is unable to speak at this time.");
  24378. return 1;
  24379. }
  24380. if(callerID[playerid] == false)format(str, sizeof(str), "SMS (%s | %d): %s", PlayerICName(playerid), PlayerInfo[playerid][pPnumber], result);
  24381. else format(str, sizeof(str), "SMS: %s, Sender: Unknown (%d)", result, PlayerInfo[playerid][pPnumber]);
  24382. SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered");
  24383. SendClientMessage(i, COLOR_YELLOW, str);
  24384. SendClientMessage(playerid, COLOR_YELLOW, str);
  24385. format(str, sizeof(str), "~r~$-%d", 25);
  24386. GameTextForPlayer(playerid, str, 5000, 1);
  24387. GiveMoney(playerid, -25);
  24388. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  24389. Mobile[playerid] = 999;
  24390. ReplyTo[i] = PlayerInfo[playerid][pPnumber];
  24391. if(!cellMuted[playerid])
  24392. {
  24393. playLocalSound(playerid, SMS_SENT, 2.0, 0);
  24394. }
  24395. if(!cellMuted[i])
  24396. {
  24397. playLocalSound(i, SMS_RECIEVED, 2.0, 0);
  24398. }
  24399. if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
  24400. {
  24401. if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
  24402. {
  24403. format(str, sizeof(str), "[AdmWrn] %s SMS'd %s (ID %d): %s", PlayerICName(playerid), PlayerICName(i), i, result);
  24404. SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
  24405. }
  24406. }
  24407. new year, month, day;
  24408. getdate(year, month, day);
  24409. new hour, minute, second;
  24410. gettime(hour, minute, second);
  24411. hour = FixHour(hour);
  24412. format(str, sizeof(str), "/SMS %s SMS'd %s (ID %d): %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), PlayerOOCName(i), i, result, day, GetMonthFromInt(month), hour, minute, second);
  24413. logswrite("sms.log", str);
  24414. return 1;
  24415. }
  24416. }
  24417. SendClientMessage(playerid, COLOR_GRAD2, "Message Delivery Failed...");
  24418. return 1;
  24419. }
  24420. stock PickupCall(playerid)
  24421. {
  24422. if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
  24423. if(Mobile[playerid] != 999 && usePayphone[playerid] == -1)
  24424. {
  24425. SendClientMessage(playerid, COLOR_GRAD2, "You are already on a call.");
  24426. return 1;
  24427. }
  24428. if(usePayphone[playerid] > -1)
  24429. {
  24430. SendClientMessage(playerid, Mobile[playerid], "They hung up...");
  24431. if(!cellMuted[Mobile[playerid]])
  24432. {
  24433. playLocalSound(Mobile[playerid], SMS_RECIEVED, 2.0, 0);
  24434. }
  24435. payPhone[usePayphone[playerid]][inUse] = 0;
  24436. usePayphone[playerid] = -1;
  24437. return 1;
  24438. }
  24439. new str[128];
  24440. foreach( new i: Player )
  24441. {
  24442. if(Mobile[i] == playerid)
  24443. {
  24444. Mobile[playerid] = i; //caller connecting
  24445. if(onCellPhone[i] == false)
  24446. {
  24447. if(!cellMuted[playerid])
  24448. {
  24449. playLocalSound(playerid, SMS_SENT, 2.0, 800);
  24450. }
  24451. GiveMoney(i, -25);
  24452. format(str, sizeof(str), "~r~Call costs: ~w~$%d", 25);
  24453. GameTextForPlayer(i, str, 5000, 1);
  24454. SendClientMessage(i, COLOR_GRAD2, "They picked up...");
  24455. format(str, sizeof(str), "* %s answers their cellphone.", PlayerICName(playerid));
  24456. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24457. }
  24458. attachPhoneToPlayer(playerid);
  24459. onCellPhone[i] = true;
  24460. onCellPhone[playerid] = true;
  24461. }
  24462. }
  24463. return 1;
  24464. }
  24465. stock HangupCall(playerid)
  24466. {
  24467. new caller = Mobile[playerid];
  24468. new str[128];
  24469. if((Mobile[playerid] >= 911 && Mobile[playerid] <= 914) || Mobile[playerid] == 420 || beingCalled[playerid])
  24470. {
  24471. detachPhoneFromPlayer(playerid);
  24472. SendClientMessage(playerid, COLOR_GREY, "You hung up.");
  24473. Mobile[playerid] = 999;
  24474. beingCalled[playerid] = false;
  24475. return 1;
  24476. }
  24477. if(IsPlayerConnected(caller))
  24478. {
  24479. if(caller < 999)
  24480. {
  24481. if(usePayphone[playerid] == -1) detachPhoneFromPlayer(playerid);
  24482. if(usePayphone[caller] > -1)
  24483. {
  24484. payPhone[usePayphone[caller]][inUse] = 0;
  24485. usePayphone[caller] = -1;
  24486. }
  24487. else
  24488. {
  24489. detachPhoneFromPlayer(caller);
  24490. }
  24491. if(!cellMuted[caller])
  24492. {
  24493. playLocalSound(caller, SMS_RECIEVED, 2.0, 0);
  24494. }
  24495. if(!cellMuted[playerid])
  24496. {
  24497. playLocalSound(playerid, SMS_RECIEVED, 2.0, 0);
  24498. }
  24499. CellTime[caller] = 0;
  24500. CellTime[playerid] = 0;
  24501. SendClientMessage(caller, COLOR_GRAD2, "They hung up...");
  24502. SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
  24503. onCellPhone[playerid] = false;
  24504. onCellPhone[caller] = false;
  24505. Mobile[caller] = 999;
  24506. beingCalled[playerid] = false;
  24507. detachPhoneFromPlayer(playerid);
  24508. }
  24509. Mobile[playerid] = 999;
  24510. CellTime[playerid] = 0;
  24511. }
  24512. if(usePayphone[playerid] > -1)
  24513. {
  24514. format(str, sizeof(str), "* %s hung up the payphone.", PlayerICName(playerid));
  24515. payPhone[usePayphone[playerid]][inUse] = 0;
  24516. usePayphone[playerid] = -1;
  24517. }
  24518. else
  24519. {
  24520. format(str, sizeof(str), "* %s puts away their cellphone.", PlayerICName(playerid));
  24521. }
  24522. //ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24523. SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 5000);
  24524. detachPhoneFromPlayer(playerid);
  24525. return 1;
  24526. }
  24527. new Float:cameraLookat[4];
  24528. stock GetVehHWTime(p)
  24529. {
  24530. new l = PlayerInfo[p][pJackSkill];
  24531. if(l >= 400) return 4;
  24532. else if(l >= 200) return 6;
  24533. else if(l >= 100) return 10;
  24534. else if(l >= 50) return 15;
  24535. else return 20;
  24536. }
  24537. stock GetVehNeedHW(veh, p)
  24538. {
  24539. if(veh == INVALID_VEHICLE_ID)
  24540. {
  24541. return 0;
  24542. }
  24543. if(veh != GetPlayerVehicleID(p))
  24544. {
  24545. return 0;
  24546. }
  24547. if(sVehicleInfo[veh][v_faction])
  24548. {
  24549. return 0;
  24550. }
  24551. return 0;
  24552. }
  24553. forward OnOAddress(playerid);
  24554. public OnOAddress(playerid)
  24555. {
  24556. if(cache_num_rows() == 1) {
  24557. new HouseID = cache_get_field_content_int(0, "pHouseID");
  24558. if(HouseID == 0) return SendClientMessage(playerid, COLOR_GREY, "That player doesn't own a house.");
  24559. if(CP[playerid] != CHECKPOINT_NONE)
  24560. {
  24561. CP[playerid] = CHECKPOINT_NONE;
  24562. DisablePlayerCheckpointEx(playerid);
  24563. }
  24564. SetPlayerCheckpointEx(playerid, HouseInfo[HouseID][hOutsideX], HouseInfo[HouseID][hOutsideY], HouseInfo[HouseID][hOutsideZ], 2.0);
  24565. CP[playerid] = CHECKPOINT_ADDRESS;
  24566. SendClientMessage(playerid, COLOR_WHITE, "That player's house has been marked on the map (red dot).");
  24567. }
  24568. else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  24569. return 1;
  24570. }
  24571. forward OnNamechange(playerid, name[]);
  24572. public OnNamechange(playerid, name[])
  24573. {
  24574. if(cache_num_rows() == 1) return SendClientMessage(playerid, COLOR_GREY, "That name is already registered.");
  24575. PlayerInfo[playerid][pReqNC] = 90;
  24576. new str[128];
  24577. for(new i = 0; i < sizeof(SurnameInfo); i++){
  24578. if(strcmp(SurnameInfo[i][Surname], GetPlayerSurnameStr(name)) == 0 && SurnameInfo[i][Taken] == 1){
  24579. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s is a restricted surname.", name);
  24580. SendAdminMessage(COLOR_WHITE, str);
  24581. new str2[128];
  24582. format(str2, sizeof(str2), "{FF0000}AdmWarning{FFFFFF}: %s[%d] has requested a namechange to %s, use /approvename or /denyname to respond.", PlayerOOCName(playerid), playerid, name);
  24583. SendAdminMessage(COLOR_WHITE, str2);
  24584. strmid(NameChangeRequest[playerid], name, 0, strlen(name), 255);
  24585. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Your name change request was sent to the administrators, please be patient, they might be busy.");
  24586. return 1;
  24587. }
  24588. else
  24589. {
  24590. strmid(NameChangeRequest[playerid], name, 0, strlen(name), 255);
  24591. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Your name change request was sent to the administrators, please be patient.");
  24592. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s[%d] has requested a namechange to %s, use /approvename or /denyname to respond.", PlayerOOCName(playerid), playerid, name);
  24593. SendAdminMessage(COLOR_WHITE, str);
  24594. return 1;
  24595. }
  24596. }
  24597. return 1;
  24598. }
  24599. forward OnUndercoverNamechange(playerid, name[], level);
  24600. public OnUndercoverNamechange(playerid, name[], level)
  24601. {
  24602. printf("Called OnUndercoverNamechange");
  24603. new str[128];
  24604. if(cache_num_rows() == 1) {SendClientMessage(playerid, COLOR_GREY, "That name is already registered."); strmid(groupNamechangeRequest[playerid], "0", 0, 255); return 1;}
  24605. else {
  24606. format(str, sizeof(str), "You have requested the name \"%s\" and level %d", name, level);
  24607. SendClientMessage(playerid, COLOR_GREY, str);
  24608. }
  24609. new str2[128];
  24610. format(str2, sizeof(str2), "%s[%d] wants to change their name to %s with level %d. /approvehnc [player] to confirm.", PlayerICName(playerid), playerid, name, level);
  24611. foreach(new p: Player) {
  24612. if(PlayerInfo[playerid][pMember] == FACTION_FBI) { // For FBI
  24613. if(PlayerInfo[p][pLeader] == FACTION_FBI) {
  24614. SendClientMessage(p, COLOR_LIGHTBLUE, str2);
  24615. }
  24616. }
  24617. else if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) { // So HA R4's can see it
  24618. if( (PlayerInfo[p][pGroupRank] >= 4 || IsGroupLeader(p)) && PlayerInfo[p][pGroup] == GROUP_HITMAN) {
  24619. SendClientMessage(p, COLOR_LIGHTBLUE, str2);
  24620. }
  24621. }
  24622. else { // For groups
  24623. if((PlayerInfo[playerid][pGroup] == PlayerInfo[p][pGroup]) && IsGroupLeader(p)) {
  24624. SendClientMessage(p, COLOR_LIGHTBLUE, str2);
  24625. }
  24626. }
  24627. }
  24628. return 1;
  24629. }
  24630. IsFallingFromInterior(playerid) {
  24631. if(IsPlayerInAnyVehicle(playerid))
  24632. return false;
  24633. new Float:playerPos[3];
  24634. GetPlayerPos(playerid, playerPos[0], playerPos[1], playerPos[2]);
  24635. if( !IsPlayerMoving(playerid) ||
  24636. !IsPlayerFalling(playerid) ||
  24637. PlayerInfo[playerid][pJailed] ||
  24638. playerPos[2] < 800
  24639. ) return false;
  24640. return true;
  24641. }
  24642. //===============================================
  24643. Timer:GetResponseKit(playerid)
  24644. {
  24645. new Float:pAngle;
  24646. GetPlayerFacingAngle(playerid, pAngle);
  24647. SetPlayerFacingAngle(playerid, pAngle +180);
  24648. RapidResKit[playerid] = CreateObject(1789, 0, 0, 0, 0, 0, 0);
  24649. AttachObjectToPlayer(RapidResKit[playerid], playerid, 0.00, 1, -0.5, 0, 0, -90);
  24650. RapidResKitActive[playerid] = 1;
  24651. HasARapidResKit[playerid] = 1;
  24652. return 1;
  24653. }
  24654. forward MedicCountOffline(playerid);
  24655. public MedicCountOffline(playerid)
  24656. {
  24657. new rows, fields;
  24658. cache_get_data(rows, fields);
  24659. if(!rows) return SendClientMessage(playerid, COLOR_GREY, "No counts above 0.");
  24660. SendClientMessage(playerid, COLOR_DOCTOR, "Offline Medic Ranks");
  24661. new name[MAX_PLAYER_NAME], count, rank;
  24662. for(new i = 0; i < rows; i++)
  24663. {
  24664. cache_get_field_content(i, "Name", name);
  24665. if(IsPlayerConnected(GetPlayerIDFromName(name))) continue;
  24666. count = cache_get_field_content_int(i, "MedicCount");
  24667. rank = cache_get_field_content_int(i, "Rank");
  24668. new str[128];
  24669. format(str, sizeof(str), "Name: %s | Rank: %s | Count: %d", name, rankNames_FMD[ rank ], count);
  24670. SendClientMessage(playerid, COLOR_DOCTOR, str);
  24671. }
  24672. return 1;
  24673. }
  24674. stock IsPlayerNearSector9HQ(playerid) {
  24675. return (IsPlayerInRangeOfPoint(playerid, 10.0, HQ_SECTOR9));
  24676. }
  24677. stock IsPlayerNearHitmenHQ(playerid) {
  24678. return IsPlayerInRangeOfPoint(playerid, 10.0, HQ_HITMAN);
  24679. }
  24680. stock IsPlayerNearSyndicateHQ(playerid) {
  24681. return (IsPlayerInRangeOfPoint(playerid, 10.0, HQ_SYNDICATE));
  24682. }
  24683. stock IsPlayerNearCJNGHQ(playerid) {
  24684. return (IsPlayerInRangeOfPoint(playerid, 10.0, HQ_CJNG));
  24685. }
  24686. stock IsPlayerNearFBIHQ(playerid) {
  24687. return(
  24688. IsPlayerInRangeOfPoint(playerid, 5.0, 1041.5110, 1521.4526, 9010.0781) ||
  24689. IsPlayerInRangeOfPoint(playerid, 5.0, 225.7773, 122.7064, 999.0639)
  24690. );
  24691. }
  24692. stock IsPlayerNearSAPDHQ(playerid){
  24693. if(
  24694. IsPlayerInRangeOfPoint(playerid, 2, 1533.3926,-1674.6483,1104.7809) ||
  24695. IsPlayerInRangeOfPoint(playerid, 2, 2731.6145,-2480.5967,1088.8622) ||
  24696. IsPlayerInRangeOfPoint(playerid, 2, 255.3, 77.4, 1003.6) ||
  24697. IsPlayerInRangeOfPoint(playerid, 2, 1927.1150, 1872.7283, 30.9359) ||
  24698. IsPlayerInRangeOfPoint(playerid, 2, -2409.1729, 2047.1067, 991.6563) ||
  24699. IsPlayerInRangeOfPoint(playerid, 2, -1137.5980, -991.1368, 9999.2588)
  24700. ) return 1;
  24701. return 0;
  24702. }
  24703. SetPlayerMasked(playerid, bool:doMasked) {
  24704. PlayerInfo[playerid][pMask] = convertBool(doMasked);
  24705. foreach(new i: Player) {
  24706. ShowPlayerNameTagForPlayer(i, playerid, convertBool(!doMasked));
  24707. }
  24708. }
  24709. //==============================================================================
  24710. CreateVIPCar(slot) {
  24711. if(VipCars[slot])
  24712. DestroyVehicle(VipCars[slot]);
  24713. switch(slot) {
  24714. // Bronze //
  24715. case 0:
  24716. VipCars[slot] = CreateVehicleEx(560, 1531.19995117, -1478.80004883, 9.30000019, 0.00000000, 123, 1, 900);
  24717. case 1:
  24718. VipCars[slot] = CreateVehicleEx(560, 1528.09960938, -1478.79980469, 9.30000019, 0.00000000, 123, 39, 900);
  24719. case 2:
  24720. VipCars[slot] = CreateVehicleEx(581, 1512.09997559, -1478.59997559, 9.19999981, 0.00000000, 123, 1, 900);
  24721. case 3:
  24722. VipCars[slot] = CreateVehicleEx(581, 1510.50000000, -1478.59997559, 9.19999981, 0.00000000, 123, 1, 900);
  24723. case 4:
  24724. VipCars[slot] = CreateVehicleEx(559, 1521.50000000, -1478.80004883, 9.30000019, 0.00000000, 123, 1, 900);
  24725. case 5:
  24726. VipCars[slot] = CreateVehicleEx(559, 1518.09997559, -1478.80004883, 9.30000019, 0.00000000, 123, 1, 900);
  24727. case 6:
  24728. VipCars[slot] = CreateVehicleEx(559, 1514.90002441, -1478.80004883, 9.30000019, 0.00000000, 123, 1, 900);
  24729. case 7:
  24730. VipCars[slot] = CreateVehicleEx(560, 1524.80004883, -1478.90002441, 9.30000019, 0.00000000, 123, 39, 900);
  24731. // Silver //
  24732. case 8:
  24733. VipCars[slot] = CreateVehicleEx(522, 1511.30004883, -1474.59997559, 9.19999981, 268.00000000, 35, 35, 900);
  24734. case 9:
  24735. VipCars[slot] = CreateVehicleEx(522, 1511.30004883, -1473.69995117, 9.19999981, 267.99499512, 35, 35, 900);
  24736. case 10:
  24737. VipCars[slot] = CreateVehicleEx(522, 1511.30004883, -1472.69995117, 9.19999981, 267.99499512, 35, 35, 900);
  24738. case 11:
  24739. VipCars[slot] = CreateVehicleEx(603, 1512.40002441, -1470.50000000, 9.30000019, 270.00000000, 35, 1, 900);
  24740. case 12:
  24741. VipCars[slot] = CreateVehicleEx(451, 1512.30004883, -1467.50000000, 9.30000019, 270.00000000, 35, 36, 900);
  24742. // Gold //
  24743. case 13:
  24744. VipCars[slot] = CreateVehicleEx(411, 1511.40002441, -1460.00000000, 9.31486607, 180.00000000, 6, 1, 900);
  24745. case 14:
  24746. VipCars[slot] = CreateVehicleEx(411, 1514.59997559, -1460.00000000, 9.31486607, 180.00000000, 6, 125, 900);
  24747. case 15:
  24748. VipCars[slot] = CreateVehicleEx(411, 1517.69995117, -1459.90002441, 9.31486607, 180.00000000, 6, 125, 900);
  24749. case 16:
  24750. VipCars[slot] = CreateVehicleEx(541, 1520.59997559, -1459.80004883, 9.19999981, 180.00000000, 6, -1, 900);
  24751. case 17:
  24752. VipCars[slot] = CreateVehicleEx(541, 1523.50000000, -1459.80004883, 9.19999981, 180.00000000, 6, -1, 900);
  24753. case 18:
  24754. VipCars[slot] = CreateVehicleEx(541, 1526.30004883, -1459.80004883, 9.19999981, 180.00000000, 6, -1, 900);
  24755. // Diamond //
  24756. case 19:
  24757. VipCars[slot] = CreateVehicleEx(562,1107.2806,-1877.1764,13.2064,179.5505,3,3, 900);
  24758. case 20:
  24759. VipCars[slot] = CreateVehicleEx(415,1111.9376,-1877.1714,13.3396,178.3269,3,3, 900);
  24760. case 21:
  24761. VipCars[slot] = CreateVehicleEx(415,1121.2952,-1876.9077,13.3205,181.9011,3,3, 900);
  24762. case 22:
  24763. VipCars[slot] = CreateVehicleEx(562,1125.4487,-1876.9957,13.2084,177.9896,3,3, 900);
  24764. case 23:
  24765. VipCars[slot] = CreateVehicleEx(434,1150.7235,-1879.3307,13.4778,175.4065,12,12, 900);
  24766. case 24:
  24767. VipCars[slot] = CreateVehicleEx(434,1155.4962,-1879.4285,13.5226,177.0588,2,2, 900);
  24768. case 25:
  24769. VipCars[slot] = CreateVehicleEx(535,1173.0529,-1888.3988,13.5066,88.2294,3,3, 900);
  24770. case 26:
  24771. VipCars[slot] = CreateVehicleEx(535,1180.5245,-1888.5300,13.5002,88.8510,3,3, 900);
  24772. case 27:
  24773. VipCars[slot] = CreateVehicleEx(495,1203.2216,-1879.8966,14.0146,177.3119,3,1, 900);
  24774. case 28:
  24775. VipCars[slot] = CreateVehicleEx(495,1208.1833,-1879.8411,13.8512,181.8271,3,1, 900);
  24776. case 29:
  24777. VipCars[slot] = CreateVehicleEx(515,1147.6578,-1887.6355,14.5881,87.4716,1,3, 900);
  24778. case 30:
  24779. VipCars[slot] = CreateVehicleEx(487,1145.9408,-1870.9009,26.5314,312.8899,3,3, 900);
  24780. }
  24781. return 1;
  24782. }
  24783. //To be converted to ZCMD & moved to /commands.inc ~ Desmond
  24784. #include "..\gamemodes\todo\OnPlayerCommandReceived.inc"
  24785. //==============================================================================
  24786. IsPlayerInRangeOfPlayer(Float:radi, playerid, targetid)
  24787. {
  24788. if(IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
  24789. {
  24790. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid))
  24791. {
  24792. new Float:pos[3];
  24793. GetPlayerPos(targetid, pos[0], pos[1], pos[2]);
  24794. if(IsPlayerInRangeOfPoint(playerid, radi, pos[0], pos[1], pos[2]))
  24795. {
  24796. return 1;
  24797. }
  24798. }
  24799. }
  24800. return 0;
  24801. }
  24802. //==============================================================================
  24803. stock CallMedicalBackup(playerid)
  24804. {
  24805. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You need to be masked to request backup from other factions as S9.");
  24806. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  24807. {
  24808. foreach( new i: Player )
  24809. {
  24810. if(IsPlayerConnected(i))
  24811. {
  24812. if((PlayerInfo[i][pMember] == 4 && !CheckForJammer(i)) || (FakeFaction[i] == 4 && !CheckForJammer(i)))
  24813. {
  24814. if(FakeFaction[playerid] == 1) SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  24815. else if(FakeFaction[playerid] == 4) SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  24816. else if(FakeFaction[playerid] == 5) SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  24817. else SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  24818. }
  24819. }
  24820. }
  24821. }
  24822. else
  24823. {
  24824. foreach( new i: Player )
  24825. {
  24826. if(IsPlayerConnected(i))
  24827. {
  24828. if((PlayerInfo[i][pMember] == 4 || FakeFaction[i]) && !CheckForJammer(i))
  24829. {
  24830. SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  24831. }
  24832. }
  24833. }
  24834. }
  24835. new str[128];
  24836. backupType[playerid] = 4;
  24837. if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
  24838. (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
  24839. format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting medical backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
  24840. }
  24841. else format(str, sizeof(str), "HQ: All units, %s %s %s is requesting medical backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
  24842. SendRadioMessage(4, TEAM_BLUE_COLOR, str);
  24843. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  24844. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24845. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"Medical\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  24846. return 1;
  24847. }
  24848. stock CallSASTBackup(playerid)
  24849. {
  24850. foreach( new i: Player )
  24851. {
  24852. if(IsPlayerConnected(i))
  24853. {
  24854. if((PlayerInfo[i][pMember] == 3 || FakeFaction[i]) && !CheckForJammer(i))
  24855. {
  24856. SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  24857. }
  24858. }
  24859. }
  24860. backupType[playerid] = 3;
  24861. new str[128];
  24862. format(str, sizeof(str), "HQ: All units, %s %s %s is requesting SASD backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  24863. SendRadioMessage(3, TEAM_BLUE_COLOR, str);
  24864. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  24865. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24866. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"SASD\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  24867. return 1;
  24868. }
  24869. stock CallDOCBackup(playerid)
  24870. {
  24871. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You need to be masked to request backup from other factions as S9.");
  24872. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  24873. {
  24874. foreach( new i: Player )
  24875. {
  24876. if(IsPlayerConnected(i))
  24877. {
  24878. if((PlayerInfo[i][pMember] == 5 && !CheckForJammer(i)) || (FakeFaction[i] == 5 && !CheckForJammer(i)))
  24879. {
  24880. if(FakeFaction[playerid] == 1) SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  24881. else if(FakeFaction[playerid] == 4) SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  24882. else if(FakeFaction[playerid] == 5) SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  24883. else SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFFFF);
  24884. }
  24885. }
  24886. }
  24887. }
  24888. else
  24889. {
  24890. foreach( new i: Player )
  24891. {
  24892. if(IsPlayerConnected(i))
  24893. {
  24894. if(PlayerInfo[i][pMember] == 5 && !CheckForJammer(i))
  24895. {
  24896. SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  24897. }
  24898. }
  24899. }
  24900. }
  24901. new str[128];
  24902. backupType[playerid] = 5;
  24903. if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
  24904. (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
  24905. format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting DoC backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
  24906. }
  24907. else format(str, sizeof(str), "HQ: All units, %s %s %s is requesting DoC backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
  24908. SendRadioMessage(5, TEAM_BLUE_COLOR, str);
  24909. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  24910. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24911. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"DoC\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  24912. return 1;
  24913. }
  24914. stock CallS9Backup(playerid)
  24915. {
  24916. if(PlayerInfo[playerid][pGroup] != GROUP_S9) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /backup [Police, DEA, SASD, DoC, Medic]");
  24917. foreach( new i: Player )
  24918. {
  24919. if(IsPlayerConnected(i))
  24920. {
  24921. if(PlayerInfo[i][pGroup] == GROUP_S9 && !CheckForJammer(i))
  24922. {
  24923. SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFFFF);
  24924. }
  24925. }
  24926. }
  24927. backupType[playerid] = 666;
  24928. new str[128];
  24929. format(str, sizeof(str), "HQ: All units, %s %s is requesting S9 backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerICName(playerid));
  24930. SendGroupMessage(GROUP_S9, COLOR_S9, str);
  24931. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"S9\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  24932. return 1;
  24933. }
  24934. stock CallFBIBackup(playerid)
  24935. {
  24936. foreach( new i: Player )
  24937. {
  24938. if(IsPlayerConnected(i))
  24939. {
  24940. if((PlayerInfo[i][pMember] == 2 || FakeFaction[i]) && !CheckForJammer(i))
  24941. {
  24942. SetPlayerMarkerForPlayer(i, playerid, 0x8D8DFFFF);
  24943. }
  24944. }
  24945. }
  24946. new str[128];
  24947. backupType[playerid] = 2;
  24948. if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
  24949. (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
  24950. format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting DEA backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
  24951. }
  24952. format(str, sizeof(str), "HQ: All units, %s %s %s is requesting DEA backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
  24953. SendRadioMessage(2, TEAM_BLUE_COLOR, str);
  24954. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  24955. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  24956. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"DEA\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  24957. return 1;
  24958. }
  24959. stock CallPoliceBackup(playerid)
  24960. {
  24961. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You need to be masked to request backup from other factions as S9.");
  24962. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  24963. {
  24964. foreach( new i: Player )
  24965. {
  24966. if(IsPlayerConnected(i))
  24967. {
  24968. if((PlayerInfo[i][pMember] == 1 || FakeFaction[i]) && !CheckForJammer(i))
  24969. {
  24970. if(FakeFaction[playerid] == 1) SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  24971. else if(FakeFaction[playerid] == 4) SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  24972. else if(FakeFaction[playerid] == 5) SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  24973. else SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  24974. }
  24975. }
  24976. }
  24977. }
  24978. else
  24979. {
  24980. foreach( new i: Player )
  24981. {
  24982. if(IsPlayerConnected(i))
  24983. {
  24984. if(PlayerInfo[i][pMember] == 1 && !CheckForJammer(i))
  24985. {
  24986. SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  24987. }
  24988. }
  24989. }
  24990. }
  24991. backupType[playerid] = 1;
  24992. new str[128];
  24993. if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
  24994. (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
  24995. format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting police backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
  24996. }
  24997. else format(str, sizeof(str), "HQ: All units, %s %s %s is requesting police backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  24998. SendRadioMessage(1, TEAM_BLUE_COLOR, str);
  24999. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  25000. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  25001. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"Police\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  25002. return 1;
  25003. }
  25004. stock CallSANGBackup(playerid)
  25005. {
  25006. if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You need to be masked to request backup from other factions as S9.");
  25007. if(PlayerInfo[playerid][pGroup] == GROUP_S9)
  25008. {
  25009. foreach( new i: Player )
  25010. {
  25011. if(IsPlayerConnected(i))
  25012. {
  25013. if((PlayerInfo[i][pMember] == 14 || FakeFaction[i]) && !CheckForJammer(i))
  25014. {
  25015. if(FakeFaction[playerid] == 1) SetPlayerMarkerForPlayer(i, playerid, 0x2641FEFF);
  25016. else if(FakeFaction[playerid] == 4) SetPlayerMarkerForPlayer(i, playerid, 0xFF8282FF);
  25017. else if(FakeFaction[playerid] == 5) SetPlayerMarkerForPlayer(i, playerid, 0x9ACD32FF);
  25018. else SetPlayerMarkerForPlayer(i, playerid, TCOLOR_LIGHTGREEN);
  25019. }
  25020. }
  25021. }
  25022. }
  25023. else
  25024. {
  25025. foreach( new i: Player )
  25026. {
  25027. if(IsPlayerConnected(i))
  25028. {
  25029. if(PlayerInfo[i][pMember] == 14 && !CheckForJammer(i))
  25030. {
  25031. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_LIGHTGREEN);
  25032. }
  25033. }
  25034. }
  25035. }
  25036. backupType[playerid] = 14;
  25037. new str[128];
  25038. if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
  25039. (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
  25040. format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting AFSA backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
  25041. }
  25042. else format(str, sizeof(str), "HQ: All units, %s %s %s is requesting AFSA backup, they have been marked on your GPS.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
  25043. SendRadioMessage(FACTION_SANG, TEAM_BLUE_COLOR, str);
  25044. format(str, sizeof(str), "* %s reaches down and presses a button on their waistbelt.", PlayerICName(playerid));
  25045. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  25046. SendClientMessage(playerid, COLOR_YELLOW, "You have called for \"AFSA\" backup - this backup won't be removed until you \"/bkc\" or log out.");
  25047. return 1;
  25048. }
  25049. new Float:carLicensePositions[][3] =
  25050. {
  25051. {1266.8654, -1842.2166, 13.2696},
  25052. {1061.5475, -1836.2394, 13.3718},
  25053. {797.6024, -1766.4312, 13.2727},
  25054. {637.3297, -1713.8506, 14.0442},
  25055. {614.5106, -1392.9651, 13.2734},
  25056. {310.4745, -1582.1296, 32.9277},
  25057. {244.1641, -1619.4785, 32.9742},
  25058. {459.5974, -1659.8098, 25.1516},
  25059. {807.1065, -1689.8192, 13.2577},
  25060. {900.5879, -1774.6519, 13.2578},
  25061. {1037.5203, -1789.5881, 13.5063},
  25062. {1148.8795, -1714.0670, 13.6563},
  25063. {1185.4692, -1855.1963, 13.2734},
  25064. {1215.3466, -1842.4543, 13.2580},
  25065. {1280.1890, -1816.4839, 13.2600}
  25066. };
  25067. public OnPlayerEnterRaceCheckpoint(playerid)
  25068. {
  25069. if(dmvSlot[playerid] == 1)
  25070. {
  25071. DisablePlayerRaceCheckpoint(playerid);
  25072. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25073. dmvSlot[playerid] ++;
  25074. }
  25075. else if(dmvSlot[playerid] == 2)
  25076. {
  25077. DisablePlayerRaceCheckpoint(playerid);
  25078. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25079. dmvSlot[playerid]++;
  25080. }
  25081. else if(dmvSlot[playerid] == 3)
  25082. {
  25083. DisablePlayerRaceCheckpoint(playerid);
  25084. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25085. dmvSlot[playerid]++;
  25086. }
  25087. else if(dmvSlot[playerid] == 4)
  25088. {
  25089. DisablePlayerRaceCheckpoint(playerid);
  25090. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25091. dmvSlot[playerid]++;
  25092. }
  25093. else if(dmvSlot[playerid] == 5)
  25094. {
  25095. DisablePlayerRaceCheckpoint(playerid);
  25096. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25097. dmvSlot[playerid]++;
  25098. }
  25099. else if(dmvSlot[playerid] == 6)
  25100. {
  25101. DisablePlayerRaceCheckpoint(playerid);
  25102. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25103. dmvSlot[playerid]++;
  25104. }
  25105. else if(dmvSlot[playerid] == 7)
  25106. {
  25107. DisablePlayerRaceCheckpoint(playerid);
  25108. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25109. dmvSlot[playerid]++;
  25110. }
  25111. else if(dmvSlot[playerid] == 8)
  25112. {
  25113. DisablePlayerRaceCheckpoint(playerid);
  25114. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25115. dmvSlot[playerid]++;
  25116. }
  25117. else if(dmvSlot[playerid] == 9)
  25118. {
  25119. DisablePlayerRaceCheckpoint(playerid);
  25120. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25121. dmvSlot[playerid]++;
  25122. }
  25123. else if(dmvSlot[playerid] == 10)
  25124. {
  25125. DisablePlayerRaceCheckpoint(playerid);
  25126. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25127. dmvSlot[playerid]++;
  25128. }
  25129. else if(dmvSlot[playerid] == 11)
  25130. {
  25131. DisablePlayerRaceCheckpoint(playerid);
  25132. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25133. dmvSlot[playerid]++;
  25134. }
  25135. else if(dmvSlot[playerid] == 12)
  25136. {
  25137. DisablePlayerRaceCheckpoint(playerid);
  25138. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25139. dmvSlot[playerid]++;
  25140. }
  25141. else if(dmvSlot[playerid] == 13)
  25142. {
  25143. DisablePlayerRaceCheckpoint(playerid);
  25144. SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid] + 1][0], carLicensePositions[dmvSlot[playerid] + 1][1], carLicensePositions[dmvSlot[playerid] + 1][2], 3.0);
  25145. dmvSlot[playerid]++;
  25146. }
  25147. else if(dmvSlot[playerid] == 14)
  25148. {
  25149. DisablePlayerRaceCheckpoint(playerid);
  25150. SetPlayerRaceCheckpoint(playerid, 1, carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], carLicensePositions[dmvSlot[playerid]][0], carLicensePositions[dmvSlot[playerid]][1], carLicensePositions[dmvSlot[playerid]][2], 3.0);
  25151. dmvSlot[playerid]++;
  25152. }
  25153. else if(dmvSlot[playerid] == 15)
  25154. {
  25155. DisablePlayerRaceCheckpoint(playerid);
  25156. dmvSlot[playerid] =0;
  25157. new Float:health;
  25158. GetVehicleHealth(GetPlayerVehicleID(playerid), health);
  25159. if(!autoFailed[playerid])
  25160. {
  25161. if(health >= 80)
  25162. {
  25163. SendClientMessage(playerid, COLOR_YELLOW, "Congratulations, you have PASSED the driving test! Enjoy your time as a driver!");
  25164. SendClientMessage(playerid, COLOR_LIGHTBLUE, "> You may now drive any land vehicle without the worry of being caught!");
  25165. PlayerInfo[playerid][pCarLicense] = 1;
  25166. GameTextForPlayer(playerid, "Driving License ~g~PASSED!", 3000, 5);
  25167. }
  25168. else
  25169. {
  25170. SendClientMessage(playerid, COLOR_YELLOW, "Unfortunately, you have FAILED the test this time, reason: Too much damage to the vehicle.");
  25171. SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Feel free to try again, better luck next time!");
  25172. GameTextForPlayer(playerid, "Driving License ~r~FAILED!", 3000, 5);
  25173. }
  25174. }
  25175. else
  25176. {
  25177. SendClientMessage(playerid, COLOR_YELLOW, "Unfortunately, you have FAILED the test this time, reason: Speeds of above 50 MPH.");
  25178. SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Feel free to try again, better luck next time!");
  25179. GameTextForPlayer(playerid, "Driving License ~r~FAILED!", 3000, 5);
  25180. }
  25181. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  25182. SetPlayerVirtualWorld(playerid, 0);
  25183. SetPlayerPos(playerid, 1491.2963, 1306.1758, 1093.2964);
  25184. SetPlayerInterior(playerid, 3);
  25185. SetCameraBehindPlayer(playerid);
  25186. }
  25187. return 1;
  25188. }
  25189. stock FailDrivingText(playerid)
  25190. {
  25191. DisablePlayerRaceCheckpoint(playerid);
  25192. dmvSlot[playerid] =0;
  25193. SendClientMessage(playerid, COLOR_YELLOW, "Unfortunately, you have FAILED the test this time, reason: You exited the test vehicle.");
  25194. SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Feel free to try again, better luck next time!");
  25195. GameTextForPlayer(playerid, "Driving License ~r~FAILED!", 3000, 5);
  25196. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  25197. SetPlayerVirtualWorld(playerid, 0);
  25198. SetPlayerPos(playerid, 1491.2963, 1306.1758, 1093.2964);
  25199. SetPlayerInterior(playerid, 3);
  25200. SetCameraBehindPlayer(playerid);
  25201. return 1;
  25202. }
  25203. stock findNearestGarbageTruck(playerid) {
  25204. new Float:vX, Float:vY, Float:vZ;
  25205. new vehicleid = -1;
  25206. for(new i = 0; i < MAX_GARBAGE_TRUCKS; i++) {
  25207. vehicleid = GarbageTruck[i][vehicle_id];
  25208. GetVehiclePos(vehicleid, vX, vY, vZ);
  25209. if(IsPlayerInRangeOfPoint(playerid, 35.0, vX, vY, vZ)) {
  25210. //set player variable to the slot
  25211. hasTruckCheckpoint[playerid] = i;
  25212. break;
  25213. } else { //not near the vehicle
  25214. vehicleid = -1;
  25215. }
  25216. }
  25217. return vehicleid;
  25218. }
  25219. forward trashUpdate();
  25220. public trashUpdate() {
  25221. for(new i = 0; i < sizeof(trashInfo); i++) {
  25222. if(trashInfo[i][tAmount] < trashInfo[i][tLimit]) {
  25223. trashInfo[i][tAmount]++;
  25224. //update 3dtext
  25225. new str[128];
  25226. format(str, sizeof(str), "Trash\n{FFFFFF}%d/%d\n/gettrash", trashInfo[i][tAmount], trashInfo[i][tLimit]);
  25227. UpdateDynamic3DTextLabelText(trashInfo[i][trashLabelID], 0x43527DFF, str);
  25228. }
  25229. }
  25230. return 1;
  25231. }
  25232. Timer:unloadTrash(playerid, slot, deliverypoint) {
  25233. if(IsPlayerConnected(playerid)) {
  25234. //skill check
  25235. new level = PlayerInfo[playerid][pWasteSkill];
  25236. new price = 25 * GarbageTruck[slot][capacity] - random(100); //level 1
  25237. new bonus = 0;
  25238. if(level >= 50) { //2
  25239. price = 30 * GarbageTruck[slot][capacity] - random(200);
  25240. }
  25241. else if(level >= 100) { //3
  25242. price = 35 * GarbageTruck[slot][capacity] - random(300);
  25243. }
  25244. else if(level >= 200) { //4
  25245. price = 40 * GarbageTruck[slot][capacity] - random(400);
  25246. }
  25247. else if(level >= 400) { //5
  25248. price = 45 * GarbageTruck[slot][capacity] - random(500); //$4500 max
  25249. }
  25250. new str[128];
  25251. //sell the trash
  25252. if(deliverypoint == 1) {
  25253. format(str, sizeof(str), "* You sold the trash for $%d.", price);
  25254. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  25255. } else if(deliverypoint == 2) {
  25256. bonus = random(600);
  25257. format(str, sizeof(str), "* You dumped the trash in the harbour and saved $%d on trash disposal fees. (total: $%d)", bonus, price + bonus);
  25258. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  25259. }
  25260. format(str, sizeof(str), "~w~Trash sold for~n~~g~$%d!", price + bonus);
  25261. displayCenterHUDInfo(playerid, str, 8);
  25262. GiveMoney(playerid, price + bonus);
  25263. TogglePlayerControllable(playerid, 1); //unfreeze
  25264. //reset variables
  25265. unloadingTrashTimer[playerid] = 0;
  25266. //reset capacity
  25267. GarbageTruck[slot][capacity] = 0;
  25268. format(str, sizeof(str), "Capacity: %d/100", GarbageTruck[slot][capacity]);
  25269. Update3DTextLabelText(GarbageTruck[slot][capacityLabelID], 0x33CCFFFF, str);
  25270. }
  25271. return 1;
  25272. }
  25273. Timer:bringPlayerToCam(playerid) {
  25274. new Float:camPos[3];
  25275. GetPlayerCameraPos(playerid, camPos[0], camPos[1], camPos[2]);
  25276. SetPlayerPos(playerid, camPos[0], camPos[1], camPos[2] - 30);
  25277. return 1;
  25278. }
  25279. ShowS9Armory(playerid) {
  25280. return ShowPlayerDialog(playerid, DIALOG_S9_MAIN, DIALOG_STYLE_LIST, "Sector 9 Armoury", "Armory\nWardrobe\nWardrobe ({ff7b00}Restricted{FFFFFF})\nLaw Enforcement Badges", "Select", "Cancel");
  25281. }
  25282. Timer:UncuffSuspect(playerid)
  25283. {
  25284. setPlayerUncuffed(playerid);
  25285. return 1;
  25286. }
  25287. stock GetVehicleColorName(color)
  25288. {
  25289. new clr[32];
  25290. switch(color)
  25291. {
  25292. case 0:
  25293. clr ="Black";
  25294. case 1:
  25295. clr ="White";
  25296. case 2:
  25297. clr ="Blue";
  25298. case 3:
  25299. clr ="Red";
  25300. case 4:
  25301. clr ="Grey-Green";
  25302. case 5:
  25303. clr ="Purple";
  25304. case 6:
  25305. clr ="Yellow";
  25306. case 7:
  25307. clr ="Blue";
  25308. case 8:
  25309. clr ="Silver";
  25310. case 9:
  25311. clr ="Dark sGrey";
  25312. case 10:
  25313. clr ="Midnight Blue";
  25314. case 11:
  25315. clr ="Dark Grey";
  25316. case 12:
  25317. clr ="Teal";
  25318. case 13:
  25319. clr ="Dark Grey";
  25320. case 14:
  25321. clr ="Light Grey";
  25322. case 15:
  25323. clr ="Silver";
  25324. case 16:
  25325. clr ="Dark Green";
  25326. case 17:
  25327. clr ="Dark Red";
  25328. case 18:
  25329. clr ="Dark Red";
  25330. case 19:
  25331. clr ="Grey";
  25332. case 20:
  25333. clr ="Royal Blue";
  25334. case 21:
  25335. clr ="Rich Maroon";
  25336. case 22:
  25337. clr ="Rich Maroon";
  25338. case 23:
  25339. clr ="Grey";
  25340. case 24:
  25341. clr ="Dark Grey";
  25342. case 25:
  25343. clr ="Dark Grey";
  25344. case 26:
  25345. clr ="Light Grey";
  25346. case 27:
  25347. clr ="Grey";
  25348. case 28:
  25349. clr ="Midnight Blue";
  25350. case 29:
  25351. clr ="Light Grey";
  25352. case 30:
  25353. clr ="Dark Maroon";
  25354. case 31:
  25355. clr ="Red";
  25356. case 32:
  25357. clr ="Baby Blue";
  25358. case 33:
  25359. clr ="Grey";
  25360. case 34:
  25361. clr ="Grey";
  25362. case 35:
  25363. clr ="Dark Grey";
  25364. case 36:
  25365. clr ="Dark Grey";
  25366. case 37:
  25367. clr ="";
  25368. case 38:
  25369. clr ="Tea Green";
  25370. case 39:
  25371. clr ="Steel blue";
  25372. case 40:
  25373. clr ="Black";
  25374. case 41:
  25375. clr ="Light Brown";
  25376. case 42:
  25377. clr ="Bright Maroon";
  25378. case 43:
  25379. clr ="Maroon";
  25380. case 44:
  25381. clr ="Myrtle Green";
  25382. case 45:
  25383. clr ="Maroon";
  25384. case 46:
  25385. clr ="Olive Green";
  25386. case 47:
  25387. clr ="Olive";
  25388. case 48:
  25389. clr ="Khaki Brown";
  25390. case 49:
  25391. clr ="Light Grey";
  25392. case 50:
  25393. clr ="Silver Grey";
  25394. case 51:
  25395. clr ="Dark Green";
  25396. case 52:
  25397. clr ="Dark Teal";
  25398. case 53:
  25399. clr ="Navy Blue";
  25400. case 54:
  25401. clr ="Navy Blue";
  25402. case 55:
  25403. clr ="Brown";
  25404. case 56:
  25405. clr ="Light Grey";
  25406. case 57:
  25407. clr ="Beige";
  25408. case 58:
  25409. clr ="Maroon";
  25410. case 59:
  25411. clr ="Grey-Blue";
  25412. case 60:
  25413. clr ="Grey";
  25414. case 61:
  25415. clr ="Old Gold";
  25416. case 62:
  25417. clr ="Maroon";
  25418. case 63:
  25419. clr ="Grey";
  25420. case 64:
  25421. clr ="Grey";
  25422. case 65:
  25423. clr ="Old Gold";
  25424. case 66:
  25425. clr ="Dark Brown";
  25426. case 67:
  25427. clr ="Light Blue";
  25428. case 68:
  25429. clr ="Light Khaki";
  25430. case 69:
  25431. clr ="Light Pink";
  25432. case 70:
  25433. clr ="Bright Maroon";
  25434. case 71:
  25435. clr ="Light Blue";
  25436. case 72:
  25437. clr ="Grey";
  25438. case 73:
  25439. clr ="Tea Green";
  25440. case 74:
  25441. clr ="Dark Maroon";
  25442. case 75:
  25443. clr ="Dark Blue";
  25444. case 76:
  25445. clr ="Light Brown";
  25446. case 77:
  25447. clr ="Ecru Brown";
  25448. case 78:
  25449. clr ="Maroon";
  25450. case 79:
  25451. clr ="Royal Blue";
  25452. case 80:
  25453. clr ="Rich Maroon";
  25454. case 81:
  25455. clr ="Light Brown";
  25456. case 82:
  25457. clr ="Bright Maroon";
  25458. case 83:
  25459. clr ="Dark Teal Green";
  25460. case 84:
  25461. clr ="Brown";
  25462. case 85:
  25463. clr ="Rich Maroon";
  25464. case 86:
  25465. clr ="Green";
  25466. case 87:
  25467. clr ="Blue ";
  25468. case 88:
  25469. clr ="Maroon";
  25470. case 89:
  25471. clr ="Beige";
  25472. case 90:
  25473. clr ="Grey";
  25474. case 91:
  25475. clr ="Dark Blue";
  25476. case 92:
  25477. clr ="Grey";
  25478. case 93:
  25479. clr ="Sky Blue";
  25480. case 94:
  25481. clr ="Blue";
  25482. case 95:
  25483. clr ="Navy Blue";
  25484. case 96:
  25485. clr ="Silver";
  25486. case 97:
  25487. clr ="Light Blue";
  25488. case 98:
  25489. clr ="Grey";
  25490. case 99:
  25491. clr ="Light Brown ";
  25492. case 100:
  25493. clr ="Blue";
  25494. case 101:
  25495. clr ="Dark Blue";
  25496. case 102:
  25497. clr ="Light Brown";
  25498. case 103:
  25499. clr ="Blue";
  25500. case 104:
  25501. clr ="Brown";
  25502. case 105:
  25503. clr ="Dark Grey";
  25504. case 106:
  25505. clr ="Blue";
  25506. case 107:
  25507. clr ="Light Brown";
  25508. case 108:
  25509. clr ="Yale Blue";
  25510. case 109:
  25511. clr ="Dark Grey";
  25512. case 110:
  25513. clr ="Brown";
  25514. case 111:
  25515. clr ="Light Grey";
  25516. case 112:
  25517. clr ="Blue";
  25518. case 113:
  25519. clr ="Brown";
  25520. case 114:
  25521. clr ="Dark Grey";
  25522. case 115:
  25523. clr ="Dark Red";
  25524. case 116:
  25525. clr ="Navy Blue";
  25526. case 117:
  25527. clr ="Dark Maroon";
  25528. case 118:
  25529. clr ="Light Blue";
  25530. case 119:
  25531. clr ="Brown";
  25532. case 120:
  25533. clr ="Light Brown";
  25534. case 121:
  25535. clr ="Dark Maroon";
  25536. case 122:
  25537. clr ="Grey";
  25538. case 123:
  25539. clr ="Brown";
  25540. case 124:
  25541. clr ="Rich Maroon";
  25542. case 125:
  25543. clr ="Dark Blue";
  25544. case 126:
  25545. clr ="Pink";
  25546. }
  25547. return clr;
  25548. }
  25549. stock getFoodTypeById(type) {
  25550. new foodType[25];
  25551. switch(type) {
  25552. case 0: {
  25553. foodType = "None";
  25554. }
  25555. case 1: {
  25556. foodType = "Pizza box";
  25557. }
  25558. case 2: {
  25559. foodType = "Clucknbell tray";
  25560. }
  25561. case 3: {
  25562. foodType = "Burgershot tray";
  25563. }
  25564. case 4: {
  25565. foodType = "Donut tray";
  25566. }
  25567. default: {
  25568. foodType = "Unknown";
  25569. }
  25570. }
  25571. return foodType;
  25572. }
  25573. stock CheckBlockedSlots(playerid)
  25574. {
  25575. new count = 0;
  25576. if(Blocked[playerid][Number1] != -420)count +=1;
  25577. if(Blocked[playerid][Number2] != -420)count +=1;
  25578. if(Blocked[playerid][Number3] != -420)count +=1;
  25579. if(Blocked[playerid][Number4] != -420)count +=1;
  25580. if(Blocked[playerid][Number5] != -420)count +=1;
  25581. if(count ==5) return false;
  25582. else return true;
  25583. }
  25584. Timer:dragTimerActual(playerid, draggingID)
  25585. {
  25586. if(!IsPlayerConnected(playerid) || !IsPlayerConnected(draggingID)){ KillTimer(dragTimer[draggingID]); return 1; }
  25587. if(IsPlayerInAnyVehicle(playerid)){ KillTimer(dragTimer[draggingID]); return 1; }
  25588. new Float:Playerx, Float:Playery, Float:Playerz;
  25589. SetPlayerVirtualWorld(draggingID, GetPlayerVirtualWorld(playerid));
  25590. SetPlayerInterior(draggingID, GetPlayerInterior(playerid));
  25591. GetPlayerPos(playerid, Playerx, Playery, Playerz);
  25592. SetPlayerPos(draggingID, Playerx+1, Playery, Playerz);
  25593. return 1;
  25594. }
  25595. // Types of MDC access
  25596. enum {
  25597. MDC_ACCESS_NONE,
  25598. MDC_ACCESS_FULL,
  25599. MDC_ACCESS_CRIMES_ONLY
  25600. };
  25601. // Types of MDC access organizations
  25602. enum {
  25603. MDC_ORG_FACTION,
  25604. MDC_ORG_GROUP
  25605. };
  25606. // What organizations can use /mdc and what access do they have?
  25607. new mdcOrganizations[][3] = {
  25608. // {organization_type, organization_id, access_type}
  25609. // organization_type = the type of organization
  25610. // organization_id = the ID of the faction or group
  25611. // acces_type = what type of access does this faction have
  25612. {MDC_ORG_FACTION, 1, MDC_ACCESS_FULL}, // SAPD
  25613. {MDC_ORG_FACTION, 11, MDC_ACCESS_FULL}, // Sector 9
  25614. {MDC_ORG_FACTION, 2, MDC_ACCESS_FULL}, // FBI | DEA
  25615. {MDC_ORG_FACTION, 5, MDC_ACCESS_FULL}, // DoC
  25616. {MDC_ORG_FACTION, 6, MDC_ACCESS_FULL}, // Government
  25617. {MDC_ORG_FACTION, 4, MDC_ACCESS_CRIMES_ONLY}, // SAFMD
  25618. {MDC_ORG_FACTION, 7, MDC_ACCESS_FULL}, // Judicial
  25619. {MDC_ORG_FACTION, 14, MDC_ACCESS_FULL} // SANG
  25620. };
  25621. // MDC locations
  25622. new Float:mdcLocations[][4] = {
  25623. // {mdc_x, mdc_y, mdc_z, mdc_range}
  25624. {1176.4827, -1327.2727, 1089.5693, 3.0}, // All Saints hospital computer
  25625. {1528.58, -1677.77, 5.89, 7.0}, // SAPD garage
  25626. {-1960.64, 1249.0, 10001.0, 30.0}, // SAPD TDB office
  25627. {378.09, 180.45, 1014.18, 10.0}, // GOV lockers
  25628. {688.7796, 1512.2487, 9001.9629, 100.0}, // DoC lobby
  25629. {-1868.5681, 960.8786, 6001.0000, 30.0}, // DoC staff area
  25630. {-2238.4836, -1744.2885, 6000.5083, 30.0}, // DoC warden
  25631. {-1499.7362, -382.4726, 6000.0259, 30.0}, // DoC office
  25632. {242.59, 75.77, 1004.76, 100.0}, // PD main int
  25633. {-2582.34, -108.98, 6001.08, 100.0}, // PD cells
  25634. {216.44, 146.23, 1007.24, 50.0}, // PD offices
  25635. {1176.80, -1333.34, 1089.57, 100.0} // All Saints Hospital
  25636. };
  25637. stock IsPlayerNearMDC(playerid) {
  25638. if(PlayerInfo[playerid][pPortMDC] || PlayerIsInMDCCar(playerid) || PlayerInfo[playerid][pMember] == 6)
  25639. return 1;
  25640. for(new i = 0; i < sizeof(mdcLocations); i++) {
  25641. if(IsPlayerInRangeOfPoint(playerid, mdcLocations[i][3], mdcLocations[i][0], mdcLocations[i][1], mdcLocations[i][2]))
  25642. return 1;
  25643. }
  25644. return 0;
  25645. }
  25646. stock GetMDCAccessType(playerid) {
  25647. if(!PlayerInfo[playerid][pMember] && !PlayerInfo[playerid][pGroup])
  25648. return MDC_ACCESS_NONE;
  25649. for(new i = 0; i < sizeof(mdcOrganizations); i++) {
  25650. // Factions
  25651. if(mdcOrganizations[i][0] == MDC_ORG_FACTION && PlayerInfo[playerid][pMember]) {
  25652. if(PlayerInfo[playerid][pMember] == mdcOrganizations[i][1])
  25653. return mdcOrganizations[i][2];
  25654. }
  25655. // Groups
  25656. if(mdcOrganizations[i][0] == MDC_ORG_GROUP && PlayerInfo[playerid][pGroup]) {
  25657. if(PlayerInfo[playerid][pGroup] == mdcOrganizations[i][1])
  25658. return mdcOrganizations[i][2];
  25659. }
  25660. }
  25661. return MDC_ACCESS_NONE;
  25662. }
  25663. stock MDCAccessToStr(accessType) {
  25664. new mdcString[30];
  25665. switch(accessType) {
  25666. case MDC_ACCESS_FULL:
  25667. format(mdcString, sizeof(mdcString), "FULL ACCESS");
  25668. case MDC_ACCESS_CRIMES_ONLY:
  25669. format(mdcString, sizeof(mdcString), "LIMITED ACCESS");
  25670. default:
  25671. format(mdcString, sizeof(mdcString), "NO ACCESS");
  25672. }
  25673. return mdcString;
  25674. }
  25675. stock SendMDCMessage(playerid, theText[]) {
  25676. new mdcString[128];
  25677. format(mdcString, sizeof(mdcString), "(MDC): %s", theText);
  25678. return SendClientMessage(playerid, COLOR_LIGHTRED, mdcString);
  25679. }
  25680. stock LogOffMDC(playerid) {
  25681. SendMDCMessage(playerid, "You have logged off the MDC.");
  25682. format(PlayerInfo[playerid][pMDCSearchName], 128, "None");
  25683. PlayerInfo[playerid][pMDCSearchID] = 0;
  25684. return 1;
  25685. }
  25686. // Returns true if the player is at a point where banking is possible
  25687. IsPlayerAtBankingPoint(playerid) {
  25688. return (
  25689. IsPlayerInRangeOfPoint(playerid, 2.0, 1630.9005,2903.0325,1001.0114) ||
  25690. IsPlayerInRangeOfPoint(playerid, 2.0, 1631.3215,2899.9331,1001.0114) ||
  25691. IsPlayerInRangeOfPoint(playerid, 2.0, 1630.4747,2897.3518,1001.0114) ||
  25692. IsPlayerInRangeOfPoint(playerid, 2.0, 630.3761,2894.4163,1001.0114) ||
  25693. IsPlayerInRangeOfPoint(playerid, 2.0, 1630.7947,2891.9766,1001.0114)
  25694. );
  25695. }
  25696. ProofJessaIsNazi(playerid) {
  25697. new jessaisnazi[1500];
  25698. format(jessaisnazi, sizeof(jessaisnazi),
  25699. "Desert Eagle\t$2,500\n\
  25700. Suppressed Pistol\t$5,000\n\
  25701. {C40000}----------\t----------{FFFFFF}\n\
  25702. M4\t$12,500\n\
  25703. AK47\t$7,500\n\
  25704. {C40000}----------\t----------{FFFFFF}\n\
  25705. Combat Shotgun\t$25,000\n");
  25706. format(jessaisnazi, sizeof(jessaisnazi),
  25707. "%sPump Shotgun\t$2,000\n\
  25708. Sawn-off Shotgun\t$7,500\n\
  25709. {C40000}----------\t----------{FFFFFF}\n\
  25710. MP5\t$1000\n\
  25711. TEC9\t$2,500\n\
  25712. Uzi\t$2,500\n",
  25713. jessaisnazi);
  25714. format(jessaisnazi, sizeof(jessaisnazi),
  25715. "%s{C40000}----------\t----------{FFFFFF}\n\
  25716. Rifle\t$2,500\n\
  25717. Sniper Rifle\t$15,000\n\
  25718. {C40000}----------\t----------{FFFFFF}\n\
  25719. Flamethrower\t$20,000\n\
  25720. Plastic Explosive\t$10,000\n\
  25721. {C40000}----------\t----------{FFFFFF}\n\
  25722. Chainsaw\t$5,000\n\
  25723. Knife\t$1,000\n",
  25724. jessaisnazi);
  25725. format(jessaisnazi, sizeof(jessaisnazi),
  25726. "%s{C40000}----------\t----------{FFFFFF}\n\
  25727. Tear Gas\t$2,500\n\
  25728. Grenades\t$2,500\n\
  25729. Molotov Cocktail\t$2,500\n\
  25730. {C40000}----------\t----------{FFFFFF}\n\
  25731. Health and Armour\t$1,000\n\
  25732. First Aid\t$200\n\
  25733. Half Vest\t$500\n\
  25734. Full Vest\t$1000\n\
  25735. {C40000}----------\t----------{FFFFFF}\n",
  25736. jessaisnazi);
  25737. ShowPlayerDialog(playerid, DIALOG_HITMAN, DIALOG_STYLE_TABLIST, "{C40000}Armory{FFFFFF}",jessaisnazi,"Select", "Cancel");
  25738. return 1;
  25739. }
  25740. showHitmanDialog(playerid) {
  25741. new hitmanStr[1500];
  25742. format(hitmanStr, sizeof(hitmanStr),
  25743. "Desert Eagle\t$2,500\n\
  25744. Suppressed Pistol\t$5,000\n\
  25745. {C40000}----------\t----------{FFFFFF}\n\
  25746. M4\t$12,500\n\
  25747. AK47\t$7,500\n\
  25748. {C40000}----------\t----------{FFFFFF}\n\
  25749. Combat Shotgun\t$25,000\n");
  25750. format(hitmanStr, sizeof(hitmanStr),
  25751. "%sPump Shotgun\t$2,000\n\
  25752. Sawn-off Shotgun\t$7,500\n\
  25753. {C40000}----------\t----------{FFFFFF}\n\
  25754. MP5\t$1000\n\
  25755. TEC9\t$2,500\n\
  25756. Uzi\t$2,500\n",
  25757. hitmanStr);
  25758. format(hitmanStr, sizeof(hitmanStr),
  25759. "%s{C40000}----------\t----------{FFFFFF}\n\
  25760. Rifle\t$2,500\n\
  25761. Sniper Rifle\t$15,000\n\
  25762. {C40000}----------\t----------{FFFFFF}\n\
  25763. Flamethrower\t$20,000\n\
  25764. Plastic Explosive\t$10,000\n\
  25765. {C40000}----------\t----------{FFFFFF}\n\
  25766. Chainsaw\t$5,000\n\
  25767. Knife\t$1,000\n",
  25768. hitmanStr);
  25769. format(hitmanStr, sizeof(hitmanStr),
  25770. "%s{C40000}----------\t----------{FFFFFF}\n\
  25771. Tear Gas\t$2,500\n\
  25772. Grenades\t$2,500\n\
  25773. Molotov Cocktail\t$2,500\n\
  25774. {C40000}----------\t----------{FFFFFF}\n\
  25775. Health and Armour\t$1,000\n\
  25776. First Aid\t$200\n\
  25777. Half Vest\t$500\n\
  25778. Full Vest\t$1000\n\
  25779. {C40000}----------\t----------{FFFFFF}\n",
  25780. hitmanStr);
  25781. format(hitmanStr, sizeof(hitmanStr),
  25782. "%sSignal Jammer\t$1,000\n\
  25783. Cyanide Pill\t$5,000\n\
  25784. Fake Badges\t(( $0 ))\n\
  25785. Lock Pick Kit\t(( $5,000 ))",
  25786. hitmanStr);
  25787. ShowPlayerDialog(playerid, DIALOG_HITMAN, DIALOG_STYLE_TABLIST, "{C40000}Hitman Armoury{FFFFFF}",
  25788. hitmanStr,
  25789. "Select", "Cancel");
  25790. return 1;
  25791. }
  25792. showPakiArmory(playerid) {
  25793. new cartelstr[1000];
  25794. format(cartelstr, sizeof(cartelstr), "Item\tPrice");
  25795. format(cartelstr, sizeof(cartelstr), "%s\nDeagle\t$50,000\nM4\t$85,000\nAK47\t$65,000\nFull Vest\t$15,000", cartelstr);
  25796. format(cartelstr, sizeof(cartelstr), "%s\nFull HP\tFree\nMP5\t$13,000\nShotgun\t$7,000", cartelstr);
  25797. ShowPlayerDialog(playerid, DIALOG_GREYWOLF_ARMORY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", cartelstr, "Purchase", "Cancel");
  25798. return 1;
  25799. }
  25800. showS9Dialog(playerid) {
  25801. new s9Str[1500];
  25802. format(s9Str, sizeof(s9Str),
  25803. "Desert Eagle\t$1,000\n\
  25804. Suppressed Pistol\t$1,500\n\
  25805. {33CCFF}----------\t----------{FFFFFF}\n\
  25806. M4\t$6,000\n\
  25807. AK47\t$4,000\n\
  25808. {33CCFF}----------\t----------{FFFFFF}\n\
  25809. Combat Shotgun\t$9,000\n");
  25810. format(s9Str, sizeof(s9Str),
  25811. "%sPump Shotgun\t$1,000\n\
  25812. Sawn-off Shotgun\t$3,000\n\
  25813. {33CCFF}----------\t----------{FFFFFF}\n\
  25814. MP5\t$1000\n\
  25815. TEC9\t$1,500\n\
  25816. Uzi\t$1,500\n",
  25817. s9Str);
  25818. format(s9Str, sizeof(s9Str),
  25819. "%s{33CCFF}----------\t----------{FFFFFF}\n\
  25820. Rifle\t$2,000\n\
  25821. Sniper Rifle\t$7,000\n\
  25822. {33CCFF}----------\t----------{FFFFFF}\n\
  25823. Flamethrower\t$8,000\n\
  25824. Plastic Explosive\t$5,000\n\
  25825. {33CCFF}----------\t----------{FFFFFF}\n\
  25826. Chainsaw\t$5,000\n\
  25827. Knife\t$1,000\n",
  25828. s9Str);
  25829. format(s9Str, sizeof(s9Str),
  25830. "%s{33CCFF}----------\t----------{FFFFFF}\n\
  25831. Tear Gas\t$1,000\n\
  25832. Grenades\t$2,500\n\
  25833. Molotov Cocktail\t$2,500\n\
  25834. {33CCFF}----------\t----------{FFFFFF}\n\
  25835. Health and Armour\t$1,000\n\
  25836. Half Vest\t$500\n\
  25837. {33CCFF}----------\t----------{FFFFFF}\n",
  25838. s9Str);
  25839. format(s9Str, sizeof(s9Str),
  25840. "%sSignal Jammer\t$1,000\n\
  25841. Lock Pick Kit\t$1,000",
  25842. s9Str);
  25843. ShowPlayerDialog(playerid, DIALOG_S9_ARMORY, DIALOG_STYLE_TABLIST, "{33CCFF}Sector 9 Armoury{FFFFFF}",
  25844. s9Str,
  25845. "Select", "Cancel");
  25846. return 1;
  25847. }
  25848. showCrimeDialog(playerid) {
  25849. new crimeStr[1500];
  25850. format(crimeStr, sizeof(crimeStr),
  25851. "Desert Eagle\t$2,500\n\
  25852. Suppressed Pistol\t$5,000\n\
  25853. {646495}----------\t----------{FFFFFF}\n\
  25854. M4\t$12,500\n\
  25855. AK47\t$7,500\n\
  25856. {646495}----------\t----------{FFFFFF}\n\
  25857. Combat Shotgun\t$25,000\n\
  25858. Pump Shotgun\t$2,000\n\
  25859. Sawn-off Shotgun\t$7,500\n\
  25860. {646495}----------\t----------{FFFFFF}\n\
  25861. MP5\t$1000\n\
  25862. TEC9\t$2,500\n\
  25863. Uzi\t$2,500\n"
  25864. );
  25865. format(crimeStr, sizeof(crimeStr),
  25866. "%s{646495}----------\t----------{FFFFFF}\n\
  25867. Rifle\t$2,500\n\
  25868. Sniper Rifle\t$15,000\n\
  25869. {646495}----------\t----------{FFFFFF}\n\
  25870. Flamethrower\t$20,000\n\
  25871. Plastic Explosive\t$10,000\n\
  25872. {646495}----------\t----------{FFFFFF}\n\
  25873. Chainsaw\t$5,000\n\
  25874. Knife\t$1,000\n",
  25875. crimeStr);
  25876. format(crimeStr, sizeof(crimeStr),
  25877. "%s{646495}----------\t----------{FFFFFF}\n\
  25878. Tear Gas\t$2,500\n\
  25879. Grenades\t$2,500\n\
  25880. Molotov Cocktail\t$2,500\n\
  25881. {646495}----------\t----------{FFFFFF}\n\
  25882. Health and Armour\t$1,000\n\
  25883. Half Vest\t$1000\n\
  25884. {646495}----------\t----------{FFFFFF}\n",
  25885. crimeStr);
  25886. format(crimeStr, sizeof(crimeStr),
  25887. "%sSignal Jammer\t$1,000\n\
  25888. Dufflebag - NEEDS TO BE SCRIPTED\t$500\n\
  25889. (( Name Change ))\t(( $0 ))\n\
  25890. {646495}----------\t----------{FFFFFF}\n\
  25891. Fully Armed\t$58,000",
  25892. crimeStr);
  25893. ShowPlayerDialog(playerid, DIALOG_CRIME, DIALOG_STYLE_TABLIST, "{646495}Armoury{FFFFFF}",
  25894. crimeStr,
  25895. "Select", "Cancel");
  25896. return 1;
  25897. }
  25898. showSAPDDialog(playerid)
  25899. {
  25900. new str[700];
  25901. format(str, sizeof(str),
  25902. "Item\tPrice\n\
  25903. {FFFFFF}Portable MDC\tFree\n\
  25904. {FFFFFF}Mace\t$20\n\
  25905. {FFFFFF}Night Stick\t$20\n\
  25906. {FFFFFF}Deagle\t$500\n\
  25907. {FFFFFF}Shotgun\t$200\n\
  25908. {FFFFFF}MP5\t$400\n\
  25909. {FFFFFF}Rifle\t$1,000\n\
  25910. {FFFFFF}M4\t$6,000\n\
  25911. {FFFFFF}First Aid Kit\t$200\n\
  25912. {FFFFFF}Kevlar\t$1,000\n\
  25913. {FFFFFF}Rubber Bullets\t$100\n\
  25914. {FFFFFF}C2 Explosive\t$80,000");
  25915. if(PlayerInfo[playerid][pMember] == FACTION_FBI)
  25916. format(str, sizeof(str), "%s\n{FFFFFF}Signal Jammer\t$1,000", str);
  25917. ShowPlayerDialog(playerid, DIALOG_SAPD_WEAPONRY, DIALOG_STYLE_TABLIST_HEADERS, "Armory", str, "Select", "Back");
  25918. return 1;
  25919. }
  25920. //Optimized by Ettore
  25921. #define ADVERTISE_COORDS 746.21, -1359.01, 9053.42
  25922. forward CheckProps(playerid);
  25923. public CheckProps(playerid)
  25924. {
  25925. if(!PlayerInfo[playerid][pBizMod]) return 1;
  25926. if(cache_num_rows() == 0) return ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST, "Inactive Properties", "No Biz's or Houses found", "Okay", "");
  25927. new bizstr[10000], PropDate[64], name[MAX_PLAYER_NAME], BizKey, house;
  25928. new syear[32], smonth[32], sday[32];
  25929. new current_year, current_month, current_day, expire_year, expire_month, expire_day;
  25930. getdate(current_year, current_month, current_day);
  25931. format(bizstr, sizeof(bizstr), "Name\tExpired On\tBiz ID\tHouse ID\n");
  25932. for(new i = 0; i < cache_num_rows(); i++)
  25933. {
  25934. cache_get_field_content(i, "Name", name);
  25935. cache_get_field_content(i, "PropDate", PropDate);
  25936. BizKey = cache_get_field_content_int(i, "BizKey");
  25937. house = cache_get_field_content_int(i, "pHouseID");
  25938. strmid(syear, PropDate, 6, 30, 32);
  25939. expire_year = strval(syear);
  25940. strmid(sday, PropDate, 4, 5, 32);
  25941. expire_day = strval(sday);
  25942. strmid(smonth, PropDate, 0, 2, 32);
  25943. expire_month = strval(smonth);
  25944. if(current_year > expire_year || current_month > expire_month && current_year >= expire_year || current_day >= expire_day && current_month >= expire_month && current_year >= expire_year)
  25945. {
  25946. format(bizstr, sizeof(bizstr), "%s{FFFF00}%s\t(%s)\t[%i]\t[%i]\t{FFFFFF}\n", bizstr, name, PropDate, BizKey, house);
  25947. }
  25948. }
  25949. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Inactive Properties", bizstr, "Okay", "");
  25950. return 1;
  25951. }
  25952. forward onomakemapper(name[], rank[], playerid);
  25953. public onomakemapper(name[], rank[], playerid)
  25954. {
  25955. new mlevel;
  25956. new str[128];
  25957. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist!");
  25958. if(strcmp(rank, "none", true) == 0)
  25959. {
  25960. mlevel = 0;
  25961. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been removed from the Mapping Team by %s.", name, PlayerICName(playerid));
  25962. }
  25963. if(strcmp(rank, "regular", true) == 0)
  25964. {
  25965. mlevel = 1;
  25966. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a regular mapper by %s.", name, PlayerICName(playerid));
  25967. }
  25968. if(strcmp(rank, "senior", true) == 0)
  25969. {
  25970. mlevel = 2;
  25971. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a senior mapper by %s.", name, PlayerICName(playerid));
  25972. }
  25973. if(strcmp(rank, "manager", true) == 0)
  25974. {
  25975. mlevel = 3;
  25976. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a mapping manager by %s.", name, PlayerICName(playerid));
  25977. }
  25978. ABroadCast(COLOR_LIGHTRED, str, 1);
  25979. format(str, sizeof(str), "You have made %s a level %d Mapper.", name, mlevel);
  25980. SendClientMessage(playerid, COLOR_WHITE, str);
  25981. new query[128];
  25982. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Mapper` = %d WHERE `name`= '%e' LIMIT 1", mlevel, name);
  25983. mysql_pquery(sqlGameConnection, query);
  25984. return 1;
  25985. }
  25986. forward OnOMakeDev(name[], rank[], playerid);
  25987. public OnOMakeDev(name[], rank[], playerid)
  25988. {
  25989. new dlevel;
  25990. new str[128];
  25991. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist!");
  25992. if(strcmp(rank, "none", true) == 0)
  25993. {
  25994. dlevel = 0;
  25995. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been removed from the Development Team by %s.", name, PlayerICName(playerid));
  25996. }
  25997. else if(strcmp(rank, "Junior", true) == 0)
  25998. {
  25999. dlevel = 1;
  26000. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a Junior Developer by %s.", name, PlayerICName(playerid));
  26001. }
  26002. else if(strcmp(rank, "Senior", true) == 0)
  26003. {
  26004. dlevel = 2;
  26005. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a Senior Developer by %s.", name, PlayerICName(playerid));
  26006. }
  26007. else if(strcmp(rank, "Manager", true) == 0)
  26008. {
  26009. dlevel = 3;
  26010. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a Development Manager by %s.", name, PlayerICName(playerid));
  26011. }
  26012. else if(strcmp(rank, "lead", true) == 0)
  26013. {
  26014. dlevel = 4;
  26015. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a Lead Developer by %s.", name, PlayerICName(playerid));
  26016. }
  26017. else {
  26018. return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} invalid developer level.");
  26019. }
  26020. ABroadCast(COLOR_LIGHTRED, str, 1);
  26021. format(str, sizeof(str), "You have made %s a level %d Developer.", name, dlevel);
  26022. SendClientMessage(playerid, COLOR_WHITE, str);
  26023. new query[128];
  26024. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `DevLevel` = %d WHERE `name`= '%e' LIMIT 1", dlevel, name);
  26025. mysql_pquery(sqlGameConnection, query);
  26026. return 1;
  26027. }
  26028. forward OnOMakeTester(name[], rank[], playerid);
  26029. public OnOMakeTester(name[], rank[], playerid)
  26030. {
  26031. new tlevel;
  26032. new str[128];
  26033. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  26034. if(strcmp(rank, "none", true) == 0)
  26035. {
  26036. tlevel = 0;
  26037. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been removed from the tester team by %s.", name, PlayerICName(playerid));
  26038. }
  26039. else if(strcmp(rank, "regular", true) == 0)
  26040. {
  26041. tlevel = 1;
  26042. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a tester by %s.", name, PlayerICName(playerid));
  26043. }
  26044. else if(strcmp(rank, "senior", true) == 0)
  26045. {
  26046. tlevel = 2;
  26047. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a senior tester by %s.", name, PlayerICName(playerid));
  26048. }
  26049. else if(strcmp(rank, "manager", true) == 0)
  26050. {
  26051. tlevel = 3;
  26052. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a manager tester by %s.", name, PlayerICName(playerid));
  26053. }
  26054. else {
  26055. return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} invalid tester level.");
  26056. }
  26057. ABroadCast(COLOR_LIGHTRED, str, 1);
  26058. format(str, sizeof(str), "You have made %s a level %d tester.", name, tlevel);
  26059. SendClientMessage(playerid, COLOR_WHITE, str);
  26060. new query[128];
  26061. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `TesterLevel` = %d WHERE `name`= '%e' LIMIT 1", tlevel, name);
  26062. mysql_pquery(sqlGameConnection, query);
  26063. return 1;
  26064. }
  26065. forward OnOMakeHelper(playerid, name[], rank[]);
  26066. public OnOMakeHelper(playerid, name[], rank[])
  26067. {
  26068. new hlevel, htag;
  26069. new str[128];
  26070. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  26071. if(strcmp(rank, "none", true) == 0)
  26072. {
  26073. hlevel = 0;
  26074. htag = NTAG_PLAYER;
  26075. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been removed from the Helper Team by %s.", name, PlayerICName(playerid));
  26076. }
  26077. else if(strcmp(rank, "trial", true) == 0)
  26078. {
  26079. hlevel = 1;
  26080. htag = NTAG_THELPER;
  26081. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a %s by %s.", name, rank, PlayerICName(playerid));
  26082. }
  26083. else if(strcmp(rank, "helper", true) == 0)
  26084. {
  26085. hlevel = 2;
  26086. htag = NTAG_HELPER;
  26087. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a %s by %s.", name, rank, PlayerICName(playerid));
  26088. }
  26089. else if(strcmp(rank, "senior", true) == 0)
  26090. {
  26091. hlevel = 3;
  26092. htag = NTAG_SHELPER;
  26093. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a %s helper by %s.", name, rank, PlayerICName(playerid));
  26094. }
  26095. else
  26096. {
  26097. return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} invalid helper level.");
  26098. }
  26099. SendHelperMessage(COLOR_LIGHTRED, str, 1);
  26100. new query[128];
  26101. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `HelperLevel` = %d, `Tag` = %d WHERE `name`='%e' LIMIT 1", hlevel, htag, name);
  26102. mysql_pquery(sqlGameConnection, query);
  26103. return 1;
  26104. }
  26105. //==============================================================================
  26106. Timer:OnTenMinuteSync()
  26107. {
  26108. new hour, minute, second;
  26109. gettime(hour, minute, second);
  26110. hour = FixHour(hour);
  26111. SetWorldTime(hour);
  26112. foreach( new i: Player )
  26113. {
  26114. if(gPlayerLogged[i] == 1)
  26115. {
  26116. //save the player and their vehicles
  26117. OnPlayerSave(i);
  26118. //if vehicle is spawned, save it.
  26119. if( playerSpawnedVehicle[i] > -1 ) {
  26120. savePlayerVehicle( i, playerSpawnedVehicle[i] );
  26121. }
  26122. }
  26123. }
  26124. //save the other stuff
  26125. SaveDealerships();
  26126. SaveHouses();
  26127. SaveGates();
  26128. SaveSurnames();
  26129. SaveEntrances();
  26130. SaveGarages();
  26131. SaveFactionBanks();
  26132. SaveStuff();
  26133. //food tray update
  26134. for(new i = 0; i < foodTrays; i++)
  26135. { //loop through food trays
  26136. if(foodTray[i][0] != SLOT_EMPTY)
  26137. { //if the tray is being used
  26138. if(foodTray[i][3] == 0)
  26139. { //if the foodtray is set to respawn
  26140. if(IsValidDynamicObject(foodTray[i][0]))
  26141. {
  26142. if(foodTray[i][0]) { DestroyDynamicObjectEx(foodTray[i][0]); }
  26143. }
  26144. foodTray[i][0] = SLOT_EMPTY; //obj ID
  26145. foodTray[i][1] = TYPE_EMPTY; //type
  26146. foodTray[i][2] = TRAY_EMPTY; //food
  26147. foodTray[i][3] = TRAY_NO_RESPAWN; //respawn
  26148. foodTray[i][4] = TRAY_NO_POISONED; //poisoned
  26149. foodTrays--;
  26150. sortArray();
  26151. }
  26152. else
  26153. {
  26154. foodTray[i][3]--; //respawn timef
  26155. //format(str, sizeof(str), "index %d has a respawn time of %d.", i, foodTray[i][3]);
  26156. //SendClientMessageToAll(COLOR_WHITE, str);
  26157. }
  26158. //format(str, sizeof(str), "index %d is an active food tray and will repsawn soon.", i);
  26159. //SendClientMessageToAll(COLOR_WHITE, str);
  26160. }
  26161. }
  26162. if(!ADMIN_ENABLED_DOUBLE_EXP_MODE) {
  26163. doubleEXPCheck(); //check if it's fri, saturday, sunday and if so enable double XP
  26164. }
  26165. return 1;
  26166. }
  26167. //==============================================================================
  26168. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  26169. {
  26170. if(hittype != BULLET_HIT_TYPE_NONE) // Bullet Crashing uses just this hittype
  26171. {
  26172. if(!(-1000.0 <= fX <= 1000.0) || !(-1000.0 <= fY <= 1000.0) || !(-1000.0 <= fZ <= 1000.0)) // a valid offset, it's impossible that a offset bigger than 1000 is legit (also less than -1000.0 is impossible, not used by this hack, but still, let's check for it, just for the future, who knows what hacks will appear). The object with biggest offset is having ~700-800 radius.
  26173. {
  26174. return 0;
  26175. }
  26176. }
  26177. if(hittype == BULLET_HIT_TYPE_VEHICLE)
  26178. {
  26179. if(IsValidVehicle(hitid))
  26180. {
  26181. if(!IsUnoccupiedVehicle(hitid))
  26182. {
  26183. new Float:health, Float:rand = 1 + random(15);
  26184. GetVehicleHealth(hitid, health);
  26185. if(health > 300)
  26186. {
  26187. SetVehicleHealth(hitid, health -rand);
  26188. }
  26189. }
  26190. }
  26191. }
  26192. new str[128];
  26193. if(playerHoldingTazer[playerid]){
  26194. if(weaponid == 23){
  26195. ApplyAnimationEx(playerid, "COLT45", "colt45_reload", 4.0, 0, 0, 0, 0, 0);
  26196. format(str, sizeof(str), "* %s reloads their tazer after firing the shot. *", PlayerICName(playerid));
  26197. ProxDetector(30.0, playerid, str, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  26198. }
  26199. }
  26200. if(PlayerInfo[playerid][pAdmin] < 2)
  26201. {
  26202. new WeaponName[65];
  26203. new newweapon = weaponid;
  26204. if(newweapon > 0)
  26205. {
  26206. if(
  26207. (newweapon == 4 && PlayerInfo[playerid][pGroup] != GROUP_HITMAN) || //knife
  26208. newweapon == 16 || //grenades
  26209. newweapon == 18 || //molotovs
  26210. (newweapon == 17 && !IsACop(playerid)) || //teargas
  26211. newweapon == 26 || //sawn off
  26212. newweapon == 28 || //uzi
  26213. newweapon == 32 || //tec9
  26214. newweapon == 35 || //rpg
  26215. newweapon == 36 || //heat seeker
  26216. newweapon == 37 || //flame thrower
  26217. newweapon == 38 || //minigun
  26218. newweapon == 39 || //satchels
  26219. (newweapon == 40 && PlayerInfo[playerid][pGroup] != GROUP_HITMAN) || //detonators
  26220. newweapon == 44 || //nv gogles
  26221. newweapon == 45) //hs goggles
  26222. {
  26223. if(HaveWeapon(playerid, newweapon) != newweapon && HaveAdminWeapon(playerid, newweapon) != newweapon)
  26224. {
  26225. if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pBand] != 3) // avoid spam
  26226. {
  26227. GetWeaponName(newweapon, WeaponName, 64);
  26228. anticheatbans ++;
  26229. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected. (%d hackers banned)", PlayerOOCName(playerid), WeaponName, anticheatbans);
  26230. SendClientMessageToAll(COLOR_WHITE, str);
  26231. PlayerInfo[playerid][pBand] = 3;
  26232. BanLog(str);
  26233. format(str, sizeof(str), "Ban Reason: Hacked %s detected - Banned by: ANTICHEAT", WeaponName);
  26234. SendClientMessage(playerid, COLOR_GREY, str);
  26235. strmid(PlayerInfo[playerid][pBanReason], str, 0, strlen(str));
  26236. BanExx(playerid);
  26237. new ip[16];
  26238. GetPlayerIp(playerid, ip, sizeof(ip));
  26239. gpci(playerid,playerserial,sizeof(playerserial));
  26240. if(NextBan == 1) {
  26241. format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(playerid));
  26242. format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
  26243. format(Ban1ip, sizeof(Ban1ip), "%s", ip);
  26244. NextBan = 2;
  26245. return 1;
  26246. }
  26247. if(NextBan == 2) {
  26248. format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(playerid));
  26249. format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
  26250. format(Ban2ip, sizeof(Ban2ip), "%s", ip);
  26251. NextBan = 3;
  26252. return 1;
  26253. }
  26254. if(NextBan == 3) {
  26255. format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(playerid));
  26256. format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
  26257. format(Ban3ip, sizeof(Ban3ip), "%s", ip);
  26258. NextBan = 4;
  26259. return 1;
  26260. }
  26261. if(NextBan == 4) {
  26262. format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(playerid));
  26263. format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
  26264. format(Ban4ip, sizeof(Ban4ip), "%s", ip);
  26265. NextBan = 5;
  26266. return 1;
  26267. }
  26268. if(NextBan == 5) {
  26269. format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(playerid));
  26270. format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
  26271. format(Ban5ip, sizeof(Ban5ip), "%s", ip);
  26272. NextBan = 1;
  26273. return 1;
  26274. }
  26275. return 1;
  26276. }
  26277. }
  26278. }
  26279. }
  26280. if(newweapon > 0 && newweapon != 46)
  26281. {
  26282. if(HaveWeapon(playerid, newweapon) != newweapon && HaveAdminWeapon(playerid, newweapon) != newweapon)
  26283. {
  26284. if(IsPlayerConnected(playerid))
  26285. {
  26286. if(PlayerInfo[playerid][pBand] == 3) return 1; // Avoid spam, should already be banned.
  26287. if(PlayerInfo[playerid][pConnectTime] < 4)
  26288. {
  26289. GetWeaponName(newweapon, WeaponName, 64);
  26290. anticheatbans ++;
  26291. format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected. (%d hackers banned)", PlayerOOCName(playerid), WeaponName, anticheatbans);
  26292. SendClientMessageToAll(COLOR_WHITE, str);
  26293. PlayerInfo[playerid][pBand] = 3;
  26294. BanLog(str);
  26295. format(str, sizeof(str), "Ban Reason: Hacked %s detected - Banned by: ANTICHEAT", WeaponName);
  26296. strmid(PlayerInfo[playerid][pBanReason], str, 0, strlen(str));
  26297. BanExx(playerid);
  26298. new ip[16];
  26299. GetPlayerIp(playerid, ip, sizeof(ip));
  26300. gpci(playerid,playerserial,sizeof(playerserial));
  26301. if(NextBan == 1) {
  26302. format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(playerid));
  26303. format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
  26304. format(Ban1ip, sizeof(Ban1ip), "%s", ip);
  26305. NextBan = 2;
  26306. return 1;
  26307. }
  26308. if(NextBan == 2) {
  26309. format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(playerid));
  26310. format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
  26311. format(Ban2ip, sizeof(Ban2ip), "%s", ip);
  26312. NextBan = 3;
  26313. return 1;
  26314. }
  26315. if(NextBan == 3) {
  26316. format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(playerid));
  26317. format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
  26318. format(Ban3ip, sizeof(Ban3ip), "%s", ip);
  26319. NextBan = 4;
  26320. return 1;
  26321. }
  26322. if(NextBan == 4) {
  26323. format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(playerid));
  26324. format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
  26325. format(Ban4ip, sizeof(Ban4ip), "%s", ip);
  26326. NextBan = 5;
  26327. return 1;
  26328. }
  26329. if(NextBan == 5) {
  26330. format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(playerid));
  26331. format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
  26332. format(Ban5ip, sizeof(Ban5ip), "%s", ip);
  26333. NextBan = 1;
  26334. return 1;
  26335. }
  26336. return 1; // No need to warn if they get banned anyways
  26337. }
  26338. GetWeaponName(newweapon, WeaponName, 64);
  26339. anticheatwarns ++;
  26340. format(str, sizeof(str), "{FF6347}Hack: %s (%d) has a desynced or hacked %s.", PlayerOOCName(playerid), playerid, WeaponName);
  26341. UpdateWarnings(str);
  26342. }
  26343. }
  26344. }
  26345. }
  26346. return 1;
  26347. }
  26348. stock LoopaWeaponName(weaponid) {
  26349. new weapon_name[32];
  26350. if(weaponid == 0)
  26351. weapon_name = "None";
  26352. else
  26353. GetWeaponName(weaponid, weapon_name, 32);
  26354. return weapon_name;
  26355. }
  26356. // Models of vehicles equipped with MDC
  26357. new mdcEquippedVehs[] = {
  26358. /** SAFMD **/
  26359. 407, // Fire truck
  26360. 544, // Fire truck 2
  26361. 416, // Ambulance
  26362. /** PD **/
  26363. 427, // Enforcer
  26364. 523, // Police bike
  26365. 596, // Cruiser
  26366. 597, // Cruiser 2
  26367. 598, // Cruiser 3
  26368. 599, // Ranger
  26369. /** DEA **/
  26370. 601, // SWAT van
  26371. 528, // DEA truck
  26372. 490 // DEA rancher
  26373. };
  26374. stock PlayerIsInMDCCar(playerid) {
  26375. if(!IsPlayerInAnyVehicle(playerid)) return 0;
  26376. new theirSeat = GetPlayerVehicleSeat(playerid);
  26377. if(theirSeat != 0 && theirSeat != 1) return 0;
  26378. // Check by dynamic vehicle faction ID
  26379. new dynvehID = GetDynamicVehicleID(GetPlayerVehicleID(playerid));
  26380. switch(sVehicleInfo[dynvehID][v_faction]) {
  26381. case 1: return 1; // All PD cars have MDC
  26382. case 2: return 1; // All DEA cars have MDC
  26383. case 3: return 1; // All SASD cars have MDC
  26384. case 5: return 1; // All DoC cars have MDC
  26385. case 6: return 1; // All government cars have MDC
  26386. case 11: return 1; // All S9 cars have MDC
  26387. }
  26388. // Check by model
  26389. new theirModel = GetVehicleModel(GetPlayerVehicleID(playerid));
  26390. for(new i = 0; i < sizeof(mdcEquippedVehs); i++) {
  26391. if(theirModel == mdcEquippedVehs[i]) return 1;
  26392. }
  26393. return 0;
  26394. }
  26395. stock IsUnoccupiedVehicle(vehicleid)
  26396. {
  26397. foreach( new i: Player )
  26398. {
  26399. if(IsPlayerConnected(i))
  26400. {
  26401. if(GetPlayerVehicleID(i) == vehicleid)
  26402. {
  26403. return false;
  26404. }
  26405. }
  26406. }
  26407. return true;
  26408. }
  26409. //Needs cleaning up
  26410. #include "../gamemodes/todo/OnPlayerText.inc"
  26411. //==============================================================================
  26412. stock FixHour(hour)
  26413. {
  26414. hour = timeshift +hour;
  26415. if(hour < 0)
  26416. {
  26417. hour = hour +24;
  26418. }
  26419. else if(hour > 23)
  26420. {
  26421. hour = hour -24;
  26422. }
  26423. return hour;
  26424. }
  26425. //==============================================================================
  26426. stock IsS9InFaction(playerid) {
  26427. return (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] > 0);
  26428. }
  26429. stock GetFactionColour(faction)
  26430. {
  26431. switch(faction)
  26432. {
  26433. case FACTION_SAPD: return TEAM_BLUE_COLOR;
  26434. case FACTION_FMD: return COLOR_DOCTOR;
  26435. case FACTION_S9: return COLOR_S9;
  26436. case FACTION_ARMY: return COLOR_DOC;
  26437. case FACTION_SANG: return COLOR_SANG;
  26438. case FACTION_SAS: return COLOR_SAS;
  26439. }
  26440. return TEAM_BLUE_COLOR;
  26441. }
  26442. stock GetFactionMaxRanks(faction)
  26443. {
  26444. switch(faction)
  26445. {
  26446. case FACTION_SAPD: return MAX_SAPD_RANKS;
  26447. case FACTION_FBI: return MAX_FBI_RANKS;
  26448. case FACTION_SASD: return MAX_SAST_RANKS;
  26449. case FACTION_FMD: return MAX_SAFMD_RANKS;
  26450. case FACTION_ARMY: return MAX_DOC_RANKS;
  26451. case FACTION_GOV: return MAX_GOV_RANKS;
  26452. case FACTION_JD: return MAX_SCOTUS_RANKS;
  26453. case FACTION_NEWS: return MAX_NEWS_RANKS;
  26454. case FACTION_TAXI: return MAX_TAXI_RANKS;
  26455. case FACTION_S9: return MAX_S9_RANKS;
  26456. case FACTION_SAS: return MAX_SAS_RANKS;
  26457. case FACTION_SANG: return MAX_SANG_RANKS;
  26458. default: return 1;
  26459. }
  26460. return -1;
  26461. }
  26462. stock CheckFactionRank(playerid)
  26463. {
  26464. if(PlayerInfo[playerid][pMember] != 0) {
  26465. if(PlayerInfo[playerid][pRank] > GetFactionMaxRanks(PlayerInfo[playerid][pMember]))
  26466. PlayerInfo[playerid][pRank] = GetFactionMaxRanks(PlayerInfo[playerid][pMember]);
  26467. }
  26468. return 1;
  26469. }
  26470. Timer:FixGPS(playerid){
  26471. if(IsPlayerInAnyVehicle(playerid))
  26472. {
  26473. if(GPSOn[playerid] == 0)
  26474. {
  26475. GPSOn[playerid] = 1;
  26476. foreach( new i: Player )
  26477. {
  26478. if(GPSOn[i] == 1)
  26479. {
  26480. if(IsASAPD(i) && IsASAPD(playerid))
  26481. {
  26482. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_SAPD);
  26483. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_SAPD);
  26484. }
  26485. if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[i][pMember] == 3)
  26486. {
  26487. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_SAST);
  26488. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_SAST);
  26489. }
  26490. if(IsAMedic(i) && IsAMedic(playerid))
  26491. {
  26492. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_LSFMD);
  26493. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_LSFMD);
  26494. }
  26495. if(IsAFBI(i) && IsAFBI(playerid))
  26496. {
  26497. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_FBI);
  26498. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_FBI);
  26499. }
  26500. }
  26501. }
  26502. }
  26503. }
  26504. return 1;
  26505. }
  26506. stock TogglePlayerGPS(playerid)
  26507. {
  26508. if(IsACop(playerid) || IsAMedic(playerid) || IsAFBI(playerid) || PlayerInfo[playerid][pMember] == 5)
  26509. {
  26510. if(IsPlayerInAnyVehicle(playerid))
  26511. {
  26512. if(GPSOn[playerid] == 0)
  26513. {
  26514. GPSOn[playerid] = 1;
  26515. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  26516. SendClientMessage(playerid, COLOR_GRAD2, "GPS enabled.");
  26517. fixGPSTimer[playerid] = SetTimerEx("Timer_FixGPS", 6000, true, "i", playerid);
  26518. foreach( new i: Player )
  26519. {
  26520. if(GPSOn[i] == 1)
  26521. {
  26522. if(IsASAPD(i) && IsASAPD(playerid))
  26523. {
  26524. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_SAPD);
  26525. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_SAPD);
  26526. }
  26527. if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[i][pMember] == 3)
  26528. {
  26529. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_SAST);
  26530. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_SAST);
  26531. }
  26532. if(IsAMedic(i) && IsAMedic(playerid))
  26533. {
  26534. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_LSFMD);
  26535. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_LSFMD);
  26536. }
  26537. if(IsAFBI(i) && IsAFBI(playerid))
  26538. {
  26539. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_FBI);
  26540. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_FBI);
  26541. }
  26542. if(PlayerInfo[i][pMember] == 5 && PlayerInfo[playerid][pMember] == 5)
  26543. {
  26544. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_DOC);
  26545. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_DOC);
  26546. }
  26547. }
  26548. }
  26549. }
  26550. else if(GPSOn[playerid] == 1)
  26551. {
  26552. GPSOn[playerid] = 0;
  26553. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  26554. SendClientMessage(playerid, COLOR_GRAD2, "GPS disabled.");
  26555. KillTimer(fixGPSTimer[playerid]);
  26556. foreach( new i: Player )
  26557. {
  26558. if(GPSOn[i] == 1)
  26559. {
  26560. if(IsASAPD(i) && IsASAPD(playerid))
  26561. {
  26562. SetPlayerMarkerForPlayer(playerid, i, TCOLOR_BLUE);
  26563. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_BLUE);
  26564. }
  26565. if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[i][pMember] == 3)
  26566. {
  26567. SetPlayerMarkerForPlayer(playerid, i, GPSCOLOR_SAST);
  26568. SetPlayerMarkerForPlayer(i, playerid, GPSCOLOR_SAST);
  26569. }
  26570. if(IsAMedic(i) && IsAMedic(playerid))
  26571. {
  26572. SetPlayerMarkerForPlayer(playerid, i, TCOLOR_PARAMEDIC);
  26573. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_PARAMEDIC);
  26574. }
  26575. if(IsAFBI(i) && IsAFBI(playerid))
  26576. {
  26577. SetPlayerMarkerForPlayer(playerid, i, TCOLOR_NAVYBLUE);
  26578. SetPlayerMarkerForPlayer(i, playerid, TCOLOR_NAVYBLUE);
  26579. }
  26580. if(PlayerInfo[i][pMember] == 5 && PlayerInfo[playerid][pMember] == 5)
  26581. {
  26582. SetPlayerMarkerForPlayer(playerid, i, COLOR_DOC_NAMETAG);
  26583. SetPlayerMarkerForPlayer(i, playerid, COLOR_DOC_NAMETAG);
  26584. }
  26585. }
  26586. }
  26587. }
  26588. }
  26589. else return SendClientMessage(playerid, COLOR_GRAD2, "You are not in a vehicle.");
  26590. }
  26591. else return SendClientMessage(playerid, COLOR_GRAD2, "You are not a member of the SAPD / SAFMD / DEA / DoC.");
  26592. return 1;
  26593. }
  26594. public LoadTrash()
  26595. {
  26596. new str[128];
  26597. for(new i = 0; i < sizeof(trashInfo); i++) {
  26598. format(str, sizeof(str), "Trash\n{FFFFFF}%d/%d\n/gettrash", trashInfo[i][tAmount], trashInfo[i][tLimit]);
  26599. trashInfo[i][trashLabelID] = CreateDynamic3DTextLabel(str, 0x43527DFF, trashInfo[i][posX], trashInfo[i][posY], trashInfo[i][posZ] +0.5, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  26600. }
  26601. return 1;
  26602. }
  26603. //==============================================================================
  26604. forward OnPlayerRegister(playerid, pass[]);
  26605. public OnPlayerRegister(playerid, pass[])
  26606. {
  26607. if(IsPlayerConnected(playerid))
  26608. {
  26609. new saveQuery[350];
  26610. new password[MAX_ENCRYPTED_PASS_LENGTH+1];
  26611. new salt[MAX_SALT_LENGTH];
  26612. new str[128];
  26613. HashPasswordEx(pass, password, salt);
  26614. mysql_format(sqlGameConnection, saveQuery, sizeof(saveQuery), "INSERT INTO `players` SET Name = '%e', NewPassword = '%e', NewSalt = '%e'", PlayerName(playerid), password, salt);
  26615. mysql_pquery(sqlGameConnection, saveQuery, "GetSQLID", "i", playerid);
  26616. displayCenterHUDInfo(playerid, "Account ~r~registered.", 8);
  26617. if(RegWarn)
  26618. {
  26619. new IP[16];
  26620. GetPlayerIp(playerid, IP, sizeof(IP));
  26621. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has just registered their account, (%s).", PlayerOOCName(playerid), playerid, IP);
  26622. ABroadCast(COLOR_WHITE, str, 1);
  26623. gpci(playerid,playerserial,sizeof(playerserial));
  26624. format(str, sizeof(str), "{FF0000}AdmWarn:{FFFFFF} %s, %s", PlayerOOCName(playerid), playerserial);
  26625. ABroadCast(COLOR_WHITE, str, 1);
  26626. if(strmatch(playerserial, Ban1gpci) || strmatch(playerserial, Ban2gpci) || strmatch(playerserial, Ban3gpci) || strmatch(playerserial, Ban4gpci) || strmatch(playerserial, Ban5gpci)) {
  26627. format(str, sizeof(str), "{FF0000}AdmWarn:{FFFFFF} LAST-BAN MATCH ( Auto-Banned for ban evasion )");
  26628. //new BE[2];
  26629. ABroadCast(COLOR_WHITE, str, 1);
  26630. //BanPlayer(playerid, playerid, "PERMANENT", "Ban Evading");
  26631. BanAccount(playerid, playerid, "Ban Evading");
  26632. }
  26633. }
  26634. gPlayerLogged[playerid] = 1;
  26635. PlayerInfo[playerid][pReg] = 1;
  26636. //==[ Show default MOTD messages]===
  26637. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE1);
  26638. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE2);
  26639. SendClientMessage(playerid, MOTD_COLOR, MOTD_MESSAGE4);
  26640. updatePlayerIP(playerid);
  26641. SpawnPlayer( playerid );
  26642. CheckExistingPrisons(playerid);
  26643. JustRegistered[playerid] = true;
  26644. ShowSkinShop(playerid, true, false, false, false, true);
  26645. }
  26646. return 1;
  26647. }
  26648. forward GetSQLID(playerid);
  26649. public GetSQLID(playerid) //get ID after insert query has complete.
  26650. {
  26651. new saveQuery[300];
  26652. mysql_format(sqlGameConnection, saveQuery, sizeof(saveQuery), "SELECT `ID` FROM `players` WHERE `name` = '%e' LIMIT 1", PlayerName(playerid));
  26653. mysql_pquery(sqlGameConnection, saveQuery, "SetPlayerID", "i", playerid);
  26654. SQLSave(playerid);
  26655. return 1;
  26656. }
  26657. stock StopAdminFlying(playerid)
  26658. {
  26659. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this when you're inside of a vehicle.");
  26660. new Float:fPos[4];
  26661. GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
  26662. SetPlayerPos(playerid, fPos[0], fPos[1], fPos[2] +1.0);
  26663. ClearAnimationsEx(playerid);
  26664. SetPlayerArmour(playerid, 100.0);
  26665. SetPlayerHealth(playerid, 100.0);
  26666. KillTimer(flyingTimer[playerid]);
  26667. isPlayerFlying[playerid] = false;
  26668. SetTimerEx("Timer_ResetFlyHealth", 2000, false, "i", playerid);
  26669. return 1;
  26670. }
  26671. stock StartAdminFlying(playerid)
  26672. {
  26673. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this when you're inside of a vehicle.");
  26674. GetPlayerHealth(playerid, pFlyHealth[playerid]);
  26675. SetPlayerArmour(playerid, pFlyArmour[playerid]);
  26676. new Float:fPos[4];
  26677. GetPlayerPos(playerid, fPos[0], fPos[1], fPos[2]);
  26678. SetPlayerPos(playerid, fPos[0], fPos[1], fPos[2] +5);
  26679. SetPlayerHealth(playerid, 1000000000.0);
  26680. flyingTimer[playerid] = SetTimerEx("Timer_SetPlayerFlying", 100, true, "i", playerid);
  26681. isPlayerFlying[playerid] = true;
  26682. return 1;
  26683. }
  26684. Timer:ResetFlyHealth(playerid)
  26685. {
  26686. SetPlayerHealth(playerid, pFlyHealth[playerid]);
  26687. SetPlayerArmour(playerid, pFlyArmour[playerid]);
  26688. return 1;
  26689. }
  26690. Timer:SetPlayerFlying(playerid)
  26691. {
  26692. if(isPlayerFlying[playerid])
  26693. {
  26694. if(!IsPlayerInAnyVehicle(playerid))
  26695. {
  26696. new plKeys, updown, leftright, Float:x[2], Float:y[2], Float:z;
  26697. GetPlayerKeys(playerid, plKeys, updown, leftright);
  26698. GetPlayerVelocity(playerid, x[0], y[0], z);
  26699. if(updown == KEY_UP)
  26700. {
  26701. GetPlayerCameraPos(playerid, x[0], y[0], z);
  26702. GetPlayerCameraFrontVector(playerid, x[1], y[1], z);
  26703. ApplyAnimationEx(playerid, "SWIM", "SWIM_crawl", 4.1, 0, 1, 1, 0, 0);
  26704. SetPlayerFacingPoint(playerid, x[0] + x[1], y[0] + y[1]);
  26705. SetPlayerVelocity(playerid, x[1], y[1], z);
  26706. }
  26707. else
  26708. {
  26709. SetPlayerVelocity(playerid, 0.0, 0.0, 0.01);
  26710. }
  26711. }
  26712. }
  26713. return 0;
  26714. }
  26715. stock SetPlayerFacingPoint(playerid, Float:X, Float:Y)
  26716. {
  26717. new Float:pX1, Float:pY1, Float:pZ1, Float:ang;
  26718. if(!IsPlayerConnected(playerid)) return 0;
  26719. GetPlayerPos(playerid, pX1, pY1, pZ1);
  26720. if(Y > pY1) ang = (-acos((X - pX1) / floatsqroot((X - pX1) *(X - pX1) + (Y - pY1) *(Y - pY1))) - 90.0);
  26721. else if(Y < pY1 && X < pX1) ang = (acos((X - pX1) / floatsqroot((X - pX1) *(X - pX1) + (Y - pY1) *(Y - pY1))) - 450.0);
  26722. else if(Y < pY1) ang = (acos((X - pX1) / floatsqroot((X - pX1) *(X - pX1) + (Y - pY1) *(Y - pY1))) - 90.0);
  26723. if(X > pX1) ang = (floatabs(floatabs(ang) + 180.0));
  26724. else ang = (floatabs(ang) - 180.0);
  26725. ang += 180.0;
  26726. SetPlayerFacingAngle(playerid, ang);
  26727. return true;
  26728. }
  26729. //Surnames
  26730. stock SaveLoopa() {
  26731. new file[25];
  26732. format(file, sizeof(file), "Loopasafe.cfg");
  26733. if(!dini_Exists(file)) dini_Create(file);
  26734. dini_IntSet(file, "Weapon1", LoopasafeWeapon[0]);
  26735. dini_IntSet(file, "Weapon2", LoopasafeWeapon[1]);
  26736. dini_IntSet(file, "Weapon3", LoopasafeWeapon[2]);
  26737. dini_IntSet(file, "Weapon4", LoopasafeWeapon[3]);
  26738. dini_IntSet(file, "Weapon5", LoopasafeWeapon[4]);
  26739. dini_IntSet(file, "Weapon6", LoopasafeWeapon[5]);
  26740. dini_IntSet(file, "Weapon7", LoopasafeWeapon[6]);
  26741. dini_IntSet(file, "Weapon8", LoopasafeWeapon[7]);
  26742. dini_IntSet(file, "Weapon9", LoopasafeWeapon[8]);
  26743. dini_IntSet(file, "Weapon10", LoopasafeWeapon[9]);
  26744. dini_IntSet(file, "Cash", LoopasafeCash);
  26745. dini_IntSet(file, "Pot", LoopasafePot);
  26746. dini_IntSet(file, "Crack", LoopasafeCrack);
  26747. dini_IntSet(file, "Mats", LoopasafeMats);
  26748. return 1;
  26749. }
  26750. stock LoadLoopa() {
  26751. new file[25];
  26752. format(file, sizeof(file), "Loopasafe.cfg");
  26753. if(!dini_Exists(file)) dini_Create(file);
  26754. LoopasafeWeapon[0] = dini_Int(file, "Weapon1");
  26755. LoopasafeWeapon[1] = dini_Int(file, "Weapon2");
  26756. LoopasafeWeapon[2] = dini_Int(file, "Weapon3");
  26757. LoopasafeWeapon[3] = dini_Int(file, "Weapon4");
  26758. LoopasafeWeapon[4] = dini_Int(file, "Weapon5");
  26759. LoopasafeWeapon[5] = dini_Int(file, "Weapon6");
  26760. LoopasafeWeapon[6] = dini_Int(file, "Weapon7");
  26761. LoopasafeWeapon[7] = dini_Int(file, "Weapon8");
  26762. LoopasafeWeapon[8] = dini_Int(file, "Weapon9");
  26763. LoopasafeWeapon[9] = dini_Int(file, "Weapon10");
  26764. LoopasafeCash = dini_Int(file, "Cash");
  26765. LoopasafePot = dini_Int(file, "Pot");
  26766. LoopasafeCrack = dini_Int(file, "Crack");
  26767. LoopasafeMats = dini_Int(file, "Mats");
  26768. return 1;
  26769. }
  26770. //==============================================================================
  26771. public LoadSurnames()
  26772. {
  26773. new arrCoords[4][64];
  26774. new strFromFile2[512];
  26775. new File: file = fopen("surnames.cfg", io_read);
  26776. if(file)
  26777. {
  26778. new idx;
  26779. while(idx < sizeof(SurnameInfo))
  26780. {
  26781. fread(file, strFromFile2);
  26782. split(strFromFile2, arrCoords, '|');
  26783. SurnameInfo[idx][Taken] = strvalEx(arrCoords[0]);
  26784. strmid(SurnameInfo[idx][Surname], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  26785. strmid(SurnameInfo[idx][Owner], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  26786. strmid(SurnameInfo[idx][AddedBy], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  26787. idx++;
  26788. }
  26789. fclose(file);
  26790. }
  26791. return 1;
  26792. }
  26793. //==============================================================================
  26794. public SaveSurnames()
  26795. {
  26796. new idx;
  26797. new File:file;
  26798. file = fopen("surnames.cfg", io_write);
  26799. fclose(file);
  26800. file = fopen("surnames.cfg", io_append);
  26801. new coordsstring[512];
  26802. if(file) {
  26803. while(idx < sizeof(SurnameInfo))
  26804. {
  26805. if(SurnameInfo[idx][Taken] == 1)
  26806. {
  26807. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s\n",
  26808. SurnameInfo[idx][Taken],
  26809. SurnameInfo[idx][Surname],
  26810. SurnameInfo[idx][Owner],
  26811. SurnameInfo[idx][AddedBy]);
  26812. fwrite(file, coordsstring);
  26813. }
  26814. idx++;
  26815. }
  26816. fclose(file);
  26817. } else {
  26818. printf("[error] Failed to find surnames.cfg");
  26819. }
  26820. return 1;
  26821. }
  26822. stock IsPlayerMoving(playerid)
  26823. {
  26824. new Float:Velocity[3];
  26825. GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
  26826. if(Velocity[0] >= 0.02 || Velocity[1] >= 0.02 || Velocity[2] >= 0.02 || Velocity[0] <= -0.02 || Velocity[1] <= -0.02 || Velocity[2] <= -0.02)
  26827. return true;
  26828. return false;
  26829. }
  26830. stock IsPlayerFalling(playerid) {
  26831. new Float:Velocity[3];
  26832. GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
  26833. if(Velocity[2] <= -0.5)
  26834. return true;
  26835. return false;
  26836. }
  26837. stock GetPlayerForename(playerid)
  26838. {
  26839. new pNames[24];
  26840. GetPlayerName(playerid, pNames, sizeof(pNames));
  26841. for(new i = 0; i < 24; i++)
  26842. {
  26843. if(pNames[i] == '_')
  26844. {
  26845. strdel(pNames, i, 24);
  26846. break;
  26847. }
  26848. }
  26849. return pNames;
  26850. }
  26851. stock GetPlayerSurname(playerid)
  26852. {
  26853. new pNames[24];
  26854. GetPlayerName(playerid, pNames, sizeof(pNames));
  26855. for(new i = 0; i < 24; i++)
  26856. {
  26857. if(pNames[i] == '_')
  26858. {
  26859. strdel(pNames, 0, i);
  26860. }
  26861. }
  26862. return pNames;
  26863. }
  26864. stock GetPlayerSurnameStr(string[])
  26865. {
  26866. new pNames[24];
  26867. format(pNames, sizeof(pNames), "%s", string);
  26868. for(new i = 0; i < 24; i++)
  26869. {
  26870. if(pNames[i] == '_')
  26871. {
  26872. strdel(pNames, 0, i);
  26873. }
  26874. }
  26875. return pNames;
  26876. }
  26877. //==============================================================================
  26878. IsNumeric(const string2[])
  26879. {
  26880. for(new i = 0, j = strlen(string2); i < j; i++)
  26881. {
  26882. if(string2[i] > '9' || string2[i] < '0') return 0;
  26883. }
  26884. return 1;
  26885. }
  26886. //==============================================================================
  26887. ReturnUser(text[])
  26888. {
  26889. new smalltext[MAX_PLAYER_NAME];
  26890. // format(str,sizeof(str), "Original input str is: %s", text);
  26891. // SendClientMessageToAll(COLOR_GRAD1, str);
  26892. strmid(smalltext, text, 0, MAX_PLAYER_NAME); //extract from 0 to 24, put in smalltext
  26893. //check if id 0
  26894. if(!strcmp(smalltext, "0"))
  26895. {
  26896. if(IsPlayerConnected(0))
  26897. {
  26898. //SendClientMessageToAll(COLOR_GRAD1, "returned id 0");
  26899. return 0; //return id 0
  26900. }
  26901. else
  26902. {
  26903. return INVALID_PLAYER_ID;
  26904. }
  26905. }
  26906. //convert str to number
  26907. new targetid = strval(smalltext);
  26908. if(targetid < 0)
  26909. {
  26910. //SendClientMessageToAll(COLOR_GRAD1, "id is negative");
  26911. return INVALID_PLAYER_ID;
  26912. }
  26913. if(targetid) //is an id
  26914. {
  26915. if(IsPlayerConnected(targetid))
  26916. {
  26917. //SendClientMessageToAll(COLOR_GRAD1, "returned an id");
  26918. return targetid;
  26919. }
  26920. else
  26921. {
  26922. return INVALID_PLAYER_ID;
  26923. }
  26924. }
  26925. else //if part of a players name
  26926. {
  26927. new playerName[MAX_PLAYER_NAME];
  26928. foreach( new i: Player )
  26929. {
  26930. GetPlayerName(i, playerName, MAX_PLAYER_NAME);
  26931. if(!strcmp(playerName, smalltext, true, strlen(smalltext)))
  26932. {
  26933. //SendClientMessageToAll(COLOR_GRAD1, "looped through and found name");
  26934. return i;
  26935. }
  26936. }
  26937. }
  26938. //SendClientMessageToAll(COLOR_GRAD1, "returned invalid id");
  26939. return INVALID_PLAYER_ID;
  26940. }
  26941. //==============================================================================
  26942. //==============================================================================
  26943. public OnRconCommand(cmd[])
  26944. {
  26945. if(strcmp(cmd, "safegmx", true) == 0)
  26946. {
  26947. GameModeInitExitFunc();
  26948. return 1;
  26949. }
  26950. return 0;
  26951. }
  26952. public OnRconLoginAttempt(ip[], password[], success)
  26953. {
  26954. new playerip[16];
  26955. foreach( new i: Player )
  26956. {
  26957. if(IsPlayerConnected(i))
  26958. {
  26959. GetPlayerIp(i, playerip, 16);
  26960. if(!strcmp(playerip, ip,true))
  26961. {
  26962. if(success)
  26963. {
  26964. #if DEVMODE == 0
  26965. if( PlayerInfo[i][pID] != 7378 && PlayerInfo[i][pID] != 7619) return KickEx(i);
  26966. #else
  26967. return 1;
  26968. #endif
  26969. }
  26970. else
  26971. {
  26972. printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
  26973. }
  26974. }
  26975. }
  26976. }
  26977. return 1;
  26978. }
  26979. //==============================================================================
  26980. stock getFreezeTime(playerid)
  26981. {
  26982. new time;
  26983. new ping = GetPlayerPing(playerid);
  26984. new multiply = ping / 100;
  26985. if(ping == 65535) return 5000;
  26986. if(multiply == 0) time = 2;
  26987. else time = (multiply * 2) + 2;
  26988. return (time * 1000);
  26989. }
  26990. //==============================================================================
  26991. Timer:FreezePlayer(playerid, type, reason)
  26992. {
  26993. if(type == FREEZE)
  26994. {
  26995. TextDrawShowForPlayer(playerid, EnteranceStuff[0]);
  26996. TextDrawShowForPlayer(playerid, EnteranceStuff[1]);
  26997. TextDrawShowForPlayer(playerid, EnteranceStuff[2]);
  26998. if(reason == ENTER_FREEZE)
  26999. {
  27000. TextDrawShowForPlayer(playerid, EnteranceStuff[3]);
  27001. }
  27002. if(reason == HELPNEWBIE_FREEZE)
  27003. {
  27004. TextDrawShowForPlayer(playerid, EnteranceStuff[4]);
  27005. }
  27006. if(reason == TESTER_FREEZE)
  27007. {
  27008. TextDrawShowForPlayer(playerid, EnteranceStuff[5]);
  27009. }
  27010. if(reason == GMX_FREEZE)
  27011. {
  27012. TextDrawShowForPlayer(playerid, EnteranceStuff[6]);
  27013. }
  27014. TogglePlayerControllable(playerid, false);
  27015. PlayerFrozen[playerid] = 1;
  27016. if(IsPlayerInAnyVehicle(playerid))
  27017. {
  27018. if(reason == ENTER_FREEZE) Timer_FreezeVehicle(playerid, (getFreezeTime(playerid) /4), 0, reason);
  27019. else Timer_FreezeVehicle(playerid, 500, 0, reason); //it'll also auto freeze the vehicle if in any.
  27020. }
  27021. else
  27022. {
  27023. if(reason == ENTER_FREEZE) SetTimerEx("Timer_FreezePlayer", getFreezeTime(playerid), false, "iii", playerid, UNFREEZE, reason);
  27024. else SetTimerEx("Timer_FreezePlayer", 2000, false, "iii", playerid, UNFREEZE, reason);
  27025. }
  27026. }
  27027. if(type == UNFREEZE)
  27028. {
  27029. TextDrawHideForPlayer(playerid, EnteranceStuff[0]);
  27030. TextDrawHideForPlayer(playerid, EnteranceStuff[1]);
  27031. TextDrawHideForPlayer(playerid, EnteranceStuff[2]);
  27032. if(reason == ENTER_FREEZE)
  27033. {
  27034. TextDrawHideForPlayer(playerid, EnteranceStuff[3]);
  27035. }
  27036. if(reason == HELPNEWBIE_FREEZE)
  27037. {
  27038. TextDrawHideForPlayer(playerid, EnteranceStuff[4]);
  27039. }
  27040. if(reason == TESTER_FREEZE)
  27041. {
  27042. TextDrawHideForPlayer(playerid, EnteranceStuff[5]);
  27043. }
  27044. TogglePlayerControllable(playerid, true);
  27045. PlayerFrozen[playerid] = 0;
  27046. }
  27047. else return 0;
  27048. return 1;
  27049. }
  27050. Timer:FreezeVehicle(playerid, time, lasttime, reason) //this is related to the functon above, don't use it in other cases!
  27051. {
  27052. if(time > lasttime)
  27053. {
  27054. if(reason == ENTER_FREEZE)
  27055. {
  27056. if((lasttime %2) == 0) SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 0.02);
  27057. else SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 0);
  27058. }
  27059. else SetVehicleVelocity(GetPlayerVehicleID(playerid), 0, 0, 0);
  27060. SetTimerEx("Timer_FreezeVehicle", 1, false, "iiii", playerid, time, lasttime +1, reason);
  27061. }
  27062. else Timer_FreezePlayer(playerid, UNFREEZE, reason);
  27063. }
  27064. //==============================================================================
  27065. public ShowAccessDialog(playerid, type)
  27066. {
  27067. if(type == 0)
  27068. {
  27069. new bigstring[512], access[7], adminaccess[7];
  27070. for(new clear = 0; clear < 7; clear++)
  27071. {
  27072. access[clear] = -1;
  27073. adminaccess[clear] = -1;
  27074. }
  27075. for(new check = 0; check < sizeof(AccessNames); check++)
  27076. {
  27077. for(new n = 0; n < 7; n++)
  27078. {
  27079. if(AccessNames[check][modid] == Accessories[playerid][n])
  27080. {
  27081. access[n] = check;
  27082. }
  27083. }
  27084. }
  27085. for(new check = 0; check < sizeof(AdminAccessers); check++)
  27086. {
  27087. for(new n = 0; n < 7; n++)
  27088. {
  27089. if(AdminAccessers[check][modid] == Accessories[playerid][n])
  27090. {
  27091. adminaccess[n] = check;
  27092. }
  27093. }
  27094. }
  27095. for(new i = 0; i < 7; i++)
  27096. {
  27097. if(access[i] != -1)
  27098. {
  27099. format(bigstring, sizeof(bigstring), "%s\n%s", bigstring, AccessNames[access[i]][modname]);
  27100. }
  27101. else if(adminaccess[i] != -1)
  27102. {
  27103. format(bigstring, sizeof(bigstring), "%s\n%s", bigstring, AdminAccessers[adminaccess[i]][modname]);
  27104. }
  27105. else format(bigstring, sizeof(bigstring), "%s\nEmpty", bigstring);
  27106. }
  27107. format(bigstring, sizeof(bigstring), "%s\n{BABABA}Equip All\n{BABABA}Unequip All", bigstring);
  27108. ShowPlayerDialog(playerid, 24215, DIALOG_STYLE_LIST, "Gear", bigstring, "Select", "Cancel");
  27109. }
  27110. return 1;
  27111. }
  27112. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  27113. {
  27114. playerClickOTextDraw(playerid, clickedid);
  27115. playerClickCCTVTextDraw(playerid, clickedid);
  27116. return 1;
  27117. }
  27118. #include "../gamemodes/inc/families/fsafes.inc"
  27119. #include "../gamemodes/inc/factions/fmddrugs.inc"
  27120. #include "../gamemodes/inc/items/dufflebag.inc"
  27121. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  27122. {
  27123. playerClickObjectTextDraw(playerid, playertextid);
  27124. return 1;
  27125. }
  27126. 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)
  27127. {
  27128. AccessoriesX[playerid][index] = fOffsetX;
  27129. AccessoriesY[playerid][index] = fOffsetY;
  27130. AccessoriesZ[playerid][index] = fOffsetZ;
  27131. AccessoriesrX[playerid][index] = fRotX;
  27132. AccessoriesrY[playerid][index] = fRotY;
  27133. AccessoriesrZ[playerid][index] = fRotZ;
  27134. AccessoriessX[playerid][index] = fScaleX;
  27135. AccessoriessY[playerid][index] = fScaleY;
  27136. AccessoriessZ[playerid][index] = fScaleZ;
  27137. SetPlayerAttachedObject(playerid, index, modelid, boneid, AccessoriesX[playerid][index], AccessoriesY[playerid][index], AccessoriesZ[playerid][index], AccessoriesrX[playerid][index], AccessoriesrY[playerid][index], AccessoriesrZ[playerid][index], AccessoriessX[playerid][index], AccessoriessY[playerid][index], AccessoriessZ[playerid][index], GetGearColour(Accessoriesc1[playerid][index]));
  27138. DeletePVar(playerid, "ManageAccessID");
  27139. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have finished editing, use /gear to make any further adjustments to the color.");
  27140. return 1;
  27141. }
  27142. stock LoadDMV()
  27143. {
  27144. CreatePickup(1318, 1, 1221.9650, -1812.1187, 16.5938, 0);
  27145. CreateDynamic3DTextLabel("Department of Motor Vehicles\n{FFFFFF}Use /enter to go inside", 0x43527DFF, 1221.9650, -1812.1187, 16.5938 + 0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  27146. CreatePickup(1239, 1, 1491.2963, 1306.1758, 1093.2964, 0);
  27147. CreateDynamic3DTextLabel("Department of Motor Vehicles\n{FFFFFF}Use /sitlicense to proceed", 0x43527DFF, 1491.2963, 1306.1758, 1093.2964 + 0.60, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  27148. CreateDynamicMapIcon(1221.9650, -1812.1187, 16.5938, 55, -1, 0, 0, -1, 100.0, MAPICON_LOCAL);
  27149. DMVCar[0] = CreateVehicle(436, 1239.7406, -1834.3180, 13.1070, 181.6799, 92, 92, 100); //Previon 1
  27150. DMVCar[1] = CreateVehicle(436, 1244.7654, -1834.2308, 13.1070, 181.6799, 92, 92, 100); //Previon 2
  27151. DMVCar[2] = CreateVehicle(436, 1249.6190, -1834.3602, 13.1070, 181.6799, 92, 92, 100); //Previon 3
  27152. SetVehicleParamsEx(DMVCar[0], 0, 0, 0, 1, 0, 0, 0);
  27153. SetVehicleParamsEx(DMVCar[1], 0, 0, 0, 1, 0, 0, 0);
  27154. SetVehicleParamsEx(DMVCar[2], 0, 0, 0, 1, 0, 0, 0);
  27155. SetVehicleVirtualWorld(DMVCar[0], 5);
  27156. SetVehicleVirtualWorld(DMVCar[1], 5);
  27157. SetVehicleVirtualWorld(DMVCar[2], 5);
  27158. return 1;
  27159. }
  27160. stock removeSlotComponent(vehicleid, slot)
  27161. {
  27162. new component = GetVehicleComponentInSlot(vehicleid, slot);
  27163. RemoveVehicleComponent(vehicleid, component);
  27164. }
  27165. //I have removed this from GM since it's an insane 14k lines LONG and needs reworking e.g y_dialogs
  27166. #include "../gamemodes/todo/OnDialogResponse.inc"
  27167. #include "../gamemodes/inc/family_levels.inc" // cant put it in /families as /todo/OnDialogResponse can't reach it, will change soon
  27168. //gear functions
  27169. stock equipAllGear(playerid)
  27170. {
  27171. for(new i = 0; i < 7; i++)
  27172. {
  27173. if(Accessories[playerid][i]) //has an accessory
  27174. {
  27175. if(AccessoriesX[playerid][i] == 0.0 && AccessoriesY[playerid][i] == 0.0 && AccessoriesZ[playerid][i] == 0.0 && AccessoriesB[playerid][i] == 0) //has been equipped for the first time
  27176. {
  27177. //could give warning that gear has not been positoned
  27178. }
  27179. else
  27180. {
  27181. SetPlayerAttachedObject(playerid, i, Accessories[playerid][i], AccessoriesB[playerid][i], AccessoriesX[playerid][i], AccessoriesY[playerid][i], AccessoriesZ[playerid][i], AccessoriesrX[playerid][i], AccessoriesrY[playerid][i], AccessoriesrZ[playerid][i], AccessoriessX[playerid][i], AccessoriessY[playerid][i], AccessoriessZ[playerid][i], GetGearColour(Accessoriesc1[playerid][i]));
  27182. }
  27183. }
  27184. }
  27185. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have equipped all the gear.");
  27186. return 1;
  27187. }
  27188. stock removeAllGear(playerid)
  27189. {
  27190. for(new i = 0; i < 7; i++)
  27191. {
  27192. RemovePlayerAttachedObject(playerid, i);
  27193. }
  27194. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unequipped all the gear.");
  27195. return 1;
  27196. }
  27197. stock displayAdminMessages(playerid)
  27198. {
  27199. new string[128] = "None";
  27200. //display stuff here
  27201. new amsgs[2560];
  27202. for(new i = 0; i < sizeof(aMessageInfo); i++)
  27203. {
  27204. string = aMessageInfo[i];
  27205. if(strcmp(string, "None", true) != 0) //if string is not "None"
  27206. {
  27207. //SendClientMessage(playerid, COLOR_GRAD1, aMessageInfo[i]); //change to send admin message
  27208. format(amsgs, sizeof(amsgs), "{BFBDBE}%s %s\n", amsgs, string);
  27209. }
  27210. }
  27211. ShowPlayerDialog(playerid, AMSGS, DIALOG_STYLE_INPUT, "Admin Messages", amsgs, "Ok", "Cancel");
  27212. }
  27213. //new tazer
  27214. stock setPlayerRubber(playerid)
  27215. {
  27216. if(PlayerCuffed[playerid] == 2) //if the player is standing up and being tazed (while cuffed), it sets their cuffed type to down on ground
  27217. {
  27218. PlayerCuffed[playerid] = 1;
  27219. }
  27220. TogglePlayerControllable(playerid, false);
  27221. PlayerTazed[playerid] = 1;
  27222. PlayerTazedTime[playerid] = 5;
  27223. lostFoodTray(playerid);
  27224. ClearAnimationsEx(playerid);
  27225. ApplyAnimationEx(playerid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  27226. return 1;
  27227. }
  27228. stock setPlayerTazed(playerid)
  27229. {
  27230. if(PlayerCuffed[playerid] == 2) //if the player is standing up and being tazed (while cuffed), it sets their cuffed type to down on ground
  27231. {
  27232. PlayerCuffed[playerid] = 1;
  27233. }
  27234. TogglePlayerControllable(playerid, false);
  27235. PlayerTazed[playerid] = 1;
  27236. PlayerTazedTime[playerid] = 12;
  27237. lostFoodTray(playerid);
  27238. ClearAnimationsEx(playerid);
  27239. ApplyAnimationEx(playerid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  27240. playLocalSound(playerid, TAZER_SHOCK, 5.0, 0);
  27241. return 1;
  27242. }
  27243. Timer:playerUntaze(playerid)
  27244. {
  27245. if(IsPlayerConnected(playerid))
  27246. {
  27247. TogglePlayerControllable(playerid, true);
  27248. ClearAnimationsEx(playerid);
  27249. }
  27250. return 1;
  27251. }
  27252. setPlayerUntazed(playerid)
  27253. {
  27254. if(PlayerCuffed[playerid] == 0) //only unfreeze player if they are not cuffed
  27255. {
  27256. ApplyAnimationEx(playerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
  27257. SetTimerEx("Timer_playerUntaze", 2 *1000, 0, "i", playerid); //2 seconds
  27258. }
  27259. PlayerTazed[playerid] = 0;
  27260. PlayerTazedTime[playerid] = 0;
  27261. return 1;
  27262. }
  27263. stock AddTicket(playerid, suspect, amount, reason[], type) // type, 0 - issued by cops, 1 - issued by speed camera
  27264. {
  27265. new TicketPID = PlayerInfo[suspect][pID];
  27266. new TicketIssuer;
  27267. if(type != 1) TicketIssuer = PlayerInfo[playerid][pID];
  27268. else TicketIssuer = 0;
  27269. new query[800], day, month, year, hour, minute, second, dstr[40];
  27270. gettime(hour, minute, second);
  27271. getdate(year, month, day);
  27272. format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  27273. if(type != 1)
  27274. {
  27275. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `tickets` (`TicketPID`, `TicketIssuer`, `Date`, `Active`, `TicketReason`, `IssuerName`, `Amount`) VALUES('%i', '%i', '%e', 1, '%e', '%e', '%i')", TicketPID, TicketIssuer, dstr, reason, PlayerName(playerid), amount);
  27276. }
  27277. else
  27278. {
  27279. new speedreason[20] = "Speeding", speedname[20] = "Speed Camera";
  27280. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `tickets` (`TicketPID`, `TicketIssuer`, `Date`, `Active`, `TicketReason`, `IssuerName`, `Amount`) VALUES('%i', '%i', '%e', 1, '%e', '%e', '%i')", TicketPID, TicketIssuer, dstr, speedreason, speedname, amount);
  27281. }
  27282. mysql_pquery(sqlGameConnection, query);
  27283. return 1;
  27284. }
  27285. stock AddCrime(playerid, suspect, type, reason[])
  27286. {
  27287. new CrimePID = PlayerInfo[suspect][pID];
  27288. new CrimeIssuer = PlayerInfo[playerid][pID];
  27289. new query[800], day, month, year, hour, minute, second, dstr[40];
  27290. gettime(hour, minute, second);
  27291. getdate(year, month, day);
  27292. format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  27293. mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `newcrimes` (`CrimePID`, `CrimeIssuer`, `Date`, `CrimeEnabled`, `CrimeType`, `CrimeReason`, `RealName`) VALUES('%i', '%i', '%e', 1, '%d', '%e', '%e')", CrimePID, CrimeIssuer, dstr, type, reason, PlayerName(playerid));
  27294. mysql_pquery(sqlGameConnection, query);
  27295. return 1;
  27296. }
  27297. stock AddOfflineCrime(playerid, suspect[], type, reason[])
  27298. {
  27299. new query[800], rows, fields, CrimePID, Cache:result;
  27300. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", suspect);
  27301. result = mysql_query(sqlGameConnection, query);
  27302. cache_get_data(rows, fields, sqlGameConnection);
  27303. CrimePID = cache_get_field_content_int(0, "ID");
  27304. new CrimeIssuer = PlayerInfo[playerid][pID];
  27305. new qqq[200], day, month, year, hour, minute, second, dstr[40];
  27306. gettime(hour, minute, second);
  27307. getdate(year, month, day);
  27308. format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
  27309. cache_delete(Cache:result, sqlGameConnection);
  27310. mysql_format(sqlGameConnection, qqq, sizeof(qqq), "INSERT INTO `newcrimes` (`CrimePID`, `CrimeIssuer`, `Date`, `CrimeEnabled`, `CrimeType`, `CrimeReason`, `RealName`) VALUES('%i', '%i', '%e', 1, '%d', '%e', '%e')", CrimePID, CrimeIssuer, dstr, type, reason, PlayerName(playerid));
  27311. mysql_pquery(sqlGameConnection, qqq, "", "");
  27312. return 1;
  27313. }
  27314. stock GetPlayerIDFromName(name[])
  27315. {
  27316. foreach( new i: Player )
  27317. {
  27318. if(IsPlayerConnected(i))
  27319. {
  27320. new playername2[MAX_PLAYER_NAME];
  27321. GetPlayerName(i, playername2, sizeof(playername2));
  27322. if(strmatch(playername2, name))
  27323. {
  27324. return i;
  27325. }
  27326. }
  27327. }
  27328. return INVALID_PLAYER_ID;
  27329. }
  27330. //new cuffs
  27331. stock setPlayerCuffed(playerid, freezeplayer)
  27332. {
  27333. //reset tazer
  27334. PlayerTazed[playerid] = 0;
  27335. PlayerTazedTime[playerid] = 0;
  27336. ClearAnimationsEx(playerid);
  27337. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
  27338. if(freezeplayer)
  27339. {
  27340. TogglePlayerControllable(playerid, false);
  27341. ApplyAnimationEx(playerid, "PED", "FLOOR_hit_f", 4.0, 0, 1, 1, 1, 0, 1);
  27342. PlayerCuffed[playerid] = 1;
  27343. }
  27344. else
  27345. {
  27346. PlayerCuffed[playerid] = 2;
  27347. }
  27348. playLocalSound(playerid, 17803, 5.0, 0);
  27349. // 15 minutes, 5 minutes is way too short. Not enough time to process criminals
  27350. PlayerCuffedTime[playerid] = 900;
  27351. new skin = GetPlayerSkin(playerid);
  27352. SetPlayerAttachedObject(playerid, INDEX_0, 19418, 6, CUFFS_cuffOffsets[skin][0], CUFFS_cuffOffsets[skin][1], CUFFS_cuffOffsets[skin][2], CUFFS_cuffOffsets[skin][3], CUFFS_cuffOffsets[skin][4], CUFFS_cuffOffsets[skin][5], CUFFS_cuffOffsets[skin][6], CUFFS_cuffOffsets[skin][7], CUFFS_cuffOffsets[skin][8]);
  27353. return 1;
  27354. }
  27355. Timer:playerUncuff(playerid)
  27356. {
  27357. if(IsPlayerConnected(playerid))
  27358. {
  27359. TogglePlayerControllable(playerid, true);
  27360. ClearAnimationsEx(playerid);
  27361. }
  27362. return 1;
  27363. }
  27364. stock setPlayerUncuffed(playerid)
  27365. {
  27366. if(PlayerCuffed[playerid] == 2)
  27367. {
  27368. TogglePlayerControllable(playerid, true); //the player only gets frozen if /detain is used
  27369. //ClearAnimationsEx(playerid);
  27370. //SetTimerEx("playerUncuff",2*1000,0,"i",playerid); //2 seconds
  27371. }
  27372. else //frozen
  27373. {
  27374. ApplyAnimationEx(playerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
  27375. SetTimerEx("Timer_playerUncuff", 2 *1000, 0, "i", playerid); //2 seconds
  27376. if(PlayerTazed[playerid] == 1) //if player was already tazed
  27377. {
  27378. PlayerTazed[playerid] = 0;
  27379. PlayerTazedTime[playerid] = 0;
  27380. }
  27381. }
  27382. new seat = GetPlayerVehicleSeat(playerid), car = GetPlayerVehicleID(playerid), inCar = 0;
  27383. if(IsPlayerInAnyVehicle(playerid))
  27384. {
  27385. inCar = 1;
  27386. }
  27387. SetPlayerSpecialAction(playerid, 0);
  27388. RemovePlayerAttachedObject(playerid, INDEX_0);
  27389. PlayerCuffed[playerid] = 0;
  27390. PlayerCuffedTime[playerid] = 0;
  27391. playLocalSound(playerid, 17803, 5.0, 0);
  27392. if(inCar == 1)
  27393. {
  27394. PutPlayerInVehicle(playerid, car, seat);
  27395. }
  27396. return 1;
  27397. }
  27398. stock SearchBizProducts(playerid)
  27399. {
  27400. new businesses = 0;
  27401. new dialogstr[50000];
  27402. for(new i = 0; i < MAX_BIZ; i++)
  27403. {
  27404. if(BizInfo[i][bProducts] <= 0)
  27405. {
  27406. new name[24];
  27407. strmid(name, str_replace('_', ' ', BizInfo[i][bOwner]), 0, MAX_PLAYER_NAME);
  27408. format(dialogstr, sizeof(dialogstr), "%s\n{FFFFFF}(ID %d)\t\tOwner: %s\t\tName: %s\t\tEmpty since: %s", dialogstr, i, name, BizInfo[i][bName], BizInfo[i][bNoProdsDate]);
  27409. businesses++;
  27410. }
  27411. }
  27412. if(businesses != 0)
  27413. {
  27414. ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "{FF0000}Empty Businesses", dialogstr, "Close", "");
  27415. }
  27416. else return SendClientMessage(playerid, COLOR_GREY, "There are currently no businesses out of products.");
  27417. return 1;
  27418. }
  27419. //stock SetPlayerPickupObjectDelay(playerid, objtype, secs);
  27420. stock SetPlayerPickupObjectDelay(playerid, objtype, secs)
  27421. {
  27422. SetTimerEx("Timer_SetPlayerPickupObject", secs *1000, 0, "ii", playerid, objtype);
  27423. return 1;
  27424. }
  27425. Timer:SetPlayerPickupObject(playerid, objtype)
  27426. {
  27427. if(IsPlayerConnected(playerid))
  27428. {
  27429. switch(objtype)
  27430. {
  27431. case 0: //crate object
  27432. {
  27433. SetPlayerAttachedObject(playerid, INDEX_8, 2912, 6, 0.05, -0.04, -0.20, 250, 0, 0, 0.5, 0.5, 0.5);
  27434. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  27435. SetPlayerArmedWeapon(playerid, 0); // disables weapons
  27436. }
  27437. case 1: //trash object
  27438. {
  27439. SetPlayerAttachedObject(playerid, INDEX_8, 1264, 6, 0.05, 0.06, -0.20, 250, 0, 0, 0.5, 0.5, 0.5);
  27440. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  27441. SetPlayerArmedWeapon(playerid, 0); // disables weapons
  27442. }
  27443. }
  27444. }
  27445. return 1;
  27446. }
  27447. stock placeBoomboxOnGround(playerid, num)
  27448. {
  27449. new string[128];
  27450. new playername[MAX_PLAYER_NAME];
  27451. GetPlayerName(playerid, playername, sizeof(playername));
  27452. GetXYInFrontOfPlayer(playerid, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2], BoomboxInfo[playerid][bpos][3], 1);
  27453. switch(num)
  27454. {
  27455. case 1:
  27456. {
  27457. BoomboxInfo[playerid][bbObjectID] = CreateDynamicObject(2102, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] -1.0, 0, 0, BoomboxInfo[playerid][bpos][3], GetPlayerVirtualWorld(playerid));
  27458. }
  27459. case 2:
  27460. {
  27461. BoomboxInfo[playerid][bbObjectID] = CreateDynamicObject(2226, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] -1.0, 0, 0, BoomboxInfo[playerid][bpos][3], GetPlayerVirtualWorld(playerid));
  27462. }
  27463. case 3:
  27464. {
  27465. BoomboxInfo[playerid][bbObjectID] = CreateDynamicObject(2103, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] -1.0, 0, 0, BoomboxInfo[playerid][bpos][3], GetPlayerVirtualWorld(playerid));
  27466. }
  27467. case 4:
  27468. {
  27469. BoomboxInfo[playerid][bbObjectID] = CreateDynamicObject(2100, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] -1.0, 0, 0, BoomboxInfo[playerid][bpos][3], GetPlayerVirtualWorld(playerid));
  27470. }
  27471. default:
  27472. {
  27473. BoomboxInfo[playerid][bbObjectID] = CreateDynamicObject(2103, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] -1.0, 0, 0, BoomboxInfo[playerid][bpos][3], GetPlayerVirtualWorld(playerid));
  27474. }
  27475. }
  27476. format(string, sizeof(string), "%s's Stereo\n{FFFFFF}/edit", playername);
  27477. BoomboxInfo[playerid][bbLabelID] = CreateDynamic3DTextLabel(string, 0x6E88FFFF, BoomboxInfo[playerid][bpos][0], BoomboxInfo[playerid][bpos][1], BoomboxInfo[playerid][bpos][2] - 1 +0.88, 40.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, GetPlayerVirtualWorld(playerid), -1, -1, 30.0);
  27478. SetPlayerSpecialAction(playerid, 0);
  27479. ApplyAnimationEx(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0, 0);
  27480. BoomboxInfo[playerid][placedBoombox] = 1;
  27481. BoomboxInfo[playerid][BoomboxWorld] = GetPlayerVirtualWorld(playerid);
  27482. return 1;
  27483. }
  27484. stock destroyBoomBox(playerid)
  27485. {
  27486. //reset boombox variables, this should be on onplayerdisconnect not here
  27487. BoomboxInfo[playerid][boomboxTurnedOn] = 0;
  27488. BoomboxInfo[playerid][locked] = 0;
  27489. BoomboxInfo[playerid][placedBoombox] = 0;
  27490. BoomboxInfo[playerid][bpos][0] = 0; //x
  27491. BoomboxInfo[playerid][bpos][1] = 0; //y
  27492. BoomboxInfo[playerid][bpos][2] = 0; //z
  27493. BoomboxInfo[playerid][bpos][3] = 0; //a
  27494. BoomboxInfo[playerid][BoomboxWorld] = -1;
  27495. format(BoomboxInfo[playerid][BoomboxURL], 256, "");
  27496. if(BoomboxInfo[playerid][bbObjectID]) { DestroyDynamicObjectEx(BoomboxInfo[playerid][bbObjectID]); }
  27497. DestroyDynamic3DTextLabel(BoomboxInfo[playerid][bbLabelID]);
  27498. BoomboxInfo[playerid][bbObjectID] = 0;
  27499. BoomboxInfo[playerid][bbLabelID] = Text3D:INVALID_3DTEXT_ID;
  27500. }
  27501. stock pickupBoombox(playerid) //NEEDS TO BE SCRIPTED
  27502. {
  27503. new bbid = editingBoomboxID[playerid];
  27504. if(IsPlayerInRangeOfPoint(playerid, 3, BoomboxInfo[bbid][bpos][0], BoomboxInfo[bbid][bpos][1], BoomboxInfo[bbid][bpos][2]))
  27505. {
  27506. if(GetPlayerVirtualWorld(playerid) == BoomboxInfo[bbid][BoomboxWorld])
  27507. {
  27508. SetPlayerFacingObject(playerid, editingBoomboxID[playerid]);
  27509. if(editingBoomboxID[playerid] != playerid) //not my boombox
  27510. {
  27511. PlayerInfo[playerid][pStereo] = PlayerInfo[bbid][pStereo]; //take their stereo model
  27512. PlayerInfo[bbid][pStereo] = 0; //owner no longer has stereo
  27513. }
  27514. //
  27515. destroyBoomBox(editingBoomboxID[playerid]);
  27516. ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_2Idle", 4.0, 0, 0, 0, 0, 0);
  27517. stopBoomboxStream(editingBoomboxID[playerid]); //loops through the players, checks if they are streaming this BB and if so stops their stream
  27518. }
  27519. }
  27520. }
  27521. // car radio commands
  27522. stock stopBoomboxStream(boomboxid)
  27523. {
  27524. foreach( new i: Player )
  27525. {
  27526. if(streamingFromBoombox[i] == boomboxid && GetPVarInt(i, "AudioDisabled") != 1)
  27527. {
  27528. //player is streaming BB
  27529. streamingFromBoombox[i] = -1;
  27530. StopAudioStreamForPlayer(i);
  27531. }
  27532. }
  27533. }
  27534. stock CarMessage(playerid, color, string[])
  27535. {
  27536. new vehicleid = GetPlayerVehicleID(playerid);
  27537. foreach( new i: Player )
  27538. {
  27539. if(IsPlayerInVehicle(i, vehicleid))
  27540. {
  27541. if(beingSpectatedID[i] != INVALID_PLAYER_ID)
  27542. {
  27543. if(IsPlayerConnected(beingSpectatedID[i]) && SpectatingID[beingSpectatedID[i]] == i)
  27544. {
  27545. SendClientMessage(beingSpectatedID[i], COLOR_GREY, string);
  27546. }
  27547. }
  27548. SendClientMessage(i, color, string);
  27549. }
  27550. }
  27551. return 1;
  27552. }
  27553. stock changeBoomboxRadioStation(boomboxid)
  27554. {
  27555. foreach( new i: Player )
  27556. {
  27557. if(streamingFromBoombox[i] == boomboxid && GetPVarInt(i, "AudioDisabled") != 1)
  27558. {
  27559. //player is streaming BB
  27560. StopAudioStreamForPlayer(i);
  27561. PlayAudioStreamForPlayer(i, BoomboxInfo[boomboxid][BoomboxURL], BoomboxInfo[boomboxid][bpos][0], BoomboxInfo[boomboxid][bpos][1], BoomboxInfo[boomboxid][bpos][2], 30, 1);
  27562. }
  27563. }
  27564. }
  27565. stock isBoomboxWithinRange(playerid, range) //check if there are any other boomboxes within specified range
  27566. {
  27567. foreach( new i: Player )
  27568. {
  27569. if(BoomboxInfo[i][placedBoombox])
  27570. {
  27571. if(IsPlayerInRangeOfPoint(playerid, range, BoomboxInfo[i][bpos][0], BoomboxInfo[i][bpos][1], BoomboxInfo[i][bpos][2]))
  27572. {
  27573. if(GetPlayerVirtualWorld(playerid) == BoomboxInfo[i][BoomboxWorld])
  27574. {
  27575. return 1;
  27576. }
  27577. }
  27578. }
  27579. }
  27580. return 0;
  27581. }
  27582. stock getOwnerOfClosestBoombox(playerid) //check if there are any other boomboxes within specified range
  27583. {
  27584. foreach( new i: Player )
  27585. {
  27586. if(BoomboxInfo[i][placedBoombox])
  27587. {
  27588. if(IsPlayerInRangeOfPoint(playerid, 3, BoomboxInfo[i][bpos][0], BoomboxInfo[i][bpos][1], BoomboxInfo[i][bpos][2]))
  27589. {
  27590. if(GetPlayerVirtualWorld(playerid) == BoomboxInfo[i][BoomboxWorld])
  27591. {
  27592. return i; //return the owners id
  27593. }
  27594. }
  27595. }
  27596. }
  27597. return -1;
  27598. }
  27599. stock playVehicleStreamForAll(vehicleid)
  27600. {
  27601. foreach( new i: Player )
  27602. {
  27603. if(GetPVarInt(i, "AudioDisabled") != 1)
  27604. {
  27605. if(IsPlayerInAnyVehicle(i))
  27606. {
  27607. if(GetPlayerVehicleID(i) == vehicleid)
  27608. {
  27609. if(!disabledRadios[i])
  27610. {
  27611. if(streamingFromBoombox[i] != -1) //if player is already streaming from a boombox, stop the stream
  27612. {
  27613. StopAudioStreamForPlayer(i);
  27614. streamingFromBoombox[i] = -1;
  27615. }
  27616. PlayAudioStreamForPlayer(i, VehicleInfo[vehicleid][radioURL], 0.0, 0.0, 0.0, 0.0, 0);
  27617. streamingFromVehicle[i] = vehicleid;
  27618. }
  27619. }
  27620. }
  27621. }
  27622. }
  27623. }
  27624. stock stopVehicleStreamForAll(vehicleid)
  27625. {
  27626. foreach( new i: Player )
  27627. {
  27628. if(IsPlayerInAnyVehicle(i))
  27629. {
  27630. if(GetPlayerVehicleID(i) == vehicleid)
  27631. {
  27632. StopAudioStreamForPlayer(i);
  27633. streamingFromVehicle[i] = -1;
  27634. }
  27635. }
  27636. }
  27637. }
  27638. forward OnOIPCheck(playerid, name[]);
  27639. public OnOIPCheck(playerid, name[])
  27640. {
  27641. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  27642. //if(cache_num_rows() != 1) return OnINIoIPCheck(playerid, name);
  27643. new ip[16];
  27644. cache_get_field_content(0, "IP", ip);
  27645. format(ipchecking[playerid], 24, "%s", name);
  27646. new link[135];
  27647. format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=6e96000f89ab82ae854f4bd2a3189d84a4eed7c77df091972df7a146d8efcf1b&ip=%s", ip);
  27648. HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
  27649. return 1;
  27650. }
  27651. forward OnUnbanIP(playerid, ip[]);
  27652. public OnUnbanIP(playerid, ip[])
  27653. {
  27654. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GRAD1, "DEBUG: OnUnbanIP: cache_num_rows() == 0");
  27655. new query[128]; // just unban the ip, not the account
  27656. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `banlist` SET `IP` = '(IP Unbanned) %e' WHERE `IP` = '%e'", ip, ip);
  27657. mysql_pquery(sqlGameConnection, query);
  27658. return 1;
  27659. }
  27660. forward OnBanAccount(playerid, name[], reason[]);
  27661. public OnBanAccount(playerid, name[], reason[])
  27662. {
  27663. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GRAD2, "That player does not exist.");
  27664. new string[128], ip[16], key[32], serial[128], band, adminlevel, permband, bannedpid, sqlid;
  27665. cache_get_field_content(0, "IP", ip);
  27666. cache_get_field_content(0, "Key_", key);
  27667. cache_get_field_content(0, "Serial", serial);
  27668. bannedpid = cache_get_field_content_int(0, "ID");
  27669. band = cache_get_field_content_int(0, "Band");
  27670. adminlevel = cache_get_field_content_int(0, "AdminLevel");
  27671. permband = cache_get_field_content_int(0, "PermBand");
  27672. sqlid = cache_get_field_content_int(0, "ID");
  27673. if(band > 0 && permband > 0) return SendClientMessage(playerid, COLOR_GRAD2, "That account is already banned.");
  27674. new str[128];
  27675. if(adminlevel > PlayerInfo[playerid][pAdmin])
  27676. {
  27677. format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to ban a higher admin.", PlayerName(playerid));
  27678. SendClientMessageToAll(COLOR_WHITE, str);
  27679. new breason[64];
  27680. format(breason, sizeof(breason), "attempting to ban a higher admin.");
  27681. BanAccount(playerid, INVALID_PLAYER_ID, breason); //log before banning the account
  27682. return 1;
  27683. }
  27684. if(sqlid == 7378 || sqlid == 7619){ SendClientMessage(playerid, COLOR_GREY, "Nice try motherfucker"); Kick(playerid); return 1;}
  27685. new query[600], expires[] = "2030-01-01", adminname[MAX_PLAYER_NAME];
  27686. GetPlayerName(playerid, adminname, MAX_PLAYER_NAME);
  27687. mysql_format(sqlGameConnection, query, sizeof(query),
  27688. "INSERT INTO `banlist` (`userID`, `IP`, `Key_`, `Serial`, `Reason`, `BannedBy`, `Expires`, `Date`, `Banned`) VALUES(%d, '%e', '%e', '%e', '%e', '%e', '%e', NOW(), 1)",
  27689. bannedpid, ip, key, serial, reason, adminname, expires);
  27690. mysql_pquery(sqlGameConnection, query);
  27691. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE players SET Band=1, PermBand=1 WHERE Name='%e'", name);
  27692. mysql_pquery(sqlGameConnection, query);
  27693. /*new banquery[225];
  27694. mysql_format(sqlGameConnection, banquery, sizeof banquery, "INSERT INTO `punishmentlogs` SET player = %d, date = NOW(), admin = '%e', reason = '%e', punishment = 1", bannedpid, PlayerOOCName(playerid), reason);
  27695. mysql_tquery(sqlGameConnection, banquery);*/
  27696. format(string, sizeof(string), "{FF0000}AdmWarning{FFFFFF}: %s has banned account '%s' and IP '%s'.", PlayerOOCName(playerid), name, ip);
  27697. ABroadCast(COLOR_LIGHTRED, string, 1);
  27698. return 1;
  27699. }
  27700. forward OnOChangePass(playerid, playername[], newpassword[]);
  27701. public OnOChangePass(playerid, playername[], newpassword[])
  27702. {
  27703. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist.");
  27704. new adminlevel = cache_get_field_content_int(0, "AdminLevel");
  27705. if(adminlevel > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GRAD2, "That player's account is a higher level admin than you.");
  27706. new password[MAX_ENCRYPTED_PASS_LENGTH], salt[MAX_SALT_LENGTH];
  27707. //create new hash
  27708. HashPasswordEx(newpassword, password, salt);
  27709. //update
  27710. new query[500];
  27711. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `NewPassword` = '%e', `NewSalt`= '%e' WHERE `Name` = '%e' LIMIT 1", password, salt, playername);
  27712. mysql_pquery(sqlGameConnection, query);
  27713. new str[128];
  27714. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has changed %s's password.", PlayerName(playerid), playername);
  27715. ABroadCast(COLOR_LIGHTRED, str, 1);
  27716. return 1;
  27717. }
  27718. stock strmatch(const String1[], const String2[])
  27719. {
  27720. if((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
  27721. {
  27722. return true;
  27723. }
  27724. else
  27725. {
  27726. return false;
  27727. }
  27728. }
  27729. stock isMotorbike(vehicleid)
  27730. {
  27731. new model = GetVehicleModel(vehicleid);
  27732. switch(model)
  27733. {
  27734. case 509:
  27735. return true;
  27736. case 481:
  27737. return true;
  27738. case 510:
  27739. return true;
  27740. case 462:
  27741. return true;
  27742. case 448:
  27743. return true;
  27744. case 581:
  27745. return true;
  27746. case 522:
  27747. return true;
  27748. case 461:
  27749. return true;
  27750. case 521:
  27751. return true;
  27752. case 523:
  27753. return true;
  27754. case 463:
  27755. return true;
  27756. case 586:
  27757. return true;
  27758. case 468:
  27759. return true;
  27760. case 471:
  27761. return true;
  27762. }
  27763. return false;
  27764. }
  27765. //Fuel/Speedo (iGetty)
  27766. stock GetVehicleSpeedKMH(vehicleid) // vehicle speed in KMH
  27767. {
  27768. new Float:xPos[3];
  27769. GetVehicleVelocity(vehicleid, xPos[0], xPos[1], xPos[2]);
  27770. return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);
  27771. }
  27772. forward updateFuelHUD(playerid);
  27773. public updateFuelHUD(playerid)
  27774. {
  27775. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  27776. {
  27777. new vehicleid = GetPlayerVehicleID(playerid), speedstr[40];
  27778. if(!IsNonFuelVehicle(vehicleid))
  27779. {
  27780. if(!ToggedFuel[playerid])
  27781. {
  27782. if(Gas[vehicleid] >= 100)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIIIIIIII~r~I~l~I");
  27783. if(Gas[vehicleid] >= 90 && Gas[vehicleid] <= 99)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIIIIIIII~r~I~l~I");
  27784. if(Gas[vehicleid] >= 80 && Gas[vehicleid] <= 89)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIIIIIII~r~I~w~I~l~I");
  27785. if(Gas[vehicleid] >= 70 && Gas[vehicleid] <= 79)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIIIII~r~I~w~III~l~I");
  27786. if(Gas[vehicleid] >= 60 && Gas[vehicleid] <= 69)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIIII~r~I~w~IIII~l~I");
  27787. if(Gas[vehicleid] >= 50 && Gas[vehicleid] <= 59)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~IIII~r~I~w~IIIII~l~I");
  27788. if(Gas[vehicleid] >= 40 && Gas[vehicleid] <= 49)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~III~r~I~w~IIIIII~l~I");
  27789. if(Gas[vehicleid] >= 30 && Gas[vehicleid] <= 39)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~II~r~I~w~IIIIIII~l~I");
  27790. if(Gas[vehicleid] >= 20 && Gas[vehicleid] <= 29)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~I~r~I~w~IIIIIIII~l~I");
  27791. if(Gas[vehicleid] >= 10 && Gas[vehicleid] <= 19)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~~r~I~w~IIIIIIIII~l~I");
  27792. if(Gas[vehicleid] >= 0 && Gas[vehicleid] <= 9)PlayerTextDrawSetString(playerid, FuelTextdraw[playerid], "~g~~h~FUEL ~l~I~w~~r~I~w~IIIIIIIII~l~I");
  27793. }
  27794. }
  27795. if(!ToggedSpeedo[playerid])
  27796. {
  27797. if(CurrentSpeedUnitMPH[playerid] == true)
  27798. {
  27799. format(speedstr, sizeof(speedstr), "~g~~h~SPEED~w~ %d MPH", GetVehicleSpeed(vehicleid));
  27800. PlayerTextDrawSetString(playerid, SpeedoTextdraw[playerid], speedstr);
  27801. }
  27802. else
  27803. {
  27804. format(speedstr, sizeof(speedstr), "~g~~h~SPEED~w~ %d KMH", GetVehicleSpeedKMH(vehicleid)); // speed in KPH. Using %d for whole number because the numbers after the dot don't matter really.
  27805. PlayerTextDrawSetString(playerid, SpeedoTextdraw[playerid], speedstr);
  27806. }
  27807. }
  27808. if(!ToggedVHealth[playerid])
  27809. {
  27810. new Float:damage;
  27811. GetVehicleHealth(vehicleid, damage);
  27812. format(speedstr, sizeof(speedstr), "~g~~h~HEALTH~w~ %d%", floatround(damage / 10, floatround_ceil));
  27813. PlayerTextDrawSetString(playerid, VHealthTextDraw[playerid], speedstr);
  27814. }
  27815. }
  27816. return 1;
  27817. }
  27818. stock GetWeek() // Credits to ipsBruno. Edited by Emmet.
  27819. {
  27820. new
  27821. date[3],
  27822. week = 0,
  27823. calendar = 0,
  27824. weekday = 0
  27825. ;
  27826. getdate(date[2], date[1], date[0]);
  27827. calendar = (date[2] % 100);
  27828. weekday = (date[2] / 100);
  27829. if(date[1] < 3)
  27830. {
  27831. date[1] += 12;
  27832. date[2] -= 1;
  27833. }
  27834. week = ((date[0] + (date[1] + 1) * 26 / 10 + calendar + calendar / 4 + weekday / 4 - 2 * weekday) % 7);
  27835. return week;
  27836. }
  27837. stock GetWeekYear(day, month, year) // Not mine! this was converted from C++.
  27838. {
  27839. new a = year;
  27840. new b = (a / 4) - (a / 100) + (a / 400);
  27841. new c = ((a - 1) / 4) - ((a - 1) / 100) + ((a - 1) / 400);
  27842. new s = b - c;
  27843. new e = s + 1;
  27844. new f = day + ((153 * (month - 3) + 2) / 5) + 58 + s;
  27845. if(month < 3)
  27846. {
  27847. a = year - 1;
  27848. b = (a / 4) - (a / 100) + (a / 400);
  27849. c = ((a - 1) / 4) - ((a - 1) / 100) + ((a - 1) / 400);
  27850. s = b - c;
  27851. e = 0;
  27852. f = day - 1 + 31 * (month - 1);
  27853. }
  27854. new g = (a + b) % 7;
  27855. new d = (f + g - e) % 7;
  27856. new n = f + 3 - d;
  27857. if(n < 0)
  27858. {
  27859. n = 53 - ((g - s) / 5);
  27860. }
  27861. else if(n > 364 + s)
  27862. {
  27863. n = 1;
  27864. }
  27865. else
  27866. {
  27867. n = (n / 7) + 1;
  27868. }
  27869. return n - 1;
  27870. }
  27871. stock strftime(const string[], dest[], size = sizeof(dest))
  27872. {
  27873. if(!string[0]) return 0;
  27874. new
  27875. date[6],
  27876. value[36],
  27877. pos = 0;
  27878. dest[0] = EOS;
  27879. strcat(dest, string, size);
  27880. getdate(date[2], date[1], date[0]);
  27881. gettime(date[3], date[4], date[5]);
  27882. while(dest[pos++] != EOS) if(dest[pos - 1] == '%')
  27883. {
  27884. switch(dest[pos])
  27885. {
  27886. case 'a':
  27887. switch(GetWeek())
  27888. {
  27889. case 0:
  27890. value = "Sat";
  27891. case 1:
  27892. value = "Sun";
  27893. case 2:
  27894. value = "Mon";
  27895. case 3:
  27896. value = "Tue";
  27897. case 4:
  27898. value = "Wed";
  27899. case 5:
  27900. value = "Thu";
  27901. case 6:
  27902. value = "Fri";
  27903. }
  27904. case 'A':
  27905. switch(GetWeek())
  27906. {
  27907. case 0:
  27908. value = "Saturday";
  27909. case 1:
  27910. value = "Sunday";
  27911. case 2:
  27912. value = "Monday";
  27913. case 3:
  27914. value = "Tuesday";
  27915. case 4:
  27916. value = "Wednesday";
  27917. case 5:
  27918. value = "Thursday";
  27919. case 6:
  27920. value = "Friday";
  27921. }
  27922. case 'b':
  27923. switch(date[1])
  27924. {
  27925. case 1:
  27926. value = "Jan";
  27927. case 2:
  27928. value = "Feb";
  27929. case 3:
  27930. value = "Mar";
  27931. case 4:
  27932. value = "Apr";
  27933. case 5:
  27934. value = "May";
  27935. case 6:
  27936. value = "Jun";
  27937. case 7:
  27938. value = "Jul";
  27939. case 8:
  27940. value = "Aug";
  27941. case 9:
  27942. value = "Sep";
  27943. case 10:
  27944. value = "Oct";
  27945. case 11:
  27946. value = "Nov";
  27947. case 12:
  27948. value = "Dec";
  27949. }
  27950. case 'B':
  27951. switch(date[1])
  27952. {
  27953. case 1:
  27954. value = "January";
  27955. case 2:
  27956. value = "February";
  27957. case 3:
  27958. value = "March";
  27959. case 4:
  27960. value = "April";
  27961. case 5:
  27962. value = "May";
  27963. case 6:
  27964. value = "June";
  27965. case 7:
  27966. value = "July";
  27967. case 8:
  27968. value = "August";
  27969. case 9:
  27970. value = "September";
  27971. case 10:
  27972. value = "October";
  27973. case 11:
  27974. value = "November";
  27975. case 12:
  27976. value = "December";
  27977. }
  27978. case 'c':
  27979. {
  27980. format(value, 36, "%02d/%02d/%02d %02d:%02d:%02d", date[1], date[0], date[2] - 2000, date[3], date[4], date[5]);
  27981. }
  27982. case 'd':
  27983. {
  27984. format(value, 36, "%02d", date[0]);
  27985. }
  27986. case 'H':
  27987. {
  27988. format(value, 36, "%02d", date[3]);
  27989. }
  27990. case 'I':
  27991. {
  27992. format(value, 36, "%02d", (date[3] > 12) ? (date[3] - 12) : (date[3]));
  27993. }
  27994. case 'j':
  27995. {
  27996. format(value, 36, "%d", getdate());
  27997. }
  27998. case 'm':
  27999. {
  28000. format(value, 36, "%02d", date[1]);
  28001. }
  28002. case 'M':
  28003. {
  28004. format(value, 36, "%02d", date[4]);
  28005. }
  28006. case 'p':
  28007. {
  28008. format(value, 36, "%s", (date[3] >= 12) ? ("PM") : ("AM"));
  28009. }
  28010. case 'S':
  28011. {
  28012. format(value, 36, "%02d", date[5]);
  28013. }
  28014. case 'U', 'W':
  28015. {
  28016. format(value, 36, "%d", GetWeekYear(date[0], date[1], date[2]));
  28017. }
  28018. case 'w':
  28019. switch(GetWeek())
  28020. {
  28021. case 0:
  28022. format(value, 36, "6");
  28023. case 1:
  28024. format(value, 36, "0");
  28025. case 2:
  28026. format(value, 36, "1");
  28027. case 3:
  28028. format(value, 36, "2");
  28029. case 4:
  28030. format(value, 36, "3");
  28031. case 5:
  28032. format(value, 36, "4");
  28033. case 6:
  28034. format(value, 36, "5");
  28035. }
  28036. case 'x':
  28037. {
  28038. format(value, 36, "%02d/%02d/%02d", date[1], date[0], date[2] - 2000);
  28039. }
  28040. case 'X':
  28041. {
  28042. format(value, 36, "%02d:%02d:%02d", date[3], date[4], date[5]);
  28043. }
  28044. case 'y':
  28045. {
  28046. format(value, 36, "%02d", date[2] - 2000);
  28047. }
  28048. case 'Y':
  28049. {
  28050. format(value, 36, "%d", date[2]);
  28051. }
  28052. case '%':
  28053. {
  28054. strdel(dest, pos - 1, pos);
  28055. continue;
  28056. }
  28057. default:
  28058. {
  28059. continue;
  28060. }
  28061. }
  28062. if(strlen(value) + strlen(dest) > size)
  28063. {
  28064. return 0;
  28065. }
  28066. strdel(dest, pos - 1, pos + 1);
  28067. strins(dest, value, pos - 1, size);
  28068. }
  28069. return 1;
  28070. }
  28071. stock SaveFactionBanks()
  28072. {
  28073. new query[200];
  28074. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `factionbanks` SET `SAPD`=%d, `FBI`=%d, `SAST`=%d, `FMD`=%d, `SANG`=%d, `GOV`=%d, `SCOTUS`=%d, `NEWS`=%d, `TAXI`=%d",
  28075. SAPD, FBI, SAST, FMD, DOC, GOV, SCOTUS, NEWS, TAXI);
  28076. mysql_pquery(sqlGameConnection, query);
  28077. return 1;
  28078. }
  28079. forward Onfactionmoderators(playerid);
  28080. public Onfactionmoderators(playerid)
  28081. {
  28082. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GREY, "There are no faction moderators.");
  28083. new name[MAX_PLAYER_NAME + 1], factionid, fstring[128], facName[45];
  28084. SendClientMessage(playerid, COLOR_ORANGE, "Faction moderators;");
  28085. for(new i = 0; i < cache_num_rows(); i++)
  28086. {
  28087. cache_get_field_content(i, "Name", name);
  28088. factionid = cache_get_field_content_int(i, "Member");
  28089. switch(factionid)
  28090. {
  28091. case 0: facName = "Civilian";
  28092. case 1: facName = "San Andreas Police Department";
  28093. case 2: facName = "Federal Beurau of Investigations";
  28094. case 3: facName = "San Andreas Sheriff Department";
  28095. case 4: facName = "San Andreas Fire & Medical Department";
  28096. case 5: facName = "Dept. Of Corrections";
  28097. case 6: facName = "Government";
  28098. case 8: facName = "Civilian";
  28099. case 9: facName = "San Andreas News Co.";
  28100. case 10: facName = "Taxi Co.";
  28101. case 11: facName = "NONE.";
  28102. //case 14: facName = "San Andreas National Guard";
  28103. case 14: facName = "Armed Forces of San Andreas";
  28104. }
  28105. format(fstring, 128, "%d. %s - %s", i, name, facName);
  28106. SendClientMessage(playerid, COLOR_GREY, fstring);
  28107. }
  28108. return 1;
  28109. }
  28110. forward onPropModerators(playerid);
  28111. public onPropModerators(playerid)
  28112. {
  28113. if(cache_num_rows() == 0) return SendClientMessage(playerid, COLOR_GREY, "There are no property moderators.");
  28114. new name[MAX_PLAYER_NAME + 1], fstring[128];
  28115. SendClientMessage(playerid, COLOR_ORANGE, "Property moderators:");
  28116. for(new i = 0; i < cache_num_rows(); i++)
  28117. {
  28118. cache_get_field_content(i, "Name", name);
  28119. format(fstring, 128, "%d. %s", i, name);
  28120. SendClientMessage(playerid, COLOR_GREY, fstring);
  28121. }
  28122. return 1;
  28123. }
  28124. SendLeaderMessage(color, string2[])
  28125. {
  28126. foreach( new i: Player )
  28127. {
  28128. if(IsPlayerConnected(i))
  28129. {
  28130. if(PlayerInfo[i][pFactionMod] > 0 && toggedflchat[i] == 0 && PlayerInfo[i][pLeader] == 0) SendClientMessage(i, color, string2);
  28131. if(PlayerInfo[i][pLeader] > 0 && toggedflchat[i] == 0) SendClientMessage(i, color, string2);
  28132. if(PlayerInfo[i][pGroup] == 1 && PlayerInfo[i][pGroupRank] >= 5 && toggedflchat[i] == 0 && PlayerInfo[i][pLeader] == 0) SendClientMessage(i, color, string2);
  28133. if(PlayerInfo[i][pGroup] == 2 && PlayerInfo[i][pGroupRank] > GROUP_CRIME_RANKS-1 && toggedflchat[i] == 0 && PlayerInfo[i][pLeader] == 0) SendClientMessage(i, color, string2);
  28134. }
  28135. }
  28136. return 1;
  28137. }
  28138. forward OnPSummonP(playerid, suedname[]);
  28139. public OnPSummonP(playerid, suedname[])
  28140. {
  28141. new str[128];
  28142. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That account doesn't exist.");
  28143. format(str, sizeof(str), "You have summoned %s to the court!", suedname);
  28144. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  28145. new query[120];
  28146. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `SueNotice`=1 WHERE `name`='%e'", suedname);
  28147. mysql_pquery(sqlGameConnection, query);
  28148. return 1;
  28149. }
  28150. forward oSetNum(name[], onum, playerid);
  28151. public oSetNum(name[], onum, playerid)
  28152. {
  28153. if(cache_num_rows() != 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that account doesn't exist!");
  28154. new str[128];
  28155. format(str, sizeof(str), "You have set %s's number to %d.", name, onum);
  28156. SendClientMessage(playerid, COLOR_WHITE, str);
  28157. new query[128];
  28158. mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `PhoneNr` = %d WHERE `name`= '%e' LIMIT 1", onum, name);
  28159. mysql_pquery(sqlGameConnection, query);
  28160. return 1;
  28161. }
  28162. //END OF osetnumber
  28163. stock IsPlayerRestricted(playerid)
  28164. {
  28165. if(PlayerCuffed[playerid] != 0 || PlayerTied[playerid] != 0 || PlayerTazed[playerid] != 0 || PlayerInfo[playerid][pJailed] != 0 || PlayerInfo[playerid][pAdminJailed] == 1) return true;
  28166. else return false;
  28167. }
  28168. #include "../gamemodes/inc/drugs/drugs.inc"
  28169. #include "../gamemodes/inc/points.inc"
  28170. #include "../gamemodes/inc/animations.inc"
  28171. #include "../gamemodes/inc/items/gags.inc"
  28172. #include "../gamemodes/inc/items/jammers.inc"
  28173. #include "../gamemodes/inc/items/blindfolds.inc"
  28174. #include "../gamemodes/inc/items/grenade_launchers.inc"
  28175. #include "../gamemodes/inc/safes/core.inc"
  28176. #include "../gamemodes/inc/groups/syndicate_safe.inc"
  28177. #include "../gamemodes\inc\custom_skins\skins_core.inc"
  28178. //#include "../gamemodes\inc\discord\discord.pwn"
  28179. #include "../gamemodes/inc/donor/donor_core.inc"
  28180. #include "../gamemodes/inc/commands.inc"
  28181. #include "./inc/factions/fmdmonthlycount.inc"
  28182. // Global Chat System
  28183. #include "../gamemodes/inc/global.inc"
  28184. #include "../gamemodes/inc/elections.inc"
  28185. #include "../gamemodes/inc/restart.inc"
  28186. /* BOTS */
  28187. #include "../gamemodes/inc/bots.inc"
  28188. #include "../gamemodes/inc/familybots.inc"
  28189. /* ATM */
  28190. #include "../gamemodes/inc/ATM.inc"
  28191. #include "../gamemodes/inc/atm-robbing.inc"
  28192. #include "../gamemodes/inc/RefundSys.inc"