| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979 |
- //Nex-AC by Nexius v1.9.23 (0.3.7-R2)
- #if defined _nex_ac_included
- #endinput
- #endif
- #define _nex_ac_included
- #include <a_samp>
- #if !defined GetConsoleVarAsInt
- #error Please download SA-MP 0.3.7 R2 server package!
- #endif
- #if !defined FILTERSCRIPT
- #define DEBUG
- #include <nex-ac_en.lang> //Localization
- #define NEX_AC_VERSION "1.9.23"
- #define AC_SERVER_VERSION "0.3.7-R2"
- #define AC_CONFIG_FILE "nex-ac_settings.cfg"
- #define AC_MAX_CLASSES 320
- #define AC_DEFAULT_COLOR -1
- #if !defined AC_USE_VENDING_MACHINES
- #define AC_USE_VENDING_MACHINES true
- #endif
- #if !defined AC_USE_TUNING_GARAGES
- #define AC_USE_TUNING_GARAGES true
- #endif
- #if !defined AC_USE_AMMUNATIONS
- #define AC_USE_AMMUNATIONS true
- #endif
- #if !defined AC_USE_RESTAURANTS
- #define AC_USE_RESTAURANTS true
- #endif
- #if !defined AC_USE_PAYNSPRAY
- #define AC_USE_PAYNSPRAY true
- #endif
- #if !defined AC_USE_CASINOS
- #define AC_USE_CASINOS true
- #endif
- #if !defined AC_USE_QUERY
- #define AC_USE_QUERY true
- #endif
- #if !defined AC_MAX_CONNECTS_FROM_IP
- #define AC_MAX_CONNECTS_FROM_IP 1
- #endif
- #if !defined AC_MAX_RCON_LOGIN_ATTEMPT
- #define AC_MAX_RCON_LOGIN_ATTEMPT 1
- #endif
- #if !defined AC_MAX_MSGS_REC_DIFF
- #define AC_MAX_MSGS_REC_DIFF 799
- #endif
- #if !defined AC_MAX_PING
- #define AC_MAX_PING 500
- #endif
- #if !defined AC_MIN_TIME_RECONNECT
- #define AC_MIN_TIME_RECONNECT 12 //In seconds
- #endif
- #if !defined AC_MAX_NOP_WARNINGS
- #define AC_MAX_NOP_WARNINGS 3
- #endif
- #if !defined AC_MAX_PING_WARNINGS
- #define AC_MAX_PING_WARNINGS 2
- #endif
- #if !defined AC_MAX_AIR_WARNINGS
- #define AC_MAX_AIR_WARNINGS 3
- #endif
- #if !defined AC_MAX_AIR_VEH_WARNINGS
- #define AC_MAX_AIR_VEH_WARNINGS 3
- #endif
- #if !defined AC_MAX_FLYHACK_VEH_WARNINGS
- #define AC_MAX_FLYHACK_VEH_WARNINGS 3
- #endif
- #if !defined AC_MAX_FLYHACK_B_WARNINGS
- #define AC_MAX_FLYHACK_B_WARNINGS 5
- #endif
- #if !defined AC_MAX_CARSHOT_WARNINGS
- #define AC_MAX_CARSHOT_WARNINGS 3
- #endif
- #if !defined AC_MAX_PRO_AIM_WARNINGS
- #define AC_MAX_PRO_AIM_WARNINGS 2
- #endif
- #if !defined AC_MAX_AFK_GHOST_WARNINGS
- #define AC_MAX_AFK_GHOST_WARNINGS 2
- #endif
- #if !defined AC_MAX_RAPID_FIRE_WARNINGS
- #define AC_MAX_RAPID_FIRE_WARNINGS 3
- #endif
- #if !defined AC_MAX_GODMODE_WARNINGS
- #define AC_MAX_GODMODE_WARNINGS 2
- #endif
- #if !defined AC_MAX_GODMODE_VEH_WARNINGS
- #define AC_MAX_GODMODE_VEH_WARNINGS 2
- #endif
- #if !defined AC_MAX_SILENT_AIM_WARNINGS
- #define AC_MAX_SILENT_AIM_WARNINGS 2
- #endif
- #if !defined AC_MAX_FLYHACK_WARNINGS
- #define AC_MAX_FLYHACK_WARNINGS 2
- #endif
- #define ac_fpublic%0(%1) forward %0(%1); public %0(%1)
- #define ac_abs(%1) (((%1) < 0) ? (-(%1)) : ((%1)))
- static bool:ac_ACAllow[] =
- {
- true, //0 Anti-AirBreak (onfoot)
- true, //1 Anti-AirBreak (in vehicle)
- true, //2 Anti-teleport hack (onfoot)
- true, //3 Anti-teleport hack (in vehicle)
- true, //4 Anti-teleport hack (into/between vehicles)
- true, //5 Anti-teleport hack (vehicle to player)
- true, //6 Anti-teleport hack (pickups)
- true, //7 Anti-FlyHack (onfoot)
- true, //8 Anti-FlyHack (in vehicle)
- true, //9 Anti-SpeedHack (onfoot)
- true, //10 Anti-SpeedHack (in vehicle)
- true, //11 Anti-Health hack (in vehicle)
- true, //12 Anti-Health hack (onfoot)
- true, //13 Anti-Armour hack
- true, //14 Anti-Money hack
- true, //15 Anti-Weapon hack
- true, //16 Anti-Ammo hack (add)
- true, //17 Anti-Ammo hack (infinite)
- true, //18 Anti-Special actions hack
- true, //19 Anti-GodMode from bullets (onfoot)
- true, //20 Anti-GodMode from bullets (in vehicle)
- true, //21 Anti-Invisible hack
- true, //22 Anti-lagcomp-spoof
- true, //23 Anti-Tuning hack
- false, //24 Anti-Parkour mod
- true, //25 Anti-Quick turn
- true, //26 Anti-Rapid fire
- true, //27 Anti-FakeSpawn
- true, //28 Anti-FakeKill
- true, //29 Anti-Pro Aim
- true, //30 Anti-CJ run
- true, //31 Anti-CarShot
- true, //32 Anti-CarJack
- false, //33 Anti-UnFreeze
- true, //34 Anti-AFK Ghost
- true, //35 Anti-Full Aiming
- false, //36 Anti-Fake NPC
- true, //37 Anti-Reconnect
- false, //38 Anti-High ping
- true, //39 Anti-Dialog hack
- true, //40 Protection from the sandbox
- true, //41 Protection against an invalid version
- true, //42 Anti-Rcon hack
- true, //43 Anti-Tuning crasher
- true, //44 Anti-Invalid seat crasher
- true, //45 Anti-Dialog crasher
- true, //46 Anti-Attached object crasher
- true, //47 Anti-Weapon Crasher
- true, //48 Flood protection connects to one slot
- true, //49 Anti-flood callback functions
- true, //50 Anti-flood change seat
- true, //51 Anti-Ddos
- false //52 Anti-NOP's
- };
- static const ac_Mtfc[][] =
- {
- {230, 5}, //0 OnDialogResponse
- {800, 2}, //1 OnEnterExitModShop
- {250, 3}, //2 OnPlayerClickMap
- {450, 3}, //3 OnPlayerClickPlayer
- {150, 5}, //4 OnPlayerClickTextDraw
- {400, 3}, //5 OnPlayerCommandText
- {150, 3}, //6 OnPlayerEnterVehicle
- {150, 3}, //7 OnPlayerExitVehicle
- {500, 8}, //8 OnPlayerPickUpPickup
- {150, 8}, //9 OnPlayerRequestClass
- {250, 5}, //10 OnPlayerSelectedMenuRow
- {600, 3}, //11 OnPlayerStateChange
- {530, 2}, //12 OnVehicleMod
- {530, 2}, //13 OnVehiclePaintjob
- {530, 2}, //14 OnVehicleRespray
- {300, 1}, //15 OnVehicleDeath
- {450, 2}, //16 OnPlayerText
- {500, 5}, //17 OnPlayerEnterCheckpoint
- {500, 5}, //18 OnPlayerLeaveCheckpoint
- {150, 3}, //19 OnPlayerRequestSpawn
- {250, 5}, //20 OnPlayerExitedMenu
- {500, 5}, //21 OnPlayerEnterRaceCheckpoint
- {500, 5}, //22 OnPlayerLeaveRaceCheckpoint
- {150, 5}, //23 OnPlayerClickPlayerTextDraw
- {51, 9}, //24 OnVehicleDamageStatusUpdate
- {150, 5}, //25 OnVehicleSirenStateChange
- {150, 5}, //26 OnPlayerSelectObject
- {150, 5} //27 Cross-public
- },
- ac_wSlot[] =
- {
- 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10,
- 10, 8, 8, 8, -1, -1, -1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5,
- 4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11
- },
- ac_wModel[] =
- {
- 0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 323, 324, 325,
- 326, 342, 343, 344, 0, 0, 0, 346, 347, 348, 349, 350, 351, 352, 353, 355, 356,
- 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371
- },
- ac_vType[] =
- {
- 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 3, 3, 3, 0, 0,
- 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 3, 0, 0, 2,
- 0, 0, 0, 0, 4, 0, 0, 3, 0, 0, 2, 2, 0, 0, 0, 0, 3, 0, 0, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 2, 2, 2, 0, 0, 0,
- 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 3
- },
- ac_cPrice[] =
- {
- 400, 550, 200, 250, 100, 150, 80, 500, 500, 200, 1000, 220, 250, 100, 400,
- 500, 200, 500, 350, 300, 250, 200, 150, 350, 50, 1000, 480, 0, 770, 680, 0,
- 370, 170, 120, 790, 150, 500, 690, 190, 390, 0, 0, 1000, 500, 500, 510, 710,
- 670, 530, 810, 620, 0, 0, 130, 210, 230, 520, 430, 620, 720, 530, 180, 0, 0,
- 830, 850, 750, 250, 200, 550, 450, 0, 0, 1100, 1030, 980, 1560, 1620, 1200,
- 1030, 900, 1230, 820, 1560, 1350, 770, 100, 1500, 150, 650, 450, 100, 750,
- 350, 0, 0, 1000, 620, 1140, 0, 940, 0, 0, 3250, 1610, 1540, 780, 0, 780,
- 1610, 1540, 0, 0, 3340, 3250, 2130, 2050, 2040, 780, 940, 0, 0, 780, 860,
- 0, 1120, 3340, 3250, 3340, 1650, 3380, 3290, 1590, 830, 800, 1500, 1000, 0,
- 580, 470, 870, 980, 0, 150, 0, 100, 490, 600, 890, 1000, 1090, 840, 910,
- 1200, 1030, 1030, 920, 930, 550, 1050, 1050, 950, 650, 450, 550, 850, 950,
- 850, 950, 970, 880, 990, 900, 950, 1000, 900, 1000, 900, 2050, 2150, 2130,
- 2050, 2130, 2040, 2150, 2040, 2095, 2175, 2080, 2200, 1200, 1040, 940, 1100
- },
- ac_MaxPassengers[] =
- {
- 0x10331113, 0x11311131, 0x11331313, 0x10133301, 0x1311F110,
- 0x10311103, 0x10001F10, 0x11113311, 0x13113311, 0x31101100,
- 0x30002301, 0x11031311, 0x11111331, 0x10013111, 0x01131100,
- 0x11111110, 0x11100031, 0x11130221, 0x33113311, 0x11111101,
- 0x33101133, 0x101001F0, 0x03133111, 0xFF11113F, 0x13330111,
- 0xFF131111, 0x0000FF3F
- },
- ac_vMods[] =
- {
- 0x033C2700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x021A27FA, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023B2785, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02BC4703, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03BA278A, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x028E078A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02310744, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x0228073A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02BD4701, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023A2780, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x0228077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x027A27CA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x0282278A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x023E07C0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x03703730, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02BE4788, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x0003C000, 0x00000000, 0x02010771, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x03382700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x023F8795, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x029F078C, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x029627EA, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x0003C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x0236C782, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x029E1FCA, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0xFC000437, 0x00000000, 0x021C0000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x03FE6007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00001B87, 0x00000001, 0x01E00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x039E07D2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x023CC700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00030000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x038E07D6, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
- 0x023D0709, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x029E1F8A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
- 0x029C077A, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000, 0x02BD076C, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0xFFFFFE00, 0x00000007, 0x00000000, 0x000001F8,
- 0x02000700, 0x00000000, 0x00FFFFFE, 0x00000007, 0xC0000000, 0x00002007, 0xFE000700, 0x00000003, 0x00FFFE00,
- 0x00000007, 0x00003C00, 0x00000600, 0xCE000700, 0xFF800000, 0x00FFFE01, 0x00000007, 0x3C000000, 0x00000000,
- 0x02000700, 0x000003FC, 0x00FFFE00, 0x00000007, 0x003C0000, 0x00001800, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x007FE000, 0x00FFFE00, 0x00000007, 0x03C00000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000047, 0x0000003E, 0x3C000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00001C00, 0x00FFFE00,
- 0x0000000F, 0x00000000, 0x0003C000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x000003C0, 0xC0000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x029607C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x03FFE7CF, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x031727F1, 0x00000000, 0x00FFFE00, 0x00000007, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x025627F0, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x039E07C2, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
- 0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000, 0x02000700, 0x00000000, 0x00FFFE00,
- 0x00000007, 0x00000000, 0x00000000
- },
- #if AC_USE_AMMUNATIONS
- ac_AmmuNationInfo[][] =
- {
- {200, 30}, {600, 30}, {1200, 10},
- {600, 15}, {800, 12}, {1000, 10},
- {500, 60}, {2000, 90}, {3500, 120},
- {4500, 90}, {300, 60}
- },
- Float:ac_AmmuNations[][] =
- {
- {296.5541, -38.5138, 1001.5156},
- {295.7008, -80.8109, 1001.5156},
- {290.1963, -109.7721, 1001.5156},
- {312.2592, -166.1385, 999.601}
- },
- #endif
- #if AC_USE_RESTAURANTS
- Float:ac_Restaurants[][] =
- {
- {374.0, -119.641, 1001.4922},
- {368.789, -6.857, 1001.8516},
- {375.566, -68.222, 1001.5151}
- },
- #endif
- #if AC_USE_PAYNSPRAY
- Float:ac_PayNSpray[][] =
- {
- {2064.2842, -1831.4736, 13.5469},
- {-2425.7822, 1022.1392, 50.3977},
- {-1420.5195, 2584.2305, 55.8433},
- {487.6401, -1739.9479, 11.1385},
- {1024.8651, -1024.087, 32.1016},
- {-1904.7019, 284.5968, 41.0469},
- {1975.2384, 2162.5088, 11.0703},
- {2393.4456, 1491.5537, 10.5616},
- {720.0854, -457.8807, 16.3359},
- {-99.9417, 1117.9048, 19.7417}
- },
- #endif
- #if AC_USE_VENDING_MACHINES
- Float:ac_vMachines[][] =
- {
- {-862.82, 1536.6, 21.98},
- {2271.72, -76.46, 25.96},
- {1277.83, 372.51, 18.95},
- {662.42, -552.16, 15.71},
- {201.01, -107.61, 0.89},
- {-253.74, 2597.95, 62.24},
- {-253.74, 2599.75, 62.24},
- {-76.03, 1227.99, 19.12},
- {-14.7, 1175.35, 18.95},
- {-1455.11, 2591.66, 55.23},
- {2352.17, -1357.15, 23.77},
- {2325.97, -1645.13, 14.21},
- {2139.51, -1161.48, 23.35},
- {2153.23, -1016.14, 62.23},
- {1928.73, -1772.44, 12.94},
- {1154.72, -1460.89, 15.15},
- {2480.85, -1959.27, 12.96},
- {2060.11, -1897.64, 12.92},
- {1729.78, -1943.04, 12.94},
- {1634.1, -2237.53, 12.89},
- {1789.21, -1369.26, 15.16},
- {-2229.18, 286.41, 34.7},
- {2319.99, 2532.85, 10.21},
- {2845.72, 1295.04, 10.78},
- {2503.14, 1243.69, 10.21},
- {2647.69, 1129.66, 10.21},
- {-2420.21, 984.57, 44.29},
- {-2420.17, 985.94, 44.29},
- {2085.77, 2071.35, 10.45},
- {1398.84, 2222.6, 10.42},
- {1659.46, 1722.85, 10.21},
- {1520.14, 1055.26, 10.0},
- {-1980.78, 142.66, 27.07},
- {-2118.96, -423.64, 34.72},
- {-2118.61, -422.41, 34.72},
- {-2097.27, -398.33, 34.72},
- {-2092.08, -490.05, 34.72},
- {-2063.27, -490.05, 34.72},
- {-2005.64, -490.05, 34.72},
- {-2034.46, -490.05, 34.72},
- {-2068.56, -398.33, 34.72},
- {-2039.85, -398.33, 34.72},
- {-2011.14, -398.33, 34.72},
- {-1350.11, 492.28, 10.58},
- {-1350.11, 493.85, 10.58},
- {2222.36, 1602.64, 1000.06},
- {2222.2, 1606.77, 1000.05},
- {2155.9, 1606.77, 1000.05},
- {2155.84, 1607.87, 1000.06},
- {2209.9, 1607.19, 1000.05},
- {2202.45, 1617.0, 1000.06},
- {2209.24, 1621.21, 1000.06},
- {2576.7, -1284.43, 1061.09},
- {330.67, 178.5, 1020.07},
- {331.92, 178.5, 1020.07},
- {350.9, 206.08, 1008.47},
- {361.56, 158.61, 1008.47},
- {371.59, 178.45, 1020.07},
- {374.89, 188.97, 1008.47},
- {-19.03, -57.83, 1003.63},
- {-36.14, -57.87, 1003.63},
- {316.87, -140.35, 998.58},
- {2225.2, -1153.42, 1025.9},
- {-15.1, -140.22, 1003.63},
- {-16.53, -140.29, 1003.63},
- {-35.72, -140.22, 1003.63},
- {373.82, -178.14, 1000.73},
- {379.03, -178.88, 1000.73},
- {495.96, -24.32, 1000.73},
- {500.56, -1.36, 1000.73},
- {501.82, -1.42, 1000.73},
- {-33.87, -186.76, 1003.63},
- {-32.44, -186.69, 1003.63},
- {-16.11, -91.64, 1003.63},
- {-17.54, -91.71, 1003.63}
- },
- #endif
- #if AC_USE_CASINOS
- Float:ac_Casinos[][] =
- {
- {2241.2878, 1617.1624, 1006.1797, 2.0},
- {2240.9736, 1604.6592, 1006.1797, 6.0},
- {2242.5427, 1592.8726, 1006.1836, 6.0},
- {2230.2124, 1592.1426, 1006.1832, 6.0},
- {2230.4717, 1604.484, 1006.186, 6.0},
- {2230.3298, 1616.9272, 1006.1799, 3.0},
- {2251.9407, 1586.1736, 1006.186, 1.0},
- {2218.6785, 1587.3448, 1006.1749, 1.0},
- {2219.2773, 1591.7467, 1006.1867, 1.0},
- {2218.5408, 1589.3229, 1006.184, 1.0},
- {2218.6477, 1593.6279, 1006.1797, 1.0},
- {2221.926, 1603.8285, 1006.1797, 1.0},
- {2218.5095, 1603.8385, 1006.1797, 1.0},
- {2219.9597, 1603.9216, 1006.1797, 1.0},
- {2216.3054, 1603.7996, 1006.1819, 1.0},
- {2218.731, 1619.8046, 1006.1794, 1.0},
- {2218.9407, 1617.8413, 1006.1821, 1.0},
- {2218.668, 1615.4681, 1006.1797, 1.0},
- {2218.6418, 1613.2629, 1006.1797, 1.0},
- {2252.4272, 1589.8412, 1006.1797, 5.0},
- {2252.4229, 1596.6169, 1006.1797, 5.0},
- {2255.1565, 1608.8784, 1006.186, 1.0},
- {2254.8496, 1610.8605, 1006.1797, 1.0},
- {2255.2917, 1612.9167, 1006.1797, 1.0},
- {2255.033, 1614.8892, 1006.1797, 1.0},
- {2255.1213, 1616.8284, 1006.1797, 1.0},
- {2255.2161, 1618.8005, 1006.1797, 1.0},
- {2268.5281, 1606.4894, 1006.1797, 1.0},
- {2270.4922, 1606.8539, 1006.1797, 1.0},
- {2272.5693, 1606.4473, 1006.1797, 1.0},
- {2274.5391, 1607.0122, 1006.1797, 1.0},
- {2271.8447, 1586.1633, 1006.1797, 1.0},
- {2261.4844, 1586.1724, 1006.1797, 1.0},
- {2257.4507, 1589.6555, 1006.1797, 5.0},
- {2267.8994, 1589.8672, 1006.1797, 5.0},
- {2262.8486, 1590.026, 1006.1797, 5.0},
- {2272.6458, 1589.7704, 1006.1797, 5.0},
- {2272.6533, 1596.5682, 1006.1797, 5.0},
- {2270.4895, 1596.4606, 1006.1797, 5.0},
- {2265.4441, 1596.4299, 1006.1797, 5.0},
- {2260.0308, 1596.7987, 1006.1797, 5.0},
- {2254.9907, 1596.241, 1006.1797, 5.0},
- {1956.9524, 988.2533, 992.4688, 2.0},
- {1961.6155, 993.0375, 992.4688, 2.0},
- {1963.7998, 998.4406, 992.4745, 2.0},
- {1936.2885, 987.1995, 992.4745, 2.0},
- {1944.9768, 986.3937, 992.4688, 2.0},
- {1940.7397, 990.9521, 992.4609, 2.0},
- {1940.0966, 1005.8996, 992.4688, 6.0},
- {1938.8785, 1014.1768, 992.4688, 6.0},
- {1938.8811, 1021.4434, 992.4688, 6.0},
- {1966.5975, 1006.6469, 992.4745, 6.0},
- {1966.5979, 1014.1024, 992.4688, 6.0},
- {1939.8351, 1029.912, 992.4688, 6.0},
- {1956.854, 1047.3718, 992.4688, 6.0},
- {1961.356, 1042.8112, 992.4688, 6.0},
- {1963.811, 1037.1263, 992.4745, 6.0},
- {1961.733, 1025.8929, 992.4688, 10.0},
- {1961.708, 1010.3194, 992.4688, 10.0},
- {1966.5989, 1029.7954, 992.4745, 6.0},
- {1961.4139, 1017.8281, 992.4688, 10.0},
- {1966.5985, 1021.7686, 992.4688, 6.0},
- {1128.7106, -1.9779, 1000.6797, 1.0},
- {1125.2388, 1.61, 1000.6797, 1.0},
- {1125.1249, -5.0489, 1000.6797, 1.0},
- {1127.4139, 3.0199, 1000.6797, 1.0},
- {1135.0634, -3.8695, 1000.6797, 1.0},
- {1135.0861, 0.6107, 1000.6797, 1.0},
- {1132.8943, -1.7139, 1000.6797, 1.0},
- {1125.3727, 3.0315, 1000.6797, 1.0},
- {1119.0272, -1.4916, 1000.6924, 1.0}
- },
- #endif
- ac_pAmmo[] =
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 8, 8, 8, 0, 0, 0, 30, 10, 10, 15,
- 10, 10, 60, 60, 80, 80, 60, 20, 10, 4, 3,
- 100, 100, 5, 1, 500, 200, 32, 1, 1, 1
- };
- enum acInfo
- {
- Float:acPosX,
- Float:acPosY,
- Float:acPosZ,
- Float:acDropJpX,
- Float:acDropJpY,
- Float:acDropJpZ,
- Float:acSetPosX,
- Float:acSetPosY,
- Float:acSetPosZ,
- Float:acSetVehHealth,
- Float:acSpeed,
- acHealth,
- acArmour,
- acMoney,
- acClassid,
- acLastShot,
- acLastWeapon,
- acEnterVehTime,
- acEnterVeh,
- acLastVeh,
- acVeh,
- acSeat,
- acDialog,
- acNextDialog,
- acAnim,
- acReload,
- acDmgRes,
- acSpecAct,
- acNextSpecAct,
- acLastSpecAct,
- acLastPickup,
- acShotTime,
- acSpawnTime,
- acLastUpdate,
- acSpawnWeapon1,
- acSpawnWeapon2,
- acSpawnWeapon3,
- acSpawnAmmo1,
- acSpawnAmmo2,
- acSpawnAmmo3,
- acSpawnRes,
- acTimerID,
- acKicked,
- acIp[16],
- acSet[15],
- acGtc[18],
- acWeapon[13],
- acAmmo[13],
- acSetWeapon[13],
- acGiveAmmo[13],
- acGtcSetWeapon[13],
- acGtcGiveAmmo[13],
- acNOPCount[11],
- acCheatCount[16],
- acCall[sizeof ac_Mtfc],
- acFloodCount[sizeof ac_Mtfc],
- bool:acACAllow[sizeof ac_ACAllow],
- bool:acStuntBonus,
- bool:acModShop,
- bool:acFreeze,
- bool:acOnline,
- bool:acLogged,
- bool:acDeathRes,
- bool:acVehDmgRes,
- bool:acDead,
- bool:acTpToZ,
- bool:acPicked,
- bool:acParachute,
- bool:acIntEnterExits,
- bool:acSpec
- }
- enum acVehInfo
- {
- Float:acVelX,
- Float:acVelY,
- Float:acVelZ,
- Float:acSpeedDiff,
- Float:acPosDiff,
- Float:acZAngle,
- Float:acHealth,
- acDriver,
- acInt,
- acPaintJob,
- bool:acSpawned
- }
- enum acPickInfo
- {
- Float:acPosX,
- Float:acPosY,
- Float:acPosZ,
- acType,
- acWeapon,
- bool:acIsStatic
- }
- enum acDPickInfo
- {
- Float:acPosX,
- Float:acPosY,
- Float:acPosZ,
- acType,
- acWeapon
- }
- static
- ac_sInfo[6],
- ac_Class[AC_MAX_CLASSES][3][2],
- ACInfo[MAX_PLAYERS][acInfo],
- ACVehInfo[MAX_VEHICLES][acVehInfo],
- ACPickInfo[MAX_PICKUPS][acPickInfo],
- ACDPickInfo[MAX_PICKUPS][acDPickInfo],
- bool:ac_IntEnterExits = true,
- bool:ac_StuntBonus = true,
- bool:ac_VehFriendlyFire,
- bool:ac_LagCompMode,
- #if !AC_USE_QUERY
- bool:ac_QueryEnable,
- #endif
- bool:ac_RconEnable,
- bool:ac_PedAnims;
- ac_fpublic ac_AddStaticVehicle(vehicleid)
- {
- ACVehInfo[vehicleid][acInt] = 0;
- ACVehInfo[vehicleid][acPaintJob] = 3;
- ACVehInfo[vehicleid][acSpawned] = true;
- ACVehInfo[vehicleid][acHealth] = 1000.0;
- ACVehInfo[vehicleid][acSpeedDiff] =
- ACVehInfo[vehicleid][acPosDiff] =
- ACVehInfo[vehicleid][acVelX] =
- ACVehInfo[vehicleid][acVelY] =
- ACVehInfo[vehicleid][acVelZ] = 0.0;
- ACVehInfo[vehicleid][acDriver] = 65535;
- return 1;
- }
- ac_fpublic ac_CreateVehicle(vehicleid, ac_vehicletype)
- {
- ACVehInfo[vehicleid][acInt] = 0;
- ACVehInfo[vehicleid][acPaintJob] = 3;
- ACVehInfo[vehicleid][acHealth] = 1000.0;
- ACVehInfo[vehicleid][acSpeedDiff] =
- ACVehInfo[vehicleid][acPosDiff] =
- ACVehInfo[vehicleid][acVelX] =
- ACVehInfo[vehicleid][acVelY] =
- ACVehInfo[vehicleid][acVelZ] = 0.0;
- if(!(569 <= ac_vehicletype <= 570)) ACVehInfo[vehicleid][acSpawned] = true;
- ACVehInfo[vehicleid][acDriver] = 65535;
- return 1;
- }
- ac_fpublic ac_AddPlayerClass(ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
- {
- if(ac_classid < AC_MAX_CLASSES)
- {
- ac_Class[ac_classid][0][0] = ac_weapon1;
- ac_Class[ac_classid][0][1] = ac_weapon1_ammo;
- ac_Class[ac_classid][1][0] = ac_weapon2;
- ac_Class[ac_classid][1][1] = ac_weapon2_ammo;
- ac_Class[ac_classid][2][0] = ac_weapon3;
- ac_Class[ac_classid][2][1] = ac_weapon3_ammo;
- }
- #undef AC_MAX_CLASSES
- return 1;
- }
- ac_fpublic ac_SetSpawnInfo(playerid, ac_team, ac_skin, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
- {
- if(SetSpawnInfo(playerid, ac_team, ac_skin, ac_x, ac_y, ac_z, ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo) == 0) return 0;
- ACInfo[playerid][acSpawnWeapon1] = ac_weapon1;
- ACInfo[playerid][acSpawnAmmo1] = ac_weapon1_ammo;
- ACInfo[playerid][acSpawnWeapon2] = ac_weapon2;
- ACInfo[playerid][acSpawnAmmo2] = ac_weapon2_ammo;
- ACInfo[playerid][acSpawnWeapon3] = ac_weapon3;
- ACInfo[playerid][acSpawnAmmo3] = ac_weapon3_ammo;
- return 1;
- }
- ac_fpublic ac_AddStaticPickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- ACPickInfo[pickupid][acWeapon] = 0;
- switch(ac_type)
- {
- case 2, 3, 15, 22:
- {
- switch(ac_model)
- {
- case 370: ACPickInfo[pickupid][acType] = 2;
- case 1240: ACPickInfo[pickupid][acType] = 3;
- case 1242: ACPickInfo[pickupid][acType] = 4;
- case 321..369, 371, 372:
- {
- for(new ac_i = 46; ac_i > -1; --ac_i)
- {
- if(ac_wModel[ac_i] == ac_model)
- {
- ACPickInfo[pickupid][acType] = 1;
- ACPickInfo[pickupid][acWeapon] = ac_i;
- break;
- }
- }
- }
- }
- }
- }
- ACPickInfo[pickupid][acIsStatic] = true;
- ACPickInfo[pickupid][acPosX] = ac_X;
- ACPickInfo[pickupid][acPosY] = ac_Y;
- ACPickInfo[pickupid][acPosZ] = ac_Z;
- return 1;
- }
- ac_fpublic ac_CreatePickup(pickupid, ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- ACPickInfo[pickupid][acWeapon] = 0;
- switch(ac_type)
- {
- case 2, 3, 15, 22:
- {
- switch(ac_model)
- {
- case 370: ACPickInfo[pickupid][acType] = 2;
- case 1240: ACPickInfo[pickupid][acType] = 3;
- case 1242: ACPickInfo[pickupid][acType] = 4;
- case 321..369, 371, 372:
- {
- for(new ac_i = 46; ac_i > -1; --ac_i)
- {
- if(ac_wModel[ac_i] == ac_model)
- {
- ACPickInfo[pickupid][acType] = 1;
- ACPickInfo[pickupid][acWeapon] = ac_i;
- break;
- }
- }
- }
- }
- }
- }
- ACPickInfo[pickupid][acIsStatic] = false;
- ACPickInfo[pickupid][acPosX] = ac_X;
- ACPickInfo[pickupid][acPosY] = ac_Y;
- ACPickInfo[pickupid][acPosZ] = ac_Z;
- return 1;
- }
- ac_fpublic ac_CreateDynamicPickup(pickupid, ac_modelid, ac_type, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- if(pickupid < MAX_PICKUPS)
- {
- switch(ac_type)
- {
- case 2, 3, 15, 22:
- {
- switch(ac_modelid)
- {
- case 370: ACDPickInfo[pickupid][acType] = 2;
- case 1240: ACDPickInfo[pickupid][acType] = 3;
- case 1242: ACDPickInfo[pickupid][acType] = 4;
- case 321..369, 371, 372:
- {
- for(new ac_i = 46; ac_i > -1; --ac_i)
- {
- if(ac_wModel[ac_i] == ac_modelid)
- {
- ACDPickInfo[pickupid][acType] = 1;
- ACDPickInfo[pickupid][acWeapon] = ac_i;
- break;
- }
- }
- }
- }
- }
- }
- ACDPickInfo[pickupid][acPosX] = ac_x;
- ACDPickInfo[pickupid][acPosY] = ac_y;
- ACDPickInfo[pickupid][acPosZ] = ac_z;
- }
- return 1;
- }
- ac_fpublic ac_DestroyVehicle(vehicleid)
- {
- if(DestroyVehicle(vehicleid) == 0) return 0;
- ACVehInfo[vehicleid][acSpawned] = false;
- return 1;
- }
- ac_fpublic ac_DestroyPickup(pickupid)
- {
- if(DestroyPickup(pickupid) == 0) return 0;
- ACPickInfo[pickupid][acType] = 0;
- return 1;
- }
- #if defined DestroyDynamicPickup
- #if defined STREAMER_ENABLE_TAGS
- ac_fpublic ac_DestroyDynamicPickup(STREAMER_TAG_PICKUP pickupid)
- #else
- ac_fpublic ac_DestroyDynamicPickup(pickupid)
- #endif
- {
- if(DestroyDynamicPickup(pickupid) == 0) return 0;
- if(_:pickupid < MAX_PICKUPS) ACDPickInfo[_:pickupid][acType] = 0;
- return 1;
- }
- #endif
- #if defined DestroyAllDynamicPickups
- ac_fpublic ac_DestroyAllDynamicPickups()
- {
- if(DestroyAllDynamicPickups() == 0) return 0;
- #if defined STREAMER_ENABLE_TAGS
- new STREAMER_TAG_PICKUP ac_i;
- #if defined Streamer_GetUpperBound
- if((_:ac_i = Streamer_GetUpperBound(1)) >= MAX_PICKUPS) ac_i = STREAMER_TAG_PICKUP (MAX_PICKUPS - 1);
- #else
- ac_i = STREAMER_TAG_PICKUP (MAX_PICKUPS - 1);
- #endif
- #else
- new ac_i;
- #if defined Streamer_GetUpperBound
- if((ac_i = Streamer_GetUpperBound(1)) >= MAX_PICKUPS) ac_i = MAX_PICKUPS - 1;
- #else
- ac_i = MAX_PICKUPS - 1;
- #endif
- #endif
- for(; _:ac_i > -1; --ac_i) ACDPickInfo[_:ac_i][acType] = 0;
- return 1;
- }
- #endif
- ac_fpublic ac_DisableInteriorEnterExits()
- {
- ac_IntEnterExits = false;
- return DisableInteriorEnterExits();
- }
- ac_fpublic ac_UsePlayerPedAnims()
- {
- ac_PedAnims = true;
- return UsePlayerPedAnims();
- }
- ac_fpublic ac_EnableVehicleFriendlyFire()
- {
- ac_VehFriendlyFire = true;
- return EnableVehicleFriendlyFire();
- }
- ac_fpublic ac_EnableStuntBonusForAll(enable)
- {
- ac_StuntBonus = !!enable;
- #if defined foreach
- foreach(new ac_i : Player)
- #else
- for(new ac_i = GetPlayerPoolSize(); ac_i > -1; --ac_i)
- {
- if(IsPlayerConnected(ac_i))
- #endif
- {
- ACInfo[ac_i][acStuntBonus] = ac_StuntBonus;
- }
- #if !defined foreach
- }
- #endif
- return EnableStuntBonusForAll(enable);
- }
- ac_fpublic ac_EnableStuntBonusForPlayer(playerid, enable)
- {
- if(EnableStuntBonusForPlayer(playerid, enable) == 0) return 0;
- ACInfo[playerid][acStuntBonus] = !!enable;
- return 1;
- }
- ac_fpublic ac_ShowPlayerDialog(playerid, dialogid)
- {
- ACInfo[playerid][acDialog] = dialogid;
- return 1;
- }
- ac_fpublic ac_fs_ShowPlayerDialog(playerid, dialogid)
- {
- ACInfo[playerid][acNextDialog] = dialogid;
- return 1;
- }
- ac_fpublic ac_TogglePlayerControllable(playerid, toggle)
- {
- if(TogglePlayerControllable(playerid, toggle) == 0) return 0;
- ACInfo[playerid][acFreeze] = !!toggle;
- return 1;
- }
- ac_fpublic ac_TogglePlayerSpectating(playerid, toggle)
- {
- if(TogglePlayerSpectating(playerid, toggle) == 0) return 0;
- if(GetPlayerState(playerid) == 9)
- {
- if(toggle == 0)
- {
- ACInfo[playerid][acSpec] = false;
- ACInfo[playerid][acSet][7] = 1;
- ACInfo[playerid][acSpawnRes]++;
- ACInfo[playerid][acNOPCount][9] = 0;
- if(ACInfo[playerid][acSet][0] != -1) ACInfo[playerid][acSet][12] = ACInfo[playerid][acSet][0];
- ACInfo[playerid][acGtc][13] = GetTickCount();
- }
- }
- else if(toggle)
- {
- ACInfo[playerid][acSet][6] = 1;
- ACInfo[playerid][acNOPCount][8] = 0;
- ACInfo[playerid][acGtc][12] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_SpawnPlayer(playerid)
- {
- if(SpawnPlayer(playerid) == 0) return 0;
- ACInfo[playerid][acSet][7] = 2;
- ACInfo[playerid][acSpawnRes]++;
- ACInfo[playerid][acSpawnTime] =
- ACInfo[playerid][acNOPCount][9] = 0;
- if(ACInfo[playerid][acSet][0] != -1) ACInfo[playerid][acSet][12] = ACInfo[playerid][acSet][0];
- ACInfo[playerid][acGtc][13] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_SetPlayerHealth(playerid, Float:ac_health)
- {
- if(SetPlayerHealth(playerid, ac_health) == 0) return 0;
- if(ac_health < 0.0) ac_health = 0.0;
- ACInfo[playerid][acNOPCount][3] = 0;
- ACInfo[playerid][acSet][1] = floatround(ac_health, floatround_tozero);
- ACInfo[playerid][acGtc][3] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_SetPlayerArmour(playerid, Float:ac_armour)
- {
- if(SetPlayerArmour(playerid, ac_armour) == 0) return 0;
- if(ac_armour < 0.0) ac_armour = 0.0;
- ACInfo[playerid][acNOPCount][5] = 0;
- ACInfo[playerid][acSet][2] = floatround(ac_armour, floatround_tozero);
- ACInfo[playerid][acGtc][5] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo)
- {
- if(0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46)
- {
- ACInfo[playerid][acNOPCount][0] = ACInfo[playerid][acNOPCount][1] = 0;
- if(16 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 43)
- {
- if(ACInfo[playerid][acAmmo][ac_wSlot[ac_weaponid]] || ac_ammo)
- {
- if(3 <= ac_wSlot[ac_weaponid] <= 5 || (ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponid]] == -1
- ? ACInfo[playerid][acWeapon][ac_wSlot[ac_weaponid]] : ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponid]]) == ac_weaponid)
- {
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] =
- (ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] == -65535 ? ACInfo[playerid][acAmmo][ac_wSlot[ac_weaponid]]
- : ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]]) + ac_ammo;
- }
- else ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] = ac_ammo;
- if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] < -32768) ac_ammo =
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] = -32768;
- else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] > 32767) ac_ammo =
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] = 32767;
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponid]] = ACInfo[playerid][acSet][3] = ac_weaponid;
- }
- }
- else
- {
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]] = -65535;
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponid]] = ACInfo[playerid][acSet][3] = ac_weaponid;
- }
- GivePlayerWeapon(playerid, ac_weaponid, ac_ammo);
- ACInfo[playerid][acGtcGiveAmmo][ac_wSlot[ac_weaponid]] =
- ACInfo[playerid][acGtcSetWeapon][ac_wSlot[ac_weaponid]] = ACInfo[playerid][acGtc][2] = GetTickCount() + 900;
- }
- return 1;
- }
- ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
- {
- if(ac_ammo < -32768) ac_ammo = -32768;
- else if(ac_ammo > 32767) ac_ammo = 32767;
- SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
- if(16 <= ac_weaponslot <= 43 && (ACInfo[playerid][acWeapon][ac_wSlot[ac_weaponslot]] > 0 ||
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponslot]] > 0))
- {
- ACInfo[playerid][acNOPCount][1] = 0;
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponslot]] = ac_ammo;
- ACInfo[playerid][acGtcGiveAmmo][ac_wSlot[ac_weaponslot]] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_SetPlayerArmedWeapon(playerid, ac_weaponid)
- {
- if(SetPlayerArmedWeapon(playerid, ac_weaponid) == 0) return 0;
- if((0 <= ac_weaponid <= 18 || 22 <= ac_weaponid <= 46) &&
- (ac_weaponid == ACInfo[playerid][acWeapon][ac_wSlot[ac_weaponid]] ||
- ac_weaponid == ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponid]]) &&
- (ACInfo[playerid][acAmmo][ac_wSlot[ac_weaponid]] || ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponid]]))
- {
- ACInfo[playerid][acNOPCount][0] = 0;
- ACInfo[playerid][acSet][3] = ac_weaponid;
- ACInfo[playerid][acGtc][2] = GetTickCount() + 900;
- }
- return 1;
- }
- ac_fpublic ac_ResetPlayerWeapons(playerid)
- {
- if(ResetPlayerWeapons(playerid) == 0) return 0;
- for(new ac_i = 12; ac_i > -1; --ac_i)
- {
- ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
- ACInfo[playerid][acSetWeapon][ac_i] = -1;
- ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
- }
- ACInfo[playerid][acSet][3] = 0;
- ACInfo[playerid][acGtc][7] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_GivePlayerMoney(playerid, ac_money)
- {
- if(GivePlayerMoney(playerid, ac_money) == 0) return 0;
- ACInfo[playerid][acMoney] += ac_money;
- return 1;
- }
- ac_fpublic ac_ResetPlayerMoney(playerid)
- {
- if(ResetPlayerMoney(playerid) == 0) return 0;
- ACInfo[playerid][acMoney] = 0;
- return 1;
- }
- static stock bad_GetPlayerMoney(playerid) return GetPlayerMoney(playerid);
- ac_fpublic ac_GetPlayerMoney(playerid) return ACInfo[playerid][acMoney];
- ac_fpublic ac_SetPlayerSpecialAction(playerid, ac_actionid)
- {
- if(SetPlayerSpecialAction(playerid, ac_actionid) == 0) return 0;
- if(ac_actionid == 2 || ac_actionid == 11 || ac_actionid == 68 || 5 <= ac_actionid <= 8 ||
- ac_actionid == 13 && ACInfo[playerid][acSpecAct] == 11 || (ac_actionid == 10 || 20 <= ac_actionid <= 25) && ACInfo[playerid][acSpecAct] != 3 ||
- ac_actionid == 0 && ACInfo[playerid][acSpecAct] != 1 && ACInfo[playerid][acSpecAct] != 3 && ACInfo[playerid][acSpecAct] != 10)
- {
- ACInfo[playerid][acNOPCount][6] = 0;
- if((ac_actionid == 68 || 10 <= ac_actionid <= 11 || 20 <= ac_actionid <= 25) && 5 <= ACInfo[playerid][acSpecAct] <= 8 ||
- 20 <= ac_actionid <= 25 && ACInfo[playerid][acSpecAct] == 1) ACInfo[playerid][acNextSpecAct] = ac_actionid;
- else
- {
- if(ac_actionid == 13) ac_actionid = 0;
- else if(ac_actionid == 2) ACInfo[playerid][acNextSpecAct] = ACInfo[playerid][acSpecAct];
- else ACInfo[playerid][acNextSpecAct] = -1;
- ACInfo[playerid][acSet][4] = ac_actionid;
- ACInfo[playerid][acGtc][6] = GetTickCount();
- if(ACInfo[playerid][acSpecAct] == 11) ACInfo[playerid][acGtc][6] += 2500;
- }
- }
- return 1;
- }
- ac_fpublic ac_SetPlayerInterior(playerid, ac_interiorid)
- {
- if(SetPlayerInterior(playerid, ac_interiorid) == 0) return 0;
- if(ac_interiorid < 0) ac_interiorid %= 256;
- if(ac_interiorid != ACInfo[playerid][acSet][14])
- {
- ACInfo[playerid][acNOPCount][2] = 0;
- if(ACInfo[playerid][acDead]) ACInfo[playerid][acSet][12] = ac_interiorid;
- else ACInfo[playerid][acSet][0] = ac_interiorid;
- ACInfo[playerid][acSet][14] = ac_interiorid;
- ACInfo[playerid][acGtc][0] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- if(SetPlayerPos(playerid, ac_x, ac_y, ac_z) == 0) return 0;
- ACInfo[playerid][acSet][8] = 1;
- ACInfo[playerid][acNOPCount][10] = 0;
- ACInfo[playerid][acSetPosX] = ac_x;
- ACInfo[playerid][acSetPosY] = ac_y;
- ACInfo[playerid][acSetPosZ] = ac_z;
- ACInfo[playerid][acGtc][11] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- if(SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z) == 0) return 0;
- ACInfo[playerid][acSet][8] = 2;
- ACInfo[playerid][acTpToZ] = true;
- ACInfo[playerid][acNOPCount][10] = 0;
- ACInfo[playerid][acSetPosX] = ac_x;
- ACInfo[playerid][acSetPosY] = ac_y;
- ACInfo[playerid][acGtc][11] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- if(SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z) == 0) return 0;
- ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_X, ac_Y, ac_Z);
- ACInfo[playerid][acGtc][10] = GetTickCount();
- return 1;
- }
- ac_fpublic ac_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)
- {
- if(PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid) == 0) return 0;
- if(!(5 <= ACInfo[playerid][acSpecAct] <= 8) && !(20 <= ACInfo[playerid][acSpecAct] <= 23) &&
- ac_IsVehicleSeatOccupied(ac_vehicleid, ac_seatid) == 0)
- {
- new ac_model = GetVehicleModel(ac_vehicleid) - 400;
- ACInfo[playerid][acNOPCount][7] = 0;
- ACInfo[playerid][acSet][9] = ac_vehicleid;
- if(ac_seatid > ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2) & 0xF) ACInfo[playerid][acSet][5] = -1;
- else ACInfo[playerid][acSet][5] = ac_seatid;
- ACInfo[playerid][acSet][11] = -1;
- ACInfo[playerid][acGtc][1] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_RemovePlayerFromVehicle(playerid)
- {
- if(RemovePlayerFromVehicle(playerid) == 0) return 0;
- ACInfo[playerid][acSet][11] = 1;
- ACInfo[playerid][acGtc][8] = GetTickCount() + 3000;
- return 1;
- }
- ac_fpublic ac_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- if(SetVehiclePos(vehicleid, ac_x, ac_y, ac_z) == 0) return 0;
- ACVehInfo[vehicleid][acVelX] = ACVehInfo[vehicleid][acVelY] =
- ACVehInfo[vehicleid][acVelZ] = 0.0;
- if(ACVehInfo[vehicleid][acDriver] != 65535)
- {
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSet][8] = 3;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acNOPCount][10] = 0;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSetPosX] = ac_x;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSetPosY] = ac_y;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSetPosZ] = ac_z;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][11] =
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][9] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- if(SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z) == 0) return 0;
- if(ACVehInfo[vehicleid][acDriver] != 65535)
- {
- ACVehInfo[vehicleid][acVelX] = ac_X;
- ACVehInfo[vehicleid][acVelY] = ac_Y;
- ACVehInfo[vehicleid][acVelZ] = ac_Z;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][9] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- if(SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z) == 0) return 0;
- if(ACVehInfo[vehicleid][acDriver] != 65535)
- {
- ACVehInfo[vehicleid][acVelX] = ac_X;
- ACVehInfo[vehicleid][acVelY] = ac_Y;
- ACVehInfo[vehicleid][acVelZ] = ac_Z;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][9] = GetTickCount();
- }
- return 1;
- }
- ac_fpublic ac_LinkVehicleToInterior(vehicleid, ac_interiorid)
- {
- if(LinkVehicleToInterior(vehicleid, ac_interiorid) == 0) return 0;
- if(ac_interiorid < 0) ac_interiorid %= 256;
- ACVehInfo[vehicleid][acInt] = ac_interiorid;
- return 1;
- }
- ac_fpublic ac_ChangeVehiclePaintjob(vehicleid, ac_paintjobid)
- {
- if(ChangeVehiclePaintjob(vehicleid, ac_paintjobid) == 0) return 0;
- ACVehInfo[vehicleid][acPaintJob] = ac_paintjobid;
- return 1;
- }
- ac_fpublic ac_SetVehicleHealth(vehicleid, Float:ac_health)
- {
- if(SetVehicleHealth(vehicleid, ac_health) == 0) return 0;
- if(ACVehInfo[vehicleid][acDriver] != 65535)
- {
- ACInfo[ACVehInfo[vehicleid][acDriver]][acNOPCount][4] = 0;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSetVehHealth] = ac_health;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][4] = GetTickCount();
- }
- else ACVehInfo[vehicleid][acHealth] = ac_health;
- return 1;
- }
- ac_fpublic ac_RepairVehicle(vehicleid)
- {
- if(RepairVehicle(vehicleid) == 0) return 0;
- if(ACVehInfo[vehicleid][acDriver] != 65535)
- {
- ACInfo[ACVehInfo[vehicleid][acDriver]][acNOPCount][4] = 0;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acSetVehHealth] = 1000.0;
- ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][4] = GetTickCount();
- }
- else ACVehInfo[vehicleid][acHealth] = 1000.0;
- return 1;
- }
- ac_fpublic ac_SetVehicleToRespawn(vehicleid)
- {
- if(ACVehInfo[vehicleid][acDriver] != 65535) ACInfo[ACVehInfo[vehicleid][acDriver]][acGtc][9] = GetTickCount();
- return SetVehicleToRespawn(vehicleid);
- }
- ac_fpublic ac_EnableAntiCheat(acid, enable)
- {
- if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
- if(acid == 42)
- {
- if(enable)
- {
- if(ac_ACAllow[acid] == false)
- {
- #if !AC_USE_QUERY
- ac_QueryEnable = !!GetConsoleVarAsBool("query");
- #endif
- ac_RconEnable = !!GetConsoleVarAsBool("rcon");
- }
- #if !AC_USE_QUERY
- SendRconCommand("query 0");
- #endif
- SendRconCommand("rcon 0");
- }
- else
- {
- static ac_strtmp[9];
- #if !AC_USE_QUERY
- format(ac_strtmp, sizeof ac_strtmp, "query %b", ac_QueryEnable);
- SendRconCommand(ac_strtmp);
- #endif
- format(ac_strtmp, sizeof ac_strtmp, "rcon %b", ac_RconEnable);
- SendRconCommand(ac_strtmp);
- }
- }
- ac_ACAllow[acid] = !!enable;
- #if defined foreach
- foreach(new ac_i : Player)
- #else
- for(new ac_i = GetPlayerPoolSize(); ac_i > -1; --ac_i)
- {
- if(IsPlayerConnected(ac_i))
- #endif
- {
- ACInfo[ac_i][acACAllow][acid] = ac_ACAllow[acid];
- if(enable)
- {
- switch(acid)
- {
- case 7: ACInfo[ac_i][acCheatCount][15] = 0;
- case 8: ACInfo[ac_i][acCheatCount][3] = 0;
- case 15: ACInfo[ac_i][acCheatCount][10] = 0;
- case 17: ACInfo[ac_i][acCheatCount][7] = 0;
- case 19: ACInfo[ac_i][acCheatCount][9] = 0;
- case 20: ACInfo[ac_i][acCheatCount][11] = 0;
- case 23: ACInfo[ac_i][acCheatCount][12] = 0;
- case 26: ACInfo[ac_i][acCheatCount][14] = ACInfo[ac_i][acCheatCount][8] = 0;
- case 29: ACInfo[ac_i][acCheatCount][13] = ACInfo[ac_i][acCheatCount][6] = 0;
- case 31: ACInfo[ac_i][acCheatCount][4] = 0;
- case 34: ACInfo[ac_i][acCheatCount][5] = 0;
- case 38: ACInfo[ac_i][acCheatCount][0] = 0;
- }
- }
- }
- #if !defined foreach
- }
- #endif
- return 1;
- }
- ac_fpublic ac_EnableAntiCheatForPlayer(playerid, acid, enable)
- {
- if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
- ACInfo[playerid][acACAllow][acid] = !!enable;
- if(enable)
- {
- switch(acid)
- {
- case 7: ACInfo[playerid][acCheatCount][15] = 0;
- case 8: ACInfo[playerid][acCheatCount][3] = 0;
- case 15: ACInfo[playerid][acCheatCount][10] = 0;
- case 17: ACInfo[playerid][acCheatCount][7] = 0;
- case 19: ACInfo[playerid][acCheatCount][9] = 0;
- case 20: ACInfo[playerid][acCheatCount][11] = 0;
- case 23: ACInfo[playerid][acCheatCount][12] = 0;
- case 26: ACInfo[playerid][acCheatCount][14] = ACInfo[playerid][acCheatCount][8] = 0;
- case 29: ACInfo[playerid][acCheatCount][13] = ACInfo[playerid][acCheatCount][6] = 0;
- case 31: ACInfo[playerid][acCheatCount][4] = 0;
- case 34: ACInfo[playerid][acCheatCount][5] = 0;
- case 38: ACInfo[playerid][acCheatCount][0] = 0;
- }
- }
- return 1;
- }
- ac_fpublic ac_IsAntiCheatEnabled(acid)
- {
- if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
- return ac_ACAllow[acid];
- }
- ac_fpublic ac_IsAntiCheatEnabledForPlayer(playerid, acid)
- {
- if(!(0 <= acid < sizeof ac_ACAllow)) return 0;
- return ACInfo[playerid][acACAllow][acid];
- }
- ac_fpublic ac_AntiCheatGetAnimationIndex(playerid) return ACInfo[playerid][acAnim];
- ac_fpublic ac_AntiCheatGetDialog(playerid) return ACInfo[playerid][acDialog];
- ac_fpublic ac_AntiCheatGetMoney(playerid) return ACInfo[playerid][acMoney];
- ac_fpublic ac_AntiCheatGetClass(playerid) return ACInfo[playerid][acClassid];
- ac_fpublic ac_AntiCheatGetEnterVehicle(playerid) return ACInfo[playerid][acEnterVeh];
- ac_fpublic ac_AntiCheatGetVehicleID(playerid) return ACInfo[playerid][acVeh];
- ac_fpublic ac_AntiCheatGetWeapon(playerid) return ACInfo[playerid][acLastWeapon];
- ac_fpublic ac_AntiCheatGetVehicleSeat(playerid) return ACInfo[playerid][acSeat];
- ac_fpublic ac_AntiCheatGetSpecialAction(playerid) return ACInfo[playerid][acSpecAct];
- ac_fpublic ac_AntiCheatGetLastSpecialActio(playerid) return ACInfo[playerid][acLastSpecAct];
- ac_fpublic ac_AntiCheatGetLastShotWeapon(playerid) return ACInfo[playerid][acLastShot];
- ac_fpublic ac_AntiCheatGetLastPickup(playerid) return ACInfo[playerid][acLastPickup];
- ac_fpublic ac_AntiCheatGetLastUpdateTime(playerid) return ACInfo[playerid][acLastUpdate];
- ac_fpublic ac_AntiCheatGetLastReloadTime(playerid) return ACInfo[playerid][acReload];
- ac_fpublic ac_AntiCheatGetLastEnteredVehTi(playerid) return ACInfo[playerid][acEnterVehTime];
- ac_fpublic ac_AntiCheatGetLastShotTime(playerid) return ACInfo[playerid][acShotTime];
- ac_fpublic ac_AntiCheatGetLastSpawnTime(playerid) return ACInfo[playerid][acSpawnTime];
- ac_fpublic ac_AntiCheatIntEnterExitsIsEnab(playerid) return ACInfo[playerid][acIntEnterExits];
- ac_fpublic ac_AntiCheatStuntBonusIsEnabled(playerid) return ACInfo[playerid][acStuntBonus];
- ac_fpublic ac_AntiCheatIsInModShop(playerid) return ACInfo[playerid][acModShop];
- ac_fpublic ac_AntiCheatIsFrozen(playerid) return ACInfo[playerid][acFreeze];
- ac_fpublic ac_AntiCheatIsDead(playerid) return ACInfo[playerid][acDead];
- ac_fpublic ac_AntiCheatIsConnected(playerid) return ACInfo[playerid][acOnline];
- ac_fpublic ac_AntiCheatGetNextDialog(playerid) return ACInfo[playerid][acNextDialog];
- #endif
- stock acc_AddStaticVehicle(ac_modelid, Float:ac_spawn_x, Float:ac_spawn_y, Float:ac_spawn_z, Float:ac_z_angle, ac_color1, ac_color2)
- {
- new ac_vehicleid = AddStaticVehicle(ac_modelid, ac_spawn_x, ac_spawn_y, ac_spawn_z, ac_z_angle, ac_color1, ac_color2);
- if(ac_vehicleid != 65535)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_AddStaticVehicle", "i", ac_vehicleid);
- #else
- ac_AddStaticVehicle(ac_vehicleid);
- #endif
- }
- return ac_vehicleid;
- }
- #if defined _ALS_AddStaticVehicle
- #undef AddStaticVehicle
- #else
- #define _ALS_AddStaticVehicle
- #endif
- #define AddStaticVehicle acc_AddStaticVehicle
- stock acc_AddStaticVehicleEx(ac_modelid, Float:ac_spawn_x, Float:ac_spawn_y, Float:ac_spawn_z, Float:ac_z_angle, ac_color1, ac_color2, ac_respawn_delay, ac_addsiren = 0)
- {
- new ac_vehicleid = AddStaticVehicleEx(ac_modelid, ac_spawn_x, ac_spawn_y, ac_spawn_z, ac_z_angle, ac_color1, ac_color2, ac_respawn_delay, ac_addsiren);
- if(ac_vehicleid != 65535)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_AddStaticVehicle", "i", ac_vehicleid);
- #else
- ac_AddStaticVehicle(ac_vehicleid);
- #endif
- }
- return ac_vehicleid;
- }
- #if defined _ALS_AddStaticVehicleEx
- #undef AddStaticVehicleEx
- #else
- #define _ALS_AddStaticVehicleEx
- #endif
- #define AddStaticVehicleEx acc_AddStaticVehicleEx
- stock acc_CreateVehicle(ac_vehicletype, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation, ac_color1, ac_color2, ac_respawn_delay, ac_addsiren = 0)
- {
- new ac_vehicleid = CreateVehicle(ac_vehicletype, ac_x, ac_y, ac_z, ac_rotation, ac_color1, ac_color2, ac_respawn_delay, ac_addsiren);
- if(ac_vehicleid != 65535)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_CreateVehicle", "ii", ac_vehicleid, ac_vehicletype);
- #else
- ac_CreateVehicle(ac_vehicleid, ac_vehicletype);
- #endif
- }
- return ac_vehicleid;
- }
- #if defined _ALS_CreateVehicle
- #undef CreateVehicle
- #else
- #define _ALS_CreateVehicle
- #endif
- #define CreateVehicle acc_CreateVehicle
- stock acc_AddPlayerClass(ac_modelid, Float:ac_spawn_x, Float:ac_spawn_y, Float:ac_spawn_z, Float:ac_z_angle, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
- {
- new ac_classid = AddPlayerClass(ac_modelid, ac_spawn_x, ac_spawn_y, ac_spawn_z, ac_z_angle, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_AddPlayerClass", "iiiiiii", ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #else
- ac_AddPlayerClass(ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #endif
- return ac_classid;
- }
- #if defined _ALS_AddPlayerClass
- #undef AddPlayerClass
- #else
- #define _ALS_AddPlayerClass
- #endif
- #define AddPlayerClass acc_AddPlayerClass
- stock acc_AddPlayerClassEx(ac_teamid, ac_modelid, Float:ac_spawn_x, Float:ac_spawn_y, Float:ac_spawn_z, Float:ac_z_angle, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
- {
- new ac_classid = AddPlayerClassEx(ac_teamid, ac_modelid, ac_spawn_x, ac_spawn_y, ac_spawn_z, ac_z_angle, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_AddPlayerClass", "iiiiiii", ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #else
- ac_AddPlayerClass(ac_classid, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #endif
- return ac_classid;
- }
- #if defined _ALS_AddPlayerClassEx
- #undef AddPlayerClassEx
- #else
- #define _ALS_AddPlayerClassEx
- #endif
- #define AddPlayerClassEx acc_AddPlayerClassEx
- stock acc_SetSpawnInfo(playerid, ac_team, ac_skin, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetSpawnInfo", "iiiffffiiiiii", playerid, ac_team, ac_skin, ac_x, ac_y, ac_z, ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #else
- return ac_SetSpawnInfo(playerid, ac_team, ac_skin, ac_x, ac_y, ac_z, ac_rotation, ac_weapon1, ac_weapon1_ammo, ac_weapon2, ac_weapon2_ammo, ac_weapon3, ac_weapon3_ammo);
- #endif
- }
- #if defined _ALS_SetSpawnInfo
- #undef SetSpawnInfo
- #else
- #define _ALS_SetSpawnInfo
- #endif
- #define SetSpawnInfo acc_SetSpawnInfo
- stock acc_AddStaticPickup(ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z, ac_virtualworld = 0)
- {
- new ac_pickupid = CreatePickup(ac_model, ac_type, ac_X, ac_Y, ac_Z, ac_virtualworld);
- if(ac_pickupid != -1)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AddStaticPickup", "iiifff", ac_pickupid, ac_model, ac_type, ac_X, ac_Y, ac_Z);
- #else
- return ac_AddStaticPickup(ac_pickupid, ac_model, ac_type, ac_X, ac_Y, ac_Z);
- #endif
- }
- return 0;
- }
- #if defined _ALS_AddStaticPickup
- #undef AddStaticPickup
- #else
- #define _ALS_AddStaticPickup
- #endif
- #define AddStaticPickup acc_AddStaticPickup
- stock acc_CreatePickup(ac_model, ac_type, Float:ac_X, Float:ac_Y, Float:ac_Z, ac_virtualworld = 0)
- {
- new ac_pickupid = CreatePickup(ac_model, ac_type, ac_X, ac_Y, ac_Z, ac_virtualworld);
- if(ac_pickupid != -1)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_CreatePickup", "iiifff", ac_pickupid, ac_model, ac_type, ac_X, ac_Y, ac_Z);
- #else
- ac_CreatePickup(ac_pickupid, ac_model, ac_type, ac_X, ac_Y, ac_Z);
- #endif
- }
- return ac_pickupid;
- }
- #if defined _ALS_CreatePickup
- #undef CreatePickup
- #else
- #define _ALS_CreatePickup
- #endif
- #define CreatePickup acc_CreatePickup
- #if defined CreateDynamicPickup
- #if defined STREAMER_ENABLE_TAGS
- stock STREAMER_TAG_PICKUP acc_CreateDynamicPickup(ac_modelid, ac_type, Float:ac_x, Float:ac_y, Float:ac_z, ac_worldid = -1, ac_interiorid = -1, ac_playerid = -1, Float:ac_streamdistance = 200.0, STREAMER_TAG_AREA ac_areaid = STREAMER_TAG_AREA -1, ac_priority = 0)
- {
- new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickup(ac_modelid, ac_type, ac_x, ac_y, ac_z, ac_worldid, ac_interiorid, ac_playerid, ac_streamdistance, ac_areaid, ac_priority);
- #else
- stock acc_CreateDynamicPickup(ac_modelid, ac_type, Float:ac_x, Float:ac_y, Float:ac_z, ac_worldid = -1, ac_interiorid = -1, ac_playerid = -1, Float:ac_streamdistance = 200.0, ac_areaid = -1, ac_priority = 0)
- {
- new ac_pickupid = CreateDynamicPickup(ac_modelid, ac_type, ac_x, ac_y, ac_z, ac_worldid, ac_interiorid, ac_playerid, ac_streamdistance, ac_areaid, ac_priority);
- #endif
- if(_:ac_pickupid > 0)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_CreateDynamicPickup", "iiifff", _:ac_pickupid, ac_modelid, ac_type, ac_x, ac_y, ac_z);
- #else
- ac_CreateDynamicPickup(_:ac_pickupid, ac_modelid, ac_type, ac_x, ac_y, ac_z);
- #endif
- }
- return ac_pickupid;
- }
- #if defined _ALS_CreateDynamicPickup
- #undef CreateDynamicPickup
- #else
- #define _ALS_CreateDynamicPickup
- #endif
- #define CreateDynamicPickup acc_CreateDynamicPickup
- #endif
- #if defined CreateDynamicPickupEx
- #if defined STREAMER_ENABLE_TAGS
- stock STREAMER_TAG_PICKUP acc_CreateDynamicPickupEx(ac_modelid, ac_type, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_streamdistance = 200.0, ac_worlds[] = { -1 }, ac_interiors[] = { -1 }, ac_players[] = { -1 }, STREAMER_TAG_AREA ac_areas[] = { STREAMER_TAG_AREA -1 }, ac_priority = 0, ac_maxworlds = sizeof ac_worlds, ac_maxinteriors = sizeof ac_interiors, ac_maxplayers = sizeof ac_players, ac_maxareas = sizeof ac_areas)
- {
- new STREAMER_TAG_PICKUP ac_pickupid = CreateDynamicPickupEx(modelid, type, acx, acy, acz, streamdistance, worlds, interiors, players, areas, priority, maxworlds, maxinteriors, maxplayers, maxareas);
- #else
- stock acc_CreateDynamicPickupEx(ac_modelid, ac_type, Float:ac_x, Float:ac_y, Float:ac_z, Float:ac_streamdistance = 200.0, ac_worlds[] = { -1 }, ac_interiors[] = { -1 }, ac_players[] = { -1 }, ac_areas[] = { -1 }, ac_priority = 0, ac_maxworlds = sizeof ac_worlds, ac_maxinteriors = sizeof ac_interiors, ac_maxplayers = sizeof ac_players, ac_maxareas = sizeof ac_areas)
- {
- new ac_pickupid = CreateDynamicPickupEx(ac_modelid, ac_type, ac_x, ac_y, ac_z, ac_streamdistance, ac_worlds, ac_interiors, ac_players, ac_areas, ac_priority, ac_maxworlds, ac_maxinteriors, ac_maxplayers, ac_maxareas);
- #endif
- if(_:ac_pickupid > 0)
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_CreateDynamicPickup", "iiifff", _:ac_pickupid, ac_modelid, ac_type, ac_x, ac_y, ac_z);
- #else
- ac_CreateDynamicPickup(_:ac_pickupid, ac_modelid, ac_type, ac_x, ac_y, ac_z);
- #endif
- }
- return ac_pickupid;
- }
- #if defined _ALS_CreateDynamicPickupEx
- #undef CreateDynamicPickupEx
- #else
- #define _ALS_CreateDynamicPickupEx
- #endif
- #define CreateDynamicPickupEx acc_CreateDynamicPickupEx
- #endif
- stock acc_DestroyVehicle(ac_vehicleid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_DestroyVehicle", "i", ac_vehicleid);
- #else
- return ac_DestroyVehicle(ac_vehicleid);
- #endif
- }
- #if defined _ALS_DestroyVehicle
- #undef DestroyVehicle
- #else
- #define _ALS_DestroyVehicle
- #endif
- #define DestroyVehicle acc_DestroyVehicle
- stock acc_DestroyPickup(ac_pickup)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_DestroyPickup", "i", ac_pickup);
- #else
- return ac_DestroyPickup(ac_pickup);
- #endif
- }
- #if defined _ALS_DestroyPickup
- #undef DestroyPickup
- #else
- #define _ALS_DestroyPickup
- #endif
- #define DestroyPickup acc_DestroyPickup
- #if defined DestroyDynamicPickup
- #if defined STREAMER_ENABLE_TAGS
- stock acc_DestroyDynamicPickup(STREAMER_TAG_PICKUP ac_pickupid)
- #else
- stock acc_DestroyDynamicPickup(ac_pickupid)
- #endif
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_DestroyDynamicPickup", "i", _:ac_pickupid);
- #else
- return ac_DestroyDynamicPickup(_:ac_pickupid);
- #endif
- }
- #if defined _ALS_DestroyDynamicPickup
- #undef DestroyDynamicPickup
- #else
- #define _ALS_DestroyDynamicPickup
- #endif
- #define DestroyDynamicPickup acc_DestroyDynamicPickup
- #endif
- #if defined DestroyAllDynamicPickups
- stock acc_DestroyAllDynamicPickups()
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_DestroyAllDynamicPickups", "");
- #else
- return ac_DestroyAllDynamicPickups();
- #endif
- }
- #if defined _ALS_DestroyAllDynamicPickups
- #undef DestroyAllDynamicPickups
- #else
- #define _ALS_DestroyAllDynamicPickups
- #endif
- #define DestroyAllDynamicPickups acc_DestroyAllDynamicPickups
- #endif
- stock acc_DisableInteriorEnterExits()
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_DisableInteriorEnterExits", "");
- #else
- return ac_DisableInteriorEnterExits();
- #endif
- }
- #if defined _ALS_DisableInteriorEnterExits
- #undef DisableInteriorEnterExits
- #else
- #define _ALS_DisableInteriorEnterExits
- #endif
- #define DisableInteriorEnterExits acc_DisableInteriorEnterExits
- stock acc_UsePlayerPedAnims()
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_UsePlayerPedAnims", "");
- #else
- return ac_UsePlayerPedAnims();
- #endif
- }
- #if defined _ALS_UsePlayerPedAnims
- #undef UsePlayerPedAnims
- #else
- #define _ALS_UsePlayerPedAnims
- #endif
- #define UsePlayerPedAnims acc_UsePlayerPedAnims
- stock acc_EnableVehicleFriendlyFire()
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_EnableVehicleFriendlyFire", "");
- #else
- return ac_EnableVehicleFriendlyFire();
- #endif
- }
- #if defined _ALS_EnableVehicleFriendlyFire
- #undef EnableVehicleFriendlyFire
- #else
- #define _ALS_EnableVehicleFriendlyFire
- #endif
- #define EnableVehicleFriendlyFire acc_EnableVehicleFriendlyFire
- stock acc_EnableStuntBonusForAll(ac_enable)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_EnableStuntBonusForAll", "i", ac_enable);
- #else
- return ac_EnableStuntBonusForAll(ac_enable);
- #endif
- }
- #if defined _ALS_EnableStuntBonusForAll
- #undef EnableStuntBonusForAll
- #else
- #define _ALS_EnableStuntBonusForAll
- #endif
- #define EnableStuntBonusForAll acc_EnableStuntBonusForAll
- stock acc_EnableStuntBonusForPlayer(playerid, ac_enable)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_EnableStuntBonusForPlayer", "ii", playerid, ac_enable);
- #else
- return ac_EnableStuntBonusForPlayer(playerid, ac_enable);
- #endif
- }
- #if defined _ALS_EnableStuntBonusForPlayer
- #undef EnableStuntBonusForPlayer
- #else
- #define _ALS_EnableStuntBonusForPlayer
- #endif
- #define EnableStuntBonusForPlayer acc_EnableStuntBonusForPlayer
- #if defined _inc_y_dialog || defined _INC_y_dialog
- stock ac_Dialog_Show(playerid, ac_style, string:ac_title[], string:ac_caption[], string:ac_button1[], string:ac_button2[] = "", ac_dialog = -1)
- {
- if(IsPlayerConnected(playerid))
- {
- #if defined FILTERSCRIPT
- CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, ac_dialog);
- #else
- ac_ShowPlayerDialog(playerid, ac_dialog);
- #endif
- }
- return Dialog_Show(playerid, ac_style, ac_title, ac_caption, ac_button1, ac_button2, ac_dialog);
- }
- #if defined _ALS_Dialog_Show
- #undef Dialog_Show
- #else
- #define _ALS_Dialog_Show
- #endif
- #define Dialog_Show ac_Dialog_Show
- #endif
- stock acc_ShowPlayerDialog(playerid, ac_dialogid, ac_style, ac_caption[], ac_info[], ac_button1[], ac_button2[])
- {
- if(ShowPlayerDialog(playerid, ac_dialogid, ac_style, ac_caption, ac_info, ac_button1, ac_button2))
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_fs_ShowPlayerDialog", "id", playerid, ac_dialogid);
- #else
- return ac_ShowPlayerDialog(playerid, ac_dialogid);
- #endif
- }
- return 0;
- }
- #if defined _ALS_ShowPlayerDialog
- #undef ShowPlayerDialog
- #else
- #define _ALS_ShowPlayerDialog
- #endif
- #define ShowPlayerDialog acc_ShowPlayerDialog
- stock acc_TogglePlayerControllable(playerid, ac_toggle)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_TogglePlayerControllable", "ii", playerid, ac_toggle);
- #else
- return ac_TogglePlayerControllable(playerid, ac_toggle);
- #endif
- }
- #if defined _ALS_TogglePlayerControllable
- #undef TogglePlayerControllable
- #else
- #define _ALS_TogglePlayerControllable
- #endif
- #define TogglePlayerControllable acc_TogglePlayerControllable
- stock acc_TogglePlayerSpectating(playerid, ac_toggle)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_TogglePlayerSpectating", "ii", playerid, ac_toggle);
- #else
- return ac_TogglePlayerSpectating(playerid, ac_toggle);
- #endif
- }
- #if defined _ALS_TogglePlayerSpectating
- #undef TogglePlayerSpectating
- #else
- #define _ALS_TogglePlayerSpectating
- #endif
- #define TogglePlayerSpectating acc_TogglePlayerSpectating
- stock acc_SpawnPlayer(playerid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SpawnPlayer", "i", playerid);
- #else
- return ac_SpawnPlayer(playerid);
- #endif
- }
- #if defined _ALS_SpawnPlayer
- #undef SpawnPlayer
- #else
- #define _ALS_SpawnPlayer
- #endif
- #define SpawnPlayer acc_SpawnPlayer
- stock acc_SetPlayerHealth(playerid, Float:ac_health)
- {
- if(ac_health > 1048576.0) ac_health = 1048576.0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerHealth", "if", playerid, ac_health);
- #else
- return ac_SetPlayerHealth(playerid, ac_health);
- #endif
- }
- #if defined _ALS_SetPlayerHealth
- #undef SetPlayerHealth
- #else
- #define _ALS_SetPlayerHealth
- #endif
- #define SetPlayerHealth acc_SetPlayerHealth
- stock acc_SetPlayerArmour(playerid, Float:ac_armour)
- {
- if(ac_armour > 1048576.0) ac_armour = 1048576.0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerArmour", "if", playerid, ac_armour);
- #else
- return ac_SetPlayerArmour(playerid, ac_armour);
- #endif
- }
- #if defined _ALS_SetPlayerArmour
- #undef SetPlayerArmour
- #else
- #define _ALS_SetPlayerArmour
- #endif
- #define SetPlayerArmour acc_SetPlayerArmour
- stock acc_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo)
- {
- if(IsPlayerConnected(playerid))
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_GivePlayerWeapon", "iid", playerid, ac_weaponid, ac_ammo);
- #else
- return ac_GivePlayerWeapon(playerid, ac_weaponid, ac_ammo);
- #endif
- }
- return 0;
- }
- #if defined _ALS_GivePlayerWeapon
- #undef GivePlayerWeapon
- #else
- #define _ALS_GivePlayerWeapon
- #endif
- #define GivePlayerWeapon acc_GivePlayerWeapon
- stock acc_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
- {
- if(IsPlayerConnected(playerid))
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerAmmo", "iid", playerid, ac_weaponslot, ac_ammo);
- #else
- return ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
- #endif
- }
- return 0;
- }
- #if defined _ALS_SetPlayerAmmo
- #undef SetPlayerAmmo
- #else
- #define _ALS_SetPlayerAmmo
- #endif
- #define SetPlayerAmmo acc_SetPlayerAmmo
- stock acc_SetPlayerArmedWeapon(playerid, ac_weaponid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerArmedWeapon", "ii", playerid, ac_weaponid);
- #else
- return ac_SetPlayerArmedWeapon(playerid, ac_weaponid);
- #endif
- }
- #if defined _ALS_SetPlayerArmedWeapon
- #undef SetPlayerArmedWeapon
- #else
- #define _ALS_SetPlayerArmedWeapon
- #endif
- #define SetPlayerArmedWeapon acc_SetPlayerArmedWeapon
- stock acc_ResetPlayerWeapons(playerid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_ResetPlayerWeapons", "i", playerid);
- #else
- return ac_ResetPlayerWeapons(playerid);
- #endif
- }
- #if defined _ALS_ResetPlayerWeapons
- #undef ResetPlayerWeapons
- #else
- #define _ALS_ResetPlayerWeapons
- #endif
- #define ResetPlayerWeapons acc_ResetPlayerWeapons
- stock acc_GivePlayerMoney(playerid, ac_money)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_GivePlayerMoney", "id", playerid, ac_money);
- #else
- return ac_GivePlayerMoney(playerid, ac_money);
- #endif
- }
- #if defined _ALS_GivePlayerMoney
- #undef GivePlayerMoney
- #else
- #define _ALS_GivePlayerMoney
- #endif
- #define GivePlayerMoney acc_GivePlayerMoney
- stock acc_ResetPlayerMoney(playerid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_ResetPlayerMoney", "i", playerid);
- #else
- return ac_ResetPlayerMoney(playerid);
- #endif
- }
- #if defined _ALS_ResetPlayerMoney
- #undef ResetPlayerMoney
- #else
- #define _ALS_ResetPlayerMoney
- #endif
- #define ResetPlayerMoney acc_ResetPlayerMoney
- stock acc_GetPlayerMoney(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_GetPlayerMoney", "i", playerid);
- #else
- return ac_GetPlayerMoney(playerid);
- #endif
- }
- return 0;
- }
- #if defined _ALS_GetPlayerMoney
- #undef GetPlayerMoney
- #else
- #define _ALS_GetPlayerMoney
- #endif
- #define GetPlayerMoney acc_GetPlayerMoney
- stock acc_SetPlayerSpecialAction(playerid, ac_actionid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerSpecialAction", "ii", playerid, ac_actionid);
- #else
- return ac_SetPlayerSpecialAction(playerid, ac_actionid);
- #endif
- }
- #if defined _ALS_SetPlayerSpecialAction
- #undef SetPlayerSpecialAction
- #else
- #define _ALS_SetPlayerSpecialAction
- #endif
- #define SetPlayerSpecialAction acc_SetPlayerSpecialAction
- stock acc_SetPlayerInterior(playerid, ac_interiorid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerInterior", "ii", playerid, ac_interiorid);
- #else
- return ac_SetPlayerInterior(playerid, ac_interiorid);
- #endif
- }
- #if defined _ALS_SetPlayerInterior
- #undef SetPlayerInterior
- #else
- #define _ALS_SetPlayerInterior
- #endif
- #define SetPlayerInterior acc_SetPlayerInterior
- stock acc_SetPlayerPos(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerPos", "ifff", playerid, ac_x, ac_y, ac_z);
- #else
- return ac_SetPlayerPos(playerid, ac_x, ac_y, ac_z);
- #endif
- }
- #if defined _ALS_SetPlayerPos
- #undef SetPlayerPos
- #else
- #define _ALS_SetPlayerPos
- #endif
- #define SetPlayerPos acc_SetPlayerPos
- stock acc_SetPlayerPosFindZ(playerid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerPosFindZ", "ifff", playerid, ac_x, ac_y, ac_z);
- #else
- return ac_SetPlayerPosFindZ(playerid, ac_x, ac_y, ac_z);
- #endif
- }
- #if defined _ALS_SetPlayerPosFindZ
- #undef SetPlayerPosFindZ
- #else
- #define _ALS_SetPlayerPosFindZ
- #endif
- #define SetPlayerPosFindZ acc_SetPlayerPosFindZ
- stock acc_SetPlayerVelocity(playerid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetPlayerVelocity", "ifff", playerid, ac_X, ac_Y, ac_Z);
- #else
- return ac_SetPlayerVelocity(playerid, ac_X, ac_Y, ac_Z);
- #endif
- }
- #if defined _ALS_SetPlayerVelocity
- #undef SetPlayerVelocity
- #else
- #define _ALS_SetPlayerVelocity
- #endif
- #define SetPlayerVelocity acc_SetPlayerVelocity
- stock acc_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_PutPlayerInVehicle", "iii", playerid, ac_vehicleid, ac_seatid);
- #else
- return ac_PutPlayerInVehicle(playerid, ac_vehicleid, ac_seatid);
- #endif
- }
- #if defined _ALS_PutPlayerInVehicle
- #undef PutPlayerInVehicle
- #else
- #define _ALS_PutPlayerInVehicle
- #endif
- #define PutPlayerInVehicle acc_PutPlayerInVehicle
- stock acc_RemovePlayerFromVehicle(playerid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_RemovePlayerFromVehicle", "i", playerid);
- #else
- return ac_RemovePlayerFromVehicle(playerid);
- #endif
- }
- #if defined _ALS_RemovePlayerFromVehicle
- #undef RemovePlayerFromVehicle
- #else
- #define _ALS_RemovePlayerFromVehicle
- #endif
- #define RemovePlayerFromVehicle acc_RemovePlayerFromVehicle
- stock acc_SetVehiclePos(vehicleid, Float:ac_x, Float:ac_y, Float:ac_z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetVehiclePos", "ifff", vehicleid, ac_x, ac_y, ac_z);
- #else
- return ac_SetVehiclePos(vehicleid, ac_x, ac_y, ac_z);
- #endif
- }
- #if defined _ALS_SetVehiclePos
- #undef SetVehiclePos
- #else
- #define _ALS_SetVehiclePos
- #endif
- #define SetVehiclePos acc_SetVehiclePos
- stock acc_SetVehicleVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetVehicleVelocity", "ifff", vehicleid, ac_X, ac_Y, ac_Z);
- #else
- return ac_SetVehicleVelocity(vehicleid, ac_X, ac_Y, ac_Z);
- #endif
- }
- #if defined _ALS_SetVehicleVelocity
- #undef SetVehicleVelocity
- #else
- #define _ALS_SetVehicleVelocity
- #endif
- #define SetVehicleVelocity acc_SetVehicleVelocity
- stock acc_SetVehicleAngularVelocity(vehicleid, Float:ac_X, Float:ac_Y, Float:ac_Z)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetVehicleAngularVelocity", "ifff", vehicleid, ac_X, ac_Y, ac_Z);
- #else
- return ac_SetVehicleAngularVelocity(vehicleid, ac_X, ac_Y, ac_Z);
- #endif
- }
- #if defined _ALS_SetVehicleAngularVelocity
- #undef SetVehicleAngularVelocity
- #else
- #define _ALS_SetVehicleAngularVelocity
- #endif
- #define SetVehicleAngularVelocity acc_SetVehicleAngularVelocity
- stock acc_LinkVehicleToInterior(vehicleid, ac_interiorid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_LinkVehicleToInterior", "ii", vehicleid, ac_interiorid);
- #else
- return ac_LinkVehicleToInterior(vehicleid, ac_interiorid);
- #endif
- }
- #if defined _ALS_LinkVehicleToInterior
- #undef LinkVehicleToInterior
- #else
- #define _ALS_LinkVehicleToInterior
- #endif
- #define LinkVehicleToInterior acc_LinkVehicleToInterior
- stock acc_ChangeVehiclePaintjob(vehicleid, ac_paintjobid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_ChangeVehiclePaintjob", "ii", vehicleid, ac_paintjobid);
- #else
- return ac_ChangeVehiclePaintjob(vehicleid, ac_paintjobid);
- #endif
- }
- #if defined _ALS_ChangeVehiclePaintjob
- #undef ChangeVehiclePaintjob
- #else
- #define _ALS_ChangeVehiclePaintjob
- #endif
- #define ChangeVehiclePaintjob acc_ChangeVehiclePaintjob
- stock acc_SetVehicleHealth(vehicleid, Float:ac_health)
- {
- if(ac_health < 0.0) ac_health = 0.0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetVehicleHealth", "if", vehicleid, ac_health);
- #else
- return ac_SetVehicleHealth(vehicleid, ac_health);
- #endif
- }
- #if defined _ALS_SetVehicleHealth
- #undef SetVehicleHealth
- #else
- #define _ALS_SetVehicleHealth
- #endif
- #define SetVehicleHealth acc_SetVehicleHealth
- stock acc_RepairVehicle(vehicleid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_RepairVehicle", "i", vehicleid);
- #else
- return ac_RepairVehicle(vehicleid);
- #endif
- }
- #if defined _ALS_RepairVehicle
- #undef RepairVehicle
- #else
- #define _ALS_RepairVehicle
- #endif
- #define RepairVehicle acc_RepairVehicle
- stock acc_SetVehicleToRespawn(vehicleid)
- {
- if(GetVehicleModel(vehicleid) > 0)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_SetVehicleToRespawn", "i", vehicleid);
- #else
- return ac_SetVehicleToRespawn(vehicleid);
- #endif
- }
- return 0;
- }
- #if defined _ALS_SetVehicleToRespawn
- #undef SetVehicleToRespawn
- #else
- #define _ALS_SetVehicleToRespawn
- #endif
- #define SetVehicleToRespawn acc_SetVehicleToRespawn
- stock EnableAntiCheat(acid, enable)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_EnableAntiCheat", "ii", acid, enable);
- #else
- return ac_EnableAntiCheat(acid, enable);
- #endif
- }
- stock EnableAntiCheatForPlayer(playerid, acid, enable)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_EnableAntiCheatForPlayer", "iii", playerid, acid, enable);
- #else
- return ac_EnableAntiCheatForPlayer(playerid, acid, enable);
- #endif
- }
- stock IsAntiCheatEnabled(acid)
- {
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_IsAntiCheatEnabled", "i", acid);
- #else
- return ac_IsAntiCheatEnabled(acid);
- #endif
- }
- stock IsAntiCheatEnabledForPlayer(playerid, acid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_IsAntiCheatEnabledForPlayer", "ii", playerid, acid);
- #else
- return ac_IsAntiCheatEnabledForPlayer(playerid, acid);
- #endif
- }
- stock AntiCheatGetAnimationIndex(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetAnimationIndex", "i", playerid);
- #else
- return ac_AntiCheatGetAnimationIndex(playerid);
- #endif
- }
- stock AntiCheatGetDialog(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetDialog", "i", playerid);
- #else
- return ac_AntiCheatGetDialog(playerid);
- #endif
- }
- stock AntiCheatGetMoney(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetMoney", "i", playerid);
- #else
- return ac_AntiCheatGetMoney(playerid);
- #endif
- }
- stock AntiCheatGetClass(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetClass", "i", playerid);
- #else
- return ac_AntiCheatGetClass(playerid);
- #endif
- }
- stock AntiCheatGetEnterVehicle(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetEnterVehicle", "i", playerid);
- #else
- return ac_AntiCheatGetEnterVehicle(playerid);
- #endif
- }
- stock AntiCheatGetVehicleID(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetVehicleID", "i", playerid);
- #else
- return ac_AntiCheatGetVehicleID(playerid);
- #endif
- }
- stock AntiCheatGetWeapon(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetWeapon", "i", playerid);
- #else
- return ac_AntiCheatGetWeapon(playerid);
- #endif
- }
- stock AntiCheatGetVehicleSeat(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetVehicleSeat", "i", playerid);
- #else
- return ac_AntiCheatGetVehicleSeat(playerid);
- #endif
- }
- stock AntiCheatGetSpecialAction(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetSpecialAction", "i", playerid);
- #else
- return ac_AntiCheatGetSpecialAction(playerid);
- #endif
- }
- stock AntiCheatGetLastSpecialAction(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastSpecialActio", "i", playerid);
- #else
- return ac_AntiCheatGetLastSpecialActio(playerid);
- #endif
- }
- stock AntiCheatGetLastShotWeapon(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastShotWeapon", "i", playerid);
- #else
- return ac_AntiCheatGetLastShotWeapon(playerid);
- #endif
- }
- stock AntiCheatGetLastPickup(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastPickup", "i", playerid);
- #else
- return ac_AntiCheatGetLastPickup(playerid);
- #endif
- }
- stock AntiCheatGetLastUpdateTime(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastUpdateTime", "i", playerid);
- #else
- return ac_AntiCheatGetLastUpdateTime(playerid);
- #endif
- }
- stock AntiCheatGetLastReloadTime(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastReloadTime", "i", playerid);
- #else
- return ac_AntiCheatGetLastReloadTime(playerid);
- #endif
- }
- stock AntiCheatGetLastEnteredVehTime(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastEnteredVehTi", "i", playerid);
- #else
- return ac_AntiCheatGetLastEnteredVehTi(playerid);
- #endif
- }
- stock AntiCheatGetLastShotTime(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastShotTime", "i", playerid);
- #else
- return ac_AntiCheatGetLastShotTime(playerid);
- #endif
- }
- stock AntiCheatGetLastSpawnTime(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatGetLastSpawnTime", "i", playerid);
- #else
- return ac_AntiCheatGetLastSpawnTime(playerid);
- #endif
- }
- stock AntiCheatIntEnterExitsIsEnabled(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatIntEnterExitsIsEnab", "i", playerid);
- #else
- return ac_AntiCheatIntEnterExitsIsEnab(playerid);
- #endif
- }
- stock AntiCheatStuntBonusIsEnabled(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatStuntBonusIsEnabled", "i", playerid);
- #else
- return ac_AntiCheatStuntBonusIsEnabled(playerid);
- #endif
- }
- stock AntiCheatIsInModShop(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatIsInModShop", "i", playerid);
- #else
- return ac_AntiCheatIsInModShop(playerid);
- #endif
- }
- stock AntiCheatIsFrozen(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatIsFrozen", "i", playerid);
- #else
- return ac_AntiCheatIsFrozen(playerid);
- #endif
- }
- stock AntiCheatIsDead(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatIsDead", "i", playerid);
- #else
- return ac_AntiCheatIsDead(playerid);
- #endif
- }
- stock AntiCheatIsConnected(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- #if defined FILTERSCRIPT
- return CallRemoteFunction("ac_AntiCheatIsConnected", "i", playerid);
- #else
- return ac_AntiCheatIsConnected(playerid);
- #endif
- }
- #if defined _inc_y_hooks || defined _INC_y_hooks
- DEFINE_HOOK_REPLACEMENT(SirenState, Siren);
- #endif
- #if defined FILTERSCRIPT
- static stock fs_AntiCheatGetNextDialog(playerid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- return CallRemoteFunction("ac_AntiCheatGetNextDialog", "i", playerid);
- }
- static stock fs_AntiCheatSetDialog(playerid, dialogid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- return CallRemoteFunction("ac_ShowPlayerDialog", "ii", playerid, dialogid);
- }
- static stock fs_AntiCheatSetNextDialog(playerid, dialogid)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- return CallRemoteFunction("ac_fs_ShowPlayerDialog", "ii", playerid, dialogid);
- }
- #else
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnGameModeInit()
- #else
- public OnGameModeInit()
- #endif
- {
- if(ac_LoadCfg() == 0) printf(CFG_OPENING_ERROR, AC_CONFIG_FILE);
- if(ac_ACAllow[42])
- {
- #if !AC_USE_QUERY
- ac_QueryEnable = !!GetConsoleVarAsBool("query");
- SendRconCommand("query 0");
- #endif
- ac_RconEnable = !!GetConsoleVarAsBool("rcon");
- SendRconCommand("rcon 0");
- }
- #if AC_MAX_CONNECTS_FROM_IP > 1
- ac_ACAllow[37] = false;
- #endif
- ac_LagCompMode = !!GetConsoleVarAsInt("lagcompmode");
- print(" ");
- print("--------------------------------------");
- print(LOADED_MSG_1);
- printf(LOADED_MSG_2, NEX_AC_VERSION);
- print(LOADED_MSG_3);
- print("--------------------------------------\n");
- new ac_a = 1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnGameModeInit
- ac_a = ac_OnGameModeInit();
- #endif
- static ac_strtmp[10];
- GetConsoleVarAsString("version", ac_strtmp, sizeof ac_strtmp);
- if(strcmp(ac_strtmp, AC_SERVER_VERSION)) print(VERSION_WARNING);
- #undef AC_SERVER_VERSION
- return ac_a;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnGameModeInit
- #undef OnGameModeInit
- #else
- #define _ALS_OnGameModeInit
- #endif
- #define OnGameModeInit ac_OnGameModeInit
- #if defined ac_OnGameModeInit
- forward ac_OnGameModeInit();
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnGameModeExit()
- #else
- public OnGameModeExit()
- #endif
- {
- new ac_a = 1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnGameModeExit
- ac_a = ac_OnGameModeExit();
- #endif
- print(" ");
- print("--------------------------------------");
- print(STATS_STRING_1);
- print(STATS_STRING_2);
- printf(STATS_STRING_3, ac_sInfo[0]);
- printf(STATS_STRING_4, ac_sInfo[1]);
- printf(STATS_STRING_5, ac_sInfo[2]);
- printf(STATS_STRING_6, ac_sInfo[3]);
- printf(STATS_STRING_7, ac_sInfo[4]);
- printf(STATS_STRING_8, ac_sInfo[5]);
- print("--------------------------------------\n");
- return ac_a;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnGameModeExit
- #undef OnGameModeExit
- #else
- #define _ALS_OnGameModeExit
- #endif
- #define OnGameModeExit ac_OnGameModeExit
- #if defined ac_OnGameModeExit
- forward ac_OnGameModeExit();
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerConnect(playerid)
- #else
- public OnPlayerConnect(playerid)
- #endif
- {
- GetPlayerIp(playerid, ACInfo[playerid][acIp], 16);
- if(IsPlayerNPC(playerid))
- {
- if(ac_ACAllow[36] && strcmp(ACInfo[playerid][acIp], "127.0.0.1")) ac_KickWithCode(playerid, "", 0, 36);
- ACInfo[playerid][acTimerID] = -1;
- }
- else
- {
- if(ac_ACAllow[48] && ACInfo[playerid][acOnline]) ac_KickWithCode(playerid, "", 0, 48, 1);
- if(ac_ACAllow[41])
- {
- static ac_version[8];
- ac_version[0] = EOS;
- GetPlayerVersion(playerid, ac_version, sizeof ac_version);
- if(strcmp(ac_version, "unknown", true) == 0)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_2, playerid, ac_version);
- #endif
- ac_KickWithCode(playerid, "", 0, 41);
- }
- }
- new ac_i = AC_MAX_CONNECTS_FROM_IP;
- if(ac_ACAllow[40])
- {
- #if defined foreach
- foreach(new ac_f : Player)
- {
- if(IsPlayerNPC(ac_f) == 0 && ac_f != playerid &&
- strcmp(ACInfo[playerid][acIp], ACInfo[ac_f][acIp], false) == 0)
- #else
- for(new ac_f = GetPlayerPoolSize(); ac_f > -1; --ac_f)
- {
- if(IsPlayerConnected(ac_f) && IsPlayerNPC(ac_f) == 0 && ac_f != playerid &&
- strcmp(ACInfo[playerid][acIp], ACInfo[ac_f][acIp], false) == 0)
- #endif
- {
- ac_i--;
- if(ac_i == 0)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_3, playerid, AC_MAX_CONNECTS_FROM_IP);
- #endif
- #undef AC_MAX_CONNECTS_FROM_IP
- ac_KickWithCode(playerid, "", 0, 40);
- break;
- }
- }
- }
- }
- ACInfo[playerid][acSpec] =
- ACInfo[playerid][acDeathRes] = false;
- ACInfo[playerid][acDead] = true;
- ACInfo[playerid][acIntEnterExits] = ac_IntEnterExits;
- ACInfo[playerid][acStuntBonus] = ac_StuntBonus;
- ACInfo[playerid][acCheatCount][0] =
- ACInfo[playerid][acLastWeapon] =
- ACInfo[playerid][acSpawnRes] =
- ACInfo[playerid][acSet][14] =
- ACInfo[playerid][acKicked] =
- ACInfo[playerid][acMoney] = 0;
- ACInfo[playerid][acSet][13] =
- ACInfo[playerid][acSet][12] =
- ACInfo[playerid][acSet][10] =
- ACInfo[playerid][acSet][0] =
- ACInfo[playerid][acNextDialog] =
- ACInfo[playerid][acDialog] = -1;
- ACInfo[playerid][acAnim] = -2;
- for(ac_i = 12; ac_i > -1; --ac_i)
- {
- ACInfo[playerid][acSetWeapon][ac_i] = -1;
- ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
- }
- for(ac_i = 27; ac_i > -1; --ac_i) ACInfo[playerid][acFloodCount][ac_i] = 0;
- ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] = ACInfo[playerid][acDropJpZ] = 20000.0;
- memcpy(ACInfo[playerid][acACAllow], ac_ACAllow, 0, sizeof(ac_ACAllow) * 4, sizeof ac_ACAllow);
- ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
- }
- ACInfo[playerid][acOnline] = true;
- ACInfo[playerid][acLogged] = false;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerConnect
- return ac_OnPlayerConnect(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerConnect
- #undef OnPlayerConnect
- #else
- #define _ALS_OnPlayerConnect
- #endif
- #define OnPlayerConnect ac_OnPlayerConnect
- #if defined ac_OnPlayerConnect
- forward ac_OnPlayerConnect(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerDisconnect(playerid, reason)
- #else
- public OnPlayerDisconnect(playerid, reason)
- #endif
- {
- if(ACInfo[playerid][acOnline])
- {
- ACInfo[playerid][acOnline] = false;
- if(IsPlayerNPC(playerid) == 0)
- {
- KillTimer(ACInfo[playerid][acTimerID]);
- if(ACInfo[playerid][acACAllow][37]) BlockIpAddress(ACInfo[playerid][acIp],
- (AC_MIN_TIME_RECONNECT * 1000) - (reason > 0 ? 0 : GetConsoleVarAsInt("playertimeout")));
- #undef AC_MIN_TIME_RECONNECT
- }
- if(ACInfo[playerid][acLastVeh] > 0 &&
- ACVehInfo[ACInfo[playerid][acLastVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acLastVeh]][acDriver] = 65535;
- if(ACInfo[playerid][acVeh] > 0 && ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid)
- {
- ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = 65535;
- if(ACInfo[playerid][acKicked] == 2)
- {
- LinkVehicleToInterior(ACInfo[playerid][acVeh], ACVehInfo[ACInfo[playerid][acVeh]][acInt]);
- SetVehicleZAngle(ACInfo[playerid][acVeh], ACVehInfo[ACInfo[playerid][acVeh]][acZAngle]);
- SetVehiclePos(ACInfo[playerid][acVeh], ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
- SetVehicleHealth(ACInfo[playerid][acVeh], ACVehInfo[ACInfo[playerid][acVeh]][acHealth]);
- ChangeVehiclePaintjob(ACInfo[playerid][acVeh], ACVehInfo[ACInfo[playerid][acVeh]][acPaintJob]);
- }
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerDisconnect
- return ac_OnPlayerDisconnect(playerid, reason);
- #endif
- }
- return 1;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerDisconnect
- #undef OnPlayerDisconnect
- #else
- #define _ALS_OnPlayerDisconnect
- #endif
- #define OnPlayerDisconnect ac_OnPlayerDisconnect
- #if defined ac_OnPlayerDisconnect
- forward ac_OnPlayerDisconnect(playerid, reason);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerSpawn(playerid)
- #else
- public OnPlayerSpawn(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- if(IsPlayerNPC(playerid) == 0)
- {
- new ac_i;
- if(ACInfo[playerid][acSpec]) ACInfo[playerid][acSpec] = false;
- else
- {
- ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][27] &&
- (ACInfo[playerid][acSpawnRes] < 1 || ac_i < ACInfo[playerid][acSpawnTime] + 1000))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Spawn res: %d, Respawn time: %d",
- ACInfo[playerid][acSpawnRes], ac_i - ACInfo[playerid][acSpawnTime]);
- #endif
- ac_KickWithCode(playerid, "", 0, 27);
- #if defined OnCheatDetected
- ACInfo[playerid][acSpawnRes] = 1;
- #endif
- }
- ACInfo[playerid][acSpawnRes]--;
- }
- for(ac_i = 11; ac_i > 0; --ac_i) ACInfo[playerid][acSet][ac_i] = -1;
- for(ac_i = 12; ac_i > -1; --ac_i)
- {
- ACInfo[playerid][acWeapon][ac_i] = ACInfo[playerid][acAmmo][ac_i] = 0;
- ACInfo[playerid][acSetWeapon][ac_i] = -1;
- ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
- }
- ACInfo[playerid][acParachute] =
- ACInfo[playerid][acModShop] =
- ACInfo[playerid][acPicked] =
- ACInfo[playerid][acTpToZ] =
- ACInfo[playerid][acDead] = false;
- ACInfo[playerid][acFreeze] = true;
- ACInfo[playerid][acNextSpecAct] =
- ACInfo[playerid][acLastPickup] =
- ACInfo[playerid][acSeat] = -1;
- ACInfo[playerid][acCheatCount][14] =
- ACInfo[playerid][acCheatCount][9] =
- ACInfo[playerid][acLastSpecAct] =
- ACInfo[playerid][acLastShot] =
- ACInfo[playerid][acLastVeh] =
- ACInfo[playerid][acSpecAct] =
- ACInfo[playerid][acDmgRes] =
- ACInfo[playerid][acVeh] = 0;
- ACInfo[playerid][acSpeed] = 0.0;
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 0.0);
- if(ACInfo[playerid][acSpawnWeapon1] != -1)
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ACInfo[playerid][acSpawnWeapon1]]] = ACInfo[playerid][acSpawnWeapon1];
- ACInfo[playerid][acAmmo][ac_wSlot[ACInfo[playerid][acSpawnWeapon1]]] = ACInfo[playerid][acSpawnAmmo1];
- }
- if(ACInfo[playerid][acSpawnWeapon2] != -1)
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ACInfo[playerid][acSpawnWeapon2]]] = ACInfo[playerid][acSpawnWeapon2];
- ACInfo[playerid][acAmmo][ac_wSlot[ACInfo[playerid][acSpawnWeapon2]]] = ACInfo[playerid][acSpawnAmmo2];
- }
- if(ACInfo[playerid][acSpawnWeapon3] != -1)
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ACInfo[playerid][acSpawnWeapon3]]] = ACInfo[playerid][acSpawnWeapon3];
- ACInfo[playerid][acAmmo][ac_wSlot[ACInfo[playerid][acSpawnWeapon3]]] = ACInfo[playerid][acSpawnAmmo3];
- }
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerSpawn
- return ac_OnPlayerSpawn(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerSpawn
- #undef OnPlayerSpawn
- #else
- #define _ALS_OnPlayerSpawn
- #endif
- #define OnPlayerSpawn ac_OnPlayerSpawn
- #if defined ac_OnPlayerSpawn
- forward ac_OnPlayerSpawn(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerDeath(playerid, killerid, reason)
- #else
- public OnPlayerDeath(playerid, killerid, reason)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- if(ACInfo[playerid][acACAllow][28] &&
- (ACInfo[playerid][acDead] || ACInfo[playerid][acDeathRes] == false &&
- reason != 255 && (reason != 54 || killerid != 65535)))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Is dead: %d, Death res: %d, killerid: %d, reason: %d",
- ACInfo[playerid][acDead], ACInfo[playerid][acDeathRes], killerid, reason);
- #endif
- ac_KickWithCode(playerid, "", 0, 28);
- }
- ACInfo[playerid][acDeathRes] = false;
- ACInfo[playerid][acSet][0] = -1;
- ACInfo[playerid][acDead] = true;
- ACInfo[playerid][acSpawnRes] = 1;
- ACInfo[playerid][acSpawnTime] = GetTickCount();
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerDeath
- return ac_OnPlayerDeath(playerid, killerid, reason);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerDeath
- #undef OnPlayerDeath
- #else
- #define _ALS_OnPlayerDeath
- #endif
- #define OnPlayerDeath ac_OnPlayerDeath
- #if defined ac_OnPlayerDeath
- forward ac_OnPlayerDeath(playerid, killerid, reason);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
- #else
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 1;
- ACInfo[playerid][acDeathRes] = true;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerTakeDamage
- return ac_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerTakeDamage
- #undef OnPlayerTakeDamage
- #else
- #define _ALS_OnPlayerTakeDamage
- #endif
- #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
- #if defined ac_OnPlayerTakeDamage
- forward ac_OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart);
- #endif
- #endif
- #endif
- #if defined FILTERSCRIPT
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- #else
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- #endif
- {
- new ac_nd = fs_AntiCheatGetNextDialog(playerid);
- if(dialogid != AntiCheatGetDialog(playerid) && dialogid == ac_nd) fs_AntiCheatSetDialog(playerid, ac_nd);
- fs_AntiCheatSetNextDialog(playerid, -1);
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_fs_OnDialogResponse
- return ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnDialogResponse
- #undef OnDialogResponse
- #else
- #define _ALS_OnDialogResponse
- #endif
- #define OnDialogResponse ac_fs_OnDialogResponse
- #if defined ac_fs_OnDialogResponse
- forward ac_fs_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
- #endif
- #endif
- #else
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- #else
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 1;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][0] + ac_Mtfc[0][0]) ac_FloodDetect(playerid, 0);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][0] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- if(ACInfo[playerid][acACAllow][39] && dialogid != ACInfo[playerid][acDialog])
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC dialog: %d, dialogid: %d", ACInfo[playerid][acDialog], dialogid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 39);
- #else
- ac_KickWithCode(playerid, "", 0, 39);
- return 1;
- #endif
- }
- ACInfo[playerid][acDialog] = -1;
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][0] = ac_i;
- if(ACInfo[playerid][acACAllow][45])
- {
- for(ac_i = strlen(inputtext) - 1; ac_i > -1; --ac_i)
- {
- if(inputtext[ac_i] == '%') strdel(inputtext, ac_i, ac_i + 1);
- }
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnDialogResponse
- return ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnDialogResponse
- #undef OnDialogResponse
- #else
- #define _ALS_OnDialogResponse
- #endif
- #define OnDialogResponse ac_OnDialogResponse
- #if defined ac_OnDialogResponse
- forward ac_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnEnterExitModShop(playerid, enterexit, interiorid)
- #else
- public OnEnterExitModShop(playerid, enterexit, interiorid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- #if !AC_USE_TUNING_GARAGES && !defined OnCheatDetected
- return ac_KickWithCode(playerid, "", 0, 23, 1);
- #else
- #if !AC_USE_TUNING_GARAGES
- ac_KickWithCode(playerid, "", 0, 23, 1);
- #endif
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acSet][0] = interiorid;
- ACInfo[playerid][acModShop] = !!enterexit;
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_i;
- ACInfo[playerid][acGtc][11] = ac_i + 1500;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnEnterExitModShop
- return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
- #else
- return 1;
- #endif
- #endif
- #undef AC_USE_TUNING_GARAGES
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnEnterExitModShop
- #undef OnEnterExitModShop
- #else
- #define _ALS_OnEnterExitModShop
- #endif
- #define OnEnterExitModShop ac_OnEnterExitModShop
- #if defined ac_OnEnterExitModShop
- forward ac_OnEnterExitModShop(playerid, enterexit, interiorid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- #else
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- new ac_vehid = GetPlayerVehicleID(playerid);
- if(newinteriorid != ACInfo[playerid][acSet][0])
- {
- if(ac_vehid > 0)
- {
- if(ACInfo[playerid][acACAllow][3])
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC interior: %d, newinteriorid: %d, vehicleid: %d",
- ACInfo[playerid][acSet][0], newinteriorid, ac_vehid);
- #endif
- ac_KickWithCode(playerid, "", 0, 3, 1);
- }
- }
- else if(ACInfo[playerid][acIntEnterExits])
- {
- GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
- ACInfo[playerid][acGtc][11] = GetTickCount() + 1500;
- }
- else if(ACInfo[playerid][acACAllow][2] && newinteriorid != ACInfo[playerid][acSet][12])
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC interior: %d, AC next interior: %d, newinteriorid: %d",
- ACInfo[playerid][acSet][0], ACInfo[playerid][acSet][12], newinteriorid);
- #endif
- ac_KickWithCode(playerid, "", 0, 2, 1);
- }
- }
- if(ACInfo[playerid][acKicked] == 0 && ac_vehid > 0) ACVehInfo[ac_vehid][acInt] = newinteriorid;
- if(ACInfo[playerid][acSet][12] == -1) ACInfo[playerid][acSet][0] = -1;
- else ACInfo[playerid][acSet][12] = -1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerInteriorChange
- return ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerInteriorChange
- #undef OnPlayerInteriorChange
- #else
- #define _ALS_OnPlayerInteriorChange
- #endif
- #define OnPlayerInteriorChange ac_OnPlayerInteriorChange
- #if defined ac_OnPlayerInteriorChange
- forward ac_OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnRconLoginAttempt(ip[], password[], success)
- #else
- public OnRconLoginAttempt(ip[], password[], success)
- #endif
- {
- if(ac_ACAllow[42])
- {
- static ac_iptables[MAX_PLAYERS][2], ac_ip_index;
- new ac_i, ac_current_ip = ac_IpToInt(ip);
- for(; ac_i < ac_ip_index && ac_i < sizeof ac_iptables; ++ac_i)
- {
- if(ac_iptables[ac_i][0] == ac_current_ip)
- {
- if(success) ac_iptables[ac_i][1] = 0;
- else if(++ac_iptables[ac_i][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_4, ip, password);
- #endif
- ac_iptables[ac_i][1] = 0;
- ac_KickWithCode(65535, ip, 1, 42, 1);
- }
- ac_i = -1;
- break;
- }
- }
- if(ac_i != -1 && success == 0)
- {
- ac_iptables[ac_ip_index][0] = ac_current_ip;
- if(++ac_iptables[ac_ip_index][1] > AC_MAX_RCON_LOGIN_ATTEMPT)
- {
- #undef AC_MAX_RCON_LOGIN_ATTEMPT
- #if defined DEBUG
- printf(DEBUG_CODE_4, ip, password, ac_iptables[ac_ip_index][1]);
- #endif
- ac_iptables[ac_ip_index][1] = 0;
- ac_KickWithCode(65535, ip, 1, 42, 2);
- }
- if(++ac_ip_index >= sizeof ac_iptables) ac_ip_index = 0;
- ac_iptables[ac_ip_index][1] = 0;
- }
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnRconLoginAttempt
- return ac_OnRconLoginAttempt(ip, password, success);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnRconLoginAttempt
- #undef OnRconLoginAttempt
- #else
- #define _ALS_OnRconLoginAttempt
- #endif
- #define OnRconLoginAttempt ac_OnRconLoginAttempt
- #if defined ac_OnRconLoginAttempt
- forward ac_OnRconLoginAttempt(ip[], password[], success);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerUpdate(playerid)
- #else
- public OnPlayerUpdate(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- static ac_gtc, ac_gpp, bool:ac_ur;
- ac_ur = false;
- ac_gtc = GetTickCount();
- if(IsPlayerNPC(playerid) == 0)
- {
- static ac_stateanim;
- if((ac_stateanim = GetPlayerState(playerid)) != 9)
- {
- ac_gpp = GetPlayerPing(playerid) + 150;
- static ac_w, ac_a;
- ac_a = GetPlayerAmmo(playerid);
- ac_w = GetPlayerWeapon(playerid);
- if(ACInfo[playerid][acSet][3] != -1)
- {
- if(ACInfo[playerid][acSet][3] == ac_w)
- {
- ACInfo[playerid][acSet][3] =
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_w]] = -1;
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- }
- else if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ACInfo[playerid][acSet][3]]] == 0) ACInfo[playerid][acSet][3] = -1;
- else if(ACInfo[playerid][acACAllow][52] &&
- !(2 <= ac_stateanim <= 3) && ac_gtc > ACInfo[playerid][acGtc][2] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "GivePlayerWeapon");
- printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSet][3], ac_w);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 1);
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_w]] = ACInfo[playerid][acSet][3] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 1);
- #endif
- }
- }
- if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_w]] != -65535)
- {
- if(ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_w]] >= ac_a)
- {
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_w]] = -65535;
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_a;
- }
- else if(ACInfo[playerid][acACAllow][52] &&
- ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_wSlot[ac_w]] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
- printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_w]], ac_a, ac_w);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 2);
- ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_w]] = -65535;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 2);
- #endif
- }
- }
- static ac_m;
- ac_m = bad_GetPlayerMoney(playerid);
- if(ACInfo[playerid][acSet][10] != -1)
- {
- if(ac_m < ACInfo[playerid][acMoney] &&
- ACInfo[playerid][acSet][10] <= (ACInfo[playerid][acMoney] - ac_m)) ACInfo[playerid][acSet][10] = -1;
- else if(ACInfo[playerid][acACAllow][15] && ac_gtc > ACInfo[playerid][acGtc][15] + ac_gpp &&
- ++ACInfo[playerid][acCheatCount][10] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Money: %d, old money: %d, price: %d",
- ac_m, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][10]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 15, 3);
- ACInfo[playerid][acSet][10] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 15, 3);
- #endif
- }
- }
- static ac_i;
- ac_i = GetPlayerInterior(playerid);
- if(ACInfo[playerid][acLastWeapon] != ac_w)
- {
- if(ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] != ac_w)
- {
- if(ac_w == 40 || ac_w == 46 && ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute])
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_a;
- }
- #if AC_USE_AMMUNATIONS
- else if(22 <= ac_w <= 32 && ac_InAmmuNation(playerid, ac_i))
- {
- if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0];
- else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0];
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_AmmuNationInfo[ac_w - 22][1];
- ACInfo[playerid][acCheatCount][10] = 0;
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- ac_ur = true;
- }
- #endif
- else if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
- ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
- ac_a <= (3 <= ac_wSlot[ac_w] <= 5 ? ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
- ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_a;
- }
- else if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acWeapon] == ac_w &&
- ac_a <= (3 <= ac_wSlot[ac_w] <= 5 ? ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosX],
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosY],
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosZ]))
- {
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_a;
- }
- else if(ACInfo[playerid][acACAllow][15] &&
- ACInfo[playerid][acSetWeapon][ac_wSlot[ac_w]] == -1 && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, ammo: %d", ac_w, ac_a);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 15, 1);
- ACInfo[playerid][acWeapon][ac_wSlot[ac_w]] = ac_w;
- #else
- return ac_KickWithCode(playerid, "", 0, 15, 1);
- #endif
- }
- }
- }
- else if(ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] != ac_a)
- {
- switch(ac_w)
- {
- case 16..18, 35, 36, 39, 43:
- {
- if(ac_stateanim != 2)
- {
- if(ACInfo[playerid][acACAllow][16] &&
- ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp && (ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] == 0 ||
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] - 1 != ac_a))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]], ac_a, ac_w);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 16, 1);
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]] = ac_a;
- #else
- return ac_KickWithCode(playerid, "", 0, 16, 1);
- #endif
- }
- ACInfo[playerid][acAmmo][ac_wSlot[ac_w]]--;
- }
- }
- }
- }
- static Float:ac_tmp, ac_hp;
- GetPlayerHealth(playerid, ac_tmp);
- ac_hp = floatround(ac_tmp, floatround_tozero);
- if(ACInfo[playerid][acSet][1] != -1)
- {
- if(ACInfo[playerid][acSet][1] > 255)
- {
- while(ac_hp < ACInfo[playerid][acSet][1]) ac_hp += 256;
- }
- if(ACInfo[playerid][acSet][1] == ac_hp || ACInfo[playerid][acDmgRes] ||
- ACInfo[playerid][acSet][1] >= ac_hp && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp)
- {
- ACInfo[playerid][acSet][1] = -1;
- ACInfo[playerid][acDmgRes] = 0;
- }
- else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][3] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][3] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerHealth");
- printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acSet][1], ac_hp);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 3);
- ACInfo[playerid][acSet][1] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 3);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][12])
- {
- while(ACInfo[playerid][acHealth] > ac_hp + 255) ac_hp += 256;
- if(ac_hp > ACInfo[playerid][acHealth])
- {
- #if AC_USE_RESTAURANTS
- if(ac_hp > ACInfo[playerid][acHealth] + 70 || ac_InRestaurant(playerid, ac_i) == 0)
- {
- #endif
- #if AC_USE_VENDING_MACHINES
- if(ac_hp > ACInfo[playerid][acHealth] + 35 || ac_NearVendingMachine(playerid, ac_i) == 0)
- {
- #endif
- #if defined DEBUG
- printf("[Nex-AC debug] AC health: %d, health: %d", ACInfo[playerid][acHealth], ac_hp);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 12);
- #else
- return ac_KickWithCode(playerid, "", 0, 12);
- #endif
- #if AC_USE_VENDING_MACHINES
- }
- #endif
- #if AC_USE_RESTAURANTS
- }
- #endif
- }
- }
- static ac_ar;
- GetPlayerArmour(playerid, ac_tmp);
- ac_ar = floatround(ac_tmp, floatround_tozero);
- if(ACInfo[playerid][acSet][2] != -1)
- {
- if(ACInfo[playerid][acSet][2] > 255)
- {
- while(ac_ar < ACInfo[playerid][acSet][2]) ac_ar += 256;
- }
- if(ACInfo[playerid][acSet][2] == ac_ar || ACInfo[playerid][acDmgRes] ||
- ACInfo[playerid][acSet][2] >= ac_ar && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp)
- {
- ACInfo[playerid][acSet][2] = -1;
- ACInfo[playerid][acDmgRes] = 0;
- }
- else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][5] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][5] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerArmour");
- printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acSet][2], ac_ar);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 4);
- ACInfo[playerid][acSet][2] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 4);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][13])
- {
- while(ACInfo[playerid][acArmour] > ac_ar + 255) ac_ar += 256;
- if(ac_ar > ACInfo[playerid][acArmour])
- {
- #if AC_USE_AMMUNATIONS
- if(ac_InAmmuNation(playerid, ac_i))
- {
- if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += 200;
- else ACInfo[playerid][acSet][10] = 200;
- ACInfo[playerid][acCheatCount][10] = 0;
- ac_ur = true;
- }
- else
- {
- #endif
- #if defined DEBUG
- printf("[Nex-AC debug] AC armour: %d, armour: %d", ACInfo[playerid][acArmour], ac_ar);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 13);
- #else
- return ac_KickWithCode(playerid, "", 0, 13);
- #endif
- #if AC_USE_AMMUNATIONS
- }
- #endif
- }
- }
- if(ACInfo[playerid][acACAllow][19])
- {
- if(ac_hp < ACInfo[playerid][acHealth] || ac_ar < ACInfo[playerid][acArmour])
- {
- ACInfo[playerid][acVehDmgRes] = false;
- ACInfo[playerid][acCheatCount][9] =
- ACInfo[playerid][acDmgRes] = 0;
- }
- else if(ACInfo[playerid][acDmgRes] && ac_gtc > ACInfo[playerid][acGtc][14] + ac_gpp)
- {
- ACInfo[playerid][acDmgRes] = 0;
- ACInfo[playerid][acVehDmgRes] = false;
- if(++ACInfo[playerid][acCheatCount][9] > AC_MAX_GODMODE_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC health: %d, health: %d, AC armour: %d, armour: %d",
- ACInfo[playerid][acHealth], ac_hp, ACInfo[playerid][acArmour], ac_ar);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 19);
- ACInfo[playerid][acCheatCount][9] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 19);
- #endif
- }
- }
- }
- static ac_vehid;
- ac_vehid = GetPlayerVehicleID(playerid);
- if(ACInfo[playerid][acACAllow][14] && ac_m > ACInfo[playerid][acMoney] &&
- !(ACInfo[playerid][acStuntBonus] && ac_vehid))
- {
- #if AC_USE_CASINOS
- if(ac_InCasino(playerid, ac_i) == 0)
- {
- #endif
- #if defined DEBUG
- printf("[Nex-AC debug] AC money: %d, money: %d, Stunt Bonus: %d, vehicleid: %d",
- ACInfo[playerid][acMoney], ac_m, ACInfo[playerid][acStuntBonus], ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 14);
- ACInfo[playerid][acMoney] = ac_m;
- #else
- ac_m = ACInfo[playerid][acMoney];
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, ac_m);
- #endif
- #if AC_USE_CASINOS
- }
- #endif
- }
- if(ACInfo[playerid][acSet][13] != -1)
- {
- if(ac_m < ACInfo[playerid][acMoney] && ACInfo[playerid][acSet][13] <=
- (ACInfo[playerid][acMoney] - ac_m)) ACInfo[playerid][acSet][13] = -1;
- else if(ACInfo[playerid][acACAllow][23] && ac_gtc > ACInfo[playerid][acGtc][17] + ac_gpp &&
- ++ACInfo[playerid][acCheatCount][12] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Money: %d, old money: %d, component price: %d",
- ac_m, ACInfo[playerid][acMoney], ACInfo[playerid][acSet][13]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 23, 3);
- ACInfo[playerid][acSet][13] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 23, 3);
- #endif
- }
- }
- if(ACInfo[playerid][acACAllow][52])
- {
- if(ACInfo[playerid][acSet][0] != -1 && ACInfo[playerid][acSet][0] != ac_i &&
- ac_gtc > ACInfo[playerid][acGtc][0] + ac_gpp && ++ACInfo[playerid][acNOPCount][2] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerInterior");
- printf("[Nex-AC debug] AC interior: %d, interiorid: %d", ACInfo[playerid][acSet][0], ac_i);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 5);
- ACInfo[playerid][acSet][0] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 5);
- #endif
- }
- if(ACInfo[playerid][acSet][6] != -1 && ac_gtc > ACInfo[playerid][acGtc][12] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][8] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "TogglePlayerSpectating");
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 6);
- ACInfo[playerid][acSet][6] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 6);
- #endif
- }
- if(ACInfo[playerid][acSet][7] != -1 && ac_gtc > ACInfo[playerid][acGtc][13] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][9] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SpawnPlayer");
- printf("[Nex-AC debug] acSet[7]: %d", ACInfo[playerid][acSet][7]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 7);
- ACInfo[playerid][acSet][7] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 7);
- #endif
- }
- if(ACInfo[playerid][acSet][11] != -1 && ac_vehid > 0 && ac_gtc > ACInfo[playerid][acGtc][8] + ac_gpp)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "RemovePlayerFromVehicle");
- printf("[Nex-AC debug] Veh model: %d", GetVehicleModel(ac_vehid));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 8);
- ACInfo[playerid][acSet][11] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 8);
- #endif
- }
- }
- static ac_s, Float:ac_X, Float:ac_Y, Float:ac_Z;
- ac_s = GetPlayerVehicleSeat(playerid);
- GetPlayerPos(playerid, ac_X, ac_Y, ac_Z);
- if(ACInfo[playerid][acSet][9] != -1)
- {
- if(ACInfo[playerid][acSet][9] == ac_vehid && (ACInfo[playerid][acSet][5] == ac_s || ACInfo[playerid][acSet][5] == -1))
- {
- if(ACInfo[playerid][acVeh] > 0 &&
- ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = 65535;
- if(ac_s == 0)
- {
- ACVehInfo[ac_vehid][acDriver] = playerid;
- GetVehicleZAngle(ac_vehid, ACVehInfo[ac_vehid][acZAngle]);
- ACInfo[playerid][acSetVehHealth] = -1;
- }
- ACInfo[playerid][acCheatCount][11] = 0;
- ACInfo[playerid][acVehDmgRes] = false;
- ACInfo[playerid][acSet][11] =
- ACInfo[playerid][acSet][9] =
- ACInfo[playerid][acSet][8] =
- ACInfo[playerid][acSet][5] = -1;
- ACInfo[playerid][acSeat] = ac_s;
- }
- else if(GetVehicleModel(ACInfo[playerid][acSet][9]) == 0 ||
- ACVehInfo[ACInfo[playerid][acSet][9]][acSpawned] == false || ACInfo[playerid][acSet][5] == -1)
- {
- ACInfo[playerid][acSet][9] =
- ACInfo[playerid][acSet][5] = -1;
- }
- else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][1] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][7] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "PutPlayerInVehicle");
- printf("[Nex-AC debug] AC vehicle: %d, vehicleid: %d, AC seat: %d, seatid: %d",
- ACInfo[playerid][acSet][9], ac_vehid, ACInfo[playerid][acSet][5], ac_s);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 9);
- ACInfo[playerid][acSet][9] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 9);
- #endif
- }
- }
- else
- {
- if(ACInfo[playerid][acSet][8] != -1)
- {
- if(IsPlayerInRangeOfPoint(playerid, 8.0, ACInfo[playerid][acSetPosX],
- ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ])))
- {
- ACInfo[playerid][acSet][8] = -1;
- ACInfo[playerid][acTpToZ] = false;
- ACInfo[playerid][acPosX] = ac_X;
- ACInfo[playerid][acPosY] = ac_Y;
- ACInfo[playerid][acPosZ] = ac_Z;
- }
- else if(ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
- {
- if(ACInfo[playerid][acACAllow][52] && ++ACInfo[playerid][acNOPCount][10] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerPos");
- printf("[Nex-AC debug] Distance: %f, acSet[8]: %d", GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acSetPosX],
- ACInfo[playerid][acSetPosY], (ACInfo[playerid][acTpToZ] ? ac_Z : ACInfo[playerid][acSetPosZ])), ACInfo[playerid][acSet][8]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 10);
- ACInfo[playerid][acSet][8] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 10);
- #endif
- }
- ACInfo[playerid][acTpToZ] = false;
- }
- }
- static Float:ac_vX, Float:ac_vY, Float:ac_vZ, Float:ac_vctsize, ac_specact;
- ac_vctsize = GetPlayerDistanceFromPoint(playerid, ACInfo[playerid][acPosX],
- ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
- ac_specact = GetPlayerSpecialAction(playerid);
- if(ac_vehid > 0)
- {
- if(ACInfo[playerid][acVeh] == 0)
- {
- if(ACInfo[playerid][acACAllow][4] &&
- (ACInfo[playerid][acEnterVeh] != ac_vehid || ac_gtc < ACInfo[playerid][acEnterVehTime] + 600))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Entered vehicle: %d, vehicleid: %d, Enter time: %d",
- ACInfo[playerid][acEnterVeh], ac_vehid, ac_gtc - ACInfo[playerid][acEnterVehTime]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 4, 1);
- #else
- return ac_KickWithCode(playerid, "", 0, 4, 1);
- #endif
- }
- }
- else if(ACInfo[playerid][acVeh] != ac_vehid)
- {
- if(ACInfo[playerid][acACAllow][4])
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC vehicle: %d, vehicleid: %d", ACInfo[playerid][acVeh], ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 4, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 4, 2);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][50] && ACInfo[playerid][acSeat] != ac_s)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC seat: %d, seatid: %d, vehicleid: %d", ACInfo[playerid][acSeat], ac_s, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 50);
- #else
- return ac_KickWithCode(playerid, "", 0, 50);
- #endif
- }
- if(ac_stateanim == 2)
- {
- if(ACInfo[playerid][acACAllow][32] &&
- ACVehInfo[ac_vehid][acDriver] != 65535 && ACVehInfo[ac_vehid][acDriver] != playerid)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC driver: %d, driver: %d, vehicleid: %d",
- ACVehInfo[ac_vehid][acDriver], playerid, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 32);
- #else
- return ClearAnimations(playerid, 1);
- #endif
- }
- if(ACInfo[playerid][acACAllow][35] && GetPlayerCameraMode(playerid) == 55)
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 35);
- #else
- return ac_KickWithCode(playerid, "", 0, 35);
- #endif
- }
- static Float:ac_vhealth;
- GetVehicleHealth(ac_vehid, ac_vhealth);
- if(ACInfo[playerid][acSetVehHealth] != -1)
- {
- if(ACInfo[playerid][acSetVehHealth] == ac_vhealth ||
- ACInfo[playerid][acSetVehHealth] >= ac_vhealth && ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp)
- {
- ACInfo[playerid][acSetVehHealth] = -1;
- ACInfo[playerid][acVehDmgRes] = false;
- }
- else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][4] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][4] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetVehicleHealth");
- printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d",
- ACInfo[playerid][acSetVehHealth], ac_vhealth, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 11);
- ACInfo[playerid][acSetVehHealth] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 11);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][11] &&
- ac_vhealth > ACVehInfo[ac_vehid][acHealth] && ACInfo[playerid][acModShop] == false)
- {
- #if AC_USE_PAYNSPRAY
- if(ac_InPayNSpray(playerid, ac_i) == 0)
- {
- #endif
- #if defined DEBUG
- printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d",
- ACVehInfo[ac_vehid][acHealth], ac_vhealth, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 11);
- #endif
- SetVehicleHealth(ac_vehid, ACVehInfo[ac_vehid][acHealth]);
- #if AC_USE_PAYNSPRAY
- }
- #endif
- }
- if(ACInfo[playerid][acACAllow][20] && ACInfo[playerid][acVehDmgRes])
- {
- if(ac_vhealth < ACVehInfo[ac_vehid][acHealth])
- {
- ACInfo[playerid][acVehDmgRes] = false;
- ACInfo[playerid][acCheatCount][11] =
- ACInfo[playerid][acDmgRes] = 0;
- }
- else if(ac_gtc > ACInfo[playerid][acGtc][16] + ac_gpp)
- {
- ACInfo[playerid][acDmgRes] = 0;
- ACInfo[playerid][acVehDmgRes] = false;
- if(++ACInfo[playerid][acCheatCount][11] > AC_MAX_GODMODE_VEH_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC veh health: %f, veh health: %f, vehicleid: %d",
- ACVehInfo[ac_vehid][acHealth], ac_vhealth, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 20);
- ACInfo[playerid][acCheatCount][11] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 20);
- #endif
- }
- }
- }
- static Float:ac_zangle;
- GetVehicleZAngle(ac_vehid, ac_zangle);
- ac_zangle = floatround(ac_zangle, floatround_floor) % 360 + floatfract(ac_zangle);
- GetVehicleVelocity(ac_vehid, ac_vX, ac_vY, ac_vZ);
- if(ac_gtc > ACInfo[playerid][acGtc][9] + ac_gpp)
- {
- static Float:ac_vsp, Float:ac_spdiff;
- ac_i = GetVehicleModel(ac_vehid) - 417;
- ac_vsp = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
- ac_spdiff = ac_vsp - ac_GetSpeed(ACVehInfo[ac_vehid][acVelX], ACVehInfo[ac_vehid][acVelY], ACVehInfo[ac_vehid][acVelZ]);
- if(ACInfo[playerid][acACAllow][10] && ac_spdiff >= 20.0 && !((ac_i == 32 || 120 <= ac_i <= 121) && ac_spdiff < 65.0) &&
- ACVehInfo[ac_vehid][acSpeedDiff] <= ac_spdiff &&
- (64 <= ac_i <= 93 && ac_vType[ac_i] != 4 || floatabs(ac_vX) > 0.3 || floatabs(ac_vY) > 0.3 || floatabs(ac_vZ) > 0.3) &&
- ACVehInfo[ac_vehid][acHealth] == ac_vhealth && ACVehInfo[ac_vehid][acHealth] > 220.0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, old speed: %.1f, veh model: %d",
- ac_vsp, ac_vsp - ac_spdiff, ac_i + 417);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 10, 1);
- #else
- return ac_KickWithCode(playerid, "", 0, 10, 1);
- #endif
- }
- if(ACInfo[playerid][acACAllow][25] && ac_vsp > 15.0 && floatabs(ac_spdiff) < 25.0 &&
- floatround(floatabs(ac_zangle - ACVehInfo[ac_vehid][acZAngle])) == 180 && (ac_vX < 0.0) !=
- (ACVehInfo[ac_vehid][acVelX] < 0.0) && (ac_vY < 0.0) != (ACVehInfo[ac_vehid][acVelY] < 0.0) &&
- (ac_vZ < 0.0) != (ACVehInfo[ac_vehid][acVelZ] < 0.0))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, speed diff: %.1f, z angle: %f, old z angle: %f, vehicleid: %d",
- ac_vsp, ac_spdiff, ac_zangle, ACVehInfo[ac_vehid][acZAngle], ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 25);
- #else
- return ac_KickWithCode(playerid, "", 0, 25);
- #endif
- }
- static Float:ac_zdiff;
- ac_zdiff = ac_Z - ACInfo[playerid][acPosZ];
- if(0 <= ac_i <= 176 && 1 <= ac_vType[ac_i] <= 2)
- {
- if(ACInfo[playerid][acACAllow][10] && ac_GetSpeed(ac_vX, ac_vY, ac_vZ, false) > 270)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed (x, y): %d, veh model: %d",
- ac_GetSpeed(ac_vX, ac_vY, ac_vZ, false), ac_i + 417);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 10, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 10, 2);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][8])
- {
- if(ac_vZ >= 0.1 && ac_vZ > ACVehInfo[ac_vehid][acVelZ] &&
- floatabs(ACInfo[playerid][acPosX] - ac_X) < ac_zdiff &&
- floatabs(ACInfo[playerid][acPosY] - ac_Y) < ac_zdiff)
- {
- if(++ACInfo[playerid][acCheatCount][3] > (64 <= ac_i <= 93 &&
- ac_vType[ac_i] == 4 ? AC_MAX_FLYHACK_B_WARNINGS : AC_MAX_FLYHACK_VEH_WARNINGS))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x: %f, pos diff y: %f, pos diff z: %f, vehicleid: %d",
- ac_vZ, ACVehInfo[ac_vehid][acVelZ], ACInfo[playerid][acPosX] - ac_X, ACInfo[playerid][acPosY] - ac_Y, ac_zdiff, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 8, 1);
- ACInfo[playerid][acCheatCount][3] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 8, 1);
- #endif
- }
- }
- else ACInfo[playerid][acCheatCount][3] = 0;
- }
- if(ac_vctsize > 0.8 && ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
- {
- if(ac_vctsize > 15.0 && ac_vctsize > ACVehInfo[ac_vehid][acPosDiff] + ((ac_vctsize / 3) * 1.5))
- {
- if(ACInfo[playerid][acACAllow][3] && ACInfo[playerid][acPosZ] > -97.0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Distance: %f, old pos diff: %f, vehicleid: %d",
- ac_vctsize, ACVehInfo[ac_vehid][acPosDiff], ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 3, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 3, 2);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][1] && ac_vsp < 16.0 &&
- ++ACInfo[playerid][acCheatCount][2] > AC_MAX_AIR_VEH_WARNINGS)
- {
- #undef AC_MAX_AIR_VEH_WARNINGS
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, distance: %f, vehicleid: %d", ac_vsp, ac_vctsize, ac_vehid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 1);
- ACInfo[playerid][acCheatCount][2] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 1);
- #endif
- }
- }
- ACVehInfo[ac_vehid][acSpeedDiff] = ac_spdiff;
- }
- ACVehInfo[ac_vehid][acVelX] = ac_vX;
- ACVehInfo[ac_vehid][acVelY] = ac_vY;
- ACVehInfo[ac_vehid][acVelZ] = ac_vZ;
- ACVehInfo[ac_vehid][acPosDiff] = ac_vctsize;
- ACVehInfo[ac_vehid][acHealth] = ac_vhealth;
- ACVehInfo[ac_vehid][acZAngle] = ac_zangle;
- }
- ACInfo[playerid][acSeat] = ac_s;
- }
- else
- {
- ac_stateanim = GetPlayerAnimationIndex(playerid);
- GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
- ac_vX = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
- if(ACInfo[playerid][acAnim] != ac_stateanim)
- {
- switch(ac_stateanim)
- {
- case -1:
- {
- if(ACInfo[playerid][acACAllow][24])
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 24);
- #else
- return ac_KickWithCode(playerid, "", 0, 24);
- #endif
- }
- }
- case 958..979:
- {
- if(ACInfo[playerid][acACAllow][7])
- {
- if(ac_w != 46)
- {
- if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Anim: %d, old anim: %d, weaponid: %d",
- ac_stateanim, ACInfo[playerid][acAnim], ac_w);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 7, 1);
- ACInfo[playerid][acCheatCount][15] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 7, 1);
- #endif
- }
- }
- else ACInfo[playerid][acCheatCount][15] = 0;
- }
- }
- case 1058:
- {
- if(ACInfo[playerid][acACAllow][7])
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 7, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 7, 2);
- #endif
- }
- }
- case 1231:
- {
- if(ACInfo[playerid][acACAllow][30])
- {
- ac_i = GetPlayerSkin(playerid);
- if(ac_PedAnims == false && ac_i > 0 && ac_i != 74 && ac_w != 46)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Skin: %d, old anim: %d, weaponid: %d",
- ac_i, ACInfo[playerid][acAnim], ac_w);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 30);
- #else
- return ac_KickWithCode(playerid, "", 0, 30);
- #endif
- }
- }
- }
- }
- }
- else if(ACInfo[playerid][acACAllow][7])
- {
- if(ac_vX > 31.0 && 1538 <= ac_stateanim <= 1544)
- {
- if(++ACInfo[playerid][acCheatCount][15] > AC_MAX_FLYHACK_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, anim: %d", ac_vX, ac_stateanim);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 7, 3);
- ACInfo[playerid][acCheatCount][15] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 7, 3);
- #endif
- }
- #undef AC_MAX_FLYHACK_WARNINGS
- }
- else ACInfo[playerid][acCheatCount][15] = 0;
- }
- if(ACInfo[playerid][acSet][4] != -1)
- {
- if(ac_specact == ACInfo[playerid][acSet][4]) ACInfo[playerid][acSet][4] = -1;
- else if(ACInfo[playerid][acACAllow][52] && ac_gtc > ACInfo[playerid][acGtc][6] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][6] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerSpecialAction");
- printf("[Nex-AC debug] AC spec act: %d, spec act: %d", ACInfo[playerid][acSet][4], ac_specact);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 52, 12);
- ACInfo[playerid][acSet][4] = -1;
- #else
- return ac_KickWithCode(playerid, "", 0, 52, 12);
- #endif
- }
- }
- else if(ac_specact != ACInfo[playerid][acSpecAct])
- {
- if(ac_specact == ACInfo[playerid][acNextSpecAct]) ACInfo[playerid][acNextSpecAct] = -1;
- else if(ACInfo[playerid][acACAllow][18])
- {
- switch(ac_specact)
- {
- case 0:
- {
- switch(ACInfo[playerid][acSpecAct])
- {
- case 11, 24, 25:
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 18, 1);
- #else
- return ac_KickWithCode(playerid, "", 0, 18, 1);
- #endif
- }
- }
- }
- case 1:
- {
- if(ACInfo[playerid][acSpecAct] > 0 && !(20 <= ACInfo[playerid][acSpecAct] <= 24))
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 18, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 18, 2);
- #endif
- }
- }
- case 2:
- {
- if(IsPlayerInRangeOfPoint(playerid, 8.0, ACInfo[playerid][acDropJpX],
- ACInfo[playerid][acDropJpY], ACInfo[playerid][acDropJpZ]) == 0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC spec act: %d, spec act: %d, distance: %f",
- ACInfo[playerid][acSpecAct], ac_specact, GetPlayerDistanceFromPoint(playerid,
- ACInfo[playerid][acDropJpX], ACInfo[playerid][acDropJpY], ACInfo[playerid][acDropJpZ]));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 18, 3);
- #else
- return ac_KickWithCode(playerid, "", 0, 18, 3);
- #endif
- }
- ACInfo[playerid][acDropJpX] = ACInfo[playerid][acDropJpY] =
- ACInfo[playerid][acDropJpZ] = 20000.0;
- }
- case 3:
- {
- switch(ACInfo[playerid][acSpecAct])
- {
- case 2, 5..8, 11, 68:
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 18, 4);
- #else
- return ac_KickWithCode(playerid, "", 0, 18, 4);
- #endif
- }
- }
- }
- default:
- {
- if(!((20 <= ac_specact <= 24 && ACInfo[playerid][acSpecAct] == 1 ||
- ACInfo[playerid][acSpecAct] == 3) && ac_specact == ACInfo[playerid][acLastSpecAct]) &&
- (ACInfo[playerid][acVeh] == 0 || ac_specact != 4 && ac_specact != 11 && ac_specact != 24 && ac_specact != 25))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC spec act: %d, spec act: %d, Last spec act: %d, last vehicleid: %d",
- ACInfo[playerid][acSpecAct], ac_specact, ACInfo[playerid][acLastSpecAct], ACInfo[playerid][acVeh]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 18, 5);
- #else
- return ac_KickWithCode(playerid, "", 0, 18, 5);
- #endif
- }
- }
- }
- }
- ACInfo[playerid][acLastSpecAct] = ACInfo[playerid][acSpecAct];
- }
- if(ac_gtc > ACInfo[playerid][acGtc][10] + ac_gpp &&
- GetPlayerSurfingVehicleID(playerid) == 65535 && GetPlayerSurfingObjectID(playerid) == 65535)
- {
- if(ACInfo[playerid][acACAllow][9] && ac_vX > 212.0 && ACInfo[playerid][acSpeed] < ac_vX)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, old speed: %.1f", ac_vX, ACInfo[playerid][acSpeed]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 9);
- #else
- return ac_KickWithCode(playerid, "", 0, 9);
- #endif
- }
- if(ac_vctsize > 0.7 && ac_gtc > ACInfo[playerid][acGtc][11] + ac_gpp)
- {
- if(ac_vctsize > 30.0)
- {
- if(ACInfo[playerid][acACAllow][2] && ACInfo[playerid][acPosZ] > -97.0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Distance: %f, pos z: %f", ac_vctsize, ACInfo[playerid][acPosZ]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 2, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 2, 2);
- #endif
- }
- }
- else if(ac_vX <= ac_vctsize * (ac_vctsize < 1.0 ? 30.0 : 5.0))
- {
- if(ac_vX < 3.0 && ac_vctsize > 5.0)
- {
- if(ACInfo[playerid][acACAllow][2])
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, distance: %f", ac_vX, ac_vctsize);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 2, 3);
- #else
- return ac_KickWithCode(playerid, "", 0, 2, 3);
- #endif
- }
- }
- else if(ACInfo[playerid][acACAllow][0] && ac_vX &&
- ++ACInfo[playerid][acCheatCount][1] > AC_MAX_AIR_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Speed: %.1f, distance: %f", ac_vX, ac_vctsize);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 0);
- ACInfo[playerid][acCheatCount][1] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 0);
- #endif
- }
- #undef AC_MAX_AIR_WARNINGS
- }
- }
- ACInfo[playerid][acSpeed] = ac_vX;
- }
- ACInfo[playerid][acAnim] = ac_stateanim;
- }
- ACInfo[playerid][acSpecAct] = ac_specact;
- ACInfo[playerid][acHealth] = ac_hp;
- ACInfo[playerid][acArmour] = ac_ar;
- }
- ACInfo[playerid][acPosX] = ac_X;
- ACInfo[playerid][acPosY] = ac_Y;
- ACInfo[playerid][acPosZ] = ac_Z;
- ACInfo[playerid][acLastWeapon] = ac_w;
- ACInfo[playerid][acVeh] = ac_vehid;
- ACInfo[playerid][acMoney] = ac_m;
- }
- }
- ac_gpp = 1;
- ACInfo[playerid][acLastUpdate] = ac_gtc;
- if(ac_ur) ACInfo[playerid][acGtc][15] = ac_gtc + 1030;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerUpdate
- ac_gpp = ac_OnPlayerUpdate(playerid);
- #endif
- if(ACInfo[playerid][acACAllow][33] && ac_gpp) return ACInfo[playerid][acFreeze];
- return ac_gpp;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerUpdate
- #undef OnPlayerUpdate
- #else
- #define _ALS_OnPlayerUpdate
- #endif
- #define OnPlayerUpdate ac_OnPlayerUpdate
- #if defined ac_OnPlayerUpdate
- forward ac_OnPlayerUpdate(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- #else
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- if((newkeys & 16) && ACInfo[playerid][acSpecAct] == 2 && GetPlayerSpecialAction(playerid) != 2)
- {
- ACInfo[playerid][acDropJpX] = ACInfo[playerid][acPosX];
- ACInfo[playerid][acDropJpY] = ACInfo[playerid][acPosY];
- ACInfo[playerid][acDropJpZ] = ACInfo[playerid][acPosZ];
- }
- if((newkeys & 2) && 24 <= GetPlayerWeapon(playerid) <= 25) ACInfo[playerid][acCheatCount][14] = 0;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerKeyStateChange
- return ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerKeyStateChange
- #undef OnPlayerKeyStateChange
- #else
- #define _ALS_OnPlayerKeyStateChange
- #endif
- #define OnPlayerKeyStateChange ac_OnPlayerKeyStateChange
- #if defined ac_OnPlayerKeyStateChange
- forward ac_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- #else
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][2] + ac_Mtfc[2][0]) return ac_FloodDetect(playerid, 2);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][2] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][2] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerClickMap
- return ac_OnPlayerClickMap(playerid, fX, fY, fZ);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerClickMap
- #undef OnPlayerClickMap
- #else
- #define _ALS_OnPlayerClickMap
- #endif
- #define OnPlayerClickMap ac_OnPlayerClickMap
- #if defined ac_OnPlayerClickMap
- forward ac_OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerClickPlayer(playerid, clickedplayerid, source)
- #else
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][3] + ac_Mtfc[3][0]) return ac_FloodDetect(playerid, 3);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][3] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][3] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerClickPlayer
- return ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerClickPlayer
- #undef OnPlayerClickPlayer
- #else
- #define _ALS_OnPlayerClickPlayer
- #endif
- #define OnPlayerClickPlayer ac_OnPlayerClickPlayer
- #if defined ac_OnPlayerClickPlayer
- forward ac_OnPlayerClickPlayer(playerid, clickedplayerid, source);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerClickTextDraw(playerid, Text:clickedid)
- #else
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 1;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][4] + ac_Mtfc[4][0])
- {
- ac_FloodDetect(playerid, 4);
- return 1;
- }
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][4] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][4] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerClickTextDraw
- return ac_OnPlayerClickTextDraw(playerid, clickedid);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerClickTextDraw
- #undef OnPlayerClickTextDraw
- #else
- #define _ALS_OnPlayerClickTextDraw
- #endif
- #define OnPlayerClickTextDraw ac_OnPlayerClickTextDraw
- #if defined ac_OnPlayerClickTextDraw
- forward ac_OnPlayerClickTextDraw(playerid, Text:clickedid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerCommandText(playerid, cmdtext[])
- #else
- public OnPlayerCommandText(playerid, cmdtext[])
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 1;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][5] + ac_Mtfc[5][0])
- {
- ac_FloodDetect(playerid, 5);
- return 1;
- }
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][5] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][5] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerCommandText
- return ac_OnPlayerCommandText(playerid, cmdtext);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerCommandText
- #undef OnPlayerCommandText
- #else
- #define _ALS_OnPlayerCommandText
- #endif
- #define OnPlayerCommandText ac_OnPlayerCommandText
- #if defined ac_OnPlayerCommandText
- forward ac_OnPlayerCommandText(playerid, cmdtext[]);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- #else
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- new bool:ac_ur;
- if(IsPlayerNPC(playerid) == 0)
- {
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][6] + ac_Mtfc[6][0]) return ac_FloodDetect(playerid, 6);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][6] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][6] = ac_i;
- ac_i = GetVehicleModel(vehicleid) - 417;
- if(ACInfo[playerid][acACAllow][44] && ac_i == -417) return ac_KickWithCode(playerid, "", 0, 44, 1);
- if(ACInfo[playerid][acEnterVeh] == vehicleid) ac_ur = true;
- else
- {
- new ac_tmpPrm1, ac_tmpPrm2;
- GetVehicleParamsEx(vehicleid, ac_tmpPrm2, ac_tmpPrm2,
- ac_tmpPrm2, ac_tmpPrm1, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm2);
- if(ispassenger || ac_tmpPrm1 != 1)
- {
- ACInfo[playerid][acEnterVeh] = vehicleid;
- if(13 <= ac_i <= 178 && ac_vType[ac_i] == 3) ACInfo[playerid][acEnterVehTime] = 0, ac_ur = true;
- }
- }
- }
- if(ac_ur == false) ACInfo[playerid][acEnterVehTime] = ACInfo[playerid][acCall][27];
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEnterVehicle
- return ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEnterVehicle
- #undef OnPlayerEnterVehicle
- #else
- #define _ALS_OnPlayerEnterVehicle
- #endif
- #define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
- #if defined ac_OnPlayerEnterVehicle
- forward ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerExitVehicle(playerid, vehicleid)
- #else
- public OnPlayerExitVehicle(playerid, vehicleid)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(IsPlayerNPC(playerid) == 0 && ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][7] + ac_Mtfc[7][0]) return ac_FloodDetect(playerid, 7);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][7] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][7] = ac_i;
- ac_i = GetVehicleModel(ACInfo[playerid][acVeh]) - 417;
- if(0 <= ac_i <= 176 && ac_vType[ac_i] == 2) ACInfo[playerid][acParachute] = true;
- else ACInfo[playerid][acParachute] = false;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerExitVehicle
- return ac_OnPlayerExitVehicle(playerid, vehicleid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerExitVehicle
- #undef OnPlayerExitVehicle
- #else
- #define _ALS_OnPlayerExitVehicle
- #endif
- #define OnPlayerExitVehicle ac_OnPlayerExitVehicle
- #if defined ac_OnPlayerExitVehicle
- forward ac_OnPlayerExitVehicle(playerid, vehicleid);
- #endif
- #endif
- #if defined OnPlayerPickUpDynamicPickup\
- && defined IsValidDynamicPickup
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerPickUpDynPickup(playerid, STREAMER_TAG_PICKUP pickupid)
- #else
- hook OnPlayerPickUpDynPickup(playerid, pickupid)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid)
- #else
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- #endif
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked] || IsValidDynamicPickup(pickupid) == 0) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
- if(_:pickupid < MAX_PICKUPS)
- {
- if(ACInfo[playerid][acACAllow][6] && (ACInfo[playerid][acSet][8] == -1 ||
- VectorSize(ACInfo[playerid][acSetPosX] - ACDPickInfo[_:pickupid][acPosX], ACInfo[playerid][acSetPosY] - ACDPickInfo[_:pickupid][acPosY], ACInfo[playerid][acSetPosZ] - ACDPickInfo[_:pickupid][acPosZ]) > 8.0) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACDPickInfo[_:pickupid][acPosX], ACDPickInfo[_:pickupid][acPosY], ACDPickInfo[_:pickupid][acPosZ]) == 0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Pickupid: %d, distance: %f",
- _:pickupid, GetPlayerDistanceFromPoint(playerid, ACDPickInfo[_:pickupid][acPosX],
- ACDPickInfo[_:pickupid][acPosY], ACDPickInfo[_:pickupid][acPosZ]));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 6, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 6, 2);
- #endif
- }
- switch(ACDPickInfo[_:pickupid][acType])
- {
- case 1:
- {
- ac_i = ac_wSlot[ACDPickInfo[_:pickupid][acWeapon]];
- if(3 <= ac_i <= 5 && ACInfo[playerid][acWeapon][ac_i] > 0 ||
- ACInfo[playerid][acWeapon][ac_i] == ACDPickInfo[_:pickupid][acWeapon]) ACInfo[playerid][acAmmo][ac_i] +=
- ac_pAmmo[ACDPickInfo[_:pickupid][acWeapon]];
- }
- case 2: ACInfo[playerid][acSpecAct] = 2;
- case 3: ACInfo[playerid][acHealth] = 100;
- case 4: ACInfo[playerid][acArmour] = 100;
- }
- }
- ACInfo[playerid][acLastPickup] = _:pickupid + MAX_PICKUPS;
- ACInfo[playerid][acPicked] = true;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerPickUpDynamicPickup
- return ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerPickUpDynamicPicku\
- || defined _ALS_OnPlayerPickUpDynamicPick || defined _ALS_OnPlayer\
- PickUpDynamicPickup
- #undef OnPlayerPickUpDynamicPickup
- #else
- #define _ALS_OnPlayerPickUpDynamicPickup
- #endif
- #define OnPlayerPickUpDynamicPickup ac_OnPlayerPickUpDynamicPickup
- #if defined ac_OnPlayerPickUpDynamicPickup
- #if defined STREAMER_ENABLE_TAGS
- forward ac_OnPlayerPickUpDynamicPickup(playerid, STREAMER_TAG_PICKUP pickupid);
- #else
- forward ac_OnPlayerPickUpDynamicPickup(playerid, pickupid);
- #endif
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerPickUpPickup(playerid, pickupid)
- #else
- public OnPlayerPickUpPickup(playerid, pickupid)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked] || !(0 <= pickupid < MAX_PICKUPS)) return 0;
- if(ACInfo[playerid][acPicked] == false)
- {
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][8] + ac_Mtfc[8][0]) ac_FloodDetect(playerid, 8);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][8] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- if(ACInfo[playerid][acACAllow][6] && (ACInfo[playerid][acSet][8] == -1 ||
- VectorSize(ACInfo[playerid][acSetPosX] - ACPickInfo[pickupid][acPosX], ACInfo[playerid][acSetPosY] - ACPickInfo[pickupid][acPosY], ACInfo[playerid][acSetPosZ] - ACPickInfo[pickupid][acPosZ]) > 8.0) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[pickupid][acPosX], ACPickInfo[pickupid][acPosY], ACPickInfo[pickupid][acPosZ]) == 0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Pickupid: %d, distance: %f",
- pickupid, GetPlayerDistanceFromPoint(playerid, ACPickInfo[pickupid][acPosX],
- ACPickInfo[pickupid][acPosY], ACPickInfo[pickupid][acPosZ]));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 6, 1);
- #else
- return ac_KickWithCode(playerid, "", 0, 6, 1);
- #endif
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][8] = ac_i;
- switch(ACPickInfo[pickupid][acType])
- {
- case 1:
- {
- ac_i = ac_wSlot[ACPickInfo[pickupid][acWeapon]];
- if(3 <= ac_i <= 5 && ACInfo[playerid][acWeapon][ac_i] > 0 ||
- ACInfo[playerid][acWeapon][ac_i] == ACPickInfo[pickupid][acWeapon]) ACInfo[playerid][acAmmo][ac_i] +=
- ac_pAmmo[ACPickInfo[pickupid][acWeapon]];
- }
- case 2: ACInfo[playerid][acSpecAct] = 2;
- case 3: ACInfo[playerid][acHealth] = 100;
- case 4: ACInfo[playerid][acArmour] = 100;
- }
- ACInfo[playerid][acLastPickup] = pickupid;
- }
- else ACInfo[playerid][acPicked] = false;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerPickUpPickup
- if(ACPickInfo[pickupid][acIsStatic] == false) return ac_OnPlayerPickUpPickup(playerid, pickupid);
- return 1;
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerPickUpPickup
- #undef OnPlayerPickUpPickup
- #else
- #define _ALS_OnPlayerPickUpPickup
- #endif
- #define OnPlayerPickUpPickup ac_OnPlayerPickUpPickup
- #if defined ac_OnPlayerPickUpPickup
- forward ac_OnPlayerPickUpPickup(playerid, pickupid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerRequestClass(playerid, classid)
- #else
- public OnPlayerRequestClass(playerid, classid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][9] + ac_Mtfc[9][0]) return ac_FloodDetect(playerid, 9);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][9] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acLogged] = true;
- ACInfo[playerid][acClassid] = classid;
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][9] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerRequestClass
- return ac_OnPlayerRequestClass(playerid, classid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerRequestClass
- #undef OnPlayerRequestClass
- #else
- #define _ALS_OnPlayerRequestClass
- #endif
- #define OnPlayerRequestClass ac_OnPlayerRequestClass
- #if defined ac_OnPlayerRequestClass
- forward ac_OnPlayerRequestClass(playerid, classid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerSelectedMenuRow(playerid, row)
- #else
- public OnPlayerSelectedMenuRow(playerid, row)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][10] + ac_Mtfc[10][0]) ac_FloodDetect(playerid, 10);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][10] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][10] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerSelectedMenuRow
- return ac_OnPlayerSelectedMenuRow(playerid, row);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerSelectedMenuRow
- #undef OnPlayerSelectedMenuRow
- #else
- #define _ALS_OnPlayerSelectedMenuRow
- #endif
- #define OnPlayerSelectedMenuRow ac_OnPlayerSelectedMenuRow
- #if defined ac_OnPlayerSelectedMenuRow
- forward ac_OnPlayerSelectedMenuRow(playerid, row);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerStateChange(playerid, newstate, oldstate)
- #else
- public OnPlayerStateChange(playerid, newstate, oldstate)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount(), bool:ac_ur;
- if(IsPlayerNPC(playerid) == 0)
- {
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][11] + ac_Mtfc[11][0])
- {
- if(newstate != 1 || oldstate != 8)
- {
- new ac_model;
- if(oldstate == 2) ac_model = GetVehicleModel(ACInfo[playerid][acVeh]) - 417;
- else if(newstate == 2) ac_model = GetVehicleModel(GetPlayerVehicleID(playerid)) - 417;
- if(!(13 <= ac_model <= 178 && ac_vType[ac_model] == 3)) ac_FloodDetect(playerid, 11);
- }
- }
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][11] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- if(oldstate == 0)
- {
- if(!(8 <= newstate <= 9) && ACInfo[playerid][acLogged] == false)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Newstate: %d", newstate);
- #endif
- ac_KickWithCode(playerid, "", 0, 48, 2);
- }
- }
- else if(2 <= oldstate <= 3)
- {
- if(oldstate == 2)
- {
- new ammo;
- if(ACVehInfo[ACInfo[playerid][acVeh]][acDriver] == playerid) ACVehInfo[ACInfo[playerid][acVeh]][acDriver] = 65535;
- GetPlayerWeaponData(playerid, 4, ammo, ammo);
- if(ammo < ACInfo[playerid][acAmmo][4]) ACInfo[playerid][acAmmo][4] = ammo;
- }
- new Float:ac_vX, Float:ac_vY, Float:ac_vZ;
- GetPlayerVelocity(playerid, ac_vX, ac_vY, ac_vZ);
- ACInfo[playerid][acSpeed] = ac_GetSpeed(ac_vX, ac_vY, ac_vZ);
- ac_ur = true;
- }
- switch(newstate)
- {
- case 1:
- {
- ACInfo[playerid][acSet][11] = -1;
- ACInfo[playerid][acEnterVeh] = 0;
- GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
- }
- case 2:
- {
- ACInfo[playerid][acSet][11] = -1;
- ac_i = GetPlayerVehicleID(playerid);
- if(ACInfo[playerid][acACAllow][44])
- {
- new ac_seatid = GetPlayerVehicleSeat(playerid);
- if(ac_seatid != 128)
- {
- new ac_model = GetVehicleModel(ac_i) - 400;
- if(ac_seatid || ac_model < 0 || ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2) & 0xF == 15 &&
- ACInfo[playerid][acSet][9] == -1)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_model + 400, ac_seatid);
- #endif
- ac_KickWithCode(playerid, "", 0, 44, 2);
- }
- }
- }
- if(ACInfo[playerid][acSet][9] == -1)
- {
- ACVehInfo[ac_i][acDriver] = playerid;
- GetVehicleZAngle(ac_i, ACVehInfo[ac_i][acZAngle]);
- GetPlayerPos(playerid, ACInfo[playerid][acPosX], ACInfo[playerid][acPosY], ACInfo[playerid][acPosZ]);
- ACInfo[playerid][acCheatCount][11] = 0;
- ACInfo[playerid][acVehDmgRes] = false;
- ACInfo[playerid][acSetVehHealth] = -1;
- }
- }
- case 3:
- {
- ACInfo[playerid][acSet][11] = -1;
- ACInfo[playerid][acCheatCount][4] = 0;
- if(ACInfo[playerid][acACAllow][44] && (ac_i = GetPlayerVehicleSeat(playerid)) != 128)
- {
- new ac_model = GetVehicleModel(GetPlayerVehicleID(playerid)) - 400;
- if(ac_model < 0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Veh model: %d, seatid: %d", ac_model + 400, ac_i);
- #endif
- ac_KickWithCode(playerid, "", 0, 44, 3);
- }
- else
- {
- new ac_maxseats = (ac_MaxPassengers[ac_model >>> 3] >>> ((ac_model & 7) << 2)) & 0xF;
- if(ac_i < 1 || (ac_maxseats == 15 || ac_i > ac_maxseats) && ACInfo[playerid][acSet][9] == -1)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Veh model: %d, max seats: %d, seatid: %d",
- ac_model + 400, ac_maxseats, ac_i);
- #endif
- ac_KickWithCode(playerid, "", 0, 44, 4);
- }
- }
- }
- }
- case 9:
- {
- if(ACInfo[playerid][acACAllow][21] && ACInfo[playerid][acSpec] == false &&
- ACInfo[playerid][acSet][6] == -1) ac_KickWithCode(playerid, "", 0, 21);
- ACInfo[playerid][acSet][6] = -1;
- ACInfo[playerid][acSpawnTime] = 0;
- ACInfo[playerid][acSpec] = true;
- }
- }
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][11] = GetTickCount();
- if(ac_ur) ACInfo[playerid][acGtc][10] = ACInfo[playerid][acCall][27];
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerStateChange
- return ac_OnPlayerStateChange(playerid, newstate, oldstate);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerStateChange
- #undef OnPlayerStateChange
- #else
- #define _ALS_OnPlayerStateChange
- #endif
- #define OnPlayerStateChange ac_OnPlayerStateChange
- #if defined ac_OnPlayerStateChange
- forward ac_OnPlayerStateChange(playerid, newstate, oldstate);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- #else
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- static ac_i, ac_gtc, bool:ac_ur, bool:ac_ur2;
- ac_gtc = GetTickCount();
- ac_ur = ac_ur2 = false;
- if(IsPlayerNPC(playerid) == 0)
- {
- if(ACInfo[playerid][acACAllow][22] && ac_LagCompMode == false) return ac_KickWithCode(playerid, "", 0, 22);
- if(!(0 <= hittype <= 4))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Hittype: %d, hitid: %d, weaponid: %d", hittype, hitid, weaponid);
- #endif
- return ac_KickWithCode(playerid, "", 0, 47, 1);
- }
- static Float:ac_oX, Float:ac_oY, Float:ac_oZ, Float:ac_X, Float:ac_Y, Float:ac_Z;
- GetPlayerLastShotVectors(playerid, ac_oX, ac_oY, ac_oZ, ac_X, ac_Y, ac_Z);
- if(ACInfo[playerid][acACAllow][34])
- {
- if(IsPlayerInRangeOfPoint(playerid, 8.0, ac_oX, ac_oY, ac_oZ) == 0)
- {
- if(++ACInfo[playerid][acCheatCount][5] > AC_MAX_AFK_GHOST_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Distance: %f", GetPlayerDistanceFromPoint(playerid, ac_oX, ac_oY, ac_oZ));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 34);
- ACInfo[playerid][acCheatCount][5] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 34);
- #endif
- }
- #undef AC_MAX_AFK_GHOST_WARNINGS
- }
- else ACInfo[playerid][acCheatCount][5] = 0;
- }
- if(ACInfo[playerid][acACAllow][29])
- {
- if(hittype > 0 && !fX && !fY && !fZ)
- {
- if(++ACInfo[playerid][acCheatCount][13] > AC_MAX_SILENT_AIM_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Hittype: %d, weaponid: %d", hittype, weaponid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 29, 1);
- ACInfo[playerid][acCheatCount][13] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 29, 1);
- #endif
- }
- #undef AC_MAX_SILENT_AIM_WARNINGS
- }
- else
- {
- ACInfo[playerid][acCheatCount][13] = 0;
- if(hittype == 1 && ac_gtc < ACInfo[hitid][acLastUpdate] + 1500 && IsPlayerInAnyVehicle(hitid) == 0 &&
- GetPlayerSurfingVehicleID(hitid) == 65535 && GetPlayerSurfingObjectID(hitid) == 65535)
- {
- if(IsPlayerInRangeOfPoint(hitid, 8.0, ac_X, ac_Y, ac_Z) == 0)
- {
- if(++ACInfo[playerid][acCheatCount][6] > AC_MAX_PRO_AIM_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Distance: %f", GetPlayerDistanceFromPoint(hitid, ac_X, ac_Y, ac_Z));
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 29, 2);
- ACInfo[playerid][acCheatCount][6] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 29, 2);
- #endif
- }
- #undef AC_MAX_PRO_AIM_WARNINGS
- }
- else ACInfo[playerid][acCheatCount][6] = 0;
- }
- }
- }
- static ac_t;
- switch(hittype)
- {
- case 1:
- {
- if(ACInfo[hitid][acACAllow][19] && ACInfo[hitid][acFreeze] &&
- GetPlayerSpecialAction(hitid) != 3)
- {
- ac_t = GetPlayerTeam(playerid);
- ac_i = GetPlayerInterior(hitid);
- if(ACInfo[hitid][acDead] == false && (ac_t == 255 || ac_t != GetPlayerTeam(hitid)))
- {
- #if AC_USE_RESTAURANTS
- if(ac_InRestaurant(hitid, ac_i) == 0)
- {
- #endif
- #if AC_USE_AMMUNATIONS
- if(ac_InAmmuNation(hitid, ac_i) == 0)
- {
- #endif
- #if AC_USE_CASINOS
- if(ac_InCasino(hitid, ac_i) == 0)
- {
- #endif
- ac_ur = true;
- #if AC_USE_CASINOS
- }
- #endif
- #if AC_USE_AMMUNATIONS
- }
- #endif
- #if AC_USE_RESTAURANTS
- }
- #endif
- }
- }
- }
- case 2:
- {
- if(ACVehInfo[hitid][acDriver] != 65535 && ACInfo[ACVehInfo[hitid][acDriver]][acACAllow][20] &&
- ACInfo[ACVehInfo[hitid][acDriver]][acFreeze] && ACVehInfo[hitid][acHealth] > 220.0)
- {
- ac_t = GetPlayerTeam(playerid);
- if(ac_VehFriendlyFire == false || ac_t == 255 || ac_t != GetPlayerTeam(ACVehInfo[hitid][acDriver]))
- {
- static ac_m, Float:ac_Offset[9], Float:ac_Offset2[6];
- ac_m = GetVehicleModel(hitid);
- GetVehicleModelInfo(ac_m, 5, ac_Offset[0], ac_Offset[1], ac_Offset[2]);
- ac_Offset2[0] = (floatsin((ACVehInfo[hitid][acZAngle] = 360 - ACVehInfo[hitid][acZAngle]), degrees) * ac_Offset[1]) + (floatcos(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[0]);
- ac_Offset2[1] = (floatcos(ACVehInfo[hitid][acZAngle], degrees) * ac_Offset[1]) - (floatsin(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[0]);
- GetVehicleModelInfo(ac_m, 6, ac_Offset[3], ac_Offset[4], ac_Offset[5]);
- ac_Offset2[2] = (floatsin((ACVehInfo[hitid][acZAngle] = 360 - ACVehInfo[hitid][acZAngle]), degrees) * ac_Offset[4]) + (floatcos(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[3]);
- ac_Offset2[3] = (floatcos(ACVehInfo[hitid][acZAngle], degrees) * ac_Offset[4]) - (floatsin(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[3]);
- GetVehicleModelInfo(ac_m, 7, ac_Offset[6], ac_Offset[7], ac_Offset[8]);
- ac_Offset2[4] = (floatsin((ACVehInfo[hitid][acZAngle] = 360 - ACVehInfo[hitid][acZAngle]), degrees) * ac_Offset[7]) + (floatcos(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[6]);
- ac_Offset2[5] = (floatcos(ACVehInfo[hitid][acZAngle], degrees) * ac_Offset[7]) - (floatsin(ACVehInfo[hitid][acZAngle], degrees) * -ac_Offset[6]);
- if(VectorSize(ac_Offset[0] - fX, ac_Offset[1] - fY, ac_Offset[2] - fZ) > 2.5 &&
- floatabs(VectorSize(ac_Offset2[0] - fX, ac_Offset2[1] - fY, ac_Offset[2] - fZ)) > 2.5 &&
- VectorSize(ac_Offset[3] - fX, ac_Offset[4] - fY, ac_Offset[5] - fZ) > 2.5 &&
- floatabs(VectorSize(ac_Offset2[2] - fX, ac_Offset2[3] - fY, ac_Offset[5] - fZ)) > 2.5 &&
- (!ac_Offset[6] && !ac_Offset[7] && !ac_Offset[8] || VectorSize(ac_Offset[6] - fX, ac_Offset[7] - fY, ac_Offset[8] - fZ) > 2.5 &&
- floatabs(VectorSize(ac_Offset2[4] - fX, ac_Offset2[5] - fY, ac_Offset[8] - fZ)) > 2.5)) ac_ur2 = true;
- }
- }
- }
- }
- if((ac_t = GetPlayerState(playerid)) != 2)
- {
- static ac_s;
- ac_s = GetPlayerWeapon(playerid);
- if(ACInfo[playerid][acACAllow][47] && (ac_t != 3 && ac_s != weaponid || weaponid != 38 && !(22 <= weaponid <= 34)))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Armed weapon: %d, weaponid: %d, state: %d", ac_s, weaponid, ac_t);
- #endif
- return ac_KickWithCode(playerid, "", 0, 47, 2);
- }
- ac_s = ac_wSlot[weaponid];
- if(ACInfo[playerid][acACAllow][26])
- {
- ac_i = ac_gtc - ACInfo[playerid][acShotTime];
- if(ACInfo[playerid][acLastShot] == weaponid)
- {
- if(weaponid != 38 && ac_t != 3)
- {
- if(ac_gtc < ACInfo[playerid][acReload] + 800)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, Reload time: %d, state: %d",
- weaponid, ac_gtc - ACInfo[playerid][acReload], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 26, 4);
- ACInfo[playerid][acReload] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 26, 4);
- #endif
- }
- else if(ac_i < 30 || ac_i < 50 && weaponid != 32 &&
- !(28 <= weaponid <= 29) || ac_i < 386 && 33 <= weaponid <= 34)
- {
- if(++ACInfo[playerid][acCheatCount][8] > AC_MAX_RAPID_FIRE_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 26, 1);
- ACInfo[playerid][acCheatCount][8] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 26, 1);
- #endif
- }
- }
- else ACInfo[playerid][acCheatCount][8] = 0;
- if((weaponid == 24 && ac_i < 600 || weaponid == 25 && ac_i < 800) &&
- ++ACInfo[playerid][acCheatCount][14] > AC_MAX_RAPID_FIRE_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Fire rate: %d, weaponid: %d", ac_i, weaponid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 26, 2);
- ACInfo[playerid][acCheatCount][14] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 26, 2);
- #endif
- }
- }
- }
- else if(ac_i < 30)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Fire rate: %d, weaponid: %d, last weapon: %d",
- ac_i, weaponid, ACInfo[playerid][acLastShot]);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 26, 3);
- #else
- return ac_KickWithCode(playerid, "", 0, 26, 3);
- #endif
- }
- if(GetPlayerWeaponState(playerid) == 1) ACInfo[playerid][acReload] = ac_gtc;
- }
- if(ACInfo[playerid][acACAllow][17] && ac_t != 3)
- {
- ac_t = GetPlayerAmmo(playerid);
- if(ACInfo[playerid][acAmmo][ac_s] == 0)
- {
- if(ac_gtc > ACInfo[playerid][acGtc][7] + GetPlayerPing(playerid) + 150)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 1);
- ACInfo[playerid][acAmmo][ac_s] = ac_t;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 1);
- #endif
- }
- else return 0;
- }
- if((ac_i = ac_abs(ACInfo[playerid][acAmmo][ac_s] - ac_t)))
- {
- switch(weaponid)
- {
- case 23, 24:
- {
- if(ac_i > 2 || ++ACInfo[playerid][acCheatCount][7] > 2)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 2);
- ACInfo[playerid][acCheatCount][7] = 0;
- ACInfo[playerid][acAmmo][ac_s] = ac_t;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 2);
- #endif
- }
- }
- case 29:
- {
- if(ac_i > 2 || ++ACInfo[playerid][acCheatCount][7] > 3)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 3);
- ACInfo[playerid][acCheatCount][7] = 0;
- ACInfo[playerid][acAmmo][ac_s] = ac_t;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 3);
- #endif
- }
- }
- case 22, 26, 28, 30..32, 34:
- {
- if(ac_i > 3 && ACInfo[playerid][acAmmo][ac_s] < ac_t)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 4);
- ACInfo[playerid][acCheatCount][7] = 0;
- ACInfo[playerid][acAmmo][ac_s] = ac_t;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 4);
- #endif
- }
- }
- case 38:
- {
- if(++ACInfo[playerid][acCheatCount][7] > 8)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 5);
- ACInfo[playerid][acCheatCount][7] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 5);
- #endif
- }
- }
- default:
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, AC ammo: %d, ammo: %d",
- weaponid, ACInfo[playerid][acAmmo][ac_s], ac_t);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 17, 6);
- ACInfo[playerid][acAmmo][ac_s] = ac_t;
- #else
- return ac_KickWithCode(playerid, "", 0, 17, 6);
- #endif
- }
- }
- }
- else ACInfo[playerid][acCheatCount][7] = 0;
- }
- ACInfo[playerid][acAmmo][ac_s]--;
- if(ACInfo[playerid][acAmmo][ac_s] < -32768) ACInfo[playerid][acAmmo][ac_s] += 65536;
- else if(ACInfo[playerid][acAmmo][ac_s] == 0 && ACInfo[playerid][acSet][3] == weaponid) ACInfo[playerid][acSet][3] =
- ACInfo[playerid][acSetWeapon][ac_s] = -1;
- }
- ACInfo[playerid][acLastShot] = weaponid;
- }
- ac_i = 1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerWeaponShot
- ac_i = ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, fX, fY, fZ);
- #endif
- ACInfo[playerid][acShotTime] = ac_gtc;
- if(ac_i)
- {
- if(ac_ur)
- {
- if(ACInfo[hitid][acArmour] > 0) ACInfo[hitid][acDmgRes] = 2;
- else ACInfo[hitid][acDmgRes] = 1;
- ACInfo[hitid][acGtc][14] = ac_gtc;
- }
- if(ac_ur2)
- {
- ACInfo[ACVehInfo[hitid][acDriver]][acVehDmgRes] = true;
- ACInfo[ACVehInfo[hitid][acDriver]][acGtc][16] = ac_gtc;
- }
- }
- return ac_i;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerWeaponShot
- #undef OnPlayerWeaponShot
- #else
- #define _ALS_OnPlayerWeaponShot
- #endif
- #define OnPlayerWeaponShot ac_OnPlayerWeaponShot
- #if defined ac_OnPlayerWeaponShot
- forward ac_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehicleMod(playerid, vehicleid, componentid)
- #else
- public OnVehicleMod(playerid, vehicleid, componentid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][12] + ac_Mtfc[12][0]) return ac_FloodDetect(playerid, 12);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][12] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- if(ACInfo[playerid][acACAllow][23] && ACInfo[playerid][acModShop] == false)
- {
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 23, 2);
- #else
- return ac_KickWithCode(playerid, "", 0, 23, 2);
- #endif
- }
- if(ACInfo[playerid][acACAllow][43] && ac_IsCompatible(GetVehicleModel(vehicleid), componentid) == 0)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Veh model: %d, componentid: %d", GetVehicleModel(vehicleid), componentid);
- #endif
- return ac_KickWithCode(playerid, "", 0, 43, 1);
- }
- if(ACInfo[playerid][acSet][13] != -1) ACInfo[playerid][acSet][13] += ac_cPrice[componentid - 1000];
- else ACInfo[playerid][acSet][13] = ac_cPrice[componentid - 1000];
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][12] = ac_i;
- ACInfo[playerid][acGtc][17] = ac_i + 1500;
- ACInfo[playerid][acCheatCount][12] = 0;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleMod
- return ac_OnVehicleMod(playerid, vehicleid, componentid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleMod
- #undef OnVehicleMod
- #else
- #define _ALS_OnVehicleMod
- #endif
- #define OnVehicleMod ac_OnVehicleMod
- #if defined ac_OnVehicleMod
- forward ac_OnVehicleMod(playerid, vehicleid, componentid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- #else
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][13] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- if(ACInfo[playerid][acACAllow][43] && !(0 <= paintjobid <= 2))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Veh model: %d, paintjobid: %d", GetVehicleModel(vehicleid), paintjobid);
- #endif
- ac_KickWithCode(playerid, "", 0, 43, 2);
- }
- else if(ACInfo[playerid][acACAllow][23] && ACInfo[playerid][acModShop] == false) ac_KickWithCode(playerid, "", 0, 23, 4);
- else ACVehInfo[vehicleid][acPaintJob] = paintjobid;
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][13] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehiclePaintjob
- return ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehiclePaintjob
- #undef OnVehiclePaintjob
- #else
- #define _ALS_OnVehiclePaintjob
- #endif
- #define OnVehiclePaintjob ac_OnVehiclePaintjob
- #if defined ac_OnVehiclePaintjob
- forward ac_OnVehiclePaintjob(playerid, vehicleid, paintjobid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehicleRespray(playerid, vehicleid, color1, color2)
- #else
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][14] + ac_Mtfc[14][0]) return ac_FloodDetect(playerid, 14);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][14] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][14] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleRespray
- return ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleRespray
- #undef OnVehicleRespray
- #else
- #define _ALS_OnVehicleRespray
- #endif
- #define OnVehicleRespray ac_OnVehicleRespray
- #if defined ac_OnVehicleRespray
- forward ac_OnVehicleRespray(playerid, vehicleid, color1, color2);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehicleSpawn(vehicleid)
- #else
- public OnVehicleSpawn(vehicleid)
- #endif
- {
- ACVehInfo[vehicleid][acPaintJob] = 3;
- ACVehInfo[vehicleid][acSpawned] = true;
- ACVehInfo[vehicleid][acHealth] = 1000.0;
- ACVehInfo[vehicleid][acSpeedDiff] =
- ACVehInfo[vehicleid][acPosDiff] =
- ACVehInfo[vehicleid][acVelX] =
- ACVehInfo[vehicleid][acVelY] =
- ACVehInfo[vehicleid][acVelZ] = 0.0;
- ACVehInfo[vehicleid][acDriver] = 65535;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleSpawn
- return ac_OnVehicleSpawn(vehicleid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleSpawn
- #undef OnVehicleSpawn
- #else
- #define _ALS_OnVehicleSpawn
- #endif
- #define OnVehicleSpawn ac_OnVehicleSpawn
- #if defined ac_OnVehicleSpawn
- forward ac_OnVehicleSpawn(vehicleid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehicleDeath(vehicleid, killerid)
- #else
- public OnVehicleDeath(vehicleid, killerid)
- #endif
- {
- if(killerid != 65535)
- {
- new ac_i = GetTickCount();
- if(ACInfo[killerid][acACAllow][49])
- {
- if(ac_i < ACInfo[killerid][acCall][15] + ac_Mtfc[15][0]) ac_FloodDetect(killerid, 15);
- else if(ac_i < ACInfo[killerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(killerid, 27);
- else ACInfo[killerid][acFloodCount][15] = ACInfo[killerid][acFloodCount][27] = 0;
- }
- ACInfo[killerid][acCall][27] = ACInfo[killerid][acCall][15] = ac_i;
- }
- new Float:ac_vhealth;
- GetVehicleHealth(vehicleid, ac_vhealth);
- if(ac_vhealth < 250.0) ACVehInfo[vehicleid][acSpawned] = false;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleDeath
- return ac_OnVehicleDeath(vehicleid, killerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleDeath
- #undef OnVehicleDeath
- #else
- #define _ALS_OnVehicleDeath
- #endif
- #define OnVehicleDeath ac_OnVehicleDeath
- #if defined ac_OnVehicleDeath
- forward ac_OnVehicleDeath(vehicleid, killerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerText(playerid, text[])
- #else
- public OnPlayerText(playerid, text[])
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][16] + ac_Mtfc[16][0]) return ac_FloodDetect(playerid, 16);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][16] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][16] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerText
- return ac_OnPlayerText(playerid, text);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerText
- #undef OnPlayerText
- #else
- #define _ALS_OnPlayerText
- #endif
- #define OnPlayerText ac_OnPlayerText
- #if defined ac_OnPlayerText
- forward ac_OnPlayerText(playerid, text[]);
- #endif
- #endif
- #if defined OnPlayerEnterDynamicCP
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP checkpointid)
- #else
- hook OnPlayerEnterDynamicCP(playerid, checkpointid)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP checkpointid)
- #else
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- #endif
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][17] + ac_Mtfc[17][0]) ac_FloodDetect(playerid, 17);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][17] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][17] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEnterDynamicCP
- return ac_OnPlayerEnterDynamicCP(playerid, checkpointid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEnterDynamicCP
- #undef OnPlayerEnterDynamicCP
- #else
- #define _ALS_OnPlayerEnterDynamicCP
- #endif
- #define OnPlayerEnterDynamicCP ac_OnPlayerEnterDynamicCP
- #if defined ac_OnPlayerEnterDynamicCP
- #if defined STREAMER_ENABLE_TAGS
- forward ac_OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP checkpointid);
- #else
- forward ac_OnPlayerEnterDynamicCP(playerid, checkpointid);
- #endif
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerEnterCheckpoint(playerid)
- #else
- public OnPlayerEnterCheckpoint(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][17] + ac_Mtfc[17][0]) ac_FloodDetect(playerid, 17);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][17] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][17] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEnterCheckpoint
- return ac_OnPlayerEnterCheckpoint(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEnterCheckpoint
- #undef OnPlayerEnterCheckpoint
- #else
- #define _ALS_OnPlayerEnterCheckpoint
- #endif
- #define OnPlayerEnterCheckpoint ac_OnPlayerEnterCheckpoint
- #if defined ac_OnPlayerEnterCheckpoint
- forward ac_OnPlayerEnterCheckpoint(playerid);
- #endif
- #endif
- #if defined OnPlayerLeaveDynamicCP
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerLeaveDynamicCP(playerid, STREAMER_TAG_CP checkpointid)
- #else
- hook OnPlayerLeaveDynamicCP(playerid, checkpointid)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerLeaveDynamicCP(playerid, STREAMER_TAG_CP checkpointid)
- #else
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- #endif
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][18] + ac_Mtfc[18][0]) ac_FloodDetect(playerid, 18);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][18] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][18] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerLeaveDynamicCP
- return ac_OnPlayerLeaveDynamicCP(playerid, checkpointid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerLeaveDynamicCP
- #undef OnPlayerLeaveDynamicCP
- #else
- #define _ALS_OnPlayerLeaveDynamicCP
- #endif
- #define OnPlayerLeaveDynamicCP ac_OnPlayerLeaveDynamicCP
- #if defined ac_OnPlayerLeaveDynamicCP
- #if defined STREAMER_ENABLE_TAGS
- forward ac_OnPlayerLeaveDynamicCP(playerid, STREAMER_TAG_CP checkpointid);
- #else
- forward ac_OnPlayerLeaveDynamicCP(playerid, checkpointid);
- #endif
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerLeaveCheckpoint(playerid)
- #else
- public OnPlayerLeaveCheckpoint(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][18] + ac_Mtfc[18][0]) ac_FloodDetect(playerid, 18);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][18] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][18] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerLeaveCheckpoint
- return ac_OnPlayerLeaveCheckpoint(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerLeaveCheckpoint
- #undef OnPlayerLeaveCheckpoint
- #else
- #define _ALS_OnPlayerLeaveCheckpoint
- #endif
- #define OnPlayerLeaveCheckpoint ac_OnPlayerLeaveCheckpoint
- #if defined ac_OnPlayerLeaveCheckpoint
- forward ac_OnPlayerLeaveCheckpoint(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerRequestSpawn(playerid)
- #else
- public OnPlayerRequestSpawn(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][19] + ac_Mtfc[19][0]) return ac_FloodDetect(playerid, 19);
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][19] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acSpawnWeapon1] = ac_Class[ACInfo[playerid][acClassid]][0][0];
- ACInfo[playerid][acSpawnAmmo1] = ac_Class[ACInfo[playerid][acClassid]][0][1];
- ACInfo[playerid][acSpawnWeapon2] = ac_Class[ACInfo[playerid][acClassid]][1][0];
- ACInfo[playerid][acSpawnAmmo2] = ac_Class[ACInfo[playerid][acClassid]][1][1];
- ACInfo[playerid][acSpawnWeapon3] = ac_Class[ACInfo[playerid][acClassid]][2][0];
- ACInfo[playerid][acSpawnAmmo3] = ac_Class[ACInfo[playerid][acClassid]][2][1];
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][19] = ac_i;
- ac_i = 1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerRequestSpawn
- ac_i = ac_OnPlayerRequestSpawn(playerid);
- #endif
- if(ac_i)
- {
- ACInfo[playerid][acSet][7] = 3;
- ACInfo[playerid][acSpawnRes]++;
- }
- return ac_i;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerRequestSpawn
- #undef OnPlayerRequestSpawn
- #else
- #define _ALS_OnPlayerRequestSpawn
- #endif
- #define OnPlayerRequestSpawn ac_OnPlayerRequestSpawn
- #if defined ac_OnPlayerRequestSpawn
- forward ac_OnPlayerRequestSpawn(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerExitedMenu(playerid)
- #else
- public OnPlayerExitedMenu(playerid)
- #endif
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][20] + ac_Mtfc[20][0]) ac_FloodDetect(playerid, 20);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][20] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][20] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerExitedMenu
- return ac_OnPlayerExitedMenu(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerExitedMenu
- #undef OnPlayerExitedMenu
- #else
- #define _ALS_OnPlayerExitedMenu
- #endif
- #define OnPlayerExitedMenu ac_OnPlayerExitedMenu
- #if defined ac_OnPlayerExitedMenu
- forward ac_OnPlayerExitedMenu(playerid);
- #endif
- #endif
- #if defined OnPlayerEnterDynamicRaceCP
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerEnterDynRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid)
- #else
- hook OnPlayerEnterDynRaceCP(playerid, checkpointid)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid)
- #else
- public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
- #endif
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][21] + ac_Mtfc[21][0]) ac_FloodDetect(playerid, 21);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][21] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][21] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEnterDynamicRaceCP
- return ac_OnPlayerEnterDynamicRaceCP(playerid, checkpointid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEnterDynamicRaceCP
- #undef OnPlayerEnterDynamicRaceCP
- #else
- #define _ALS_OnPlayerEnterDynamicRaceCP
- #endif
- #define OnPlayerEnterDynamicRaceCP ac_OnPlayerEnterDynamicRaceCP
- #if defined ac_OnPlayerEnterDynamicRaceCP
- #if defined STREAMER_ENABLE_TAGS
- forward ac_OnPlayerEnterDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid);
- #else
- forward ac_OnPlayerEnterDynamicRaceCP(playerid, checkpointid);
- #endif
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerEnterRaceCP(playerid)
- #else
- public OnPlayerEnterRaceCheckpoint(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][21] + ac_Mtfc[21][0]) ac_FloodDetect(playerid, 21);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][21] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][21] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEnterRaceCheckpoint
- return ac_OnPlayerEnterRaceCheckpoint(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEnterRaceCheckpoin\
- || defined _ALS_OnPlayerEnterRaceCP || defined _ALS_OnPlayer\
- EnterRaceCheckpoint
- #undef OnPlayerEnterRaceCheckpoint
- #else
- #define _ALS_OnPlayerEnterRaceCheckpoint
- #endif
- #define OnPlayerEnterRaceCheckpoint ac_OnPlayerEnterRaceCheckpoint
- #if defined ac_OnPlayerEnterRaceCheckpoint
- forward ac_OnPlayerEnterRaceCheckpoint(playerid);
- #endif
- #endif
- #if defined OnPlayerLeaveDynamicRaceCP
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerLeaveDynRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid)
- #else
- hook OnPlayerLeaveDynRaceCP(playerid, checkpointid)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerLeaveDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid)
- #else
- public OnPlayerLeaveDynamicRaceCP(playerid, checkpointid)
- #endif
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][22] + ac_Mtfc[22][0]) ac_FloodDetect(playerid, 22);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][22] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][22] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerLeaveDynamicRaceCP
- return ac_OnPlayerLeaveDynamicRaceCP(playerid, checkpointid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerLeaveDynamicRaceCP
- #undef OnPlayerLeaveDynamicRaceCP
- #else
- #define _ALS_OnPlayerLeaveDynamicRaceCP
- #endif
- #define OnPlayerLeaveDynamicRaceCP ac_OnPlayerLeaveDynamicRaceCP
- #if defined ac_OnPlayerLeaveDynamicRaceCP
- #if defined STREAMER_ENABLE_TAGS
- forward ac_OnPlayerLeaveDynamicRaceCP(playerid, STREAMER_TAG_RACE_CP checkpointid);
- #else
- forward ac_OnPlayerLeaveDynamicRaceCP(playerid, checkpointid);
- #endif
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerLeaveRaceCP(playerid)
- #else
- public OnPlayerLeaveRaceCheckpoint(playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][22] + ac_Mtfc[22][0]) ac_FloodDetect(playerid, 22);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][22] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][22] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerLeaveRaceCheckpoint
- return ac_OnPlayerLeaveRaceCheckpoint(playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerLeaveRaceCheckpoin\
- || defined _ALS_OnPlayerLeaveRaceCP || defined _ALS_OnPlayer\
- LeaveRaceCheckpoint
- #undef OnPlayerLeaveRaceCheckpoint
- #else
- #define _ALS_OnPlayerLeaveRaceCheckpoint
- #endif
- #define OnPlayerLeaveRaceCheckpoint ac_OnPlayerLeaveRaceCheckpoint
- #if defined ac_OnPlayerLeaveRaceCheckpoint
- forward ac_OnPlayerLeaveRaceCheckpoint(playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerClickPlayerTD(playerid, PlayerText:playertextid)
- #else
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 1;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][23] + ac_Mtfc[23][0])
- {
- ac_FloodDetect(playerid, 23);
- return 1;
- }
- if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][23] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][23] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerClickPlayerTextDraw
- return ac_OnPlayerClickPlayerTextDraw(playerid, playertextid);
- #else
- return 0;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerClickPlayerTextDra\
- || defined _ALS_OnPlayerClickPlayerTD || defined _ALS_OnPlayer\
- ClickPlayerTextDraw
- #undef OnPlayerClickPlayerTextDraw
- #else
- #define _ALS_OnPlayerClickPlayerTD
- #endif
- #define OnPlayerClickPlayerTextDraw ac_OnPlayerClickPlayerTextDraw
- #if defined ac_OnPlayerClickPlayerTextDraw
- forward ac_OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehDamageStatusUpd(vehicleid, playerid)
- #else
- public OnVehicleDamageStatusUpdate(vehicleid, playerid)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][24] + ac_Mtfc[24][0]) ac_FloodDetect(playerid, 24);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][24] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][24] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleDamageStatusUpdate
- return ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleDamageStatusUpdat\
- || defined _ALS_OnVehicleDamageStatusUpd || defined _ALS_OnVehicle\
- DamageStatusUpdate
- #undef OnVehicleDamageStatusUpdate
- #else
- #define _ALS_OnVehicleDamageStatusUpdate
- #endif
- #define OnVehicleDamageStatusUpdate ac_OnVehicleDamageStatusUpdate
- #if defined ac_OnVehicleDamageStatusUpdate
- forward ac_OnVehicleDamageStatusUpdate(vehicleid, playerid);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnVehicleSirenChange(playerid, vehicleid, newstate)
- #else
- public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][25] + ac_Mtfc[25][0]) ac_FloodDetect(playerid, 25);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][25] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][25] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnVehicleSirenStateChange
- return ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnVehicleSirenStateChange
- #undef OnVehicleSirenStateChange
- #else
- #define _ALS_OnVehicleSirenStateChange
- #endif
- #define OnVehicleSirenStateChange ac_OnVehicleSirenStateChange
- #if defined ac_OnVehicleSirenStateChange
- forward ac_OnVehicleSirenStateChange(playerid, vehicleid, newstate);
- #endif
- #endif
- #if defined OnPlayerSelectDynamicObject
- #if defined _inc_y_hooks || defined _INC_y_hooks
- #if defined STREAMER_ENABLE_TAGS
- hook OnPlayerSelectDynObj(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
- #else
- hook OnPlayerSelectDynObj(playerid, objectid, modelid, Float:x, Float:y, Float:z)
- #endif
- #else
- #if defined STREAMER_ENABLE_TAGS
- public OnPlayerSelectDynamicObject(playerid, STREAMER_TAG_OBJECT objectid, modelid, Float:x, Float:y, Float:z)
- #else
- public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
- #endif
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerSelectDynamicObject
- return ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, x, y, z);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerSelectDynamicObjec\
- || defined _ALS_OnPlayerSelectDynamicObj || defined _ALS_OnPlayer\
- SelectDynamicObject
- #undef OnPlayerSelectDynamicObject
- #else
- #define _ALS_OnPlayerSelectDynamicObject
- #endif
- #define OnPlayerSelectDynamicObject ac_OnPlayerSelectDynamicObject
- #if defined ac_OnPlayerSelectDynamicObject
- forward ac_OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z);
- #endif
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
- #else
- public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- new ac_i = GetTickCount();
- if(ACInfo[playerid][acACAllow][49])
- {
- if(ac_i < ACInfo[playerid][acCall][26] + ac_Mtfc[26][0]) ac_FloodDetect(playerid, 26);
- else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
- else ACInfo[playerid][acFloodCount][26] = ACInfo[playerid][acFloodCount][27] = 0;
- }
- ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][26] = ac_i;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerSelectObject
- return ac_OnPlayerSelectObject(playerid, type, objectid, modelid, fX, fY, fZ);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerSelectObject
- #undef OnPlayerSelectObject
- #else
- #define _ALS_OnPlayerSelectObject
- #endif
- #define OnPlayerSelectObject ac_OnPlayerSelectObject
- #if defined ac_OnPlayerSelectObject
- forward ac_OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnUnoccupiedVehicleUpd(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
- #else
- public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- static Float:ac_X, Float:ac_Y, Float:ac_Z, Float:ac_D;
- GetVehiclePos(vehicleid, ac_X, ac_Y, ac_Z);
- ac_D = GetVehicleDistanceFromPoint(vehicleid, new_x, new_y, new_z);
- if(passenger_seat > 0)
- {
- static Float:ac_zdiff;
- ac_zdiff = new_z - ac_Z;
- if(ACInfo[playerid][acACAllow][31] && (floatabs(vel_x) >= floatabs(ACVehInfo[vehicleid][acVelX]) > 0.3 ||
- floatabs(vel_y) >= floatabs(ACVehInfo[vehicleid][acVelY]) > 0.3 || floatabs(vel_x - ACVehInfo[vehicleid][acVelX]) > 25.0 ||
- floatabs(vel_y - ACVehInfo[vehicleid][acVelY]) > 25.0) && ac_zdiff > -5.0)
- {
- if(++ACInfo[playerid][acCheatCount][4] > AC_MAX_CARSHOT_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Vel x: %f, old vel x: %f, vel y: %f, old vel y: %f, pos diff z: %f, vehicleid: %d",
- vel_x, ACVehInfo[vehicleid][acVelX], vel_y, ACVehInfo[vehicleid][acVelY], ac_zdiff, vehicleid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 31);
- ACInfo[playerid][acCheatCount][4] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 31);
- #endif
- }
- #undef AC_MAX_CARSHOT_WARNINGS
- }
- else if(ACInfo[playerid][acACAllow][8] && vel_z >= 0.1 && vel_z > ACVehInfo[vehicleid][acVelZ] &&
- floatabs(ac_X - new_x) < ac_zdiff && floatabs(ac_Y - new_y) < ac_zdiff)
- {
- if(++ACInfo[playerid][acCheatCount][3] > AC_MAX_FLYHACK_VEH_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Vel z: %f, old vel z: %f, pos diff x: %f, pos diff y: %f, pos diff z: %f, vehicleid: %d",
- vel_z, ACVehInfo[vehicleid][acVelZ], ac_X - new_x, ac_Y - new_y, ac_zdiff, vehicleid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 8, 2);
- ACInfo[playerid][acCheatCount][3] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 8, 2);
- #endif
- }
- #undef AC_MAX_FLYHACK_VEH_WARNINGS
- }
- else ACInfo[playerid][acCheatCount][4] =
- ACInfo[playerid][acCheatCount][3] = 0;
- }
- if(ACInfo[playerid][acACAllow][5] && ac_D > 15.0 && ac_Z > -70.0 &&
- ac_D > ACVehInfo[vehicleid][acPosDiff] + ((ac_D / 3) * 1.5))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Distance: %f, old pos diff: %f, pos z: %f, vehicleid: %d",
- ac_D, ACVehInfo[vehicleid][acPosDiff], ac_Z, vehicleid);
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 5);
- #endif
- GetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
- SetVehicleZAngle(vehicleid, ACVehInfo[vehicleid][acZAngle]);
- SetVehiclePos(vehicleid, ac_X, ac_Y, ac_Z);
- return 0;
- }
- static ac_a;
- ac_a = 1;
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnUnoccupiedVehicleUpdate
- ac_a = ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, new_x, new_y, new_z, vel_x, vel_y, vel_z);
- #endif
- if(ac_a)
- {
- ACVehInfo[vehicleid][acSpeedDiff] = ac_GetSpeed(vel_x, vel_y, vel_z) - ac_GetSpeed(ACVehInfo[vehicleid][acVelX], ACVehInfo[vehicleid][acVelY], ACVehInfo[vehicleid][acVelZ]);
- ACVehInfo[vehicleid][acPosDiff] = ac_D;
- ACVehInfo[vehicleid][acVelX] = vel_x;
- ACVehInfo[vehicleid][acVelY] = vel_y;
- ACVehInfo[vehicleid][acVelZ] = vel_z;
- }
- return ac_a;
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnUnoccupiedVehicleUpdate
- #undef OnUnoccupiedVehicleUpdate
- #else
- #define _ALS_OnUnoccupiedVehicleUpdate
- #endif
- #define OnUnoccupiedVehicleUpdate ac_OnUnoccupiedVehicleUpdate
- #if defined ac_OnUnoccupiedVehicleUpdate
- forward ac_OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z);
- #endif
- #endif
- #if defined _inc_y_hooks || defined _INC_y_hooks
- hook OnPlayerEditAttachedObj(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
- #else
- 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)
- #endif
- {
- if(ACInfo[playerid][acKicked]) return 0;
- if(ACInfo[playerid][acACAllow][46] && 384 <= modelid <= 393)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Object modelid: %d", modelid);
- #endif
- return ac_KickWithCode(playerid, "", 0, 46);
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks\
- && defined ac_OnPlayerEditAttachedObject
- return ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ, fScaleX, fScaleY, fScaleZ);
- #else
- return 1;
- #endif
- }
- #if !defined _inc_y_hooks && !defined _INC_y_hooks
- #if defined _ALS_OnPlayerEditAttachedObject
- #undef OnPlayerEditAttachedObject
- #else
- #define _ALS_OnPlayerEditAttachedObject
- #endif
- #define OnPlayerEditAttachedObject ac_OnPlayerEditAttachedObject
- #if defined ac_OnPlayerEditAttachedObject
- forward ac_OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ);
- #endif
- #endif
- ac_fpublic ac_Timer(playerid)
- {
- if(IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) return 0;
- if(ACInfo[playerid][acACAllow][51] && NetStats_MessagesRecvPerSecond(playerid) > AC_MAX_MSGS_REC_DIFF)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Max msgs per sec: %d, msgs per sec: %d",
- AC_MAX_MSGS_REC_DIFF, NetStats_MessagesRecvPerSecond(playerid));
- #endif
- ac_KickWithCode(playerid, "", 0, 51);
- }
- #undef AC_MAX_MSGS_REC_DIFF
- static ac_gpp;
- ac_gpp = GetPlayerPing(playerid);
- if(ACInfo[playerid][acACAllow][38])
- {
- if(ac_gpp > AC_MAX_PING && ac_gpp != 65535)
- {
- if(++ACInfo[playerid][acCheatCount][0] > AC_MAX_PING_WARNINGS)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Max ping: %d, ping: %d", AC_MAX_PING, ac_gpp);
- #endif
- ac_KickWithCode(playerid, "", 0, 38);
- #if defined OnCheatDetected
- ACInfo[playerid][acCheatCount][0] = 0;
- #endif
- }
- #undef AC_MAX_PING_WARNINGS
- }
- else ACInfo[playerid][acCheatCount][0] = 0;
- }
- ac_gpp += 150;
- static ac_gtc, bool:ac_ur;
- ac_gtc = GetTickCount();
- ac_ur = false;
- if(ACInfo[playerid][acDead] == false && ac_gtc > ACInfo[playerid][acGtc][7] + ac_gpp &&
- ac_gtc < ACInfo[playerid][acLastUpdate] + 1500)
- {
- for(new ac_i, ac_w, ac_a, bool:ac_cw, ac_s = ac_wSlot[GetPlayerWeapon(playerid)]; ac_i < 13; ++ac_i)
- {
- GetPlayerWeaponData(playerid, ac_i, ac_w, ac_a);
- if(ac_w == 39) ac_cw = true;
- if(ac_s != ac_i)
- {
- if(ACInfo[playerid][acSetWeapon][ac_i] != -1)
- {
- if(ACInfo[playerid][acSetWeapon][ac_i] == ac_w)
- {
- ACInfo[playerid][acSetWeapon][ac_i] = -1;
- ACInfo[playerid][acWeapon][ac_i] = ac_w;
- }
- else if(ACInfo[playerid][acACAllow][52] &&
- ac_gtc > ACInfo[playerid][acGtcSetWeapon][ac_i] + ac_gpp &&
- ++ACInfo[playerid][acNOPCount][0] > AC_MAX_NOP_WARNINGS)
- {
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "GivePlayerWeapon");
- printf("[Nex-AC debug] AC weapon: %d, weaponid: %d", ACInfo[playerid][acSetWeapon][ac_i], ac_w);
- #endif
- ac_KickWithCode(playerid, "", 0, 52, 13);
- #if defined OnCheatDetected
- ACInfo[playerid][acSetWeapon][ac_i] = -1;
- #endif
- }
- }
- else
- {
- if(ACInfo[playerid][acWeapon][ac_i] != ac_w)
- {
- if(ac_w == 0 || ac_w == 40 && ac_cw || ac_w == 46 &&
- ACInfo[playerid][acVeh] > 0 && ACInfo[playerid][acParachute])
- {
- ACInfo[playerid][acWeapon][ac_i] = ac_w;
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- }
- else if(0 <= ACInfo[playerid][acLastPickup] < MAX_PICKUPS &&
- ACPickInfo[ACInfo[playerid][acLastPickup]][acWeapon] == ac_w &&
- ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACPickInfo[ACInfo[playerid][acLastPickup]][acPosX],
- ACPickInfo[ACInfo[playerid][acLastPickup]][acPosY], ACPickInfo[ACInfo[playerid][acLastPickup]][acPosZ]))
- {
- ACInfo[playerid][acWeapon][ac_i] = ac_w;
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- }
- else if(ACInfo[playerid][acLastPickup] > MAX_PICKUPS &&
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acWeapon] == ac_w &&
- ac_a <= (3 <= ac_i <= 5 ? ACInfo[playerid][acAmmo][ac_i] + ac_pAmmo[ac_w] : ac_pAmmo[ac_w]) &&
- IsPlayerInRangeOfPoint(playerid, 8.0, ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosX],
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosY],
- ACDPickInfo[ACInfo[playerid][acLastPickup] - MAX_PICKUPS][acPosZ]))
- {
- ACInfo[playerid][acWeapon][ac_i] = ac_w;
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- }
- else if(ACInfo[playerid][acACAllow][15] && !(16 <= ac_w <= 43 && ac_a == 0))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] Weaponid: %d, ammo: %d", ac_w, ac_a);
- #endif
- ac_KickWithCode(playerid, "", 0, 15, 2);
- #if defined OnCheatDetected
- ACInfo[playerid][acWeapon][ac_i] = ac_w;
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- #endif
- }
- }
- if(ACInfo[playerid][acGiveAmmo][ac_i] != -65535)
- {
- if(ACInfo[playerid][acGiveAmmo][ac_i] >= ac_a)
- {
- ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- }
- else if(ACInfo[playerid][acACAllow][52] &&
- ac_gtc > ACInfo[playerid][acGtcGiveAmmo][ac_i] + ac_gpp)
- {
- if(++ACInfo[playerid][acNOPCount][1] > AC_MAX_NOP_WARNINGS)
- {
- #undef AC_MAX_NOP_WARNINGS
- #if defined DEBUG
- printf(DEBUG_CODE_5, playerid, "SetPlayerAmmo");
- printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
- ACInfo[playerid][acGiveAmmo][ac_i], ac_a, ac_w);
- #endif
- ac_KickWithCode(playerid, "", 0, 52, 14);
- #if defined OnCheatDetected
- ACInfo[playerid][acGiveAmmo][ac_i] = -65535;
- #endif
- }
- }
- }
- if(16 <= ac_w <= 43)
- {
- if(ac_a == 0) ACInfo[playerid][acAmmo][ac_i] = 0;
- else if(ACInfo[playerid][acACAllow][16] &&
- (ac_w != 40 && ac_a > ACInfo[playerid][acAmmo][ac_i] || ACInfo[playerid][acAmmo][ac_i] == 0 &&
- ac_a > ACInfo[playerid][acAmmo][ac_i] && ACInfo[playerid][acWeapon][8] != 39))
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
- ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
- #endif
- ac_KickWithCode(playerid, "", 0, 16, 2);
- #if defined OnCheatDetected
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- #endif
- }
- }
- }
- }
- else if(22 <= ac_w <= 32 || 41 <= ac_w <= 42 || ac_LagCompMode == false && (16 <= ac_w <= 39 || ac_w == 43))
- {
- if(ACInfo[playerid][acACAllow][16] &&
- ac_a > ACInfo[playerid][acAmmo][ac_i] && ACInfo[playerid][acGiveAmmo][ac_i] == -65535)
- {
- #if AC_USE_AMMUNATIONS
- if(22 <= ac_w <= 32 && ac_ur == false && ac_InAmmuNation(playerid, GetPlayerInterior(playerid)) &&
- ac_AmmuNationInfo[ac_w - 22][1] == ac_abs(ac_a - ACInfo[playerid][acAmmo][ac_i]))
- {
- if(ACInfo[playerid][acSet][10] != -1) ACInfo[playerid][acSet][10] += ac_AmmuNationInfo[ac_w - 22][0];
- else ACInfo[playerid][acSet][10] = ac_AmmuNationInfo[ac_w - 22][0];
- ACInfo[playerid][acAmmo][ac_i] += ac_AmmuNationInfo[ac_w - 22][1];
- ACInfo[playerid][acCheatCount][10] = 0;
- ac_ur = true;
- }
- else
- {
- #endif
- if(ac_LagCompMode == false)
- {
- #if defined DEBUG
- printf("[Nex-AC debug] AC ammo: %d, ammo: %d, weaponid: %d",
- ACInfo[playerid][acAmmo][ac_i], ac_a, ac_w);
- #endif
- ac_KickWithCode(playerid, "", 0, 16, 3);
- #if defined OnCheatDetected
- ACInfo[playerid][acAmmo][ac_i] = ac_a;
- #endif
- }
- #if AC_USE_AMMUNATIONS
- }
- #endif
- #undef ac_abs
- }
- else if(ACInfo[playerid][acAmmo][ac_i]) ACInfo[playerid][acAmmo][ac_i] = ac_a;
- }
- }
- }
- ACInfo[playerid][acCheatCount][1] = ACInfo[playerid][acCheatCount][2] = 0;
- if(ac_ur) ACInfo[playerid][acGtc][15] = ac_gtc + 1030;
- ACInfo[playerid][acTimerID] = SetTimerEx("ac_Timer", 1000, false, "i", playerid);
- return 1;
- }
- ac_fpublic ac_OnCheatDetected(playerid, ip_address[], type, code)
- {
- if(type) BlockIpAddress(ip_address, 0);
- else
- {
- switch(code)
- {
- case 40: SendClientMessage(playerid, AC_DEFAULT_COLOR, MAX_CONNECTS_MSG);
- case 41: SendClientMessage(playerid, AC_DEFAULT_COLOR, UNKNOWN_CLIENT_MSG);
- default:
- {
- static ac_strtmp[sizeof KICK_MSG];
- format(ac_strtmp, sizeof ac_strtmp, KICK_MSG, code);
- SendClientMessage(playerid, AC_DEFAULT_COLOR, ac_strtmp);
- #undef AC_DEFAULT_COLOR
- }
- }
- new ac_vehid = GetPlayerVehicleID(playerid), ac_pping = GetPlayerPing(playerid) + 150;
- SetTimerEx("ac_KickTimer", (ac_pping > AC_MAX_PING ? AC_MAX_PING : ac_pping), false, "i", playerid);
- #undef AC_MAX_PING
- if(ac_vehid > 0)
- {
- if(code == 4) ACInfo[playerid][acLastVeh] = ac_vehid;
- ACInfo[playerid][acKicked] = 2;
- }
- else ACInfo[playerid][acKicked] = 1;
- }
- return 1;
- }
- ac_fpublic ac_KickTimer(playerid) return Kick(playerid);
- #undef ac_fpublic
- stock AntiCheatGetHealth(playerid, &Float:achealth)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- achealth = ACInfo[playerid][acHealth];
- return 1;
- }
- stock AntiCheatGetArmour(playerid, &Float:acarmour)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- acarmour = ACInfo[playerid][acArmour];
- return 1;
- }
- stock AntiCheatGetVehicleHealth(vehicleid, &Float:achealth)
- {
- if(GetVehicleModel(vehicleid) == 0) return 0;
- achealth = ACVehInfo[vehicleid][acHealth];
- return 1;
- }
- stock AntiCheatGetWeaponData(playerid, acslot, &acweapons, &acammo)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- acweapons = ACInfo[playerid][acWeapon][acslot];
- acammo = ACInfo[playerid][acAmmo][acslot];
- return 1;
- }
- stock AntiCheatGetSpawnWeapon(playerid, &acweapon1, &acweapon1_ammo, &acweapon2, &acweapon2_ammo, &acweapon3, &acweapon3_ammo)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- acweapon1 = ACInfo[playerid][acSpawnWeapon1];
- acweapon1_ammo = ACInfo[playerid][acSpawnAmmo1];
- acweapon2 = ACInfo[playerid][acSpawnWeapon2];
- acweapon2_ammo = ACInfo[playerid][acSpawnAmmo2];
- acweapon3 = ACInfo[playerid][acSpawnWeapon3];
- acweapon3_ammo = ACInfo[playerid][acSpawnAmmo3];
- return 1;
- }
- stock AntiCheatGetPos(playerid, &Float:acx, &Float:acy, &Float:acz)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- acx = ACInfo[playerid][acPosX];
- acy = ACInfo[playerid][acPosY];
- acz = ACInfo[playerid][acPosZ];
- return 1;
- }
- stock AntiCheatGetSpeed(playerid, &Float:acspeed)
- {
- if(IsPlayerConnected(playerid) == 0) return 0;
- acspeed = ACInfo[playerid][acSpeed];
- return 1;
- }
- stock AntiCheatGetVehicleVelocity(vehicleid, &Float:acx, &Float:acy, &Float:acz)
- {
- if(GetVehicleModel(vehicleid) == 0) return 0;
- acx = ACVehInfo[vehicleid][acVelX];
- acy = ACVehInfo[vehicleid][acVelY];
- acz = ACVehInfo[vehicleid][acVelZ];
- return 1;
- }
- static ac_GetSpeed(Float:acX, Float:acY, Float:acZ, bool:speed3d = true)
- {
- if(speed3d) return floatround(VectorSize(acX, acY, acZ) * 179.28625);
- return floatround(VectorSize(acX, acY, 0.0) * 179.28625);
- }
- static ac_IsVehicleSeatOccupied(vehicleid, seat)
- {
- #if defined foreach
- foreach(new ac_i : Player)
- #else
- for(new ac_i = GetPlayerPoolSize(); ac_i > -1; --ac_i)
- {
- if(IsPlayerConnected(ac_i))
- #endif
- {
- if(ACInfo[ac_i][acVeh] == vehicleid && ACInfo[ac_i][acSeat] == seat) return 1;
- }
- #if !defined foreach
- }
- #endif
- return 0;
- }
- static stock ac_InRestaurant(playerid, interiorid)
- {
- #if AC_USE_RESTAURANTS
- new ac_i;
- switch(interiorid)
- {
- case 5: ac_i = 0;
- case 9: ac_i = 1;
- case 10: ac_i = 2;
- default: return 0;
- }
- return IsPlayerInRangeOfPoint(playerid, 3.0, ac_Restaurants[ac_i][0], ac_Restaurants[ac_i][1], ac_Restaurants[ac_i][2]);
- #else
- #pragma unused playerid, interiorid
- return 0;
- #endif
- #undef AC_USE_RESTAURANTS
- }
- static stock ac_InAmmuNation(playerid, interiorid)
- {
- #if AC_USE_AMMUNATIONS
- new ac_i, ac_s;
- switch(interiorid)
- {
- case 1: ac_i = 0, ac_s = -1;
- case 4: ac_i = 1, ac_s = 0;
- case 6: ac_i = 3, ac_s = 1;
- default: return 0;
- }
- for(; ac_i > ac_s; --ac_i)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, ac_AmmuNations[ac_i][0],
- ac_AmmuNations[ac_i][1], ac_AmmuNations[ac_i][2])) return 1;
- }
- #else
- #pragma unused playerid, interiorid
- #endif
- #undef AC_USE_AMMUNATIONS
- return 0;
- }
- static stock ac_InPayNSpray(playerid, interiorid)
- {
- #if AC_USE_PAYNSPRAY
- if(interiorid == 0)
- {
- for(new ac_i = sizeof(ac_PayNSpray) - 1; ac_i > -1; --ac_i)
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.5, ac_PayNSpray[ac_i][0],
- ac_PayNSpray[ac_i][1], ac_PayNSpray[ac_i][2])) return 1;
- }
- }
- #else
- #pragma unused playerid, interiorid
- #endif
- #undef AC_USE_PAYNSPRAY
- return 0;
- }
- static stock ac_NearVendingMachine(playerid, interiorid)
- {
- #if AC_USE_VENDING_MACHINES
- new ac_i, ac_s;
- switch(interiorid)
- {
- case 0: ac_i = 44, ac_s = -1;
- case 1: ac_i = 51, ac_s = 44;
- case 2: ac_i = 52, ac_s = 51;
- case 3: ac_i = 58, ac_s = 52;
- case 6: ac_i = 60, ac_s = 58;
- case 7: ac_i = 61, ac_s = 60;
- case 15: ac_i = 62, ac_s = 61;
- case 16: ac_i = 65, ac_s = 62;
- case 17: ac_i = 72, ac_s = 65;
- case 18: ac_i = 74, ac_s = 72;
- default: return 0;
- }
- for(; ac_i > ac_s; --ac_i)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.5, ac_vMachines[ac_i][0],
- ac_vMachines[ac_i][1], ac_vMachines[ac_i][2])) return 1;
- }
- #else
- #pragma unused playerid, interiorid
- #endif
- #undef AC_USE_VENDING_MACHINES
- return 0;
- }
- static stock ac_InCasino(playerid, interiorid)
- {
- #if AC_USE_CASINOS
- new ac_i, ac_s;
- switch(interiorid)
- {
- case 1: ac_i = 41, ac_s = -1;
- case 10: ac_i = 61, ac_s = 41;
- case 12: ac_i = 70, ac_s = 61;
- default: return 0;
- }
- for(; ac_i > ac_s; --ac_i)
- {
- if(IsPlayerInRangeOfPoint(playerid, ac_Casinos[ac_i][3], ac_Casinos[ac_i][0],
- ac_Casinos[ac_i][1], ac_Casinos[ac_i][2])) return 1;
- }
- #else
- #pragma unused playerid, interiorid
- #endif
- #undef AC_USE_CASINOS
- return 0;
- }
- static ac_IsCompatible(modelid, componentid)
- {
- if(modelid > 0)
- {
- switch(componentid)
- {
- case 1000..1191:
- {
- componentid -= 1000;
- if(ac_vMods[(modelid - 400) * 6 + (componentid >>> 5)] & 1 << (componentid & 0b00011111)) return 1;
- }
- case 1192, 1193:
- {
- if(modelid == 576) return 1;
- }
- }
- }
- return 0;
- }
- static ac_IpToInt(const s_szIP[])
- {
- new ac_aiBytes[1], ac_iPos;
- ac_aiBytes{0} = strval(s_szIP[ac_iPos]);
- while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
- ac_aiBytes{1} = strval(s_szIP[ac_iPos]);
- while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
- ac_aiBytes{2} = strval(s_szIP[ac_iPos]);
- while(ac_iPos < 15 && s_szIP[ac_iPos++] != '.'){}
- ac_aiBytes{3} = strval(s_szIP[ac_iPos]);
- return ac_aiBytes[0];
- }
- static ac_FloodDetect(playerid, publicid)
- {
- if(ACInfo[playerid][acKicked] == 0)
- {
- if(++ACInfo[playerid][acFloodCount][publicid] > ac_Mtfc[publicid][1])
- {
- #if defined DEBUG
- printf(DEBUG_CODE_1, playerid, ac_Mtfc[publicid][1], publicid);
- #undef DEBUG
- #endif
- #if defined OnCheatDetected
- ac_KickWithCode(playerid, "", 0, 49, publicid);
- ACInfo[playerid][acFloodCount][publicid] = ACInfo[playerid][acFloodCount][27] = 0;
- #else
- return ac_KickWithCode(playerid, "", 0, 49, publicid);
- #endif
- }
- ACInfo[playerid][acCall][publicid] = ACInfo[playerid][acCall][27] = GetTickCount();
- }
- return 0;
- }
- static ac_KickWithCode(playerid, ip_address[], type, code, code2 = 0)
- {
- if(type == 0 && (IsPlayerConnected(playerid) == 0 || ACInfo[playerid][acKicked]) ||
- !(0 <= code < sizeof ac_ACAllow)) return 0;
- ac_sInfo[5]++;
- switch(code)
- {
- case 0..35, 37, 39, 51: ac_sInfo[0]++;
- case 36, 38, 40, 41, 50: ac_sInfo[4]++;
- case 42: ac_sInfo[1]++;
- case 47..49: ac_sInfo[3]++;
- case 43..46: ac_sInfo[2]++;
- }
- static ac_strtmp[6];
- ac_strtmp[0] = EOS;
- if(code2) format(ac_strtmp, sizeof ac_strtmp, " (%d)", code2);
- if(type) printf(SUSPICION_2, ip_address, code, ac_strtmp);
- else printf(SUSPICION_1, playerid, code, ac_strtmp);
- #if defined OnCheatDetected
- OnCheatDetected(playerid, ip_address, type, code);
- #else
- ac_OnCheatDetected(playerid, ip_address, type, code);
- #endif
- return 0;
- }
- static ac_LoadCfg()
- {
- new ac_i, File:ac_cfgFile;
- static ac_string[415], ac_strtmp[9];
- ac_string[0] = EOS;
- if(fexist(AC_CONFIG_FILE))
- {
- if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_read)))
- {
- #if defined sscanf
- new ac_j;
- #endif
- while(fread(ac_cfgFile, ac_string) > 0)
- {
- #if defined sscanf
- sscanf(ac_string, "i'//'i", ac_j, ac_i);
- ac_ACAllow[ac_i] = !!ac_j;
- #else
- if((ac_i = strfind(ac_string, "//")) != -1)
- {
- strmid(ac_strtmp, ac_string, ac_i + 2, strlen(ac_string));
- if(0 <= (ac_i = strval(ac_strtmp)) < sizeof ac_ACAllow) ac_ACAllow[ac_i] = !!strval(ac_string);
- }
- #endif
- }
- fclose(ac_cfgFile);
- }
- else return 0;
- }
- else if((ac_cfgFile = fopen(AC_CONFIG_FILE, io_write)))
- {
- #undef AC_CONFIG_FILE
- for(; ac_i < sizeof ac_ACAllow; ++ac_i)
- {
- format(ac_strtmp, sizeof ac_strtmp, "%d //%d\r\n", ac_ACAllow[ac_i], ac_i);
- strcat(ac_string, ac_strtmp);
- }
- fwrite(ac_cfgFile, ac_string);
- fclose(ac_cfgFile);
- }
- else return 0;
- return 1;
- }
- #endif
|