1
0

OnPlayerCommandReceived.inc 408 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006
  1. // Convert to ZCMD
  2. //==============================================================================
  3. static str[144], tmp[144], sendername[MAX_PLAYER_NAME+1], giveplayer[MAX_PLAYER_NAME+1];
  4. public OnPlayerCommandReceived(playerid, cmdtext[])
  5. {
  6. if(!gamemodeLoaded) return SendClientMessage(playerid, COLOR_GREY, "Please wait until the gamemode finishes loading.");
  7. new cmd[64], idx;
  8. cmd = strtok(cmdtext, idx);
  9. if(gPlayerSpawned[playerid] == 0)
  10. {
  11. SendClientMessage(playerid, COLOR_GRAD1, "You are not logged in or have not spawned.");
  12. return 0;
  13. }
  14. if(PlayerInfo[playerid][pAdmin] > 0 && gAdminAuthorized[playerid] == 0)
  15. {
  16. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) was kicked for attempting to use commands without authorizing.", PlayerICName(playerid), playerid);
  17. UpdateWarnings(str);
  18. KickEx(playerid);
  19. return 0;
  20. }
  21. if(strcmp(cmd, "/pdcctv", true, 6) && watchingPDCCTV[playerid]) {
  22. SendClientMessage(playerid, COLOR_GRAD1, "You can only use the /pdcctv command at the moment.");
  23. return 0;
  24. }
  25. if(strcmp(cmd, "/mute", true, 4) && strcmp(cmd, "/report", true, 6) && PlayerInfo[playerid][pMuted] == 1)
  26. {
  27. SendClientMessage(playerid, COLOR_GRAD1, "You can't speak, you're muted.");
  28. return 0;
  29. }
  30. //anti server ad
  31. if(PlayerInfo[playerid][pAdmin] < 1)
  32. {
  33. new i_numcount, i_period, i_pos;
  34. if(strfind(cmdtext, ":", true) != -1)
  35. {
  36. while(cmdtext[i_pos])
  37. {
  38. if('0' <= cmdtext[i_pos] <= '9') i_numcount++;
  39. else if(cmdtext[i_pos] == '.') i_period++;
  40. i_pos++;
  41. }
  42. if(i_numcount >= 8 && i_period >= 3)
  43. {
  44. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s [%d] has attempted to advertise another server.", PlayerICName(playerid), playerid);
  45. ABroadCast(COLOR_WHITE, str, 1);
  46. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: '%s'", cmdtext);
  47. ABroadCast(COLOR_GRAD3, str, 1);
  48. return 0;
  49. }
  50. }
  51. else // If there is no colon
  52. {
  53. if(!strcmp(cmd, "/newb", true, 4) || !strcmp(cmd, "/newbie", true, 6))
  54. {
  55. if(i_numcount >= 8 && PlayerInfo[playerid][pConnectTime] < 3)
  56. {
  57. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s [%d] may have attempted to advertise another server.", PlayerICName(playerid), playerid);
  58. ABroadCast(COLOR_WHITE, str, 1);
  59. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: '%s'", cmdtext);
  60. ABroadCast(COLOR_GRAD3, str, 1);
  61. return 0;
  62. }
  63. }
  64. }
  65. }
  66. return 1;
  67. }
  68. //////// Timer /////////////
  69. Timer:stopCMD(playerid) return pCommandUsed[playerid] = false;
  70. Timer:DropWepTimer(playerid)
  71. {
  72. if(!IsPlayerConnected(playerid)) return 0;
  73. if(DropWeaponTimer[playerid] == 1)
  74. {
  75. DropWeaponTimer[playerid] = 0;
  76. }
  77. return 1;
  78. }
  79. Timer:UseFare(playerid)
  80. {
  81. if(!IsPlayerConnected(playerid)) return 0;
  82. if(UseFareTimer[playerid])
  83. {
  84. UseFareTimer[playerid] = 0;
  85. }
  86. return 1;
  87. }
  88. Timer:SellGun(playerid)
  89. {
  90. if(!IsPlayerConnected(playerid)) return 0;
  91. if(SellGunTimer[playerid])
  92. {
  93. SellGunTimer[playerid] = 0;
  94. }
  95. return 1;
  96. }
  97. Timer:Fillup(playerid)
  98. {
  99. new FillUp;
  100. new vehicleid = GetPlayerVehicleID(playerid);
  101. FillUp = 100 - Gas[vehicleid];
  102. if(FillUp > 100)
  103. {
  104. SendClientMessage(playerid, COLOR_GREY, "The vehicle fuel tank is full.");
  105. Refueling[playerid] = 0;
  106. return 1;
  107. }
  108. if(Refueling[playerid] == 1)
  109. {
  110. if(PlayerInfo[playerid][pCash] >= FillUp +4)
  111. {
  112. Gas[vehicleid] += FillUp;
  113. FillUp = FillUp * 8;
  114. format(str, sizeof(str), "~w~ You filled up your vehicle~n~ for ~g~$%d~w~.", FillUp);
  115. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  116. GiveMoney(playerid, - FillUp);
  117. Refueling[playerid] = 0;
  118. }
  119. else
  120. {
  121. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  122. Refueling[playerid] = 0;
  123. }
  124. }
  125. return 1;
  126. }
  127. Timer:UseAccept(playerid)
  128. {
  129. if(!IsPlayerConnected(playerid)) return 0;
  130. if(UseAcceptTimer[playerid])
  131. {
  132. UseAcceptTimer[playerid] = 0;
  133. }
  134. return 1;
  135. }
  136. Timer:WeedPick(playerid, weed)
  137. {
  138. /*
  139. Pending re-work by Sparke
  140. */
  141. if(!IsPlayerConnected(playerid)) return 0;
  142. if(WeedPickTimer[playerid])
  143. {
  144. new Float:X, Float:Y, Float:Z;
  145. GetPlayerPos(playerid, X, Y, Z);
  146. if(WeedPickPosition[playerid][PosX] == X && WeedPickPosition[playerid][PosY] == Y && WeedPickPosition[playerid][PosZ] == Z)
  147. {
  148. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
  149. {
  150. if(WeedInfo[weed][WeedPlanted] == 1)
  151. {
  152. format(str, sizeof(str), "You have picked a weed plant and received %d grams of pot.", WeedInfo[weed][WeedGrams]);
  153. SendClientMessage(playerid, COLOR_GREEN, str);
  154. format(str, sizeof(str), "* %s picks a weed plant.", PlayerICName(playerid));
  155. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  156. format(str, sizeof(str), "~w~Found %d grams of pot", WeedInfo[weed][WeedGrams]);
  157. displayCenterHUDInfo(playerid, str, 8);
  158. PlayerInfo[playerid][pCannabis] += WeedInfo[weed][WeedGrams];
  159. if(weedObject[weed]) { DestroyDynamicObjectEx(weedObject[weed]); }
  160. weedObject[weed] = 0;
  161. GotPlant[playerid] = 1;
  162. OldWeedX[playerid] = WeedInfo[weed][WeedX];
  163. OldWeedY[playerid] = WeedInfo[weed][WeedY];
  164. OldWeedZ[playerid] = WeedInfo[weed][WeedZ];
  165. WeedInfo[weed][WeedX] = 0.0;
  166. WeedInfo[weed][WeedY] = 0.0;
  167. WeedInfo[weed][WeedZ] = 0.0;
  168. WeedInfo[weed][WeedTime] = 0;
  169. WeedInfo[weed][WeedPlanted] = 0;
  170. WeedInfo[weed][WeedGrams] = 0;
  171. strmid(WeedInfo[weed][WeedPlanter], "[NONE]", 0, strlen("[NONE]"), 128);
  172. WeedPickTimer[playerid] = 0;
  173. }
  174. else
  175. {
  176. WeedPickTimer[playerid] = 0;
  177. SendClientMessage(playerid, COLOR_GREEN, "This weed does not exist anymore.");
  178. }
  179. }
  180. else
  181. {
  182. WeedPickTimer[playerid] = 0;
  183. SendClientMessage(playerid, COLOR_GREEN, "You are not crouched, picking failed.");
  184. }
  185. }
  186. else
  187. {
  188. WeedPickTimer[playerid] = 0;
  189. SendClientMessage(playerid, COLOR_GREEN, "You have moved from your weed picking position, picking failed.");
  190. }
  191. }
  192. return 1;
  193. }
  194. /////////////////////////////////
  195. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  196. {
  197. if(!gamemodeLoaded) return SendClientMessage(playerid, COLOR_GREY, "Please wait until the gamemode finishes loading.");
  198. new cmd[64];
  199. new giveplayerid, moneys, idx;
  200. cmd = strtok(cmdtext, idx);
  201. strmid(sendername, PlayerName(playerid), 0, MAX_PLAYER_NAME);
  202. if(strcmp(cmd, "/changepass", true) != 0 && strcmp(cmd, "/ochangepass", true) != 0) printf("[cmd] [%s] %s", sendername, cmdtext);
  203. if(success) return 1;
  204. if(pCommandUsed[playerid] == false)
  205. {
  206. KillTimer(AFK_Timer[playerid]);
  207. pCommandUsed[playerid] = true;
  208. AFK_Timer[playerid] = SetTimerEx("Timer_stopCMD", 600000, false, "i", playerid); // 10 minutes
  209. }
  210. if(strcmp(cmd, "/fedit", true) == 0)
  211. {
  212. if(PlayerInfo[playerid][pGangDirector] < 1 && PlayerInfo[playerid][pAdmin] < 1337)
  213. {
  214. SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
  215. return 1;
  216. }
  217. tmp = strtok(cmdtext, idx);
  218. if(!strlen(tmp))
  219. {
  220. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  221. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  222. return 1;
  223. }
  224. new family = strvalEx(tmp);
  225. if(family < 1 || family > 20)
  226. {
  227. SendClientMessage(playerid, COLOR_GREY, "Family can't be below 1 or above 20.");
  228. return 1;
  229. }
  230. tmp = strtok(cmdtext, idx);
  231. if(!strlen(tmp))
  232. {
  233. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  234. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  235. return 1;
  236. }
  237. if(strcmp(tmp, "maxskins", true) == 0)
  238. {
  239. tmp = strtok(cmdtext, idx);
  240. if(!strlen(tmp))
  241. {
  242. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  243. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  244. return 1;
  245. }
  246. new amount = strvalEx(tmp);
  247. if(amount < 0 || amount > 8)
  248. {
  249. SendClientMessage(playerid, COLOR_GREY, "MaxSkins can't be below 0 or above 8.");
  250. return 1;
  251. }
  252. FamilyInfo[family -1][FamilySkins] = amount;
  253. format(str, sizeof(str), "You have adjusted the MaxSkins of Family %d to %d", family, amount);
  254. SendClientMessage(playerid, COLOR_WHITE, str);
  255. SaveFamilies();
  256. return 1;
  257. }
  258. if(strcmp(tmp, "skin1", true) == 0)
  259. {
  260. tmp = strtok(cmdtext, idx);
  261. if(!strlen(tmp))
  262. {
  263. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  264. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  265. return 1;
  266. }
  267. new amount = strvalEx(tmp);
  268. if(amount < 0 || amount > 311)
  269. {
  270. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  271. return 1;
  272. }
  273. FamilyInfo[family -1][FamilySkin1] = amount;
  274. format(str, sizeof(str), "You have adjusted Family %d's Skin1 to Skin ID %d", family, amount);
  275. SendClientMessage(playerid, COLOR_WHITE, str);
  276. SaveFamilies();
  277. return 1;
  278. }
  279. if(strcmp(tmp, "skin2", true) == 0)
  280. {
  281. tmp = strtok(cmdtext, idx);
  282. if(!strlen(tmp))
  283. {
  284. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  285. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  286. return 1;
  287. }
  288. new amount = strvalEx(tmp);
  289. if(amount < 0 || amount > 311)
  290. {
  291. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  292. return 1;
  293. }
  294. FamilyInfo[family -1][FamilySkin2] = amount;
  295. format(str, sizeof(str), "You have adjusted Family %d's Skin2 to Skin ID %d", family, amount);
  296. SendClientMessage(playerid, COLOR_WHITE, str);
  297. SaveFamilies();
  298. return 1;
  299. }
  300. if(strcmp(tmp, "skin3", true) == 0)
  301. {
  302. tmp = strtok(cmdtext, idx);
  303. if(!strlen(tmp))
  304. {
  305. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  306. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  307. return 1;
  308. }
  309. new amount = strvalEx(tmp);
  310. if(amount < 0 || amount > 311)
  311. {
  312. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  313. return 1;
  314. }
  315. FamilyInfo[family -1][FamilySkin3] = amount;
  316. format(str, sizeof(str), "You have adjusted Family %d's Skin3 to Skin ID %d", family, amount);
  317. SendClientMessage(playerid, COLOR_WHITE, str);
  318. SaveFamilies();
  319. return 1;
  320. }
  321. if(strcmp(tmp, "skin4", true) == 0)
  322. {
  323. tmp = strtok(cmdtext, idx);
  324. if(!strlen(tmp))
  325. {
  326. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  327. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  328. return 1;
  329. }
  330. new amount = strvalEx(tmp);
  331. if(amount < 0 || amount > 311)
  332. {
  333. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  334. return 1;
  335. }
  336. FamilyInfo[family -1][FamilySkin4] = amount;
  337. format(str, sizeof(str), "You have adjusted Family %d's Skin4 to Skin ID %d", family, amount);
  338. SendClientMessage(playerid, COLOR_WHITE, str);
  339. SaveFamilies();
  340. return 1;
  341. }
  342. if(strcmp(tmp, "skin5", true) == 0)
  343. {
  344. tmp = strtok(cmdtext, idx);
  345. if(!strlen(tmp))
  346. {
  347. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  348. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  349. return 1;
  350. }
  351. new amount = strvalEx(tmp);
  352. if(amount < 0 || amount > 311)
  353. {
  354. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  355. return 1;
  356. }
  357. FamilyInfo[family -1][FamilySkin5] = amount;
  358. format(str, sizeof(str), "You have adjusted Family %d's Skin5 to Skin ID %d", family, amount);
  359. SendClientMessage(playerid, COLOR_WHITE, str);
  360. SaveFamilies();
  361. return 1;
  362. }
  363. if(strcmp(tmp, "skin6", true) == 0)
  364. {
  365. tmp = strtok(cmdtext, idx);
  366. if(!strlen(tmp))
  367. {
  368. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  369. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  370. return 1;
  371. }
  372. new amount = strvalEx(tmp);
  373. if(amount < 0 || amount > 311)
  374. {
  375. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  376. return 1;
  377. }
  378. FamilyInfo[family -1][FamilySkin6] = amount;
  379. format(str, sizeof(str), "You have adjusted Family %d's Skin6 to Skin ID %d", family, amount);
  380. SendClientMessage(playerid, COLOR_WHITE, str);
  381. SaveFamilies();
  382. return 1;
  383. }
  384. if(strcmp(tmp, "skin7", true) == 0)
  385. {
  386. tmp = strtok(cmdtext, idx);
  387. if(!strlen(tmp))
  388. {
  389. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  390. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  391. return 1;
  392. }
  393. new amount = strvalEx(tmp);
  394. if(amount < 0 || amount > 311)
  395. {
  396. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  397. return 1;
  398. }
  399. FamilyInfo[family -1][FamilySkin7] = amount;
  400. format(str, sizeof(str), "You have adjusted Family %d's Skin7 to Skin ID %d", family, amount);
  401. SendClientMessage(playerid, COLOR_WHITE, str);
  402. SaveFamilies();
  403. return 1;
  404. }
  405. if(strcmp(tmp, "skin8", true) == 0)
  406. {
  407. tmp = strtok(cmdtext, idx);
  408. if(!strlen(tmp))
  409. {
  410. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fedit [family] [name] [amount]");
  411. SendClientMessage(playerid, COLOR_GREY, "Available names: MaxSkins, Skin1, Skin2, Skin3, Skin4, Skin5, Skin6, Skin7, Skin8");
  412. return 1;
  413. }
  414. new amount = strvalEx(tmp);
  415. if(amount < 0 || amount > 311)
  416. {
  417. SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
  418. return 1;
  419. }
  420. FamilyInfo[family -1][FamilySkin8] = amount;
  421. format(str, sizeof(str), "You have adjusted Family %d's Skin8 to Skin ID %d", family, amount);
  422. SendClientMessage(playerid, COLOR_WHITE, str);
  423. SaveFamilies();
  424. return 1;
  425. }
  426. else
  427. {
  428. SendClientMessage(playerid, COLOR_GREY, "Unknown name.");
  429. }
  430. return 1;
  431. }
  432. if(strcmp(cmd, "/setbizname", true) == 0)
  433. {
  434. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  435. {
  436. tmp = strtok(cmdtext, idx);
  437. if(!strlen(tmp))
  438. {
  439. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizname [id] [name]");
  440. return 1;
  441. }
  442. new business = strval(tmp);
  443. if(BizInfo[business][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business needs to be owned first.");
  444. // Fix to allow spaces in business names
  445. while(idx < strlen(cmdtext) && cmdtext[idx] <= ' ') idx++; // pass all spaces before the biz name
  446. strmid(tmp, cmdtext, idx, strlen(cmdtext));
  447. if(!strlen(tmp))
  448. {
  449. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz name [newname]");
  450. }
  451. if(strlen(tmp) >= 64) return SendClientMessage(playerid, COLOR_GRAD1, "The name length must be lesser than 64 characters.");
  452. if(!AlphaNumeric(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "The name can only contain alphabetical/numerical characters.");
  453. strmid(BizInfo[business][bName], tmp, 0, strlen(tmp), 255);
  454. format(str, sizeof(str), "You have set business ID %d's name to '%s'.", business, BizInfo[business][bName]);
  455. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  456. if(BizInfo[business][bOwned] == 0)
  457. {
  458. new pricestring[32];
  459. new price = BizInfo[business][bValue];
  460. new j = valstr(pricestring, price);
  461. while(j >= 4)
  462. {
  463. j -= 3;
  464. strins(pricestring, ",", j);
  465. }
  466. strins(pricestring, "$", 0);
  467. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[business][bName], pricestring);
  468. }
  469. else
  470. {
  471. // Government seized
  472. if(BizInfo[business][bSeized] == 1)
  473. {
  474. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[business][bName]);
  475. }
  476. // Judicial Department seized
  477. else if(BizInfo[business][bSeized] == 2) {
  478. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[business][bName]);
  479. }
  480. else
  481. {
  482. if(BizInfo[business][bLocked] == 1)
  483. {
  484. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[business][bName], BizInfo[business][bOwner]);
  485. }
  486. else
  487. {
  488. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  489. }
  490. }
  491. }
  492. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  493. }
  494. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  495. return 1;
  496. }
  497. if(strcmp(cmd, "/setbizowner", true) == 0)
  498. {
  499. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  500. {
  501. tmp = strtok(cmdtext, idx);
  502. if(!strlen(tmp))
  503. {
  504. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizowner [id] [owner name]");
  505. return 1;
  506. }
  507. new business = strval(tmp);
  508. new length = strlen(cmdtext);
  509. while((idx < length) && (cmdtext[idx] <= ' '))
  510. {
  511. idx++;
  512. }
  513. new offset = idx;
  514. new result[24];
  515. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  516. {
  517. result[idx - offset] = cmdtext[idx];
  518. idx++;
  519. }
  520. result[idx - offset] = EOS;
  521. if(!strlen(result))
  522. {
  523. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizowner [id] [owner name]");
  524. return 1;
  525. }
  526. strmid(BizInfo[business][bOwner], result, 0, strlen(result), 255);
  527. format(str, sizeof(str), "You have set business ID %d's owner name to '%s'.", business, BizInfo[business][bName]);
  528. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  529. if(BizInfo[business][bOwned] == 0)
  530. {
  531. new pricestring[32];
  532. new price = BizInfo[business][bValue];
  533. new j = valstr(pricestring, price);
  534. while(j >= 4)
  535. {
  536. j -= 3;
  537. strins(pricestring, ",", j);
  538. }
  539. strins(pricestring, "$", 0);
  540. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[business][bName], pricestring);
  541. }
  542. else
  543. {
  544. // Government seized
  545. if(BizInfo[business][bSeized] == 1)
  546. {
  547. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[business][bName]);
  548. }
  549. // Judicial Department seized
  550. else if(BizInfo[business][bSeized] == 2) {
  551. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[business][bName]);
  552. }
  553. else
  554. {
  555. if(BizInfo[business][bLocked] == 1)
  556. {
  557. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[business][bName], BizInfo[business][bOwner]);
  558. }
  559. else
  560. {
  561. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  562. }
  563. }
  564. }
  565. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  566. }
  567. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  568. return 1;
  569. }
  570. if(strcmp(cmd, "/setbizenter", true) == 0)
  571. {
  572. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  573. {
  574. tmp = strtok(cmdtext, idx);
  575. if(!strlen(tmp))
  576. {
  577. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizenter [bizid]");
  578. return 1;
  579. }
  580. new businessid = strval(tmp);
  581. new Float:x, Float:y, Float:z, Float:a;
  582. GetPlayerPos(playerid, x, y, z);
  583. BizInfo[businessid][bOutsideX] = x;
  584. BizInfo[businessid][bOutsideY] = y;
  585. BizInfo[businessid][bOutsideZ] = z;
  586. BizInfo[businessid][bOutsideWorld] = GetPlayerVirtualWorld(playerid);
  587. BizInfo[businessid][bOutsideInt] = GetPlayerInterior(playerid);
  588. GetPlayerFacingAngle(playerid, a);
  589. BizInfo[businessid][bOutsideAng] = a -180.0;
  590. //load pickups
  591. if(BizInfo[businessid][bOutsidePickup]) DestroyDynamicPickup(BizInfo[businessid][bOutsidePickup]);
  592. BizInfo[businessid][bOutsidePickup] = CreateDynamicPickup(1272, 23, BizInfo[businessid][bOutsideX], BizInfo[businessid][bOutsideY], BizInfo[businessid][bOutsideZ]);
  593. //load 3dtext
  594. if(BizText[businessid]) DestroyDynamic3DTextLabel(BizText[businessid]);
  595. if(BizInfo[businessid][bOwned] == 0)
  596. {
  597. new pricestring[32];
  598. new price = BizInfo[businessid][bValue];
  599. new j = valstr(pricestring, price);
  600. while(j >= 4)
  601. {
  602. j -= 3;
  603. strins(pricestring, ",", j);
  604. }
  605. strins(pricestring, "$", 0);
  606. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[businessid][bName], pricestring);
  607. }
  608. else if(BizInfo[businessid][bOwned] == 1)
  609. {
  610. // Government seized
  611. if(BizInfo[businessid][bSeized] == 1)
  612. {
  613. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[businessid][bName]);
  614. }
  615. // Judicial Department seized
  616. else if(BizInfo[businessid][bSeized] == 2) {
  617. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[businessid][bName]);
  618. }
  619. else
  620. {
  621. if(BizInfo[businessid][bLocked] == 1)
  622. {
  623. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  624. }
  625. else
  626. {
  627. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  628. }
  629. }
  630. }
  631. BizText[businessid] = CreateDynamic3DTextLabel(str, COLOR_BIZTEXT, BizInfo[businessid][bOutsideX], BizInfo[businessid][bOutsideY], BizInfo[businessid][bOutsideZ] +0.88, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  632. SaveBusinesses();
  633. format(str, sizeof(str), "You have set business ID %d's enter location.", businessid);
  634. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  635. }
  636. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  637. return 1;
  638. }
  639. if(strcmp(cmd, "/setbizexit", true) == 0)
  640. {
  641. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  642. {
  643. tmp = strtok(cmdtext, idx);
  644. if(!strlen(tmp))
  645. {
  646. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizexit [bizid]");
  647. return 1;
  648. }
  649. new businessid = strval(tmp);
  650. new Float:x, Float:y, Float:z, Float:a;
  651. GetPlayerPos(playerid, x, y, z);
  652. BizInfo[businessid][bInsideX] = x;
  653. BizInfo[businessid][bInsideY] = y;
  654. BizInfo[businessid][bInsideZ] = z;
  655. BizInfo[businessid][bInsideInt] = GetPlayerInterior(playerid);
  656. GetPlayerFacingAngle(playerid, a);
  657. BizInfo[businessid][bInsideAng] = a;
  658. //load pickups
  659. if(BizInfo[businessid][bInsidePickup]) DestroyDynamicPickup(BizInfo[businessid][bInsidePickup]);
  660. BizInfo[businessid][bInsidePickup] = CreateDynamicPickup(1272, 23, BizInfo[businessid][bInsideX], BizInfo[businessid][bInsideY], BizInfo[businessid][bInsideZ], businessid);
  661. SaveBusinesses();
  662. format(str, sizeof(str), "You have set business ID %d's exit location.", businessid);
  663. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  664. }
  665. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  666. return 1;
  667. }
  668. if(strcmp(cmd, "/setbizprod", true) == 0)
  669. {
  670. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  671. {
  672. tmp = strtok(cmdtext, idx);
  673. if(!strlen(tmp))
  674. {
  675. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizprod [bizid] [products]");
  676. return 1;
  677. }
  678. new businessid = strval(tmp);
  679. tmp = strtok(cmdtext, idx);
  680. if(!strlen(tmp))
  681. {
  682. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizprod [bizid] [products]");
  683. return 1;
  684. }
  685. new type = strval(tmp);
  686. BizInfo[businessid][bProducts] = type;
  687. SaveBusinesses();
  688. format(str, sizeof(str), "You have set business ID %d's products to %d.", businessid, type);
  689. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  690. }
  691. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  692. return 1;
  693. }
  694. if(strcmp(cmd, "/aseizebiz", true) == 0)
  695. {
  696. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  697. {
  698. tmp = strtok(cmdtext, idx);
  699. if(!strlen(tmp))
  700. {
  701. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /aseizebiz [bizid]");
  702. return 1;
  703. }
  704. new businessid = strval(tmp);
  705. if(!BizInfo[businessid][bOwned]) return SendClientMessage(playerid, COLOR_GREY, "You cannot seize a business that is not owned by someone.");
  706. if(BizInfo[businessid][bSeized] == 0)
  707. {
  708. format(str, sizeof(str), "You have seized business ID %d.", businessid);
  709. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  710. BizInfo[businessid][bSeized] = 1;
  711. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[businessid][bName]);
  712. UpdateDynamic3DTextLabelText(Text3D:BizText[businessid], COLOR_BIZTEXT, str);
  713. }
  714. else
  715. {
  716. format(str, sizeof(str), "You have unseized business ID %d.", businessid);
  717. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  718. BizInfo[businessid][bSeized] = 0;
  719. if(BizInfo[businessid][bLocked] == 1)
  720. {
  721. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  722. }
  723. else
  724. {
  725. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  726. }
  727. UpdateDynamic3DTextLabelText(Text3D:BizText[businessid], COLOR_BIZTEXT, str);
  728. }
  729. SaveBusinesses();
  730. }
  731. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  732. return 1;
  733. }
  734. if(strcmp(cmd, "/setbiztill", true) == 0)
  735. {
  736. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  737. {
  738. tmp = strtok(cmdtext, idx);
  739. if(!strlen(tmp))
  740. {
  741. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbiztill [bizid] [amount]");
  742. return 1;
  743. }
  744. new businessid = strval(tmp);
  745. tmp = strtok(cmdtext, idx);
  746. if(!strlen(tmp))
  747. {
  748. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbiztill [bizid] [amount]");
  749. return 1;
  750. }
  751. new type = strval(tmp);
  752. BizInfo[businessid][bTill] = type;
  753. SaveBusinesses();
  754. format(str, sizeof(str), "You have set business ID %d's bank amount to $%d.", businessid, type);
  755. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  756. }
  757. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  758. return 1;
  759. }
  760. /*if(strcmp(cmd, "/setbizentryfee", true) == 0)
  761. {
  762. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  763. {
  764. tmp = strtok(cmdtext, idx);
  765. if(!strlen(tmp))
  766. {
  767. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizentryfee [bizid] [amount]");
  768. return 1;
  769. }
  770. new id = strval(tmp);
  771. tmp = strtok(cmdtext, idx);
  772. if(!strlen(tmp))
  773. {
  774. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizentryfee [bizid] [amount]");
  775. return 1;
  776. }
  777. new type = strval(tmp);
  778. //BizInfo[id][bEntryFee] = type;
  779. SaveBusinesses();
  780. format(str, sizeof(str), "You have set business ID %d's entry fee to $%d.", id, type);
  781. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  782. }
  783. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  784. return 1;
  785. }*/
  786. if(strcmp(cmd, "/setbiztype", true) == 0)
  787. {
  788. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  789. {
  790. tmp = strtok(cmdtext, idx);
  791. if(!strlen(tmp))
  792. {
  793. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbiztype [bizid] [type]");
  794. SendClientMessage(playerid, COLOR_GREY, "Available Types: 1: gunshop, 2: burgershot, 3: 247, 4: bar/club, 5: sexshop, 6: clothes store, 7: donut store");
  795. SendClientMessage(playerid, COLOR_GREY, "Available Types: 8: clucknbell, 9: pizzastack, 10: bank, 11: electronics store, 12: furniture store 13: fishing");
  796. return 1;
  797. }
  798. new businessid = strval(tmp);
  799. tmp = strtok(cmdtext, idx);
  800. if(!strlen(tmp))
  801. {
  802. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbiztype [bizid] [type]");
  803. SendClientMessage(playerid, COLOR_GREY, "Available Types: 1: gunshop, 2: burgershot, 3: 247, 4: bar/club, 5: sexshop, 6: clothes store, 7: donut store");
  804. SendClientMessage(playerid, COLOR_GREY, "Available Types: 8: clucknbell, 9: pizzastack, 10: bank, 11: electronics store, 12: furniture store 13: fishing");
  805. return 1;
  806. }
  807. new type = strval(tmp);
  808. if(type > 13 || type < 1)
  809. {
  810. SendClientMessage(playerid, COLOR_GREY, "Type can't be below 1 or above 13.");
  811. return 1;
  812. }
  813. BizInfo[businessid][bType] = type;
  814. SaveBusinesses();
  815. format(str, sizeof(str), "You have set business ID %d's type to %d.", businessid, type);
  816. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  817. }
  818. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  819. return 1;
  820. }
  821. if(strcmp(cmd, "/setbizprice", true) == 0)
  822. {
  823. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  824. {
  825. tmp = strtok(cmdtext, idx);
  826. if(!strlen(tmp))
  827. {
  828. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizprice [bizid] [amount]");
  829. return 1;
  830. }
  831. new businessid = strval(tmp);
  832. tmp = strtok(cmdtext, idx);
  833. if(!strlen(tmp))
  834. {
  835. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setbizprice [bizid] [amount]");
  836. return 1;
  837. }
  838. new amount = strval(tmp);
  839. if(amount > 100000000 || amount < 1)
  840. {
  841. SendClientMessage(playerid, COLOR_GREY, "Type can't be below $1 or above $100,000,000.");
  842. return 1;
  843. }
  844. BizInfo[businessid][bValue] = amount;
  845. if(BizInfo[businessid][bOwned] == 0)
  846. {
  847. new pricestring[32];
  848. new price = BizInfo[businessid][bValue];
  849. new j = valstr(pricestring, price);
  850. while(j >= 4)
  851. {
  852. j -= 3;
  853. strins(pricestring, ",", j);
  854. }
  855. strins(pricestring, "$", 0);
  856. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[businessid][bName], pricestring);
  857. }
  858. else
  859. {
  860. // Government seized
  861. if(BizInfo[businessid][bSeized] == 1)
  862. {
  863. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[businessid][bName]);
  864. }
  865. // Judicial Department seized
  866. else if(BizInfo[businessid][bSeized] == 2) {
  867. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[businessid][bName]);
  868. }
  869. else
  870. {
  871. if(BizInfo[businessid][bLocked] == 1)
  872. {
  873. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  874. }
  875. else
  876. {
  877. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  878. }
  879. }
  880. }
  881. UpdateDynamic3DTextLabelText(Text3D:BizText[businessid], COLOR_BIZTEXT, str);
  882. SaveBusinesses();
  883. format(str, sizeof(str), "You have set business ID %d's value to $%d.", businessid, amount);
  884. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  885. }
  886. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  887. return 1;
  888. }
  889. if(strcmp(cmd, "/gotobiz", true) == 0)
  890. {
  891. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  892. {
  893. if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
  894. {
  895. SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
  896. return 1;
  897. }
  898. tmp = strtok(cmdtext, idx);
  899. if(!strlen(tmp))
  900. {
  901. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotobiz [bizid]");
  902. return 1;
  903. }
  904. new businessid = strval(tmp);
  905. SetPlayerPos(playerid, BizInfo[businessid][bOutsideX], BizInfo[businessid][bOutsideY], BizInfo[businessid][bOutsideZ]);
  906. SetPlayerVirtualWorld(playerid, BizInfo[businessid][bOutsideWorld]);
  907. SetPlayerInterior(playerid, BizInfo[businessid][bOutsideInt]);
  908. displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
  909. }
  910. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  911. return 1;
  912. }
  913. if(strcmp(cmd, "/asellbiz", true) == 0)
  914. {
  915. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  916. {
  917. new biz = IsPlayerNearBiz(playerid);
  918. if(biz == -1) return SendClientMessage(playerid, COLOR_GREY, "You must be near the business you wish to sell.");
  919. foreach( new i: Player )
  920. {
  921. if(PlayerInfo[i][pBizKey] == biz)
  922. {
  923. PlayerInfo[i][pBizKey] = -1;
  924. }
  925. }
  926. strmid(BizInfo[biz][bOwner], "None", 0, strlen("None"), 255);
  927. BizInfo[biz][bOwned] = 0;
  928. BizInfo[biz][bSeized] = 0;
  929. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have successfully sold this business.");
  930. new pricestring[32];
  931. new price = BizInfo[biz][bValue];
  932. new j = valstr(pricestring, price);
  933. while(j >= 4)
  934. {
  935. j -= 3;
  936. strins(pricestring, ",", j);
  937. }
  938. strins(pricestring, "$", 0);
  939. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[biz][bName], pricestring);
  940. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  941. }
  942. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  943. return 1;
  944. }
  945. if(strcmp(cmd, "/getbizid", true) == 0)
  946. {
  947. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pBizMod] == 1)
  948. {
  949. new biz = IsPlayerNearBiz(playerid);
  950. if(biz == -1) return SendClientMessage(playerid, COLOR_GREY, "You must be near the business to get the biz ID.");
  951. format(str, sizeof(str), "Name: %s, Owner: %s, ID: %d", BizInfo[biz][bName], BizInfo[biz][bOwner], biz);
  952. SendClientMessage(playerid, COLOR_WHITE, str);
  953. }
  954. else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  955. return 1;
  956. }
  957. if(strcmp(cmd, "/purchase", true) == 0)
  958. {
  959. if(UseBMTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds.");
  960. if(IsPlayerInRangeOfPoint(playerid, 30.0, 311.92, -137.58, 999.60) && PlayerInfo[playerid][pVirtualWorld] == 426)
  961. {
  962. if(PlayerInfo[playerid][pDonateRank] == 2)
  963. {
  964. ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "Silver Blackmarket", "Deagle $80,000\nAK-47 $150,000\nTEC9 $100,000\nMicro-UZI $100,000", "Purchase", "Cancel");
  965. }
  966. if(PlayerInfo[playerid][pDonateRank] == 3)
  967. {
  968. ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Gold Blackmarket", "Deagle $60,000\nKnife $1,000,000\nAK-47 $100,000\nTEC9 $50,000\nMicro-UZI $50,000", "Purchase", "Cancel");
  969. }
  970. if(PlayerInfo[playerid][pDonateRank] == 4)
  971. {
  972. ShowPlayerDialog(playerid, 3325, DIALOG_STYLE_LIST, "Gold Blackmarket", "Deagle $30,000\nKnife $600,000\nAK-47 $60,000\nTEC9 $25,000\nMicro-UZI $25,000\nSniper $80,000", "Purchase", "Cancel");
  973. }
  974. return 1;
  975. }
  976. else
  977. {
  978. SendClientMessage(playerid, COLOR_GREY, "You are not in the VIP Club/Black Market.");
  979. }
  980. return 1;
  981. }
  982. if(strcmp(cmd, "/biz", true) == 0)
  983. {
  984. if(PlayerInfo[playerid][pBizKey] == -1) return SendClientMessage(playerid, COLOR_GREY, "You do not own a business.");
  985. new business = PlayerInfo[playerid][pBizKey];
  986. if(BizInfo[business][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business is currently property of the government.");
  987. new x_nr[64];
  988. x_nr = strtok(cmdtext, idx);
  989. if(!strlen(x_nr))
  990. {
  991. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz [name]");
  992. SendClientMessage(playerid, COLOR_GRAD1, "Available names: EntryFee, Lock, Till, Restock, Name");
  993. /*if(business == 1)
  994. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Gate");*/
  995. return 1;
  996. }
  997. if(strcmp(x_nr, "name", true) == 0)
  998. {
  999. // Fix to allow spaces in business names
  1000. while(idx < strlen(cmdtext) && cmdtext[idx] <= ' ') idx++; // pass all spaces before the biz name
  1001. strmid(tmp, cmdtext, idx, strlen(cmdtext));
  1002. if(!strlen(tmp))
  1003. {
  1004. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz name [newname]");
  1005. }
  1006. if(strlen(tmp) < 5 || strlen(tmp) >= 64) return SendClientMessage(playerid, COLOR_GRAD1, "The name length must be greater than 5 and lesser than 64 characters.");
  1007. if(!AlphaNumeric(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "The name can only contain alphabetical/numerical characters.");
  1008. strmid(BizInfo[business][bName], tmp, 0, strlen(tmp), 255);
  1009. format(str, sizeof(str), "You have set your business name to '%s'.", BizInfo[business][bName]);
  1010. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  1011. // Government seized
  1012. if(BizInfo[business][bSeized] == 1)
  1013. {
  1014. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[business][bName]);
  1015. }
  1016. // Judicial Department seized
  1017. else if(BizInfo[business][bSeized] == 2) {
  1018. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[business][bName]);
  1019. }
  1020. else
  1021. {
  1022. if(BizInfo[business][bLocked] == 1)
  1023. {
  1024. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[business][bName], BizInfo[business][bOwner]);
  1025. }
  1026. else
  1027. {
  1028. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  1029. }
  1030. }
  1031. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  1032. return 1;
  1033. }
  1034. /*if(strcmp(x_nr, "entryfee", true) == 0)
  1035. {
  1036. tmp = strtok(cmdtext, idx);
  1037. if(!strlen(tmp))
  1038. {
  1039. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz entryfee [amount]");
  1040. return 1;
  1041. }
  1042. new amount = strval(tmp);
  1043. if(amount < 0 || amount > 5000)
  1044. {
  1045. SendClientMessage(playerid, COLOR_WHITE, "Entry fee cannot go below $0 or above $5,000.");
  1046. return 1;
  1047. }
  1048. BizInfo[business][bEntryFee] = amount;
  1049. format(str, sizeof(str), "Your business entry fee has been set to $%d.", amount);
  1050. SendClientMessage(playerid, COLOR_GREY, str);
  1051. // Government seized
  1052. if(BizInfo[business][bSeized] == 1)
  1053. {
  1054. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[business][bName]);
  1055. }
  1056. // Judicial Department seized
  1057. else if(BizInfo[business][bSeized] == 2) {
  1058. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[business][bName]);
  1059. }
  1060. else
  1061. {
  1062. if(BizInfo[business][bLocked] == 1)
  1063. {
  1064. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  1065. }
  1066. else
  1067. {
  1068. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  1069. }
  1070. }
  1071. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  1072. }*/
  1073. else if(strcmp(x_nr, "lock", true) == 0)
  1074. {
  1075. new inbusiness = 0;
  1076. if(IsPlayerInRangeOfPoint(playerid, 5.0, BizInfo[business][bInsideX], BizInfo[business][bInsideY], BizInfo[business][bInsideZ]))
  1077. {
  1078. if(GetPlayerVirtualWorld(playerid) == playerid)
  1079. {
  1080. inbusiness = 1;
  1081. }
  1082. }
  1083. if(!inbusiness && !IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[business][bOutsideX], BizInfo[business][bOutsideY], BizInfo[business][bOutsideZ]))
  1084. {
  1085. SendClientMessage(playerid, COLOR_GREY, "You are not near/inside your business.");
  1086. return 1;
  1087. }
  1088. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  1089. if(BizInfo[business][bLocked] == 1)
  1090. {
  1091. BizInfo[business][bLocked] = 0;
  1092. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  1093. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  1094. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  1095. format(str, sizeof(str), "* %s has unlocked the door to their business.", sendername);
  1096. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1097. return 1;
  1098. }
  1099. else
  1100. {
  1101. BizInfo[business][bLocked] = 1;
  1102. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[business][bName], BizInfo[business][bOwner]);
  1103. UpdateDynamic3DTextLabelText(Text3D:BizText[business], COLOR_BIZTEXT, str);
  1104. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  1105. format(str, sizeof(str), "* %s has locked the door to their business.", sendername);
  1106. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1107. return 1;
  1108. }
  1109. }
  1110. else if(strcmp(x_nr, "till", true) == 0)
  1111. {
  1112. tmp = strtok(cmdtext, idx);
  1113. if(!strlen(tmp))
  1114. {
  1115. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz till [amount]");
  1116. format(str, sizeof(str), "You have $%d in your business till.", BizInfo[business][bTill]);
  1117. SendClientMessage(playerid, COLOR_YELLOW, str);
  1118. return 1;
  1119. }
  1120. new amount = strval(tmp);
  1121. if(amount < 1 || amount > BizInfo[business][bTill]) return SendClientMessage(playerid, COLOR_GREY, "Invalid transaction amount.");
  1122. new ebill = amount / 8;
  1123. new profit = amount-ebill;
  1124. BizInfo[business][bTill] -= amount;
  1125. GiveMoney(playerid, profit);
  1126. TaxValue += ebill;
  1127. format(str, sizeof(str), "You have withdrawn $%d (Tax: -$%d. Profit: $%d) from your business till. Total business till: $%d", amount, ebill, profit, BizInfo[business][bTill]);
  1128. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  1129. }
  1130. else if(strcmp(x_nr, "restock", true) == 0)
  1131. {
  1132. if(IsPlayerInRangeOfPoint(playerid, 25.0, BizInfo[business][bInsideX], BizInfo[business][bInsideY], BizInfo[business][bInsideZ]))
  1133. {
  1134. if(GetPlayerVirtualWorld(playerid) == business)
  1135. {
  1136. tmp = strtok(cmdtext, idx);
  1137. if(!strlen(tmp))
  1138. {
  1139. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /biz restock [amount]");
  1140. format(str, sizeof(str), "Your business has %d products.", BizInfo[business][bProducts]);
  1141. SendClientMessage(playerid, COLOR_YELLOW, str);
  1142. return 1;
  1143. }
  1144. new amount = strval(tmp);
  1145. if(amount > PlayerInfo[playerid][pProducts]) return SendClientMessage(playerid, COLOR_GREY, "You don't have that many products.");
  1146. if(amount < 1 || amount > 500) return SendClientMessage(playerid, COLOR_GREY, "Cannot restock below 1 product or above 500 products.");
  1147. if(amount + BizInfo[business][bProducts] > 500) return SendClientMessage(playerid, COLOR_GREY, "Your business can only hold 500 max products.");
  1148. BizInfo[business][bProducts] += amount;
  1149. PlayerInfo[playerid][pProducts] -=amount;
  1150. format(str, sizeof(str), "You have restocked %d products into your business. Total Products: %d", amount, BizInfo[business][bProducts]);
  1151. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  1152. }
  1153. }
  1154. else
  1155. {
  1156. return SendClientMessage(playerid, COLOR_GREY, "You are not inside your business.");
  1157. }
  1158. }
  1159. /*else if(strcmp(x_nr,"gate",true) == 0)
  1160. {
  1161. if(business!= 1) return 1;
  1162. if(IsPlayerInRangeOfPoint(playerid,25.0,BizInfo[1][bInsideX],BizInfo[1][bInsideY],BizInfo[1][bInsideZ]))
  1163. {
  1164. if(GetPlayerVirtualWorld(playerid) == 1)
  1165. {
  1166. openSRGate();
  1167. }
  1168. }
  1169. else
  1170. {
  1171. return SendClientMessage(playerid,COLOR_GREY, "You are not inside your business.");
  1172. }
  1173. }*/
  1174. else
  1175. {
  1176. SendClientMessage(playerid, COLOR_GREY, "Invalid action.");
  1177. return 1;
  1178. }
  1179. return 1;
  1180. }
  1181. if(strcmp(cmd, "/famdeposit", true) == 0)
  1182. {
  1183. if(PlayerInfo[playerid][pFMember] == 255)
  1184. {
  1185. SendClientMessage(playerid, COLOR_GREY, "You are not in a Family.");
  1186. return 1;
  1187. }
  1188. if(!IsPlayerAtBankingPoint(playerid))
  1189. {
  1190. SendClientMessage(playerid, COLOR_GREY, "You are not at the bank counter.");
  1191. return 1;
  1192. }
  1193. tmp = strtok(cmdtext, idx);
  1194. if(!strlen(tmp))
  1195. {
  1196. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /famdeposit [amount]");
  1197. format(str, sizeof(str), "You have $%d in your family bank account.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank]);
  1198. SendClientMessage(playerid, COLOR_GRAD3, str);
  1199. return 1;
  1200. }
  1201. new cashdeposit = strvalEx(tmp);
  1202. if(cashdeposit > PlayerInfo[playerid][pCash] || cashdeposit < 1)
  1203. {
  1204. SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much.");
  1205. return 1;
  1206. }
  1207. GiveMoney(playerid, -cashdeposit);
  1208. FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank] =FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank] +cashdeposit;
  1209. SendClientMessage(playerid, COLOR_WHITE, "Bank Statement:");
  1210. format(str, sizeof(str), "Old Balance: $%d", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank]);
  1211. SendClientMessage(playerid, COLOR_GRAD2, str);
  1212. format(str, sizeof(str), "Deposit: $%d", cashdeposit);
  1213. SendClientMessage(playerid, COLOR_GRAD4, str);
  1214. format(str, sizeof(str), "New Balance: $%d", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank]);
  1215. SendClientMessage(playerid, COLOR_WHITE, str);
  1216. return 1;
  1217. }
  1218. if(strcmp(cmd, "/fwithdraw", true) == 0)
  1219. {
  1220. if(PlayerInfo[playerid][pFMember] == 255)
  1221. {
  1222. SendClientMessage(playerid, COLOR_GREY, "You are not in a Family.");
  1223. return 1;
  1224. }
  1225. if(!IsPlayerAtBankingPoint(playerid))
  1226. return SendClientMessage(playerid, COLOR_GREY, "You are not at a bank counter.");
  1227. if(PlayerInfo[playerid][pRank] < 4)
  1228. {
  1229. SendClientMessage(playerid, COLOR_GREY, "You must be rank 4 to withdraw money from your family bank account.");
  1230. return 1;
  1231. }
  1232. tmp = strtok(cmdtext, idx);
  1233. if(!strlen(tmp))
  1234. {
  1235. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fwithdraw [amount]");
  1236. format(str, sizeof(str), "You have $%d in your family bank account.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank]);
  1237. SendClientMessage(playerid, COLOR_GRAD3, str);
  1238. return 1;
  1239. }
  1240. new cashdeposit = strvalEx(tmp);
  1241. if(cashdeposit > FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank] || cashdeposit < 1)
  1242. {
  1243. SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much.");
  1244. return 1;
  1245. }
  1246. PlayerInfo[playerid][pCash] += cashdeposit;
  1247. FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank] =FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank] -cashdeposit;
  1248. format(str, sizeof(str), "You have withdrawn $%d from your family bank account, Total: $%d ", cashdeposit, FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyBank]);
  1249. SendClientMessage(playerid, COLOR_YELLOW, str);
  1250. return 1;
  1251. }
  1252. if(strcmp(cmd, "/engine", true) == 0)
  1253. {
  1254. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
  1255. if(!IsPlayerInAnyVehicle(playerid))
  1256. {
  1257. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  1258. return 1;
  1259. }
  1260. new vehid = GetPlayerVehicleID(playerid);
  1261. if(vehid != INVALID_VEHICLE_ID)
  1262. {
  1263. if(turningengine[playerid]) return 1; // avoiding spam
  1264. new Float:vhealth;
  1265. GetVehicleHealth( vehid, vhealth );
  1266. if( vhealth < 306.0 ) {
  1267. return SendClientMessage( playerid, COLOR_GREY, "The vehicle will not start." );
  1268. }
  1269. if(IsABicycle(vehid)) return SendClientMessage(playerid, COLOR_GREY, "That vehicle doesn't have an engine.");
  1270. if(Gas[vehid] < 1)
  1271. {
  1272. return SendClientMessage(playerid, COLOR_GREY, "That vehicle is out of fuel.");
  1273. }
  1274. if(Refueling[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't start your engine whilst re-fuelling.");
  1275. if(engineOn[vehid] == 0)
  1276. {
  1277. if(GetVehNeedHW(vehid, playerid))
  1278. {
  1279. return SendClientMessage(playerid, COLOR_GRAD2, "You do not have the key for this vehicle! (/(h)ot(w)ire)");
  1280. }
  1281. turningenginetimer[playerid] = SetTimerEx("Timer_EngineStart", 2500, false, "ii", playerid, vehid);
  1282. format(str, sizeof(str), "* %s turns the key in the ignition...", PlayerICName(playerid));
  1283. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1284. turningengine[playerid] = 1;
  1285. }
  1286. else
  1287. {
  1288. new engine, lights, alarm, doors, bonnet, boot, objective;
  1289. GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
  1290. SetVehicleParamsEx(vehid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
  1291. engineOn[vehid] = 0;
  1292. playerDisabledEngine[vehid] = 1;
  1293. format(str, sizeof(str), "* %s has turned their engine off.", PlayerICName(playerid));
  1294. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1295. }
  1296. }
  1297. return 1;
  1298. }
  1299. if(strcmp(cmd, "/lights", true) == 0)
  1300. {
  1301. if(!IsPlayerInAnyVehicle(playerid))
  1302. {
  1303. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
  1304. return 1;
  1305. }
  1306. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  1307. {
  1308. return 1;
  1309. }
  1310. new vehid = GetPlayerVehicleID(playerid);
  1311. if(vehid != INVALID_VEHICLE_ID)
  1312. {
  1313. if(IsABicycle(vehid))
  1314. {
  1315. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have lights.");
  1316. return 1;
  1317. }
  1318. new engine, lights, alarm, doors, bonnet, boot, objective;
  1319. GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
  1320. if(lightsOff[vehid] == 0)
  1321. {
  1322. SetVehicleParamsEx(vehid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
  1323. lightsOff[vehid] = 1;
  1324. format(str, sizeof(str), "* %s has turned their lights on.", PlayerICName(playerid));
  1325. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1326. }
  1327. else
  1328. {
  1329. SetVehicleParamsEx(vehid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
  1330. lightsOff[vehid] = 0;
  1331. format(str, sizeof(str), "* %s has turned their lights off.", PlayerICName(playerid));
  1332. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1333. }
  1334. }
  1335. return 1;
  1336. }
  1337. if(strcmp(cmd, "/hood", true) == 0)
  1338. {
  1339. new vehid = gLastCar[playerid];
  1340. if(vehid == INVALID_VEHICLE_ID)
  1341. {
  1342. return 1;
  1343. }
  1344. new Float:cx, Float:cy, Float:cz;
  1345. GetVehiclePos(vehid, cx, cy, cz);
  1346. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || IsPlayerInRangeOfPoint(playerid, 4, cx, cy, cz) && !IsPlayerInAnyVehicle(playerid))
  1347. {
  1348. if(IsABicycle(vehid))
  1349. {
  1350. SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a hood.");
  1351. return 1;
  1352. }
  1353. new engine, lights, alarm, doors, bonnet, boot, objective;
  1354. GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
  1355. if(hoodOpen[vehid] == 0)
  1356. {
  1357. SetVehicleParamsEx(vehid, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
  1358. hoodOpen[vehid] = 1;
  1359. format(str, sizeof(str), "* %s has opened their hood.", PlayerICName(playerid));
  1360. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1361. }
  1362. else
  1363. {
  1364. SetVehicleParamsEx(vehid, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
  1365. hoodOpen[vehid] = 0;
  1366. format(str, sizeof(str), "* %s has closed their hood.", PlayerICName(playerid));
  1367. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  1368. }
  1369. }
  1370. else
  1371. {
  1372. SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle/in range of your last vehicle.");
  1373. }
  1374. return 1;
  1375. }
  1376. if(strcmp(cmd, "/vips", true) == 0)
  1377. {
  1378. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pShopMod] != 0)
  1379. {
  1380. new vips;
  1381. new vipType[7];
  1382. new vipColor[10];
  1383. foreach( new i: Player )
  1384. {
  1385. if(IsPlayerConnected(i))
  1386. {
  1387. if(PlayerInfo[i][pDonateRank] > 0)
  1388. {
  1389. if(PlayerInfo[i][pDonateRank] == 1)
  1390. {
  1391. vipType = "Bronze";
  1392. vipColor = "{BB7900}";
  1393. }
  1394. else if(PlayerInfo[i][pDonateRank] == 2)
  1395. {
  1396. vipType = "Silver";
  1397. vipColor = "{ACAEB0}";
  1398. }
  1399. else if(PlayerInfo[i][pDonateRank] == 3)
  1400. {
  1401. vipType = "Gold";
  1402. vipColor = "{FFC600}";
  1403. }
  1404. format(str, sizeof(str), "Name: %s | Type: %s%s{FFFFFF} | Purchased: %s | Expires: %s", PlayerICName(i), vipColor, vipType, PlayerInfo[i][pVIPJoinDate], PlayerInfo[i][pVIPExpDate]);
  1405. SendClientMessage(playerid, COLOR_WHITE, str);
  1406. vips++;
  1407. }
  1408. }
  1409. }
  1410. if(vips == 0)
  1411. {
  1412. SendClientMessage(playerid, COLOR_GREY, "There are currently no VIPs online.");
  1413. }
  1414. }
  1415. else
  1416. {
  1417. SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
  1418. }
  1419. return 1;
  1420. }
  1421. if(strcmp(cmdtext, "/vip", true) ==0)
  1422. {//
  1423. if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
  1424. if((pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0))
  1425. return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  1426. if(PlayerInfo[playerid][pJailed] != 0) return SendClientMessage(playerid, COLOR_RED, "You can not use this while being in prison.");
  1427. if(PlayerInfo[playerid][pDonateRank] >= 1)
  1428. {
  1429. if(IsPlayerInAnyVehicle(playerid))
  1430. {
  1431. new tempid = GetPlayerVehicleID(playerid);
  1432. if(IsAPlane(tempid) || IsAHelicopter(tempid) || IsABike(tempid) || IsATrain(tempid) || IsABoat(tempid))
  1433. {
  1434. ShowPlayerDialog(playerid, 3242, DIALOG_STYLE_LIST, "VIP", "Color Name\nRepair Car\nSkin", "Select", "Cancel");
  1435. }
  1436. else
  1437. {
  1438. ShowPlayerDialog(playerid, 62, DIALOG_STYLE_LIST, "VIP", "Color Name\nCar Tune\nSkin", "Select", "Cancel");
  1439. }
  1440. }
  1441. else
  1442. {
  1443. ShowPlayerDialog(playerid, 62, DIALOG_STYLE_LIST, "VIP", "Color Name\nCar Tune\nSkin", "Select", "Cancel");
  1444. }
  1445. }
  1446. else
  1447. {
  1448. SendClientMessage(playerid, COLOR_GREY, "You are not a VIP.");
  1449. }
  1450. return 1;
  1451. }
  1452. if(strcmp(cmd, "/famed", true) == 0) // This allows famed members to color their name the in-game famed color (scolor_cyan)
  1453. {
  1454. if(PlayerInfo[playerid][pFamed] >= 1)
  1455. {
  1456. if(usingFC[playerid] == 0)
  1457. {
  1458. usingFC[playerid] = 1;
  1459. SendClientMessage(playerid, COLOR_FAMED, "Your name is now colored.");
  1460. SetPlayerToTeamColor(playerid);
  1461. }
  1462. else
  1463. {
  1464. usingFC[playerid] = 0;
  1465. SendClientMessage(playerid, COLOR_FAMED, "Your name is no longer colored.");
  1466. SetPlayerToTeamColor(playerid);
  1467. }
  1468. }
  1469. return 1;
  1470. }
  1471. if(strcmp(cmdtext, "/viptime", true) ==0)
  1472. {
  1473. if(PlayerInfo[playerid][pDonateRank] < 1)
  1474. {
  1475. return SendClientMessage(playerid, COLOR_GREY, "You are not a VIP.");
  1476. }
  1477. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[playerid][pVIPJoinDate], PlayerInfo[playerid][pVIPExpDate]);
  1478. SendClientMessage(playerid, COLOR_GRAD1, str);
  1479. return 1;
  1480. }
  1481. /*if(strcmp(cmd, "/makevip", true) == 0)
  1482. {
  1483. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  1484. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
  1485. {
  1486. tmp = strtok(cmdtext, idx);
  1487. if(!strlen(tmp))
  1488. {
  1489. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makevip [playerid/PartOfName] [rank]");
  1490. return 1;
  1491. }
  1492. giveplayerid = ReturnUser(tmp);
  1493. if(giveplayerid == INVALID_PLAYER_ID)
  1494. {
  1495. SendClientMessage(playerid, COLOR_GRAD2, "Invalid player.");
  1496. return 1;
  1497. }
  1498. new x_string[64];
  1499. x_string = strtok(cmdtext, idx);
  1500. if(!strlen(x_string))
  1501. {
  1502. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makevip [playerid/PartOfName] [rank]");
  1503. return 1;
  1504. }
  1505. new level;
  1506. level = strvalEx(x_string);
  1507. new Year, Month, Day;
  1508. getdate(Year, Month, Day);
  1509. if(level < 0 && level > 3)
  1510. {
  1511. return SendClientMessage(giveplayerid, COLOR_GREY, "Rank cannot be below 0 or above 3.");
  1512. }
  1513. if(level == 0)
  1514. {
  1515. PlayerInfo[giveplayerid][pDonateRank] = 0;
  1516. if(PlayerInfo[giveplayerid][pLevel] == 1) PlayerInfo[giveplayerid][pTag] = NTAG_NEWBIE;
  1517. else if(PlayerInfo[giveplayerid][pLevel] > 1) PlayerInfo[giveplayerid][pTag] = NTAG_PLAYER;
  1518. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been revoked by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1519. ABroadCast(COLOR_WHITE, str, 1);
  1520. format(str, sizeof(str), "Admin %s has revoked you of your VIP status.", PlayerICName(playerid));
  1521. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1522. ClearVIP(giveplayerid);
  1523. return 1;
  1524. }
  1525. else if(level == 1)
  1526. {
  1527. PlayerInfo[giveplayerid][pDonateRank] = 1;
  1528. PlayerInfo[giveplayerid][pTag] = NTAG_BVIP;
  1529. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a bronze VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1530. ABroadCast(COLOR_WHITE, str, 1);
  1531. format(str, sizeof(str), "Admin %s has made you a bronze VIP.", PlayerICName(playerid));
  1532. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1533. }
  1534. else if(level == 2)
  1535. {
  1536. PlayerInfo[giveplayerid][pDonateRank] = 2;
  1537. PlayerInfo[giveplayerid][pTag] = NTAG_SVIP;
  1538. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a silver VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1539. ABroadCast(COLOR_WHITE, str, 1);
  1540. format(str, sizeof(str), "Admin %s has made you a silver VIP.", PlayerICName(playerid));
  1541. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1542. }
  1543. else if(level == 3)
  1544. {
  1545. PlayerInfo[giveplayerid][pDonateRank] = 3;
  1546. PlayerInfo[giveplayerid][pTag] = NTAG_GVIP;
  1547. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a gold VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1548. ABroadCast(COLOR_WHITE, str, 1);
  1549. format(str, sizeof(str), "Admin %s has made you a gold VIP.", PlayerICName(playerid));
  1550. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1551. }
  1552. format(str, 32, "%02d/%02d/%d", Month, Day, Year);
  1553. strmid(PlayerInfo[giveplayerid][pVIPJoinDate], str, 0, strlen(str), 255);
  1554. new
  1555. rDay,
  1556. rMonth,
  1557. rYear;
  1558. GetDateAfterInterval(Day, Month, Year, 30, rDay, rMonth, rYear);
  1559. format(str, 32, "%02d/%02d/%d", rMonth, rDay, rYear);
  1560. strmid(PlayerInfo[giveplayerid][pVIPExpDate], str, 0, strlen(str), 255);
  1561. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[giveplayerid][pVIPJoinDate], PlayerInfo[giveplayerid][pVIPExpDate]);
  1562. SendClientMessage(giveplayerid, COLOR_GRAD2, str);
  1563. }
  1564. else
  1565. {
  1566. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  1567. }
  1568. return 1;
  1569. }*/
  1570. if(strcmp(cmd, "/makevip", true) == 0)
  1571. {
  1572. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  1573. if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
  1574. {
  1575. tmp = strtok(cmdtext, idx);
  1576. if(!strlen(tmp))
  1577. {
  1578. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makevip [playerid/PartOfName] [rank]");
  1579. return 1;
  1580. }
  1581. giveplayerid = ReturnUser(tmp);
  1582. if(giveplayerid == INVALID_PLAYER_ID)
  1583. {
  1584. SendClientMessage(playerid, COLOR_GRAD2, "Invalid player.");
  1585. return 1;
  1586. }
  1587. new x_string[64];
  1588. x_string = strtok(cmdtext, idx);
  1589. if(!strlen(x_string))
  1590. {
  1591. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makevip [playerid/PartOfName] [rank]");
  1592. return 1;
  1593. }
  1594. new level;
  1595. level = strvalEx(x_string);
  1596. new Year, Month, Day;
  1597. getdate(Year, Month, Day);
  1598. if(level < 0 && level > 3)
  1599. {
  1600. return SendClientMessage(giveplayerid, COLOR_GREY, "Rank cannot be below 0 or above 3.");
  1601. }
  1602. if(Month == 1 && Day >= 29)
  1603. {
  1604. return SendClientMessage(giveplayerid, COLOR_GREY, "You cannot make vips today.");
  1605. }
  1606. if(level == 0)
  1607. {
  1608. PlayerInfo[giveplayerid][pDonateRank] = 0;
  1609. if(PlayerInfo[giveplayerid][pLevel] == 1) PlayerInfo[giveplayerid][pTag] = NTAG_NEWBIE;
  1610. else if(PlayerInfo[giveplayerid][pLevel] > 1) PlayerInfo[giveplayerid][pTag] = NTAG_PLAYER;
  1611. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been revoked by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1612. ABroadCast(COLOR_WHITE, str, 1);
  1613. format(str, sizeof(str), "Admin %s has revoked you of your VIP status.", PlayerICName(playerid));
  1614. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1615. ClearVIP(giveplayerid);
  1616. return 1;
  1617. }
  1618. else if(level == 1)
  1619. {
  1620. PlayerInfo[giveplayerid][pDonateRank] = 1;
  1621. PlayerInfo[giveplayerid][pTag] = NTAG_BVIP;
  1622. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a bronze VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1623. ABroadCast(COLOR_WHITE, str, 1);
  1624. format(str, sizeof(str), "Admin %s has made you a bronze VIP.", PlayerICName(playerid));
  1625. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1626. }
  1627. else if(level == 2)
  1628. {
  1629. PlayerInfo[giveplayerid][pDonateRank] = 2;
  1630. PlayerInfo[giveplayerid][pTag] = NTAG_SVIP;
  1631. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a silver VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1632. ABroadCast(COLOR_WHITE, str, 1);
  1633. format(str, sizeof(str), "Admin %s has made you a silver VIP.", PlayerICName(playerid));
  1634. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1635. }
  1636. else if(level == 3)
  1637. {
  1638. PlayerInfo[giveplayerid][pDonateRank] = 3;
  1639. PlayerInfo[giveplayerid][pTag] = NTAG_GVIP;
  1640. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a gold VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1641. ABroadCast(COLOR_WHITE, str, 1);
  1642. format(str, sizeof(str), "Admin %s has made you a gold VIP.", PlayerICName(playerid));
  1643. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1644. }
  1645. else if(level == 4)
  1646. {
  1647. PlayerInfo[giveplayerid][pDonateRank] = 4;
  1648. PlayerInfo[giveplayerid][pTag] = NTAG_DVIP;
  1649. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a Platinum VIP by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
  1650. ABroadCast(COLOR_WHITE, str, 1);
  1651. format(str, sizeof(str), "Admin %s has made you a Platinum VIP.", PlayerICName(playerid));
  1652. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  1653. }
  1654. format(str, 32, "%02d/%02d/%d", Month, Day, Year);
  1655. strmid(PlayerInfo[giveplayerid][pVIPJoinDate], str, 0, strlen(str), 255);
  1656. format(str, 32, "%02d/%02d/%d", Month +1, Day, Year);
  1657. strmid(PlayerInfo[giveplayerid][pVIPExpDate], str, 0, strlen(str), 255);
  1658. if(Month == 12)
  1659. {
  1660. format(PlayerInfo[giveplayerid][pVIPExpDate], 32, "%02d/%02d/%d", 1, Day, Year +1);
  1661. }
  1662. format(str, sizeof(str), "Join Date: %s, Expire Date: %s", PlayerInfo[giveplayerid][pVIPJoinDate], PlayerInfo[giveplayerid][pVIPExpDate]);
  1663. SendClientMessage(giveplayerid, COLOR_GRAD2, str);
  1664. }
  1665. else
  1666. {
  1667. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  1668. }
  1669. return 1;
  1670. }
  1671. if(strcmp(cmd, "/agiverank", true) == 0)
  1672. {
  1673. tmp = strtok(cmdtext, idx);
  1674. if(!strlen(tmp))
  1675. {
  1676. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /agiverank [playerid/PartOfName] [Number(0-8 (in some cases))]");
  1677. return 1;
  1678. }
  1679. new para1;
  1680. new level;
  1681. para1 = ReturnUser(tmp);
  1682. tmp = strtok(cmdtext, idx);
  1683. level = strvalEx(tmp);
  1684. if(level > 8 || level < 0)
  1685. {
  1686. SendClientMessage(playerid, COLOR_GREY, "Dont go below number 0, or above number 8.");
  1687. return 1;
  1688. }
  1689. if(PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pFactionMod] == 1)
  1690. {
  1691. if(IsPlayerConnected(para1))
  1692. {
  1693. if(para1 != INVALID_PLAYER_ID)
  1694. {
  1695. if(PlayerInfo[para1][pMember] != 0)
  1696. {
  1697. strmid(giveplayer, PlayerICName(para1), 0, MAX_PLAYER_NAME);
  1698. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  1699. PlayerInfo[para1][pRank] = level;
  1700. format(str, sizeof(str), "* You have been promoted to a higher Rank by admin %s.", sendername);
  1701. SendClientMessage(para1, COLOR_LIGHTBLUE, str);
  1702. format(str, sizeof(str), "* You have given %s Rank %d.", giveplayer, level);
  1703. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  1704. customRankName[para1] = false;
  1705. format(customRank[para1], 24, "None");
  1706. }
  1707. else
  1708. {
  1709. SendClientMessage(playerid, COLOR_GREY, "That player is not a member of a Faction.");
  1710. return 1;
  1711. }
  1712. }
  1713. }
  1714. }
  1715. else
  1716. {
  1717. AdmErrorMsg;
  1718. }
  1719. return 1;
  1720. }
  1721. if(strcmp(cmd, "/sendto", true) == 0 || strcmp(cmd, "/st", true) == 0)
  1722. {
  1723. if(!(PlayerInfo[playerid][pAdmin] >= 2))
  1724. return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
  1725. tmp = strtok(cmdtext, idx);
  1726. if(!strlen(tmp))
  1727. {
  1728. SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /(s)end(t)o [area/playerid] [playerid]");
  1729. SendClientMessage(playerid, COLOR_GREY, "AREAS: lsair sfair lvair SAPD sfhosp");
  1730. SendClientMessage(playerid, COLOR_GREY, "AREAS: skyscraper chiliad area51 airstrip bayside quarry dam bank pier");
  1731. SendClientMessage(playerid, COLOR_GREY, "AREAS: underwater jet battlefield 8track kickstart dirtbike bloodbowl gym");
  1732. SendClientMessage(playerid, COLOR_GREY, "AREAS: SAN lsmod bigammu allsaints taxi docks loco countygen dillhosp tiki arch");
  1733. SendClientMessage(playerid, COLOR_GREY, "AREAS: fmd trainsf sfbridge sfbank sfapart sffmd paintball pizza");
  1734. return 1;
  1735. }
  1736. new
  1737. p =1,
  1738. Float:a = GetPlayerFacingAngle(playerid, a),
  1739. destination[64] = " ",
  1740. lookupid = ReturnUser(tmp),
  1741. tmp34[128];
  1742. tmp34 = strtok(cmdtext, idx);
  1743. if(!strlen(tmp34))
  1744. {
  1745. SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /sendto [area/playerid] [playerid]");
  1746. SendClientMessage(playerid, COLOR_GREY, "AREAS: lsair sfair lvair SAPD");
  1747. SendClientMessage(playerid, COLOR_GREY, "AREAS: skyscraper chiliad area51 airstrip bayside quarry dam bank pier");
  1748. SendClientMessage(playerid, COLOR_GREY, "AREAS: underwater jet battlefield 8track kickstart dirtbike bloodbowl gym");
  1749. SendClientMessage(playerid, COLOR_GREY, "AREAS: mine dillimore blueberry prison montgomery carrier grove glenpark skytower pizza");
  1750. return 1;
  1751. }
  1752. giveplayerid = ReturnUser(tmp34);
  1753. if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD1, "That player is not active.");
  1754. if(IsPlayerNPC(giveplayerid)) return 1;
  1755. if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "You can't teleport higher admins.");
  1756. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) p =0;
  1757. if(lookupid != INVALID_PLAYER_ID)
  1758. {
  1759. if(lookupid != giveplayerid)
  1760. {
  1761. if(!gPlayerLogged[lookupid])
  1762. return SendClientMessage(playerid, COLOR_GRAD2, "That player hasn't spawned yet.");
  1763. if(GetPlayerState(lookupid) == PLAYER_STATE_SPECTATING)
  1764. return SendClientMessage(playerid, COLOR_GRAD2, "That player is spectating someone.");
  1765. }
  1766. new
  1767. Float:x,
  1768. Float:y,
  1769. Float:z,
  1770. i = GetPlayerInterior(lookupid),
  1771. vvv = GetPlayerVirtualWorld(lookupid);
  1772. if(IsPlayerInAnyVehicle(lookupid))
  1773. {
  1774. GetVehicleZAngle(GetPlayerVehicleID(lookupid), a);
  1775. }
  1776. else
  1777. {
  1778. GetPlayerFacingAngle(lookupid, a);
  1779. }
  1780. GetPlayerPos(lookupid, x, y, z);
  1781. Teleport(giveplayerid, x, y +2, z, a, i, vvv, p);
  1782. destination = PlayerICName(lookupid);
  1783. }
  1784. else if(!strcmp(tmp, "SAPD", true) || !strcmp(tmp, "ls", true))
  1785. {
  1786. destination = "San Andreas Police Department";
  1787. Teleport(giveplayerid, 1529.6, -1691.2, 13.3, a, 0, 0, p);
  1788. }
  1789. else if(!strcmp(tmp, "int1", true))
  1790. {
  1791. strmid(sendername, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  1792. if(strcmp(sendername, "Marcus", true) == 0)
  1793. {
  1794. destination = "Marcus' Room";
  1795. Teleport(giveplayerid, 1492.91, -1635.93, 949.16, 270.0, 1, 0, p);
  1796. return 1;
  1797. }
  1798. else
  1799. {
  1800. destination = "Interior 1";
  1801. Teleport(giveplayerid, 1411.1451, -0.5155, 1000.9236, a, 1, 0, p);
  1802. }
  1803. }
  1804. else if(!strcmp(tmp, "marcsroom", true))
  1805. {
  1806. destination = "Marcus' Room";
  1807. Teleport(giveplayerid, 1492.91, -1635.93, 949.16, 270.0, 1, 0, p);
  1808. }
  1809. else if(!strcmp(tmp, "interior1", true))
  1810. {
  1811. destination = "Interior 1";
  1812. Teleport(giveplayerid, 1411.1451, -0.5155, 1000.9236, a, 1, 0, p);
  1813. }
  1814. else if(!strcmp(tmp, "gym", true))
  1815. {
  1816. destination = "Los Santos GYM";
  1817. Teleport(giveplayerid, 2225.4001, -1724.4464, 13.5632, a, 0, 0, p);
  1818. }
  1819. else if(!strcmp(tmp, "lsair", true))
  1820. {
  1821. destination = "Los Santos Airport";
  1822. Teleport(giveplayerid, 1934.9127, -2290.6362, 13.5469, a, 0, 0, p);
  1823. }
  1824. else if(!strcmp(tmp, "sfair", true) || !strcmp(tmp, "sf", true))
  1825. {
  1826. destination = "San Fierro Airport";
  1827. Teleport(giveplayerid, -1417.0, -295.8, 14.1, a, 0, 0, p);
  1828. }
  1829. else if(!strcmp(tmp, "lvair", true) || !strcmp(tmp, "lv", true))
  1830. {
  1831. destination = "Las Venturas Airport";
  1832. Teleport(giveplayerid, 1699.2, 1435.1, 10.7, a, 0, 0, p);
  1833. }
  1834. else if(!strcmp(tmp, "jet", true))
  1835. {
  1836. destination = "private jet";
  1837. Teleport(giveplayerid, 1.71875, 30.4062, 1200.34, a, 1, 0, 0);
  1838. }
  1839. else if(!strcmp(tmp, "chiliad", true))
  1840. {
  1841. destination = "Mt. Chiliad";
  1842. Teleport(giveplayerid, -2317.5325, -1644.9664, 483.7031, a, 0, 0, p);
  1843. }
  1844. else if(!strcmp(tmp, "area51", true))
  1845. {
  1846. destination = "Area 51";
  1847. Teleport(giveplayerid, 202.1886, 1881.4122, 17.2199, 37.8779, 0, 0, p);
  1848. }
  1849. else if(!strcmp(tmp, "airstrip", true))
  1850. {
  1851. destination = "Desert Airstrip";
  1852. Teleport(giveplayerid, 357.5273, 2513.8701, 16.5856, a, 0, 0, p);
  1853. }
  1854. else if(!strcmp(tmp, "skyscraper", true) || !strcmp(tmp, "sky", true))
  1855. {
  1856. destination = "the Skyscraper";
  1857. Teleport(giveplayerid, 1543.9886, -1353.7587, 329.4735, a, 0, 0, p);
  1858. }
  1859. else if(!strcmp(tmp, "bayside", true))
  1860. {
  1861. destination = "Bayside Heliport";
  1862. Teleport(giveplayerid, -2252.2944, 2335.5396, 4.8125, a, 0, 0, p);
  1863. }
  1864. else if(!strcmp(tmp, "underwater", true) || !strcmp(tmp, "under", true))
  1865. {
  1866. destination = "under the sea";
  1867. Teleport(giveplayerid, -1005.3044, 657.4559, -39.0847, a, 0, 0, p);
  1868. }
  1869. else if(!strcmp(tmp, "bank", true))
  1870. {
  1871. destination = "The Bank";
  1872. Teleport(giveplayerid, 1462.395751, -1016.391174, 25.84375, a, 0, 0, p);
  1873. }
  1874. else if(!strcmp(tmp, "pier", true))
  1875. {
  1876. destination = "the fishing pier";
  1877. Teleport(giveplayerid, 364.9920, -2059.7288, 15.3990, a, 0, 0, p);
  1878. }
  1879. else if(!strcmp(tmp, "battlefield", true) || !strcmp(tmp, "battle", true))
  1880. {
  1881. destination = "the battlefield";
  1882. Teleport(giveplayerid, -972.4957, 1060.9830, 1345.6690, a, 10, 0, p);
  1883. }
  1884. else if(!strcmp(tmp, "dam", true))
  1885. {
  1886. destination = "the Sherman Dam";
  1887. Teleport(giveplayerid, -715.0000, 2062.0000, 60.0000, a, 0, 0, p);
  1888. }
  1889. else if(!strcmp(tmp, "bloodbowl", true))
  1890. {
  1891. destination = "Bloodbowl Arena";
  1892. Teleport(giveplayerid, -1394.5928, 996.4797, 1033.8864, a, 15, 0, p);
  1893. }
  1894. else if(!strcmp(tmp, "8track", true))
  1895. {
  1896. destination = "8-Track Stadium";
  1897. Teleport(giveplayerid, -1406.3815, -262.7644, 1043.4290, 346.8336, 7, 0, p);
  1898. }
  1899. else if(!strcmp(tmp, "dirtbike", true))
  1900. {
  1901. destination = "Dirtbike Stadium";
  1902. Teleport(giveplayerid, -1436.2065, -642.5217, 1049.5261, 167.3703, 4, 0, p);
  1903. }
  1904. else if(!strcmp(tmp, "kickstart", true))
  1905. {
  1906. destination = "Kickstart Stadium";
  1907. Teleport(giveplayerid, -1447.2618, 1604.3374, 1052.5220, 263.7223, 14, 0, p);
  1908. }
  1909. else if(!strcmp(tmp, "quarry", true))
  1910. {
  1911. destination = "Hunter Quarry";
  1912. Teleport(giveplayerid, 609.8776, 867.3369, -42.2692, a, 0, 0, p);
  1913. }
  1914. else if(!strcmp(tmp, "mine", true))
  1915. {
  1916. destination = "Mine";
  1917. Teleport(giveplayerid, 1027.9011, -305.6943, 74.5135, a, 0, 0, p);
  1918. }
  1919. else if(!strcmp(tmp, "dillimore", true))
  1920. {
  1921. destination = "Dillimore";
  1922. Teleport(giveplayerid, 641.7200, -564.9901, 16.1875, a, 0, 0, p);
  1923. }
  1924. else if(!strcmp(tmp, "blueberry", true))
  1925. {
  1926. destination = "Blueberry";
  1927. Teleport(giveplayerid, 214.9969, -129.4305, 1.5779, a, 0, 0, p);
  1928. }
  1929. else if(!strcmp(tmp, "montgomery", true))
  1930. {
  1931. destination = "Montgomery";
  1932. Teleport(giveplayerid, 1329.1864, 317.3034, 19.5469, 66.3917, 0, 0, p);
  1933. }
  1934. else if(!strcmp(tmp, "carrier", true))
  1935. {
  1936. destination = "Aircraft Carrier";
  1937. Teleport(giveplayerid, 3352.1787, -2835.1282, 18.2344, 358.2253, 0, 0, p);
  1938. }
  1939. else if(!strcmp(tmp, "grove", true))
  1940. {
  1941. destination = "Grove Street";
  1942. Teleport(giveplayerid, 2510.5432, -1687.5811, 13.5661, 49.4352, 0, 0, p);
  1943. }
  1944. else if(!strcmp(tmp, "glenpark", true))
  1945. {
  1946. destination = "Glen Park";
  1947. Teleport(giveplayerid, 1977.5286, -1185.2473, 25.9960, 3.6421, 0, 0, p);
  1948. }
  1949. else if(!strcmp(tmp, "skytower", true))
  1950. {
  1951. destination = "Sky Tower";
  1952. Teleport(giveplayerid, 1543.60132, -1355.82654, 4568.44873, 0.0, 0, 0, p);
  1953. }
  1954. else if(!strcmp(tmp, "sfhosp", true))
  1955. {
  1956. destination = "San Fierro Hospital";
  1957. Teleport(giveplayerid, -2653.3828, 638.5444, 14.4531, 0.0, 0, 0, p);
  1958. }
  1959. else if(!strcmp(tmp, "paintball", true))
  1960. {
  1961. destination = "Paintball";
  1962. Teleport(giveplayerid, 1310.0594, -1376.5634, 13.6561, 0.0, 0, 0, p);
  1963. }
  1964. else if(!strcmp(tmp, "SAN", true))
  1965. {
  1966. destination = "San Andreas Network";
  1967. Teleport(giveplayerid, 785.2725, -1325.4803, 13.5469, 350.9720, 0, 0, p);
  1968. }
  1969. else if(!strcmp(tmp, "lsmod", true))
  1970. {
  1971. destination = "LS Transfender";
  1972. Teleport(giveplayerid, 1035.7266, -1034.4908, 31.6142, 183.1505, 0, 0, p);
  1973. }
  1974. else if(!strcmp(tmp, "bigammu", true))
  1975. {
  1976. destination = "Ammunation";
  1977. Teleport(giveplayerid, 1363.4006, -1279.7795, 13.5469, 87.1025, 0, 0, p);
  1978. }
  1979. else if(!strcmp(tmp, "allsaints", true))
  1980. {
  1981. destination = "All Saints";
  1982. Teleport(giveplayerid, 1185.8871, -1323.7729, 13.5591, 269.2528, 0, 0, p);
  1983. }
  1984. else if(!strcmp(tmp, "taxi", true))
  1985. {
  1986. destination = "Taxi Company";
  1987. Teleport(giveplayerid, 1773.9911, -1860.9225, 13.5781, 359.1532, 0, 0, p);
  1988. }
  1989. else if(!strcmp(tmp, "docks", true))
  1990. {
  1991. destination = "Ocean Docks";
  1992. Teleport(giveplayerid, 2318.1357, -2318.7971, 13.5469, 141.9202, 0, 0, p);
  1993. }
  1994. else if(!strcmp(tmp, "loco", true))
  1995. {
  1996. destination = "Loco Low";
  1997. Teleport(giveplayerid, 2645.3574, -2022.3029, 13.5469, 2.7214, 0, 0, p);
  1998. }
  1999. else if(!strcmp(tmp, "countygen", true))
  2000. {
  2001. destination = "County General";
  2002. Teleport(giveplayerid, 2024.6085, -1423.7742, 16.9665, 134.2379, 0, 0, p);
  2003. }
  2004. else if(!strcmp(tmp, "dillhosp", true))
  2005. {
  2006. destination = "Dillimore Hospital";
  2007. Teleport(giveplayerid, 844.7101, -576.0881, 16.5325, 359.3915, 0, 0, p);
  2008. }
  2009. else if(!strcmp(tmp, "tiki", true))
  2010. {
  2011. destination = "Tikistore";
  2012. Teleport(giveplayerid, 2347.5042, -1465.6353, 23.8281, 87.9392, 0, 0, p);
  2013. }
  2014. else if(!strcmp(tmp, "arch", true))
  2015. {
  2016. destination = "Arch Angels";
  2017. Teleport(giveplayerid, -2711.4683, 223.9344, 4.3281, 271.3685, 0, 0, p);
  2018. }
  2019. else if(!strcmp(tmp, "fmd", true))
  2020. {
  2021. destination = "Los Santos Fire Medical Dept.";
  2022. Teleport(giveplayerid, 1108.6631, -1337.4138, 13.8500, 178.4724, 0, 0, p);
  2023. }
  2024. else if(!strcmp(tmp, "trainsf", true))
  2025. {
  2026. destination = "SF Train Station";
  2027. Teleport(giveplayerid, -1986.8132, 137.4702, 27.5391, 91.4267, 0, 0, p);
  2028. }
  2029. else if(!strcmp(tmp, "sfbridge", true))
  2030. {
  2031. destination = "SF Bridge";
  2032. Teleport(giveplayerid, -1631.1191, 582.4623, 40.5780, 315.5850, 0, 0, p);
  2033. }
  2034. else if(!strcmp(tmp, "sfbank", true))
  2035. {
  2036. destination = "San Fierro Bank";
  2037. Teleport(giveplayerid, -1706.2723, 785.4876, 24.8906, 90.6131, 0, 0, p);
  2038. }
  2039. else if(!strcmp(tmp, "sfapart", true))
  2040. {
  2041. destination = "San Fierro Apartments";
  2042. Teleport(giveplayerid, -1754.3157, 944.8129, 24.8828, 179.5380, 0, 0, p);
  2043. }
  2044. else if(!strcmp(tmp, "sffmd", true))
  2045. {
  2046. destination = "San Fierro Fire Medical Dept.";
  2047. Teleport(giveplayerid, -2667.0950, 582.0782, 14.4531, 180.5395, 0, 0, p);
  2048. }
  2049. else if(!strcmp(tmp, "pizza", true))
  2050. {
  2051. destination = "Pizza Stacks";
  2052. Teleport(giveplayerid, 2098.9524, -1806.1031, 13.5550, 88.4629, 0, 0, p);
  2053. }
  2054. else
  2055. {
  2056. return SendClientMessage(playerid, COLOR_FADE1, "Invalid destination.");
  2057. }
  2058. // format str and send to player
  2059. format(str, sizeof(str), "Sent to ~b~%s~w~.", destination);
  2060. displayCenterHUDInfo(giveplayerid, str, 8); //display for 8 seconds
  2061. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has sent %s to \"%s\"", PlayerICName(playerid), PlayerICName(giveplayerid), destination);
  2062. ABroadCast(COLOR_WHITE, str, 1);
  2063. return 1;
  2064. }
  2065. if(strcmp(cmd, "/joinevent", true) == 0)
  2066. {
  2067. if(EventActive == 1)
  2068. {
  2069. if(EventLocked == 1)
  2070. {
  2071. SendClientMessage(playerid, COLOR_GREY, "The event is currently locked.");
  2072. return 1;
  2073. }
  2074. if(IsAtEvent[playerid] == 1)
  2075. {
  2076. SendClientMessage(playerid, COLOR_GREY, "You have already joined the event.");
  2077. return 1;
  2078. }
  2079. if(EventX == 0.0 && EventY == 0.0 && EventZ == 0.0)
  2080. {
  2081. SendClientMessage(playerid, COLOR_GREY, "The event spawn has not been set.");
  2082. return 1;
  2083. }
  2084. if(PlayerInfo[playerid][pAdminJailed]) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error{FFFFFF}: You cannot join events whilst in admin-prison.");
  2085. GetPlayerPos(playerid, StuffEvent[playerid][0], StuffEvent[playerid][1], StuffEvent[playerid][2]);
  2086. GetPlayerFacingAngle(playerid, StuffEvent[playerid][3]);
  2087. GetPlayerHealth(playerid, StuffEvent[playerid][4]);
  2088. GetPlayerArmour(playerid, StuffEvent[playerid][5]);
  2089. StuffEvent2[playerid][0] = GetPlayerInterior(playerid);
  2090. StuffEvent2[playerid][1] = GetPlayerVirtualWorld(playerid);
  2091. EventGuns[playerid][0] = PlayerInfo[playerid][pGun0];
  2092. EventGuns[playerid][1] = PlayerInfo[playerid][pGun1];
  2093. EventGuns[playerid][2] = PlayerInfo[playerid][pGun2];
  2094. EventGuns[playerid][3] = PlayerInfo[playerid][pGun3];
  2095. EventGuns[playerid][4] = PlayerInfo[playerid][pGun4];
  2096. EventGuns[playerid][5] = PlayerInfo[playerid][pGun5];
  2097. EventGuns[playerid][6] = PlayerInfo[playerid][pGun6];
  2098. EventGuns[playerid][7] = PlayerInfo[playerid][pGun7];
  2099. EventGuns[playerid][8] = PlayerInfo[playerid][pGun8];
  2100. EventGuns[playerid][9] = PlayerInfo[playerid][pGun9];
  2101. EventGuns[playerid][10] = PlayerInfo[playerid][pGun10];
  2102. EventGuns[playerid][11] = PlayerInfo[playerid][pGun11];
  2103. EventGuns[playerid][12] = PlayerInfo[playerid][pGun12];
  2104. SetPlayerPos(playerid, EventX, EventY, EventZ);
  2105. IsAtEvent[playerid] = 1;
  2106. SetPlayerVirtualWorld(playerid, EventWorld);
  2107. SetPlayerInterior(playerid, EventInt);
  2108. SetPlayerHealth(playerid, EventHP);
  2109. SetPlayerArmour(playerid, EventArmour);
  2110. ResetPlayerAdminWeaponsEx(playerid);
  2111. ResetPlayerWeapons(playerid);
  2112. if(EventJoinText == 1)
  2113. {
  2114. GameTextForPlayer(playerid, EventText, 5000, 0);
  2115. }
  2116. displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
  2117. SendClientMessage(playerid, COLOR_LIGHTRED, "You have been teleported to the event, please follow instructions given by the admin.");
  2118. }
  2119. else
  2120. {
  2121. SendClientMessage(playerid, COLOR_GREY, "There are currently no events active.");
  2122. }
  2123. return 1;
  2124. }
  2125. if(strcmp(cmdtext, "/quitevent", true) == 0)
  2126. {
  2127. if(IsAtEvent[playerid] != 0)
  2128. {
  2129. ResetPlayerAdminWeaponsEx(playerid);
  2130. SetPlayerSpawn(playerid);
  2131. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have quit the event.");
  2132. }
  2133. return 1;
  2134. }
  2135. if(strcmp(cmd, "/event", true) == 0)
  2136. {
  2137. if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
  2138. {
  2139. tmp = strtok(cmdtext, idx);
  2140. if(!strlen(tmp))
  2141. {
  2142. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event [name]");
  2143. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Jointext, Health, Armor, Gun1, Gun2, Gun3, Gun4, Gun5");
  2144. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Pos, Open, Lock, Start, End");
  2145. return 1;
  2146. }
  2147. if(strcmp(tmp, "jointext", true) == 0)
  2148. {
  2149. if(EventStarted)
  2150. {
  2151. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2152. return 1;
  2153. }
  2154. new length = strlen(cmdtext);
  2155. while((idx < length) && (cmdtext[idx] <= ' '))
  2156. {
  2157. idx++;
  2158. }
  2159. new offset = idx;
  2160. new result[128];
  2161. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  2162. {
  2163. result[idx - offset] = cmdtext[idx];
  2164. idx++;
  2165. }
  2166. result[idx - offset] = EOS;
  2167. if(!strlen(result))
  2168. {
  2169. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event jointext [text]");
  2170. return 1;
  2171. }
  2172. format(EventText, sizeof(EventText), "%s", result);
  2173. SendClientMessage(playerid, COLOR_WHITE, "You have been set the event jointext to the following.");
  2174. GameTextForPlayer(playerid, EventText, 5000, 0);
  2175. EventJoinText = 1;
  2176. return 1;
  2177. }
  2178. if(strcmp(tmp, "health", true) == 0)
  2179. {
  2180. if(EventStarted)
  2181. {
  2182. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2183. return 1;
  2184. }
  2185. tmp = strtok(cmdtext, idx);
  2186. if(!strlen(tmp))
  2187. {
  2188. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event health [amount]");
  2189. return 1;
  2190. }
  2191. new ehp = strvalEx(tmp);
  2192. if(ehp < 1 || ehp > 100)
  2193. {
  2194. SendClientMessage(playerid, COLOR_GREY, "Health can't be below 1 or above 100.");
  2195. return 1;
  2196. }
  2197. EventHP = ehp;
  2198. format(str, sizeof(str), "You have set the event health to %d.", ehp);
  2199. SendClientMessage(playerid, COLOR_WHITE, str);
  2200. return 1;
  2201. }
  2202. if(strcmp(tmp, "armor", true) == 0)
  2203. {
  2204. if(EventStarted)
  2205. {
  2206. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2207. return 1;
  2208. }
  2209. tmp = strtok(cmdtext, idx);
  2210. if(!strlen(tmp))
  2211. {
  2212. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event armor [amount]");
  2213. return 1;
  2214. }
  2215. new earmor = strvalEx(tmp);
  2216. if(earmor < 0 || earmor > 100)
  2217. {
  2218. SendClientMessage(playerid, COLOR_GREY, "Armor can't be below 0 or above 100.");
  2219. return 1;
  2220. }
  2221. EventArmour = earmor;
  2222. format(str, sizeof(str), "You have set the event armor to %d.", earmor);
  2223. SendClientMessage(playerid, COLOR_WHITE, str);
  2224. return 1;
  2225. }
  2226. if(strcmp(tmp, "gun1", true) == 0)
  2227. {
  2228. if(EventStarted)
  2229. {
  2230. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2231. return 1;
  2232. }
  2233. tmp = strtok(cmdtext, idx);
  2234. if(!strlen(tmp))
  2235. {
  2236. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event gun1 [gunid]");
  2237. return 1;
  2238. }
  2239. new egun = strvalEx(tmp);
  2240. EventWeapon1 = egun;
  2241. format(str, sizeof(str), "You have been set the event gun1 to %d.", egun);
  2242. SendClientMessage(playerid, COLOR_WHITE, str);
  2243. return 1;
  2244. }
  2245. if(strcmp(tmp, "gun2", true) == 0)
  2246. {
  2247. if(EventStarted)
  2248. {
  2249. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2250. return 1;
  2251. }
  2252. tmp = strtok(cmdtext, idx);
  2253. if(!strlen(tmp))
  2254. {
  2255. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event gun2 [gunid]");
  2256. return 1;
  2257. }
  2258. new egun = strvalEx(tmp);
  2259. EventWeapon2 = egun;
  2260. format(str, sizeof(str), "You have been set the event gun2 to %d.", egun);
  2261. SendClientMessage(playerid, COLOR_WHITE, str);
  2262. return 1;
  2263. }
  2264. if(strcmp(tmp, "gun3", true) == 0)
  2265. {
  2266. if(EventStarted)
  2267. {
  2268. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2269. return 1;
  2270. }
  2271. tmp = strtok(cmdtext, idx);
  2272. if(!strlen(tmp))
  2273. {
  2274. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event gun3 [gunid]");
  2275. return 1;
  2276. }
  2277. new egun = strvalEx(tmp);
  2278. EventWeapon3 = egun;
  2279. format(str, sizeof(str), "You have been set the event gun3 to %d.", egun);
  2280. SendClientMessage(playerid, COLOR_WHITE, str);
  2281. return 1;
  2282. }
  2283. if(strcmp(tmp, "gun4", true) == 0)
  2284. {
  2285. if(EventStarted)
  2286. {
  2287. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2288. return 1;
  2289. }
  2290. tmp = strtok(cmdtext, idx);
  2291. if(!strlen(tmp))
  2292. {
  2293. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event gun4 [gunid]");
  2294. return 1;
  2295. }
  2296. new egun = strvalEx(tmp);
  2297. EventWeapon4 = egun;
  2298. format(str, sizeof(str), "You have been set the event gun4 to %d.", egun);
  2299. SendClientMessage(playerid, COLOR_WHITE, str);
  2300. return 1;
  2301. }
  2302. if(strcmp(tmp, "gun5", true) == 0)
  2303. {
  2304. if(EventStarted)
  2305. {
  2306. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2307. return 1;
  2308. }
  2309. tmp = strtok(cmdtext, idx);
  2310. if(!strlen(tmp))
  2311. {
  2312. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /event gun5 [gunid]");
  2313. return 1;
  2314. }
  2315. new egun = strvalEx(tmp);
  2316. EventWeapon5 = egun;
  2317. format(str, sizeof(str), "You have been set the event gun5 to %d.", egun);
  2318. SendClientMessage(playerid, COLOR_WHITE, str);
  2319. return 1;
  2320. }
  2321. if(strcmp(tmp, "pos", true) == 0)
  2322. {
  2323. if(EventStarted)
  2324. {
  2325. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2326. return 1;
  2327. }
  2328. GetPlayerPos(playerid, EventX, EventY, EventZ);
  2329. EventInt = GetPlayerInterior(playerid);
  2330. EventWorld = GetPlayerVirtualWorld(playerid);
  2331. SendClientMessage(playerid, COLOR_WHITE, "You have successfully adjusted the event position.");
  2332. }
  2333. if(strcmp(tmp, "open", true) == 0)
  2334. {
  2335. if(EventX == 0.0 && EventY == 0.0 && EventZ == 0.0)
  2336. {
  2337. SendClientMessage(playerid, COLOR_GREY, "The event spawn has not been set.");
  2338. return 1;
  2339. }
  2340. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  2341. SendClientMessageToAll(COLOR_BLUE, "Event: An event is about to start. Type /joinevent to participate.");
  2342. EventActive = 1;
  2343. }
  2344. if(strcmp(tmp, "lock", true) == 0)
  2345. {
  2346. if(!EventActive)
  2347. {
  2348. SendClientMessage(playerid, COLOR_GREY, "There are currently no events active.");
  2349. return 1;
  2350. }
  2351. if(EventLocked)
  2352. {
  2353. EventLocked = 0;
  2354. SendClientMessageToAll(COLOR_BLUE, "Event: The event has been unlocked.");
  2355. }
  2356. else
  2357. {
  2358. EventLocked = 1;
  2359. SendClientMessageToAll(COLOR_BLUE, "Event: The event has been locked.");
  2360. }
  2361. }
  2362. if(strcmp(tmp, "start", true) == 0)
  2363. {
  2364. if(EventStarted)
  2365. {
  2366. SendClientMessage(playerid, COLOR_GREY, "There is already a started event.");
  2367. return 1;
  2368. }
  2369. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  2370. SendClientMessageToAll(COLOR_BLUE, "Event: The event has been started.");
  2371. EventStarted = 1;
  2372. // for(new i = 0; i < MAX_PLAYERS; i++)
  2373. foreach( new i: Player )
  2374. {
  2375. if(IsPlayerConnected(i))
  2376. {
  2377. if(IsAtEvent[i] == 1)
  2378. {
  2379. GivePlayerAdminGun(i, EventWeapon1);
  2380. GivePlayerAdminGun(i, EventWeapon2);
  2381. GivePlayerAdminGun(i, EventWeapon3);
  2382. GivePlayerAdminGun(i, EventWeapon4);
  2383. GivePlayerAdminGun(i, EventWeapon5);
  2384. }
  2385. }
  2386. }
  2387. }
  2388. if(strcmp(tmp, "end", true) == 0)
  2389. {
  2390. if(EventActive == 1 || EventStarted == 1)
  2391. {
  2392. EventX = 0.0;
  2393. EventY = 0.0;
  2394. EventZ = 0.0;
  2395. EventInt = 0;
  2396. EventWorld = 0;
  2397. EventHP = 100;
  2398. EventArmour = 0;
  2399. EventActive = 0;
  2400. EventStarted = 0;
  2401. EventLocked = 0;
  2402. EventWeapon1 = 0;
  2403. EventWeapon2 = 0;
  2404. EventWeapon3 = 0;
  2405. EventWeapon4 = 0;
  2406. EventWeapon5 = 0;
  2407. EventJoinText = 0;
  2408. format(EventText, sizeof(EventText), "None");
  2409. SendClientMessageToAll(COLOR_BLUE, "Event: The event has been finished.");
  2410. // for(new i = 0; i < MAX_PLAYERS; i++)
  2411. foreach( new i: Player )
  2412. {
  2413. if(IsPlayerConnected(i))
  2414. {
  2415. if(IsAtEvent[i] == 1)
  2416. {
  2417. ResetPlayerAdminWeaponsEx(i);
  2418. SetPlayerSpecialAction(i, SPECIAL_ACTION_NONE); //Reset the Jetpack if used in event.
  2419. SetPlayerSpawn(i);
  2420. }
  2421. }
  2422. }
  2423. }
  2424. else
  2425. {
  2426. SendClientMessage(playerid, COLOR_GREY, "There are currently no events active.");
  2427. }
  2428. }
  2429. }
  2430. else
  2431. {
  2432. SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
  2433. }
  2434. return 1;
  2435. }
  2436. if(!strcmp(cmd, "/setvhp", true))
  2437. {
  2438. tmp = strtok(cmdtext, idx);
  2439. if(!(PlayerInfo[playerid][pAdmin] >= 3))
  2440. return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}You're not authorized to use that command.");
  2441. if(!strlen(tmp))
  2442. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sethp [vehicle id] [health]");
  2443. new vid = strval(tmp);
  2444. tmp = strtok(cmdtext, idx);
  2445. if(!strlen(tmp))
  2446. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sethp [vehicle id] [health]");
  2447. if(!GetVehicleModel(vid))
  2448. return SendClientMessage(playerid, COLOR_GRAD2, "Invalid vehicle ID. Make sure the vehicle ID exists.");
  2449. new vhealth = strval(tmp);
  2450. SetVehicleHealth(vid, vhealth);
  2451. return 1;
  2452. }
  2453. if(strcmp(cmd, "/vsetweather", true) == 0)
  2454. {
  2455. if(VoodooSpell[playerid] == 0)
  2456. {
  2457. return 1;
  2458. }
  2459. tmp = strtok(cmdtext, idx);
  2460. if(!strlen(tmp))
  2461. {
  2462. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /vsetweather [weatherid]");
  2463. return 1;
  2464. }
  2465. new weather;
  2466. weather = strvalEx(tmp);
  2467. if(weather >= 0 && weather <= 19)
  2468. {
  2469. SetWeather(weather);
  2470. g_WeatherID = weather;
  2471. VoodooSpell[playerid] = 0;
  2472. return SendClientMessageToAll(COLOR_PURPLE, "* The weather suddenly changes.");
  2473. }
  2474. SendClientMessage(playerid, COLOR_GREY, "* The weather ID must not be below 0 or above 19.");
  2475. return 1;
  2476. }
  2477. if(strcmp(cmd, "/setgrav", true) == 0)
  2478. {
  2479. if(PlayerInfo[playerid][pAdmin] < 1337)
  2480. {
  2481. return 1;
  2482. }
  2483. tmp = strtok(cmdtext, idx);
  2484. if(!strlen(tmp))
  2485. {
  2486. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setgrav [number]");
  2487. return 1;
  2488. }
  2489. new Float:grav;
  2490. grav = strvalEx(tmp);
  2491. SetGravity(grav);
  2492. SendClientMessage(playerid, COLOR_GREY, "Gravity has been set for everyone.");
  2493. return 1;
  2494. }
  2495. if(strcmp(cmd, "/savechars", true) == 0)
  2496. {
  2497. if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pDev] >= 3)
  2498. {
  2499. SaveChars();
  2500. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Player/Server data has been saved.");
  2501. }
  2502. else
  2503. {
  2504. AdmErrorMsg;
  2505. }
  2506. return 1;
  2507. }
  2508. if(strcmp(cmd, "/load", true) == 0)
  2509. {
  2510. if(PlayerInfo[playerid][pAdmin] < 1337)
  2511. {
  2512. AdmErrorMsg;
  2513. return 1;
  2514. }
  2515. tmp = strtok(cmdtext, idx);
  2516. if(!strlen(tmp))
  2517. {
  2518. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /load [name]");
  2519. SendClientMessage(playerid, COLOR_GREY, "Available names: Families, Points, Entrances, Bizz, Surnames");
  2520. return 1;
  2521. }
  2522. if(strcmp(tmp, "families", true) == 0)
  2523. {
  2524. LoadFamilies();
  2525. SendClientMessage(playerid, COLOR_GRAD1, "Families.cfg has successfully been reloaded.");
  2526. return 1;
  2527. }
  2528. if(strcmp(tmp, "entrances", true) == 0)
  2529. {
  2530. LoadEntrances();
  2531. SendClientMessage(playerid, COLOR_GRAD1, "Entrances.cfg has successfully been reloaded.");
  2532. return 1;
  2533. }
  2534. if(strcmp(tmp, "bizz", true) == 0)
  2535. {
  2536. LoadBusinesses();
  2537. SendClientMessage(playerid, COLOR_GRAD1, "Bizz.cfg has successfully been reloaded.");
  2538. return 1;
  2539. }
  2540. if(strcmp(tmp, "surnames", true) == 0)
  2541. {
  2542. LoadSurnames();
  2543. SendClientMessage(playerid, COLOR_GRAD1, "Surnames.cfg has successfully been reloaded.");
  2544. return 1;
  2545. }
  2546. else
  2547. {
  2548. SendClientMessage(playerid, COLOR_GREY, "Invalid load name.");
  2549. }
  2550. return 1;
  2551. }
  2552. if(strcmp(cmd, "/getpos", true) == 0)
  2553. {
  2554. new Float:x, Float:y, Float:z;
  2555. GetPlayerPos(playerid, x, y, z);
  2556. format(str, sizeof(str), "Current Position: %0.2f, %0.2f, %0.2f", x, y, z);
  2557. SendClientMessage(playerid, SAMP_COLOR, str);
  2558. return 1;
  2559. }
  2560. if(strcmp(cmd, "/getvw", true) == 0)
  2561. {
  2562. format(str, sizeof(str), "Current Virtual World: %d", GetPlayerVirtualWorld(playerid));
  2563. SendClientMessage(playerid, SAMP_COLOR, str);
  2564. return 1;
  2565. }
  2566. if(strcmp(cmd, "/seizebiz", true) == 0)
  2567. {
  2568. if( PlayerInfo[playerid][pMember] != FACTION_GOV &&
  2569. PlayerInfo[playerid][pMember] != FACTION_JD)
  2570. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this.");
  2571. if(PlayerInfo[playerid][pMember] == FACTION_GOV && PlayerInfo[playerid][pRank] < 2)
  2572. return SendClientMessage(playerid, COLOR_GREY, "You must be R2+ to use this.");
  2573. new businessid = IsPlayerNearBiz(playerid);
  2574. if(businessid == -1)
  2575. return SendClientMessage(playerid, COLOR_GREY, "You are not near a business.");
  2576. if(!BizInfo[businessid][bOwned])
  2577. return SendClientMessage(playerid, COLOR_GREY, "You cannot seize a business that is not owned by someone.");
  2578. // Business is not seized
  2579. if(BizInfo[businessid][bSeized] == 0)
  2580. {
  2581. format(str, sizeof(str), "* You have seized %s's business.", BizInfo[businessid][bOwner]);
  2582. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  2583. // Seize for government
  2584. if(PlayerInfo[playerid][pMember] == 6) {
  2585. BizInfo[businessid][bSeized] = 1;
  2586. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[businessid][bName]);
  2587. }
  2588. // Seize for Judicial Department
  2589. else if(PlayerInfo[playerid][pMember] == 7) {
  2590. BizInfo[businessid][bSeized] = 2;
  2591. format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[businessid][bName]);
  2592. }
  2593. UpdateDynamic3DTextLabelText(Text3D:BizText[businessid], COLOR_BIZTEXT, str);
  2594. }
  2595. // Business is seized
  2596. else
  2597. {
  2598. if( BizInfo[businessid][bSeized] == 1 &&
  2599. PlayerInfo[playerid][pMember] != 6)
  2600. return SendClientMessage(playerid, COLOR_GREY, "You are not able to unseize this business.");
  2601. if( BizInfo[businessid][bSeized] == 2 &&
  2602. PlayerInfo[playerid][pMember] != 7)
  2603. return SendClientMessage(playerid, COLOR_GREY, "You are not able to unseize this business.");
  2604. format(str, sizeof(str), "You have unseized %s's business.", BizInfo[businessid][bOwner]);
  2605. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  2606. BizInfo[businessid][bSeized] = 0;
  2607. if(BizInfo[businessid][bLocked] == 1)
  2608. {
  2609. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nEntry Fee: Locked", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  2610. }
  2611. else
  2612. {
  2613. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[businessid][bName], BizInfo[businessid][bOwner]);
  2614. }
  2615. UpdateDynamic3DTextLabelText(Text3D:BizText[businessid], COLOR_BIZTEXT, str);
  2616. }
  2617. SaveBusinesses();
  2618. return 1;
  2619. }
  2620. if(strcmp(cmd, "/sate", true) == 0)
  2621. {
  2622. if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 5)
  2623. {
  2624. if(UsingSate[playerid] == 1)
  2625. {
  2626. SetCameraBehindPlayer(playerid);
  2627. PutPlayerInVehicle(playerid, gLastCar[playerid], 2);
  2628. TogglePlayerControllable(playerid, true);
  2629. UsingSate[playerid] = 0;
  2630. SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
  2631. oldsposx[playerid] = 0.0;
  2632. oldsposy[playerid] = 0.0;
  2633. oldsposz[playerid] = 0.0;
  2634. newsposx[playerid] = 0.0;
  2635. newsposy[playerid] = 0.0;
  2636. newsposz[playerid] = 0.0;
  2637. ZOOM[playerid] = 0;
  2638. SetCameraBehindPlayer(playerid);
  2639. return 1;
  2640. }
  2641. if(IsPlayerInRangeOfPoint(playerid, 3.0, 213.5529,1818.7916,6.4216))
  2642. {
  2643. if(UsingSate[playerid] == 0)
  2644. {
  2645. SetPlayerFacingAngle(playerid, 0.0);
  2646. GetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
  2647. SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid] +500);
  2648. gLastCar[playerid] = GetPlayerVehicleID(playerid);
  2649. TogglePlayerControllable(playerid, false);
  2650. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  2651. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] +200);
  2652. SendClientMessage(playerid, COLOR_GREY, "Use up, down, left, right to navigate and fire key to adjust the zoom !");
  2653. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid]);
  2654. UsingSate[playerid] = 1;
  2655. ZOOM[playerid] = 1;
  2656. return 1;
  2657. }
  2658. }
  2659. else return 1;
  2660. }
  2661. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pGroup] == GROUP_S9)
  2662. {
  2663. if(UsingSate[playerid] == 1)
  2664. {
  2665. SetCameraBehindPlayer(playerid);
  2666. PutPlayerInVehicle(playerid, gLastCar[playerid], 2);
  2667. TogglePlayerControllable(playerid, true);
  2668. UsingSate[playerid] = 0;
  2669. SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
  2670. oldsposx[playerid] = 0.0;
  2671. oldsposy[playerid] = 0.0;
  2672. oldsposz[playerid] = 0.0;
  2673. newsposx[playerid] = 0.0;
  2674. newsposy[playerid] = 0.0;
  2675. newsposz[playerid] = 0.0;
  2676. ZOOM[playerid] = 0;
  2677. SetCameraBehindPlayer(playerid);
  2678. return 1;
  2679. }
  2680. if(IsPlayerInAnyVehicle(playerid))
  2681. {
  2682. new playervehid = GetPlayerVehicleID(playerid);
  2683. if(sVehicleInfo[GetDynamicVehicleID(playervehid)][v_faction] != 2 && sVehicleInfo[GetDynamicVehicleID(playervehid)][v_group] != GROUP_S9)
  2684. {
  2685. SendClientMessage(playerid, COLOR_GREY, "You are not in the back seat of a DEA/S9 vehicle !");
  2686. return 1;
  2687. }
  2688. if(GetPlayerVehicleSeat(playerid) == 2 || GetPlayerVehicleSeat(playerid) == 3)
  2689. {
  2690. if(UsingSate[playerid] == 0)
  2691. {
  2692. SetPlayerFacingAngle(playerid, 0.0);
  2693. GetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
  2694. SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid] +500);
  2695. gLastCar[playerid] = playervehid;
  2696. TogglePlayerControllable(playerid, false);
  2697. GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
  2698. SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid] +200);
  2699. SendClientMessage(playerid, COLOR_GREY, "Use up, down, left, right to navigate and fire key to adjust the zoom !");
  2700. SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid] +5, newsposz[playerid]);
  2701. UsingSate[playerid] = 1;
  2702. ZOOM[playerid] = 1;
  2703. return 1;
  2704. }
  2705. }
  2706. }
  2707. else return SendClientMessage(playerid, COLOR_GREY, "You are not in vehicle !");
  2708. }
  2709. else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the DEA !");
  2710. }
  2711. if(strcmp(cmd, "/mute", true) == 0)
  2712. {
  2713. tmp = strtok(cmdtext, idx);
  2714. if(!strlen(tmp))
  2715. {
  2716. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /mute [playerid/PartOfName]");
  2717. return 1;
  2718. }
  2719. new playa;
  2720. playa = ReturnUser(tmp);
  2721. if(PlayerInfo[playerid][pAdmin] >= 1)
  2722. {
  2723. if(IsPlayerConnected(playa))
  2724. {
  2725. if(playa != INVALID_PLAYER_ID)
  2726. {
  2727. strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
  2728. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  2729. if(PlayerInfo[playa][pMuted] == 0)
  2730. {
  2731. PlayerInfo[playa][pMuted] = 1;
  2732. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was muted by %s.", giveplayer, sendername);
  2733. ABroadCast(COLOR_WHITE, str, 1);
  2734. }
  2735. else
  2736. {
  2737. PlayerInfo[playa][pMuted] = 0;
  2738. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was unmuted by %s.", giveplayer, sendername);
  2739. ABroadCast(COLOR_WHITE, str, 1);
  2740. }
  2741. }
  2742. }
  2743. }
  2744. else
  2745. {
  2746. AdmErrorMsg;
  2747. }
  2748. return 1;
  2749. }
  2750. if(strcmp(cmd, "/admute", true) == 0)
  2751. {
  2752. tmp = strtok(cmdtext, idx);
  2753. if(!strlen(tmp))
  2754. {
  2755. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /admute [playerid/PartOfName]");
  2756. return 1;
  2757. }
  2758. new playa;
  2759. playa = ReturnUser(tmp);
  2760. if(PlayerInfo[playerid][pAdmin] >= 1)
  2761. {
  2762. if(IsPlayerConnected(playa))
  2763. {
  2764. if(playa != INVALID_PLAYER_ID)
  2765. {
  2766. strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
  2767. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  2768. if(PlayerInfo[playa][pAdMuted] == 0)
  2769. {
  2770. PlayerInfo[playa][pAdMuted] = 1;
  2771. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's ad permission was revoked by %s.", giveplayer, sendername);
  2772. ABroadCast(COLOR_WHITE, str, 1);
  2773. }
  2774. else
  2775. {
  2776. PlayerInfo[playa][pAdMuted] = 0;
  2777. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's ad permission was granted by %s.", giveplayer, sendername);
  2778. ABroadCast(COLOR_WHITE, str, 1);
  2779. }
  2780. }
  2781. }
  2782. }
  2783. else
  2784. {
  2785. AdmErrorMsg;
  2786. }
  2787. return 1;
  2788. }
  2789. if(strcmp(cmd, "/bugmute", true) == 0)
  2790. {
  2791. tmp = strtok(cmdtext, idx);
  2792. if(!strlen(tmp))
  2793. {
  2794. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /bugmute [playerid/PartOfName]");
  2795. return 1;
  2796. }
  2797. new playa;
  2798. playa = ReturnUser(tmp);
  2799. if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pTester] >= TESTERRANK_SENIOR)
  2800. {
  2801. if(IsPlayerConnected(playa))
  2802. {
  2803. if(playa != INVALID_PLAYER_ID)
  2804. {
  2805. strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
  2806. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  2807. if(PlayerInfo[playa][pBugMuted] == 0)
  2808. {
  2809. PlayerInfo[playa][pBugMuted] = 1;
  2810. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's /reportbug permission was revoked by %s.", giveplayer, sendername);
  2811. ABroadCast(COLOR_WHITE, str, 1);
  2812. if(PlayerInfo[playerid][pTester] >= 1 && PlayerInfo[playerid][pAdmin] == 0)
  2813. {
  2814. return SendClientMessage(playerid, COLOR_WHITE, str);
  2815. }
  2816. }
  2817. else
  2818. {
  2819. PlayerInfo[playa][pBugMuted] = 0;
  2820. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's /reportbug permission was granted by %s.", giveplayer, sendername);
  2821. ABroadCast(COLOR_WHITE, str, 1);
  2822. if(PlayerInfo[playerid][pTester] >= 1 && PlayerInfo[playerid][pAdmin] == 0)
  2823. {
  2824. return SendClientMessage(playerid, COLOR_WHITE, str);
  2825. }
  2826. }
  2827. }
  2828. }
  2829. }
  2830. else
  2831. {
  2832. AdmErrorMsg;
  2833. }
  2834. return 1;
  2835. }
  2836. if(strcmp(cmd, "/banip", true) == 0)
  2837. {
  2838. if(PlayerInfo[playerid][pAdmin] > 1 || PlayerInfo[playerid][pBanAppealer])
  2839. {
  2840. tmp = strtok(cmdtext, idx);
  2841. if(!strlen(tmp))
  2842. {
  2843. SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /banip [ip]");
  2844. return 1;
  2845. }
  2846. format(str, sizeof(str), "banip %s", tmp);
  2847. SendRconCommand(str);
  2848. SendRconCommand("reloadbans");
  2849. strmid(sendername, PlayerOOCName(playerid), 0, MAX_PLAYER_NAME);
  2850. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has banned IP: %s", sendername, tmp);
  2851. ABroadCast(COLOR_WHITE, str, 1);
  2852. }
  2853. else
  2854. {
  2855. SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
  2856. }
  2857. return 1;
  2858. }
  2859. if(strcmp(cmd, "/getprisontime", true) == 0 || strcmp(cmd, "/cp", true) == 0)
  2860. {
  2861. if(PlayerInfo[playerid][pAdmin] >= 1)
  2862. {
  2863. tmp = strtok(cmdtext, idx);
  2864. if(!strlen(tmp))
  2865. {
  2866. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getprisontime [playerid/PartOfName]");
  2867. return 1;
  2868. }
  2869. giveplayerid = ReturnUser(tmp);
  2870. if(IsPlayerConnected(giveplayerid))
  2871. {
  2872. if(giveplayerid != INVALID_PLAYER_ID)
  2873. {
  2874. GetPlayerICName(giveplayerid, sendername, sizeof(sendername));
  2875. format(str, sizeof(str), "Name: %s, Time: %d minutes Prisoned By %s Reason: %s", PlayerICName(giveplayerid), PlayerInfo[giveplayerid][pJailTime] / 60, PlayerInfo[giveplayerid][pPrisonedBy], PlayerInfo[giveplayerid][pPrisonReason]);
  2876. SendClientMessage(playerid, COLOR_GREY, str);
  2877. }
  2878. }
  2879. else
  2880. {
  2881. SendClientMessage(playerid, COLOR_GRAD1, "Player does not exist.");
  2882. }
  2883. }
  2884. else
  2885. {
  2886. SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
  2887. }
  2888. return 1;
  2889. }
  2890. if(strcmp(cmd, "/shuffle", true) ==0)
  2891. {
  2892. if(PlayerInfo[playerid][pDeck] < 1)
  2893. {
  2894. SendClientMessage(playerid, COLOR_GRAD2, "You don't have a deck of cards.");
  2895. return 1;
  2896. }
  2897. ShuffleDeck(playerid);
  2898. PlayerPlaySound(playerid, 5600, 0.0, 0.0, 0.0);
  2899. format(str, sizeof(str), "* %s has shuffled their deck of cards.", PlayerICName(playerid));
  2900. ProxDetector(5.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  2901. return 1;
  2902. }
  2903. if(strcmp(cmd, "/dealcards", true) ==0)
  2904. {
  2905. if(PlayerInfo[playerid][pDeck] < 1)
  2906. {
  2907. SendClientMessage(playerid, COLOR_GRAD2, "You don't have a deck of cards.");
  2908. return 1;
  2909. }
  2910. tmp = strtok(cmdtext, idx);
  2911. if(!strlen(tmp))
  2912. {
  2913. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /dealcards [playerid] [amount]");
  2914. return 1;
  2915. }
  2916. new targetplayerid = ReturnUser(tmp);
  2917. if(IsPlayerConnected(targetplayerid))
  2918. {
  2919. if(IsPlayerInRangeOfPlayer(8.0, playerid, targetplayerid))
  2920. {
  2921. tmp = strtok(cmdtext, idx);
  2922. if(!strlen(tmp))
  2923. {
  2924. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /dealcards [playerid/PartOfName] [amount]");
  2925. return 1;
  2926. }
  2927. new numcards = strval(tmp);
  2928. if(numcards < 1 || numcards > 5)
  2929. {
  2930. SendClientMessage(playerid, COLOR_GREY, "You must deal between 1 and 5 cards.");
  2931. return 1;
  2932. }
  2933. if((CardsHave[targetplayerid] + numcards) > 5)
  2934. {
  2935. SendClientMessage(playerid, COLOR_GREY, "That player doesn't have enough open card slots.");
  2936. return 1;
  2937. }
  2938. if((CardsDealt[playerid] + numcards) > 52)
  2939. {
  2940. SendClientMessage(playerid, COLOR_GREY, "You don't have enough cards in the deck to deal that many.");
  2941. return 1;
  2942. }
  2943. for(new i = 0; i < numcards; i++)
  2944. {
  2945. DealCard(playerid, targetplayerid);
  2946. }
  2947. format(str, sizeof(str), "* %s has dealt %d cards to %s.", PlayerICName(playerid), numcards, PlayerICName(targetplayerid));
  2948. ProxDetector(5.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
  2949. }
  2950. else
  2951. {
  2952. SendClientMessage(playerid, COLOR_GREY, "You are not near that player.");
  2953. }
  2954. }
  2955. else
  2956. {
  2957. format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", targetplayerid);
  2958. SendClientMessage(playerid, COLOR_GRAD1, str);
  2959. }
  2960. return 1;
  2961. }
  2962. if(strcmp(cmd, "/discard", true) ==0)
  2963. {
  2964. tmp = strtok(cmdtext, idx);
  2965. if(!strlen(tmp))
  2966. {
  2967. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /discard [card slot/all]");
  2968. return 1;
  2969. }
  2970. if(strcmp(tmp, "all", true) ==0)
  2971. {
  2972. DiscardAll(playerid);
  2973. return 1;
  2974. }
  2975. while(strlen(tmp))
  2976. {
  2977. new discardid = strval(tmp);
  2978. tmp = strtok(cmdtext, idx);
  2979. if(discardid < 1 || discardid > 5)
  2980. {
  2981. SendClientMessage(playerid, COLOR_GREY, "Card cannot be below 1 or above 5.");
  2982. continue;
  2983. }
  2984. else if(discardid == 1 && Cards[playerid][0] < 1)
  2985. {
  2986. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  2987. continue;
  2988. }
  2989. else if(discardid == 2 && Cards[playerid][1] < 1)
  2990. {
  2991. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  2992. continue;
  2993. }
  2994. else if(discardid == 3 && Cards[playerid][2] < 1)
  2995. {
  2996. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  2997. continue;
  2998. }
  2999. else if(discardid == 4 && Cards[playerid][3] < 1)
  3000. {
  3001. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3002. continue;
  3003. }
  3004. else if(discardid == 5 && Cards[playerid][4] < 1)
  3005. {
  3006. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3007. continue;
  3008. }
  3009. Discard(playerid, discardid -1);
  3010. }
  3011. return 1;
  3012. }
  3013. if(strcmp(cmd, "/cards", true) ==0)
  3014. {
  3015. SendClientMessage(playerid, COLOR_WHITE, "Cards:");
  3016. format(str, sizeof(str), "Card 1: %s.", CardNames[Cards[playerid][0]]);
  3017. SendClientMessage(playerid, COLOR_GREY, str);
  3018. format(str, sizeof(str), "Card 2: %s.", CardNames[Cards[playerid][1]]);
  3019. SendClientMessage(playerid, COLOR_GREY, str);
  3020. format(str, sizeof(str), "Card 3: %s.", CardNames[Cards[playerid][2]]);
  3021. SendClientMessage(playerid, COLOR_GREY, str);
  3022. format(str, sizeof(str), "Card 4: %s.", CardNames[Cards[playerid][3]]);
  3023. SendClientMessage(playerid, COLOR_GREY, str);
  3024. format(str, sizeof(str), "Card 5: %s.", CardNames[Cards[playerid][4]]);
  3025. SendClientMessage(playerid, COLOR_GREY, str);
  3026. return 1;
  3027. }
  3028. if(strcmp(cmd, "/showcard", true) ==0)
  3029. {
  3030. tmp = strtok(cmdtext, idx);
  3031. if(!strlen(tmp))
  3032. {
  3033. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /showcard [card slot/all]");
  3034. return 1;
  3035. }
  3036. if(strcmp(tmp, "all", true) ==0)
  3037. {
  3038. ShowHand(playerid);
  3039. return 1;
  3040. }
  3041. while(strlen(tmp))
  3042. {
  3043. new discardid = strval(tmp);
  3044. tmp = strtok(cmdtext, idx);
  3045. if(discardid < 1 || discardid > 5)
  3046. {
  3047. SendClientMessage(playerid, COLOR_GREY, "Card cannot be below 1 or above 5.");
  3048. continue;
  3049. }
  3050. else if(discardid == 1 && Cards[playerid][0] < 1)
  3051. {
  3052. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3053. continue;
  3054. }
  3055. else if(discardid == 2 && Cards[playerid][1] < 1)
  3056. {
  3057. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3058. continue;
  3059. }
  3060. else if(discardid == 3 && Cards[playerid][2] < 1)
  3061. {
  3062. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3063. continue;
  3064. }
  3065. else if(discardid == 4 && Cards[playerid][3] < 1)
  3066. {
  3067. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3068. continue;
  3069. }
  3070. else if(discardid == 5 && Cards[playerid][4] < 1)
  3071. {
  3072. SendClientMessage(playerid, COLOR_GREY, "You don't have a card with that number.");
  3073. continue;
  3074. }
  3075. Showcard(playerid, discardid -1);
  3076. }
  3077. return 1;
  3078. }
  3079. if(strcmp(cmd, "/nametag", true) == 0)
  3080. {
  3081. if(ADuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You cannot use this command whilst on admin duty.");
  3082. new x_tag[64];
  3083. x_tag = strtok(cmdtext, idx);
  3084. if(!strlen(x_tag))
  3085. {
  3086. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /nametag [tagname]");
  3087. SendClientMessage(playerid, COLOR_GRAD1, "Tag names: VIP, Helper, Admin, Probie, Owner, Developer, Tester, Mapper, None");
  3088. return 1;
  3089. }
  3090. if(strcmp(x_tag, "vip", true) == 0)
  3091. {
  3092. if(usingNameTag[playerid])
  3093. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3094. if(PlayerInfo[playerid][pDonateRank] == 0)
  3095. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3096. if(PlayerInfo[playerid][pDonateRank] == 4)
  3097. {
  3098. nametagText[playerid] = CreateDynamic3DTextLabel("\nPlatinum VIP", COLOR_LIGHTBLUE, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3099. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Platinum VIP nametag enabled.");
  3100. usingNameTag[playerid] = 1;
  3101. }
  3102. else
  3103. {
  3104. nametagText[playerid] = CreateDynamic3DTextLabel("\nVIP", 0x800080FF0, 0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3105. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* VIP nametag enabled.");
  3106. usingNameTag[playerid] = 1;
  3107. }
  3108. }
  3109. else if(strcmp(x_tag, "helper", true) == 0)
  3110. {
  3111. if(usingNameTag[playerid])
  3112. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3113. if(PlayerInfo[playerid][pHelper] == 0)
  3114. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3115. nametagText[playerid] = CreateDynamic3DTextLabel("\nHelper", NEWBIE_COLOR, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3116. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Helper nametag enabled.");
  3117. usingNameTag[playerid] = 1;
  3118. return 1;
  3119. }
  3120. else if(strcmp(x_tag, "admin", true) == 0)
  3121. {
  3122. if(usingNameTag[playerid])
  3123. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3124. if(PlayerInfo[playerid][pAdmin] < 2)
  3125. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3126. if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
  3127. nametagText[playerid] = CreateDynamic3DTextLabel("\nAdministrator", 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3128. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Administrator nametag enabled.");
  3129. usingNameTag[playerid] = 1;
  3130. return 1;
  3131. }
  3132. else if(strcmp(x_tag, "probie", true) == 0)
  3133. {
  3134. if(usingNameTag[playerid])
  3135. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3136. if(PlayerInfo[playerid][pAdmin] != 1)
  3137. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3138. nametagText[playerid] = CreateDynamic3DTextLabel("\nProbationary Administrator", 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3139. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Probie Administrator nametag enabled.");
  3140. usingNameTag[playerid] = 1;
  3141. return 1;
  3142. }
  3143. else if(strcmp(x_tag, "developer", true) == 0)
  3144. {
  3145. if(usingNameTag[playerid])
  3146. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3147. if(PlayerInfo[playerid][pDev] == DEVRANK_NONE)
  3148. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3149. nametagText[playerid] = CreateDynamic3DTextLabel("\nDeveloper", 0xFEE349FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3150. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Developer nametag enabled.");
  3151. usingNameTag[playerid] = 1;
  3152. return 1;
  3153. }
  3154. else if(strcmp(x_tag, "owner", true) == 0)
  3155. {
  3156. if(usingNameTag[playerid])
  3157. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3158. if(PlayerInfo[playerid][pAdmin] != 1999999999)
  3159. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3160. nametagText[playerid] = CreateDynamic3DTextLabel("\nServer Owner", 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3161. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Owner nametag enabled.");
  3162. usingNameTag[playerid] = 1;
  3163. return 1;
  3164. }
  3165. else if(strcmp(x_tag, "tester", true) == 0)
  3166. {
  3167. if(usingNameTag[playerid])
  3168. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3169. if(PlayerInfo[playerid][pTester] == TESTERRANK_NONE)
  3170. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3171. nametagText[playerid] = CreateDynamic3DTextLabel("\nBeta Tester", 0x00CA00FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3172. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Beta Tester nametag enabled.");
  3173. usingNameTag[playerid] = 1;
  3174. return 1;
  3175. }
  3176. else if(strcmp(x_tag, "mapper", true) == 0)
  3177. {
  3178. if(usingNameTag[playerid])
  3179. return SendClientMessage(playerid, COLOR_GREY, "You already have your nametag enabled, use \"None\" to disable it.");
  3180. if(PlayerInfo[playerid][pMapper] == MAPPERRANK_NONE)
  3181. return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this nametag.");
  3182. nametagText[playerid] = CreateDynamic3DTextLabel("\nMapper", 0xFFFFFFAA, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
  3183. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Mapper nametag enabled.");
  3184. usingNameTag[playerid] = 1;
  3185. return 1;
  3186. }
  3187. else if(strcmp(x_tag, "none", true) == 0)
  3188. {
  3189. if(!usingNameTag[playerid])
  3190. return SendClientMessage(playerid, COLOR_GREY, "You are not using a nametag.");
  3191. DestroyDynamic3DTextLabel(nametagText[playerid]);
  3192. nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
  3193. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nametag has been disabled.");
  3194. usingNameTag[playerid] = 0;
  3195. return 1;
  3196. }
  3197. return 1;
  3198. }
  3199. if(strcmp(cmd, "/newbietag", true) == 0)
  3200. {
  3201. new x_tag[64];
  3202. x_tag = strtok(cmdtext, idx);
  3203. if(!strlen(x_tag))
  3204. {
  3205. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /newbietag [tagname]");
  3206. SendClientMessage(playerid, COLOR_GRAD1, "Tag names: Newbie, Player, VIP, Helper, Admin, Developer, Famed, Tester, Mapper, Designer, Oldschool, Custom");
  3207. }
  3208. else if(strcmp(x_tag, "Newbie", true) == 0)
  3209. {
  3210. if(PlayerInfo[playerid][pLevel] == 1 || PlayerInfo[playerid][pAdmin] > 1)
  3211. {
  3212. PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
  3213. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Newbie");
  3214. return 1;
  3215. }
  3216. else
  3217. {
  3218. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3219. return 1;
  3220. }
  3221. }
  3222. else if(strcmp(x_tag, "player", true) == 0)
  3223. {
  3224. if(PlayerInfo[playerid][pLevel] >= 2 || PlayerInfo[playerid][pAdmin] >= 1)
  3225. {
  3226. PlayerInfo[playerid][pTag] = NTAG_PLAYER;
  3227. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Player");
  3228. return 1;
  3229. }
  3230. else
  3231. {
  3232. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3233. return 1;
  3234. }
  3235. }
  3236. else if(strcmp(x_tag, "vip", true) == 0)
  3237. {
  3238. if(PlayerInfo[playerid][pDonateRank] == 0)
  3239. {
  3240. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3241. return 1;
  3242. }
  3243. new viprank = PlayerInfo[playerid][pDonateRank];
  3244. if(viprank == 1)
  3245. {
  3246. PlayerInfo[playerid][pTag] = NTAG_BVIP;
  3247. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Bronze VIP");
  3248. return 1;
  3249. }
  3250. else if(viprank == 2)
  3251. {
  3252. PlayerInfo[playerid][pTag] = NTAG_SVIP;
  3253. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Silver VIP");
  3254. return 1;
  3255. }
  3256. else if(viprank == 3)
  3257. {
  3258. PlayerInfo[playerid][pTag] = NTAG_GVIP;
  3259. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Gold VIP");
  3260. return 1;
  3261. }
  3262. }
  3263. else if(strcmp(x_tag, "helper", true) == 0)
  3264. {
  3265. if(PlayerInfo[playerid][pHelper] == 0)
  3266. {
  3267. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3268. return 1;
  3269. }
  3270. new helperrank = PlayerInfo[playerid][pHelper];
  3271. if(helperrank == 1)
  3272. {
  3273. PlayerInfo[playerid][pTag] = NTAG_THELPER;
  3274. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Trial Helper");
  3275. }
  3276. if(helperrank == 2)
  3277. {
  3278. PlayerInfo[playerid][pTag] = NTAG_HELPER;
  3279. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Helper");
  3280. }
  3281. if(helperrank == 3)
  3282. {
  3283. PlayerInfo[playerid][pTag] = NTAG_SHELPER;
  3284. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Senior Helper");
  3285. }
  3286. if(helperrank == 4)
  3287. {
  3288. PlayerInfo[playerid][pTag] = NTAG_HHELPER;
  3289. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Head Helper");
  3290. }
  3291. if(helperrank == 5)
  3292. {
  3293. PlayerInfo[playerid][pTag] = NTAG_DOPR;
  3294. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Director of The Helpers Team");
  3295. }
  3296. return 1;
  3297. }
  3298. else if(strcmp(x_tag, "admin", true) == 0)
  3299. {
  3300. if(PlayerInfo[playerid][pAdmin] <= 1)
  3301. {
  3302. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3303. return 1;
  3304. }
  3305. PlayerInfo[playerid][pTag] = NTAG_ADMIN;
  3306. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Admin");
  3307. return 1;
  3308. }
  3309. else if(strcmp(x_tag, "developer", true) == 0)
  3310. {
  3311. if(PlayerInfo[playerid][pDev] == DEVRANK_NONE)
  3312. {
  3313. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3314. return 1;
  3315. }
  3316. new devrank = PlayerInfo[playerid][pDev];
  3317. if(devrank == 1)
  3318. {
  3319. PlayerInfo[playerid][pTag] = NTAG_JUNIORDEV;
  3320. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Junior Developer");
  3321. }
  3322. if(devrank == 2)
  3323. {
  3324. PlayerInfo[playerid][pTag] = NTAG_SENIORDEV;
  3325. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Senior Developer");
  3326. }
  3327. if(devrank == 3)
  3328. {
  3329. PlayerInfo[playerid][pTag] = NTAG_MANAGERDEV;
  3330. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Development Manager");
  3331. }
  3332. if(devrank == 4)
  3333. {
  3334. PlayerInfo[playerid][pTag] = NTAG_LEADDEV;
  3335. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Lead Developer");
  3336. }
  3337. return 1;
  3338. }
  3339. else if(strcmp(x_tag, "famed", true) == 0)
  3340. {
  3341. if(PlayerInfo[playerid][pFamed] == 0)
  3342. {
  3343. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3344. return 1;
  3345. }
  3346. new famrank = PlayerInfo[playerid][pFamed];
  3347. if(famrank == 1)
  3348. {
  3349. PlayerInfo[playerid][pTag] = NTAG_FAMED;
  3350. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Famed");
  3351. }
  3352. if(famrank == 2)
  3353. {
  3354. PlayerInfo[playerid][pTag] = NTAG_MANAGERFAMED;
  3355. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Famed Manager");
  3356. }
  3357. return 1;
  3358. }
  3359. else if(strcmp(x_tag, "Oldschool", true) == 0)
  3360. {
  3361. if(PlayerInfo[playerid][pOldSchool] == 0)
  3362. {
  3363. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3364. return 1;
  3365. }
  3366. new osrank = PlayerInfo[playerid][pOldSchool];
  3367. if(osrank == 1)
  3368. {
  3369. PlayerInfo[playerid][pTag] = NTAG_OLDSCHOOL;
  3370. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Old School");
  3371. }
  3372. if(osrank == 2)
  3373. {
  3374. PlayerInfo[playerid][pTag] = NTAG_MODOLDSCHOOL;
  3375. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Old School Moderator");
  3376. }
  3377. return 1;
  3378. }
  3379. else if(strcmp(x_tag, "tester", true) == 0)
  3380. {
  3381. if(PlayerInfo[playerid][pTester] == TESTERRANK_NONE)
  3382. {
  3383. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3384. return 1;
  3385. }
  3386. new testrank = PlayerInfo[playerid][pTester];
  3387. if(testrank == 1)
  3388. {
  3389. PlayerInfo[playerid][pTag] = NTAG_TESTER;
  3390. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Tester");
  3391. }
  3392. if(testrank == 2)
  3393. {
  3394. PlayerInfo[playerid][pTag] = NTAG_STESTER;
  3395. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Tester");
  3396. }
  3397. if(testrank == 3)
  3398. {
  3399. PlayerInfo[playerid][pTag] = NTAG_MANAGERTESTER;
  3400. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Tester Manager");
  3401. }
  3402. return 1;
  3403. }
  3404. else if(strcmp(x_tag, "mapper", true) == 0)
  3405. {
  3406. if(PlayerInfo[playerid][pMapper] == MAPPERRANK_NONE)
  3407. {
  3408. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3409. return 1;
  3410. }
  3411. new testrank = PlayerInfo[playerid][pMapper];
  3412. if(testrank == 1)
  3413. {
  3414. PlayerInfo[playerid][pTag] = NTAG_MAPPER;
  3415. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Mapper");
  3416. }
  3417. if(testrank == 2)
  3418. {
  3419. PlayerInfo[playerid][pTag] = NTAG_SENIORMAPPER;
  3420. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Senior Mapper");
  3421. }
  3422. if(testrank == 3)
  3423. {
  3424. PlayerInfo[playerid][pTag] = NTAG_MANAGERMAPPER;
  3425. SendClientMessage(playerid, COLOR_WHITE, "Your tag in newbie chat was changed to Mapping Manager");
  3426. }
  3427. return 1;
  3428. }
  3429. else if(strcmp(x_tag, "custom", true) == 0){
  3430. if(PlayerInfo[playerid][pNewbieTag] != 0){
  3431. new string[128];
  3432. PlayerInfo[playerid][pTag] = PlayerInfo[playerid][pNewbieTagName];
  3433. format(string, sizeof(string), "Your tag in newbie chat was changed to %s", PlayerInfo[playerid][pNewbieTagName]);
  3434. SendClientMessage(playerid, COLOR_WHITE, string);
  3435. } else {
  3436. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag.");
  3437. }
  3438. return 1;
  3439. }
  3440. }
  3441. /*if(strcmp(cmd, "/globaltag", true) == 0)
  3442. {
  3443. new x_tag[64];
  3444. x_tag = strtok(cmdtext, idx);
  3445. if(!strlen(x_tag))
  3446. {
  3447. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /globaltag [tagname]");
  3448. SendClientMessage(playerid, COLOR_GRAD1, "Tag names: Newbie, Player, VIP, Helper, Admin, Developer, Famed, Tester, Mapper, Designer, Oldschool, Custom");
  3449. }
  3450. else if(strcmp(x_tag, "Newbie", true) == 0)
  3451. {
  3452. if(PlayerInfo[playerid][pLevel] == 1 || PlayerInfo[playerid][pAdmin] > 1)
  3453. {
  3454. PlayerInfo[playerid][pTag] = GTAG_NEWBIE;
  3455. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Newbie");
  3456. return 1;
  3457. }
  3458. else
  3459. {
  3460. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3461. return 1;
  3462. }
  3463. }
  3464. else if(strcmp(x_tag, "player", true) == 0)
  3465. {
  3466. if(PlayerInfo[playerid][pLevel] >= 2 || PlayerInfo[playerid][pAdmin] >= 1)
  3467. {
  3468. PlayerInfo[playerid][pTag] = GTAG_PLAYER;
  3469. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Player");
  3470. return 1;
  3471. }
  3472. else
  3473. {
  3474. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3475. return 1;
  3476. }
  3477. }
  3478. else if(strcmp(x_tag, "vip", true) == 0)
  3479. {
  3480. if(PlayerInfo[playerid][pDonateRank] == 0)
  3481. {
  3482. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3483. return 1;
  3484. }
  3485. new viprank = PlayerInfo[playerid][pDonateRank];
  3486. if(viprank == 1)
  3487. {
  3488. PlayerInfo[playerid][pTag] = GTAG_BVIP;
  3489. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Bronze VIP");
  3490. return 1;
  3491. }
  3492. else if(viprank == 2)
  3493. {
  3494. PlayerInfo[playerid][pTag] = GTAG_SVIP;
  3495. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Silver VIP");
  3496. return 1;
  3497. }
  3498. else if(viprank == 3)
  3499. {
  3500. PlayerInfo[playerid][pTag] = GTAG_GVIP;
  3501. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Gold VIP");
  3502. return 1;
  3503. }
  3504. }
  3505. else if(strcmp(x_tag, "helper", true) == 0)
  3506. {
  3507. if(PlayerInfo[playerid][pHelper] == 0)
  3508. {
  3509. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3510. return 1;
  3511. }
  3512. new helperrank = PlayerInfo[playerid][pHelper];
  3513. if(helperrank == 1)
  3514. {
  3515. PlayerInfo[playerid][pTag] = GTAG_THELPER;
  3516. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Trial Helper");
  3517. }
  3518. if(helperrank == 2)
  3519. {
  3520. PlayerInfo[playerid][pTag] = GTAG_HELPER;
  3521. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Helper");
  3522. }
  3523. if(helperrank == 3)
  3524. {
  3525. PlayerInfo[playerid][pTag] = GTAG_SHELPER;
  3526. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Senior Helper");
  3527. }
  3528. if(helperrank == 4)
  3529. {
  3530. PlayerInfo[playerid][pTag] = GTAG_HHELPER;
  3531. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Head Helper");
  3532. }
  3533. if(helperrank == 5)
  3534. {
  3535. PlayerInfo[playerid][pTag] = GTAG_DOPR;
  3536. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Director of The Helpers Team");
  3537. }
  3538. return 1;
  3539. }
  3540. else if(strcmp(x_tag, "admin", true) == 0)
  3541. {
  3542. if(PlayerInfo[playerid][pAdmin] <= 1)
  3543. {
  3544. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3545. return 1;
  3546. }
  3547. PlayerInfo[playerid][pTag] = GTAG_ADMIN;
  3548. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Admin");
  3549. return 1;
  3550. }
  3551. else if(strcmp(x_tag, "developer", true) == 0)
  3552. {
  3553. if(PlayerInfo[playerid][pDev] == DEVRANK_NONE)
  3554. {
  3555. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3556. return 1;
  3557. }
  3558. new devrank = PlayerInfo[playerid][pDev];
  3559. if(devrank == 1)
  3560. {
  3561. PlayerInfo[playerid][pTag] = GTAG_JUNIORDEV;
  3562. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Junior Developer");
  3563. }
  3564. if(devrank == 2)
  3565. {
  3566. PlayerInfo[playerid][pTag] = GTAG_SENIORDEV;
  3567. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Senior Developer");
  3568. }
  3569. if(devrank == 3)
  3570. {
  3571. PlayerInfo[playerid][pTag] = GTAG_MANAGERDEV;
  3572. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Development Manager");
  3573. }
  3574. if(devrank == 4)
  3575. {
  3576. PlayerInfo[playerid][pTag] = GTAG_LEADDEV;
  3577. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Lead Developer");
  3578. }
  3579. return 1;
  3580. }
  3581. else if(strcmp(x_tag, "famed", true) == 0)
  3582. {
  3583. if(PlayerInfo[playerid][pFamed] == 0)
  3584. {
  3585. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3586. return 1;
  3587. }
  3588. new famrank = PlayerInfo[playerid][pFamed];
  3589. if(famrank == 1)
  3590. {
  3591. PlayerInfo[playerid][pTag] = GTAG_FAMED;
  3592. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Famed");
  3593. }
  3594. if(famrank == 2)
  3595. {
  3596. PlayerInfo[playerid][pTag] = GTAG_MANAGERFAMED;
  3597. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Famed Manager");
  3598. }
  3599. return 1;
  3600. }
  3601. else if(strcmp(x_tag, "Oldschool", true) == 0)
  3602. {
  3603. if(PlayerInfo[playerid][pOldSchool] == 0)
  3604. {
  3605. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3606. return 1;
  3607. }
  3608. new osrank = PlayerInfo[playerid][pOldSchool];
  3609. if(osrank == 1)
  3610. {
  3611. PlayerInfo[playerid][pTag] = GTAG_OLDSCHOOL;
  3612. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Old School");
  3613. }
  3614. if(osrank == 2)
  3615. {
  3616. PlayerInfo[playerid][pTag] = GTAG_MODOLDSCHOOL;
  3617. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Old School Moderator");
  3618. }
  3619. return 1;
  3620. }
  3621. else if(strcmp(x_tag, "tester", true) == 0)
  3622. {
  3623. if(PlayerInfo[playerid][pTester] == TESTERRANK_NONE)
  3624. {
  3625. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3626. return 1;
  3627. }
  3628. new testrank = PlayerInfo[playerid][pTester];
  3629. if(testrank == 1)
  3630. {
  3631. PlayerInfo[playerid][pTag] = GTAG_TESTER;
  3632. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Tester");
  3633. }
  3634. if(testrank == 2)
  3635. {
  3636. PlayerInfo[playerid][pTag] = GTAG_STESTER;
  3637. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Tester");
  3638. }
  3639. if(testrank == 3)
  3640. {
  3641. PlayerInfo[playerid][pTag] = GTAG_MANAGERTESTER;
  3642. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Tester Manager");
  3643. }
  3644. return 1;
  3645. }
  3646. else if(strcmp(x_tag, "mapper", true) == 0)
  3647. {
  3648. if(PlayerInfo[playerid][pMapper] == MAPPERRANK_NONE)
  3649. {
  3650. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag");
  3651. return 1;
  3652. }
  3653. new testrank = PlayerInfo[playerid][pMapper];
  3654. if(testrank == 1)
  3655. {
  3656. PlayerInfo[playerid][pTag] = GTAG_MAPPER;
  3657. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Mapper");
  3658. }
  3659. if(testrank == 2)
  3660. {
  3661. PlayerInfo[playerid][pTag] = GTAG_SENIORMAPPER;
  3662. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Senior Mapper");
  3663. }
  3664. if(testrank == 3)
  3665. {
  3666. PlayerInfo[playerid][pTag] = GTAG_MANAGERMAPPER;
  3667. SendClientMessage(playerid, COLOR_WHITE, "Your tag in global chat was changed to Mapping Manager");
  3668. }
  3669. return 1;
  3670. }
  3671. else if(strcmp(x_tag, "custom", true) == 0){
  3672. if(PlayerInfo[playerid][pGCTag] != 0){
  3673. new string[128];
  3674. PlayerInfo[playerid][pTag] = PlayerInfo[playerid][pGCTagName];
  3675. format(string, sizeof(string), "Your tag in global chat was changed to %s", PlayerInfo[playerid][pGCTagName]);
  3676. SendClientMessage(playerid, COLOR_WHITE, string);
  3677. } else {
  3678. SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this tag.");
  3679. }
  3680. return 1;
  3681. }
  3682. }*/
  3683. if(strcmp(cmd, "/skills", true) ==0)
  3684. { // functions such as GetPlayerJobLevel are defined in core.inc in the jobs folder
  3685. new tline[1200], line1[128], line2[128], line3[128], line4[128], line5[128], line6[128], line7[128], line8[128], line9[128], line10[128],
  3686. line11[128], line12[128];
  3687. new req1, req2, jlevel;
  3688. new templine[128], templine2[128];
  3689. new joblevel1 = GetPlayerJobLevel(playerid, JOB_DETECTIVE), joblevel2 = GetPlayerJobLevel(playerid, JOB_MECHANIC);
  3690. format(line1, sizeof(line1), "{007BD0}Detective Skill Level: {B4B5B7}%d\t\t\t\t\t{007BD0}Mechanic Skill Level: {B4B5B7}%d", joblevel1, joblevel2);
  3691. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to find %d more people to level up.", GetPlayerJobSkillLevel(playerid, JOB_DETECTIVE));
  3692. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.\t");
  3693. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to fix/fill %d more vehicles to level up.", GetPlayerJobSkillLevel(playerid, JOB_MECHANIC));
  3694. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3695. format(line2, sizeof(line2), "%s\t\t\t%s", templine, templine2);
  3696. joblevel1 = GetPlayerJobLevel(playerid, JOBID_LAWYER), joblevel2 = GetPlayerJobLevel(playerid, JOB_BOXER);
  3697. format(line3, sizeof(line3), "{007BD0}Lawyer Skill Level: {B4B5B7}%d\t\t\t\t\t\t{007BD0}Boxer Skill Level: {B4B5B7}%d", joblevel1, joblevel2);
  3698. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to free %d more people to level up.", GetPlayerJobSkillLevel(playerid, JOB_LAWYER));
  3699. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.\t");
  3700. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to win %d more boxing matches to level up.", GetPlayerJobSkillLevel(playerid, JOB_BOXER));
  3701. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3702. format(line4, sizeof(line4), "%s\t\t\t%s", templine, templine2);
  3703. //Sex & Fishing
  3704. jlevel = PlayerInfo[playerid][pSexSkill];
  3705. if(jlevel >= 0 && jlevel <= 49)
  3706. {
  3707. joblevel1 = 1;
  3708. req1 = 50 -jlevel;
  3709. }
  3710. else if(jlevel >= 50 && jlevel <= 99)
  3711. {
  3712. joblevel1 = 2;
  3713. req1 = 100 -jlevel;
  3714. }
  3715. else if(jlevel >= 100 && jlevel <= 199)
  3716. {
  3717. joblevel1 = 3;
  3718. req1 = 200 -jlevel;
  3719. }
  3720. else if(jlevel >= 200 && jlevel <= 399)
  3721. {
  3722. joblevel1 = 4;
  3723. req1 = 400 -jlevel;
  3724. }
  3725. else if(jlevel >= 400)
  3726. {
  3727. joblevel1 = 5;
  3728. }
  3729. jlevel = PlayerInfo[playerid][pFishSkill];
  3730. if(jlevel >= 0 && jlevel <= 49)
  3731. {
  3732. joblevel2 = 1;
  3733. req2 = 50 -jlevel;
  3734. }
  3735. else if(jlevel >= 50 && jlevel <= 249)
  3736. {
  3737. joblevel2 = 2;
  3738. req2 = 250 -jlevel;
  3739. }
  3740. else if(jlevel >= 250 && jlevel <= 499)
  3741. {
  3742. joblevel2 = 3;
  3743. req2 = 500 -jlevel;
  3744. }
  3745. else if(jlevel >= 500 && jlevel <= 999)
  3746. {
  3747. joblevel2 = 4;
  3748. req2 = 1000 -jlevel;
  3749. }
  3750. else if(jlevel >= 1000)
  3751. {
  3752. joblevel2 = 5;
  3753. }
  3754. format(line5, sizeof(line5), "{007BD0}Sex Skill Level: {B4B5B7}%d\t\t\t\t\t\t{007BD0}Fishing Skill Level: {B4B5B7}%d", joblevel1, joblevel2);
  3755. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to have sex with %d more people to level up.", req1);
  3756. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.\t\t");
  3757. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to catch %d more fish to level up.", req2);
  3758. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3759. format(line6, sizeof(line6), "%s\t%s", templine, templine2);
  3760. joblevel1 = GetPlayerJobLevel(playerid, JOB_DRUGDEALER), joblevel2 = GetPlayerJobLevel(playerid, JOB_SMUGGLER);
  3761. format(line7, sizeof(line7), "{007BD0}Drug Dealer Skill Level: {B4B5B7}%d\t\t\t\t\t{007BD0}Drug Smuggler Level: {B4B5B7}%d", joblevel1, joblevel2);
  3762. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to sell drugs %d more times to level up.", GetPlayerJobSkillLevel(playerid, JOB_DRUGDEALER));
  3763. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.\t\t");
  3764. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to deliver %d more drug crates to level up.", GetPlayerJobSkillLevel(playerid, JOB_SMUGGLER));
  3765. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3766. format(line8, sizeof(line8), "%s\t\t%s", templine, templine2);
  3767. // Car Jacker & pizza
  3768. jlevel = PlayerInfo[playerid][pJackSkill];
  3769. if(jlevel >= 0 && jlevel <= 49)
  3770. {
  3771. joblevel1 = 1;
  3772. req1 = 50 -jlevel;
  3773. }
  3774. else if(jlevel >= 50 && jlevel <= 99)
  3775. {
  3776. joblevel1 = 2;
  3777. req1 = 100 -jlevel;
  3778. }
  3779. else if(jlevel >= 100 && jlevel <= 199)
  3780. {
  3781. joblevel1 = 3;
  3782. req1 = 200 -jlevel;
  3783. }
  3784. else if(jlevel >= 200 && jlevel <= 399)
  3785. {
  3786. joblevel1 = 4;
  3787. req1 = 400 -jlevel;
  3788. }
  3789. else if(jlevel >= 400)
  3790. {
  3791. joblevel1 = 5;
  3792. req1 = 999;
  3793. }
  3794. joblevel2 = GetPlayerPizzaLevel(playerid);
  3795. format(line9, sizeof(line9), "{007BD0}Car Jacker Skill Level: {B4B5B7}%d\t\t\t\t\t{007BD0}Pizza Skill Level: {B4B5B7}%d", joblevel1, joblevel2);
  3796. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to drop %d more cars at the crane to level up.", req1);
  3797. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.\t\t");
  3798. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to deliver %d more pizzas to level up.", GetPlayerPizzaSkillLevel(playerid));
  3799. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3800. if(req1 <= 99) format(line10, sizeof(line10), "%s\t%s", templine, templine2);
  3801. else if(req1 >= 100 && req1 <= 500) format(line10, sizeof(line10), "%s\t%s", templine, templine2);
  3802. else if(req1 == 999) format(line10, sizeof(line10), "%s\t\t%s", templine, templine2);
  3803. // Arms Dealer & Waste Collector
  3804. joblevel1 = GetPlayerJobLevel(playerid, JOB_ARMS), joblevel2 = GetPlayerJobLevel(playerid, JOB_WASTECOLLECTOR);
  3805. format(line11, sizeof(line11), "{007BD0}Arms Dealer Skill Level: {B4B5B7}%d\t\t\t\t\t{007BD0}Waste Collector Skill Level: {B4B5B7}%d", joblevel1, joblevel2);
  3806. if(joblevel1 < 5) format(templine, sizeof(templine), "You need to craft %d more guns to level up.", GetPlayerJobSkillLevel(playerid, JOB_ARMS));
  3807. else if(joblevel1 == 5) format(templine, sizeof(templine), "You are the maximum level for this job.");
  3808. if(joblevel2 < 5) format(templine2, sizeof(templine2), "You need to pickup %d more trashbags level up.", GetPlayerJobSkillLevel(playerid, JOB_WASTECOLLECTOR));
  3809. else if(joblevel2 == 5) format(templine2, sizeof(templine2), "You are the maximum level for this job.");
  3810. req1 = GetPlayerJobSkillLevel(playerid, JOB_ARMS);
  3811. if(req1 <= 99) format(line12, sizeof(line12), "%s\t\t\t%s", templine, templine2);
  3812. else if(req1 >= 100 && req1 <= 500) format(line12, sizeof(line12), "%s\t%s", templine, templine2);
  3813. else if(req1 == 999) format(line12, sizeof(line12), "%s\t\t%s", templine, templine2);
  3814. format(tline, sizeof(tline), "%s\n%s\n\n%s\n%s\n\n%s\n%s\n\n%s\n%s\n\n%s\n%s\n\n%s\n%s", line1, line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12);
  3815. ShowPlayerDialog(playerid, DIALOG_SKILLS, DIALOG_STYLE_MSGBOX, "Skill Levels", tline, "Done", "Cancel");
  3816. return 1;
  3817. }
  3818. if(strcmp(cmd, "/adjust", true) == 0)
  3819. {
  3820. if(PlayerInfo[playerid][pFMember] == 255)
  3821. {
  3822. SendClientMessage(playerid, COLOR_GREY, "You are not in a Family.");
  3823. return 1;
  3824. }
  3825. new family = PlayerInfo[playerid][pFMember];
  3826. new isleader = 0;
  3827. if(strcmp(FamilyInfo[family][FamilyLeader], PlayerICName(playerid), true) == 0 || strcmp(FamilyInfo[family][FamilyLeader], PlayerName(playerid), true) == 0)
  3828. {
  3829. isleader = 1;
  3830. }
  3831. if(PlayerInfo[playerid][pRank] >= 5)
  3832. {
  3833. new x_nr[64];
  3834. x_nr = strtok(cmdtext, idx);
  3835. if(!strlen(x_nr))
  3836. {
  3837. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust [name]");
  3838. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Name, MOTD, Invite, Uninvite, Rank, Safe, Rankname, Leadername");
  3839. SendClientMessage(playerid, COLOR_GRAD1, "Note: To kick an offline member use /ofuninvite [full name(case sensitive)]");
  3840. return 1;
  3841. }
  3842. if(strcmp(x_nr, "name", true) == 0)
  3843. {
  3844. if(isleader == 0)
  3845. return SendClientMessage(playerid, COLOR_GREY, "Only the family leader is allowed to change the family name.");
  3846. new length = strlen(cmdtext);
  3847. while((idx < length) && (cmdtext[idx] <= ' '))
  3848. {
  3849. idx++;
  3850. }
  3851. new offset = idx;
  3852. new result[24];
  3853. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  3854. {
  3855. result[idx - offset] = cmdtext[idx];
  3856. idx++;
  3857. }
  3858. result[idx - offset] = EOS;
  3859. if(!strlen(result))
  3860. {
  3861. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust name [name]");
  3862. return 1;
  3863. }
  3864. if(InvalidChar(result) == 1)
  3865. {
  3866. SendClientMessage(playerid, COLOR_GREY, "Family name cannot contain invalid characters.");
  3867. return 1;
  3868. }
  3869. strmid(FamilyInfo[family][FamilyName], result, 0, strlen(result), 255);
  3870. format(str, sizeof(str), "* You have adjusted your Family's Name to '%s'.", FamilyInfo[family][FamilyName]);
  3871. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3872. SaveFamilies();
  3873. }
  3874. else if(strcmp(x_nr, "rankname", true) == 0)
  3875. {
  3876. if(PlayerInfo[playerid][pRank] < 6)
  3877. return SendClientMessage(playerid, COLOR_GREY, "You must be rank 6 to change ranknames.");
  3878. tmp = strtok(cmdtext, idx);
  3879. if(!strlen(tmp))
  3880. {
  3881. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust rankname [rank] [name]");
  3882. return 1;
  3883. }
  3884. new rank = strvalEx(tmp);
  3885. if(rank < 1 || rank > 6)
  3886. {
  3887. SendClientMessage(playerid, COLOR_GREY, "Rank can't be below 1 or above 6.");
  3888. return 1;
  3889. }
  3890. new length = strlen(cmdtext);
  3891. while((idx < length) && (cmdtext[idx] <= ' '))
  3892. {
  3893. idx++;
  3894. }
  3895. new offset = idx;
  3896. new result[24];
  3897. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  3898. {
  3899. result[idx - offset] = cmdtext[idx];
  3900. idx++;
  3901. }
  3902. result[idx - offset] = EOS;
  3903. if(!strlen(result))
  3904. {
  3905. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust rankname [rank] [name]");
  3906. return 1;
  3907. }
  3908. if(InvalidChar(result) == 1)
  3909. {
  3910. SendClientMessage(playerid, COLOR_GREY, "ERROR: cannot contain invalid characters .");
  3911. return 1;
  3912. }
  3913. strmid(FamilyRank[family][rank -1], result, 0, strlen(result), 255);
  3914. format(str, sizeof(str), "* You have adjusted the name of Rank %d to \"%s\".", rank, FamilyRank[family][rank -1]);
  3915. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3916. SaveFamilies();
  3917. return 1;
  3918. }
  3919. else if(strcmp(x_nr, "motd", true) == 0)
  3920. {
  3921. new length = strlen(cmdtext);
  3922. while((idx < length) && (cmdtext[idx] <= ' '))
  3923. {
  3924. idx++;
  3925. }
  3926. new offset = idx;
  3927. new result[64];
  3928. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  3929. {
  3930. result[idx - offset] = cmdtext[idx];
  3931. idx++;
  3932. }
  3933. result[idx - offset] = EOS;
  3934. if(!strlen(result))
  3935. {
  3936. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust MOTD [MOTD Text]");
  3937. return 1;
  3938. }
  3939. if(InvalidChar(result) == 1)
  3940. {
  3941. SendClientMessage(playerid, COLOR_GREY, "ERROR: cannot contain invalid characters .");
  3942. return 1;
  3943. }
  3944. strmid(FamilyInfo[family][FamilyMOTD], result, 0, strlen(result), 255);
  3945. format(str, sizeof(str), "* You have adjusted your Family's MOTD to \"%s\".", FamilyInfo[family][FamilyMOTD]);
  3946. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  3947. SaveFamilies();
  3948. }
  3949. else if(strcmp(x_nr, "safe", true) == 0)
  3950. {
  3951. x_nr = strtok(cmdtext, idx);
  3952. if(!strlen(x_nr))
  3953. {
  3954. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust safe [confirm]");
  3955. if(FamilyInfo[family][FamilySafe] != 0)
  3956. {
  3957. SendClientMessage(playerid, COLOR_GREY, "Adjusting the position of your Family's Safe will cost $50,000.");
  3958. }
  3959. else
  3960. {
  3961. SendClientMessage(playerid, COLOR_GREY, "Purchasing a Safe for your Family will cost $50,000.");
  3962. SendClientMessage(playerid, COLOR_WHITE, "HINT: Purchasing a safe will give your family the ability to store/share drugs, materials, and guns.");
  3963. }
  3964. return 1;
  3965. }
  3966. if(strcmp(x_nr, "confirm", true) == 0)
  3967. {
  3968. if(PlayerInfo[playerid][pCash] < 49999)
  3969. {
  3970. SendClientMessage(playerid, COLOR_GRAD1, "You don't have that much money.");
  3971. return 1;
  3972. }
  3973. if(FamilyInfo[family][FamilySafe] != 0)
  3974. {
  3975. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have adjusted the position of your Family's Safe.");
  3976. }
  3977. else
  3978. {
  3979. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Safe.");
  3980. }
  3981. GiveMoney(playerid, -50000);
  3982. new randworld = GetPlayerVirtualWorld(playerid);
  3983. FamilyInfo[family][FamilySafeWorld] = randworld;
  3984. GetPlayerPos(playerid, FamilyInfo[family][FamilySafePos][0], FamilyInfo[family][FamilySafePos][1], FamilyInfo[family][FamilySafePos][2]);
  3985. DestroyDynamicPickup(FamilyInfo[family][PickupID]);
  3986. FamilyInfo[family][PickupID] = CreateDynamicPickup(1210, 23, FamilyInfo[family][FamilySafePos][0], FamilyInfo[family][FamilySafePos][1], FamilyInfo[family][FamilySafePos][2], randworld, -1, -1, 100.0);
  3987. FamilyInfo[family][FamilySafe] = 1;
  3988. SaveFamilies();
  3989. LogSafe(playerid, "Moved Safe");
  3990. return 1;
  3991. }
  3992. }
  3993. else if(strcmp(x_nr, "invite", true) == 0)
  3994. {
  3995. x_nr = strtok(cmdtext, idx);
  3996. if(!strlen(x_nr))
  3997. {
  3998. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust invite [playerid/PartOfName]");
  3999. return 1;
  4000. }
  4001. giveplayerid = ReturnUser(x_nr);
  4002. if(IsPlayerConnected(giveplayerid))
  4003. {
  4004. if(giveplayerid != INVALID_PLAYER_ID)
  4005. {
  4006. if(PlayerInfo[giveplayerid][pMember] > 0 || PlayerInfo[giveplayerid][pLeader] > 0 || PlayerInfo[giveplayerid][pFMember] != 255)
  4007. {
  4008. SendClientMessage(playerid, COLOR_GREY, "That player is already in a Faction / Family.");
  4009. return 1;
  4010. }
  4011. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4012. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4013. format(str, sizeof(str), "* You've invited %s to join %s.", giveplayer, FamilyInfo[family][FamilyName]);
  4014. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4015. format(str, sizeof(str), "* %s has invited you to join %s, (type /accept family) to accept.", sendername, FamilyInfo[family][FamilyName]);
  4016. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4017. FamilyOffer[giveplayerid] = playerid;
  4018. }
  4019. }
  4020. else
  4021. {
  4022. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4023. return 1;
  4024. }
  4025. }
  4026. else if(strcmp(x_nr, "uninvite", true) == 0)
  4027. {
  4028. tmp = strtok(cmdtext, idx);
  4029. if(!strlen(x_nr))
  4030. {
  4031. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust uninvite [playerid/PartOfName]");
  4032. return 1;
  4033. }
  4034. giveplayerid = ReturnUser(tmp);
  4035. if(!strlen(x_nr))
  4036. {
  4037. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust uninvite [playerid/PartOfName]");
  4038. return 1;
  4039. }
  4040. if(IsPlayerConnected(giveplayerid))
  4041. {
  4042. if(giveplayerid != INVALID_PLAYER_ID)
  4043. {
  4044. if(PlayerInfo[giveplayerid][pFMember] != family)
  4045. {
  4046. SendClientMessage(playerid, COLOR_GREY, "That player is not in your Family.");
  4047. return 1;
  4048. }
  4049. if(PlayerInfo[giveplayerid][pRank] > PlayerInfo[playerid][pRank] && !strmatch(FamilyInfo[family][FamilyLeader], PlayerICName(playerid)))
  4050. {
  4051. SendClientMessage(playerid, COLOR_GREY, "That player is a higher rank & you can't kick them unless you're the leader.");
  4052. return 1;
  4053. }
  4054. if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GREY, "You can't uninvite yourself, use /quitfamily.");
  4055. new fam = PlayerInfo[giveplayerid][pFMember];
  4056. if(strmatch(FamilyInfo[fam][FamilyLeader], PlayerICName(giveplayerid)))
  4057. {
  4058. strmid(FamilyInfo[fam][FamilyLeader], "None", 0, 100, 255);
  4059. FamilyInfo[fam][FamilyMembers] -= 1;
  4060. }
  4061. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4062. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4063. format(str, sizeof(str), "* You have kicked %s out of your Family.", giveplayer);
  4064. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4065. format(str, sizeof(str), "* Family Leader %s has kicked you out of the Family.", sendername);
  4066. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4067. PlayerInfo[giveplayerid][pFMember] = 255;
  4068. PlayerInfo[giveplayerid][pRank] = 0;
  4069. FamilyInfo[family][FamilyMembers] --;
  4070. return 1;
  4071. }
  4072. }
  4073. else
  4074. {
  4075. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4076. return 1;
  4077. }
  4078. }
  4079. else if(strcmp(x_nr, "rank", true) == 0)
  4080. {
  4081. tmp = strtok(cmdtext, idx);
  4082. if(!strlen(x_nr))
  4083. {
  4084. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust rank [rank] [playerid/PartOfName]");
  4085. return 1;
  4086. }
  4087. new rank = strvalEx(tmp);
  4088. if(!strlen(tmp))
  4089. {
  4090. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust rank [rank] [playerid/PartOfName]");
  4091. return 1;
  4092. }
  4093. if(rank < 1 || rank > 6)
  4094. {
  4095. SendClientMessage(playerid, COLOR_GREY, "Rank can't be below 1 or above 6.");
  4096. return 1;
  4097. }
  4098. tmp = strtok(cmdtext, idx);
  4099. if(!strlen(x_nr))
  4100. {
  4101. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adjust rank [rank] [playerid/PartOfName]");
  4102. return 1;
  4103. }
  4104. giveplayerid = ReturnUser(tmp);
  4105. if(IsPlayerConnected(giveplayerid))
  4106. {
  4107. if(giveplayerid != INVALID_PLAYER_ID)
  4108. {
  4109. if(PlayerInfo[giveplayerid][pFMember] != family)
  4110. {
  4111. SendClientMessage(playerid, COLOR_GREY, "That player is not in your family.");
  4112. return 1;
  4113. }
  4114. if(playerid == giveplayerid)
  4115. {
  4116. SendClientMessage(playerid, COLOR_GREY, "You can't adjust your own rank.");
  4117. return 1;
  4118. }
  4119. if(rank < 0 || rank > 4 && PlayerInfo[playerid][pRank] == 5 && isleader == 0)
  4120. {
  4121. SendClientMessage(playerid, COLOR_GREY, "Rank 5 can only give family members ranks ranging from 1 through 4.");
  4122. return 1;
  4123. }
  4124. if(PlayerInfo[giveplayerid][pRank] >= PlayerInfo[playerid][pRank])
  4125. {
  4126. SendClientMessage(playerid, COLOR_GREY, "That player is a higher or the same rank.");
  4127. return 1;
  4128. }
  4129. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4130. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4131. format(str, sizeof(str), "* You have given %s Rank %d.", giveplayer, rank);
  4132. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4133. format(str, sizeof(str), "* Family Leader %s has given you Rank %d.", sendername, rank);
  4134. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4135. PlayerInfo[giveplayerid][pRank] = rank;
  4136. return 1;
  4137. }
  4138. }
  4139. else
  4140. {
  4141. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4142. return 1;
  4143. }
  4144. }
  4145. else if(strcmp(x_nr, "leadername", true) == 0)
  4146. {
  4147. if(isleader == 0) return SendClientMessage(playerid, COLOR_GREY, "Only the family leader is allowed to change this setting.");
  4148. if(FamilyInfo[family][FamilyLeaderHide])
  4149. {
  4150. FamilyInfo[family][FamilyLeaderHide] = 0;
  4151. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You will no longer be hidden on /families.");
  4152. }
  4153. else
  4154. {
  4155. FamilyInfo[family][FamilyLeaderHide] = 1;
  4156. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now hidden on /families.");
  4157. }
  4158. SaveFamilies();
  4159. }
  4160. else
  4161. {
  4162. SendClientMessage(playerid, COLOR_GREY, "Invalid adjust name.");
  4163. return 1;
  4164. }
  4165. }
  4166. else
  4167. {
  4168. SendClientMessage(playerid, COLOR_GREY, "Your rank is not high enough.");
  4169. return 1;
  4170. }
  4171. return 1;
  4172. }
  4173. if(strcmp(cmd, "/fcreate", true) == 0)
  4174. {
  4175. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGangDirector] > 0)
  4176. {
  4177. tmp = strtok(cmdtext, idx);
  4178. if(!strlen(tmp))
  4179. {
  4180. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fcreate [family] [playerid/PartOfName]");
  4181. return 1;
  4182. }
  4183. new family = strvalEx(tmp);
  4184. if(family < 1 || family > 20)
  4185. {
  4186. SendClientMessage(playerid, COLOR_GREY, "Family can't be below 1 or above 20.");
  4187. return 1;
  4188. }
  4189. tmp = strtok(cmdtext, idx);
  4190. if(!strlen(tmp))
  4191. {
  4192. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fcreate [family] [playerid/PartOfName]");
  4193. return 1;
  4194. }
  4195. giveplayerid = ReturnUser(tmp);
  4196. if(IsPlayerNPC(giveplayerid)) return 1;
  4197. if(IsPlayerConnected(giveplayerid))
  4198. {
  4199. if(giveplayerid != INVALID_PLAYER_ID)
  4200. {
  4201. family -= 1;
  4202. if(FamilyInfo[family][FamilyTaken] == 1)
  4203. {
  4204. SendClientMessage(playerid, COLOR_GREY, "That Family is already taken.");
  4205. return 1;
  4206. }
  4207. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4208. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4209. format(str, sizeof(str), "* You've made %s the Leader of a Family.", giveplayer);
  4210. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4211. format(str, sizeof(str), "* Admin %s has made you the Leader of a Family.", sendername);
  4212. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4213. format(str, sizeof(str), "%s", giveplayer);
  4214. strmid(FamilyInfo[family][FamilyLeader], str, 0, strlen(str), 255);
  4215. FamilyInfo[family][FamilyMembers] ++;
  4216. FamilyInfo[family][FamilyTaken] = 1;
  4217. PlayerInfo[giveplayerid][pFMember] = family;
  4218. PlayerInfo[giveplayerid][pModel] = FamilyInfo[family][FamilySkin1];
  4219. SetPlayerSkin(giveplayerid, FamilyInfo[family][FamilySkin1]);
  4220. PlayerInfo[giveplayerid][pClothes] = 0;
  4221. PlayerInfo[giveplayerid][pRank] = 6;
  4222. PlayerInfo[giveplayerid][pMember] = 0;
  4223. PlayerInfo[giveplayerid][pLeader] = 0;
  4224. SaveFamilies();
  4225. }
  4226. }
  4227. else
  4228. {
  4229. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4230. return 1;
  4231. }
  4232. }
  4233. else
  4234. {
  4235. SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
  4236. return 1;
  4237. }
  4238. return 1;
  4239. }
  4240. if(strcmp(cmd, "/fdelete", true) == 0)
  4241. {
  4242. if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGangDirector] > 0)
  4243. {
  4244. tmp = strtok(cmdtext, idx);
  4245. if(!strlen(tmp))
  4246. {
  4247. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fdelete [family]");
  4248. return 1;
  4249. }
  4250. new family = strvalEx(tmp);
  4251. if(family < 1 || family > 20)
  4252. {
  4253. SendClientMessage(playerid, COLOR_GREY, "Family can't be below 1 or above 20.");
  4254. return 1;
  4255. }
  4256. family -= 1;
  4257. if(FamilyInfo[family][FamilyTaken] != 1)
  4258. {
  4259. SendClientMessage(playerid, COLOR_GREY, "That Family isn't taken.");
  4260. return 1;
  4261. }
  4262. if(UseAdmCmdTimer[playerid] > 2)
  4263. {
  4264. format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /fdelete spam.", PlayerOOCName(playerid));
  4265. SendClientMessageToAll(COLOR_WHITE, str);
  4266. new reason[12];
  4267. format(reason, sizeof(reason), "/fdelete spam.");
  4268. BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
  4269. return 1;
  4270. }
  4271. format(str, sizeof(str), "Family %d has been deleted.", family +1);
  4272. SendClientMessage(playerid, COLOR_GREY, str);
  4273. ClearFamily(family);
  4274. UseAdmCmdTimer[playerid]++;
  4275. SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
  4276. }
  4277. else
  4278. {
  4279. SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
  4280. return 1;
  4281. }
  4282. return 1;
  4283. }
  4284. if(strcmp(cmd, "/divorce", true) ==0)
  4285. {
  4286. if(PlayerInfo[playerid][pMarried] < 1)
  4287. {
  4288. SendClientMessage(playerid, COLOR_GREY, "You aren't Married.");
  4289. return 1;
  4290. }
  4291. tmp = strtok(cmdtext, idx);
  4292. if(!strlen(tmp))
  4293. {
  4294. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /divorce [Playerid/PartOfName]");
  4295. return 1;
  4296. }
  4297. giveplayerid = ReturnUser(tmp);
  4298. if(IsPlayerConnected(giveplayerid))
  4299. {
  4300. if(giveplayerid != INVALID_PLAYER_ID)
  4301. {
  4302. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  4303. {
  4304. if(giveplayerid == playerid)
  4305. {
  4306. SendClientMessage(playerid, COLOR_GREY, "You cannot offer a divorce to yourself.");
  4307. return 1;
  4308. }
  4309. new dstring[MAX_PLAYER_NAME];
  4310. new wstring[MAX_PLAYER_NAME];
  4311. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4312. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4313. format(str, sizeof(str), "%s", giveplayer);
  4314. strmid(wstring, str, 0, strlen(str), 255);
  4315. format(str, sizeof(str), "%s", PlayerInfo[playerid][pMarriedTo]);
  4316. strmid(dstring, str, 0, strlen(str), 255);
  4317. if(strcmp(dstring, wstring, true) == 0)
  4318. {
  4319. format(str, sizeof(str), "* You've sent Divorce Papers to %s.", giveplayer);
  4320. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4321. format(str, sizeof(str), "* %s just sent you their Divorce Papers (type /accept divorce) to accept.", sendername);
  4322. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4323. DivorceOffer[giveplayerid] = playerid;
  4324. return 1;
  4325. }
  4326. else
  4327. {
  4328. SendClientMessage(playerid, COLOR_GREY, "That player is not Married to you.");
  4329. return 1;
  4330. }
  4331. }
  4332. else
  4333. {
  4334. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  4335. return 1;
  4336. }
  4337. }
  4338. }
  4339. else
  4340. {
  4341. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4342. return 1;
  4343. }
  4344. return 1;
  4345. }
  4346. if(strcmp(cmd, "/propose", true) ==0)
  4347. {
  4348. if(PlayerInfo[playerid][pMarried] > 0)
  4349. {
  4350. SendClientMessage(playerid, COLOR_GREY, "You are already Married.");
  4351. return 1;
  4352. }
  4353. if(PlayerInfo[playerid][pCash] < 100000)
  4354. {
  4355. SendClientMessage(playerid, COLOR_GREY, "The Marriage & Reception costs $100,000.");
  4356. return 1;
  4357. }
  4358. tmp = strtok(cmdtext, idx);
  4359. if(!strlen(tmp))
  4360. {
  4361. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /propose [Playerid/PartOfName]");
  4362. return 1;
  4363. }
  4364. giveplayerid = ReturnUser(tmp);
  4365. if(IsPlayerConnected(giveplayerid))
  4366. {
  4367. if(giveplayerid != INVALID_PLAYER_ID)
  4368. {
  4369. if(PlayerInfo[giveplayerid][pMarried] > 0)
  4370. {
  4371. SendClientMessage(playerid, COLOR_GREY, "That player is already Married.");
  4372. return 1;
  4373. }
  4374. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  4375. {
  4376. if(giveplayerid == playerid)
  4377. {
  4378. SendClientMessage(playerid, COLOR_GREY, "You cannot offer to propose to yourself.");
  4379. return 1;
  4380. }
  4381. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4382. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4383. format(str, sizeof(str), "* You proposed to %s.", giveplayer);
  4384. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4385. format(str, sizeof(str), "* %s just proposed to you (type /accept marriage) to accept.", sendername);
  4386. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4387. ProposeOffer[giveplayerid] = playerid;
  4388. }
  4389. else
  4390. {
  4391. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  4392. return 1;
  4393. }
  4394. }
  4395. }
  4396. else
  4397. {
  4398. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4399. return 1;
  4400. }
  4401. return 1;
  4402. }
  4403. if(strcmp(cmd, "/witness", true) ==0)
  4404. {
  4405. tmp = strtok(cmdtext, idx);
  4406. if(!strlen(tmp))
  4407. {
  4408. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /witness [Playerid/PartOfName]");
  4409. return 1;
  4410. }
  4411. giveplayerid = ReturnUser(tmp);
  4412. if(IsPlayerConnected(giveplayerid))
  4413. {
  4414. if(giveplayerid != INVALID_PLAYER_ID)
  4415. {
  4416. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  4417. {
  4418. if(giveplayerid == playerid)
  4419. {
  4420. SendClientMessage(playerid, COLOR_GREY, "You cannot offer to be your own witness.");
  4421. return 1;
  4422. }
  4423. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4424. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4425. format(str, sizeof(str), "* You requested %s to be your Marriage Witness.", giveplayer);
  4426. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4427. format(str, sizeof(str), "* %s just requested you to be their Marriage Witness (type /accept witness) to accept.", sendername);
  4428. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  4429. MarryWitnessOffer[giveplayerid] = playerid;
  4430. }
  4431. else
  4432. {
  4433. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  4434. return 1;
  4435. }
  4436. }
  4437. }
  4438. else
  4439. {
  4440. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4441. return 1;
  4442. }
  4443. return 1;
  4444. }
  4445. if(strcmp(cmd, "/irc", true) ==0)
  4446. {
  4447. new x_nr[64];
  4448. x_nr = strtok(cmdtext, idx);
  4449. if(!strlen(x_nr))
  4450. {
  4451. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/irc join [channelnr] or /irc join [channelnr] [password]) (/irc Leave) (/irc Admins) (/irc members)");
  4452. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc [name] [channelnr]");
  4453. SendClientMessage(playerid, COLOR_GRAD1, "Available names: MOTD, Password, NeedPass, Lock, Kick, Status");
  4454. return 1;
  4455. }
  4456. if(strcmp(x_nr, "join", true) == 0)
  4457. {
  4458. tmp = strtok(cmdtext, idx);
  4459. if(!strlen(tmp))
  4460. {
  4461. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc join [channelnr] or /irc join [channelnr] [password]");
  4462. return 1;
  4463. }
  4464. new channel = strvalEx(tmp);
  4465. if(channel < 1 || channel > 10)
  4466. {
  4467. SendClientMessage(playerid, COLOR_GREY, "Channel Number can't be below 1 or above 10.");
  4468. return 1;
  4469. }
  4470. channel -= 1;
  4471. if(IRCInfo[channel][iLock] == 0)
  4472. {
  4473. if(IRCInfo[channel][iNeedPass] == 0)
  4474. {
  4475. JoinChannelNr(playerid, channel);
  4476. }
  4477. else
  4478. {
  4479. tmp = strtok(cmdtext, idx);
  4480. if(!strlen(tmp))
  4481. {
  4482. SendClientMessage(playerid, COLOR_WHITE, "There's a password required to join this Channel");
  4483. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc join [channelnr] [password]");
  4484. return 1;
  4485. }
  4486. JoinChannel(playerid, channel, tmp);
  4487. }
  4488. }
  4489. else
  4490. {
  4491. SendClientMessage(playerid, COLOR_GREY, "That Channel is Locked, please choose a different one.");
  4492. return 1;
  4493. }
  4494. }
  4495. else if(strcmp(x_nr, "status", true) == 0)
  4496. {
  4497. for(new i = 0; i < sizeof(IRCInfo); i++)
  4498. {
  4499. format(str, sizeof(str), "Channel %d: %d Players Connected.", i + 1, IRCInfo[i][iPlayers]);
  4500. SendClientMessage(playerid, COLOR_WHITE, str);
  4501. }
  4502. return 1;
  4503. }
  4504. else if(strcmp(x_nr, "password", true) == 0)
  4505. {
  4506. tmp = strtok(cmdtext, idx);
  4507. if(!strlen(tmp))
  4508. {
  4509. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc password [channelnr] [password]");
  4510. return 1;
  4511. }
  4512. new channel = strvalEx(tmp);
  4513. if(channel < 1 || channel > 10)
  4514. {
  4515. SendClientMessage(playerid, COLOR_GREY, "Channel Number can't be below 1 or above 10.");
  4516. return 1;
  4517. }
  4518. channel -= 1;
  4519. new wstring[128];
  4520. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4521. format(str, sizeof(str), "%s", sendername);
  4522. strmid(wstring, str, 0, strlen(str), 255);
  4523. if(strcmp(IRCInfo[channel][iAdmin], wstring, true) == 0)
  4524. {
  4525. tmp = strtok(cmdtext, idx);
  4526. if(!strlen(tmp))
  4527. {
  4528. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc password [channelnr] [password]");
  4529. return 1;
  4530. }
  4531. strmid(IRCInfo[channel][iPassword], tmp, 0, strlen(tmp), 255);
  4532. format(str, sizeof(str), "You've changed the IRC Channel's Password to: %s.", IRCInfo[channel][iPassword]);
  4533. SendClientMessage(playerid, COLOR_YELLOW, str);
  4534. SaveIRC();
  4535. return 1;
  4536. }
  4537. else
  4538. {
  4539. SendClientMessage(playerid, COLOR_GREY, "You are not the Admin of that Channel.");
  4540. return 1;
  4541. }
  4542. }
  4543. else if(strcmp(x_nr, "needpass", true) == 0)
  4544. {
  4545. tmp = strtok(cmdtext, idx);
  4546. if(!strlen(tmp))
  4547. {
  4548. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc needpass [channelnr]");
  4549. return 1;
  4550. }
  4551. new channel = strvalEx(tmp);
  4552. if(channel < 1 || channel > 10)
  4553. {
  4554. SendClientMessage(playerid, COLOR_GREY, "Channel Number can't be below 1 or above 10.");
  4555. return 1;
  4556. }
  4557. channel -= 1;
  4558. new wstring[128];
  4559. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4560. format(str, sizeof(str), "%s", sendername);
  4561. strmid(wstring, str, 0, strlen(str), 255);
  4562. if(strcmp(IRCInfo[channel][iAdmin], wstring, true) == 0)
  4563. {
  4564. if(IRCInfo[channel][iNeedPass] != 0)
  4565. {
  4566. IRCInfo[channel][iNeedPass] = 0;
  4567. SendClientMessage(playerid, COLOR_YELLOW, "Players won't have to fill in a password in order to join the IRC Channel now.");
  4568. }
  4569. else
  4570. {
  4571. IRCInfo[channel][iNeedPass] = 1;
  4572. SendClientMessage(playerid, COLOR_YELLOW, "Players must fill in a password in order to join the IRC Channel now.");
  4573. }
  4574. SaveIRC();
  4575. return 1;
  4576. }
  4577. else
  4578. {
  4579. SendClientMessage(playerid, COLOR_GREY, "You are not the Admin of that Channel.");
  4580. return 1;
  4581. }
  4582. }
  4583. else if(strcmp(x_nr, "lock", true) == 0)
  4584. {
  4585. tmp = strtok(cmdtext, idx);
  4586. if(!strlen(tmp))
  4587. {
  4588. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc lock [channelnr]");
  4589. return 1;
  4590. }
  4591. new channel = strvalEx(tmp);
  4592. if(channel < 1 || channel > 10)
  4593. {
  4594. SendClientMessage(playerid, COLOR_GREY, "Channel Number can't be below 1 or above 10.");
  4595. return 1;
  4596. }
  4597. channel -= 1;
  4598. new wstring[128];
  4599. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4600. format(str, sizeof(str), "%s", sendername);
  4601. strmid(wstring, str, 0, strlen(str), 255);
  4602. if(strcmp(IRCInfo[channel][iAdmin], wstring, true) == 0)
  4603. {
  4604. if(IRCInfo[channel][iLock] != 0)
  4605. {
  4606. IRCInfo[channel][iLock] = 0;
  4607. SendClientMessage(playerid, COLOR_YELLOW, "You've unlocked the IRC Channel.");
  4608. }
  4609. else
  4610. {
  4611. IRCInfo[channel][iLock] = 1;
  4612. SendClientMessage(playerid, COLOR_YELLOW, "You've locked the IRC Channel.");
  4613. }
  4614. SaveIRC();
  4615. return 1;
  4616. }
  4617. else
  4618. {
  4619. SendClientMessage(playerid, COLOR_GREY, "You are not the Admin of that Channel.");
  4620. return 1;
  4621. }
  4622. }
  4623. else if(strcmp(x_nr, "motd", true) == 0)
  4624. {
  4625. tmp = strtok(cmdtext, idx);
  4626. if(!strlen(tmp))
  4627. {
  4628. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc motd [channelnr] [motdtext]");
  4629. return 1;
  4630. }
  4631. new channel = strvalEx(tmp);
  4632. if(channel < 1 || channel > 10)
  4633. {
  4634. SendClientMessage(playerid, COLOR_GREY, "Channel Number can't be below 1 or above 10.");
  4635. return 1;
  4636. }
  4637. channel -= 1;
  4638. new wstring[128];
  4639. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4640. format(str, sizeof(str), "%s", sendername);
  4641. strmid(wstring, str, 0, strlen(str), 255);
  4642. if(strcmp(IRCInfo[channel][iAdmin], wstring, true) == 0)
  4643. {
  4644. new length = strlen(cmdtext);
  4645. while((idx < length) && (cmdtext[idx] <= ' '))
  4646. {
  4647. idx++;
  4648. }
  4649. new offset = idx;
  4650. new result[64];
  4651. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  4652. {
  4653. result[idx - offset] = cmdtext[idx];
  4654. idx++;
  4655. }
  4656. result[idx - offset] = EOS;
  4657. if(!strlen(result))
  4658. {
  4659. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc motd [motdtext]");
  4660. return 1;
  4661. }
  4662. strmid(IRCInfo[channel][iMOTD], result, 0, strlen(result), 255);
  4663. SendClientMessage(playerid, COLOR_YELLOW, "You've adjusted the IRC Channel's MOTD Text.");
  4664. SaveIRC();
  4665. return 1;
  4666. }
  4667. else
  4668. {
  4669. SendClientMessage(playerid, COLOR_GREY, "You are not the Admin of that Channel.");
  4670. return 1;
  4671. }
  4672. }
  4673. else if(strcmp(x_nr, "leave", true) == 0)
  4674. {
  4675. if(PlayersChannel[playerid] < 999)
  4676. {
  4677. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4678. format(str, sizeof(str), "* %s has left the Channel.", sendername);
  4679. SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, str);
  4680. IRCInfo[PlayersChannel[playerid]][iPlayers] --;
  4681. PlayersChannel[playerid] = 999;
  4682. return 1;
  4683. }
  4684. else
  4685. {
  4686. SendClientMessage(playerid, COLOR_GREY, "You are not in an IRC Channel.");
  4687. return 1;
  4688. }
  4689. }
  4690. else if(strcmp(x_nr, "admins", true) == 0)
  4691. {
  4692. for(new i = 0; i < sizeof(IRCInfo); i++)
  4693. {
  4694. format(str, sizeof(str), "Channel %d: %s.", i + 1, IRCInfo[i][iAdmin]);
  4695. SendClientMessage(playerid, COLOR_WHITE, str);
  4696. }
  4697. return 1;
  4698. }
  4699. else if(strcmp(x_nr, "kick", true) == 0)
  4700. {
  4701. if(PlayersChannel[playerid] == 999)
  4702. {
  4703. SendClientMessage(playerid, COLOR_GREY, "You are not in an IRC Channel.");
  4704. return 1;
  4705. }
  4706. new wstring[128];
  4707. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4708. format(str, sizeof(str), "%s", sendername);
  4709. strmid(wstring, str, 0, strlen(str), 255);
  4710. if(strcmp(IRCInfo[PlayersChannel[playerid]][iAdmin], wstring, true) == 0)
  4711. {
  4712. tmp = strtok(cmdtext, idx);
  4713. if(!strlen(tmp))
  4714. {
  4715. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /irc kick [playerid/PartOfName]");
  4716. return 1;
  4717. }
  4718. giveplayerid = ReturnUser(tmp);
  4719. if(IsPlayerConnected(giveplayerid))
  4720. {
  4721. if(giveplayerid != INVALID_PLAYER_ID)
  4722. {
  4723. if(PlayersChannel[giveplayerid] == PlayersChannel[playerid])
  4724. {
  4725. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4726. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  4727. format(str, sizeof(str), "* You've kicked %s out of your IRC Channel.", giveplayer);
  4728. SendClientMessage(playerid, COLOR_YELLOW, str);
  4729. format(str, sizeof(str), "* You've been kicked out of the IRC Channel by Channel Admin: %s.", sendername);
  4730. SendClientMessage(giveplayerid, COLOR_YELLOW, str);
  4731. format(str, sizeof(str), "* %s has left the Channel (Kicked).", giveplayer);
  4732. SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, str);
  4733. IRCInfo[PlayersChannel[giveplayerid]][iPlayers] --;
  4734. PlayersChannel[giveplayerid] = 999;
  4735. }
  4736. else
  4737. {
  4738. SendClientMessage(playerid, COLOR_GREY, "That player is not in your IRC Channel.");
  4739. return 1;
  4740. }
  4741. }
  4742. }
  4743. else
  4744. {
  4745. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  4746. return 1;
  4747. }
  4748. }
  4749. else
  4750. {
  4751. SendClientMessage(playerid, COLOR_GREY, "You are not the Admin of the Channel.");
  4752. return 1;
  4753. }
  4754. }
  4755. else if(strcmp(x_nr, "members", true) == 0)
  4756. {
  4757. if(PlayersChannel[playerid] == 999)
  4758. {
  4759. SendClientMessage(playerid, COLOR_GREY, "You are not in an IRC Channel.");
  4760. return 1;
  4761. }
  4762. format(str, sizeof(str), "========| Players in IRC #%i |========", (PlayersChannel[playerid]-1));
  4763. SendClientMessage(playerid, COLOR_WHITE, str);
  4764. foreach( new i: Player )
  4765. {
  4766. if(PlayersChannel[i] == PlayersChannel[playerid])
  4767. {
  4768. format(str, sizeof(str), "- %s", PlayerName(i));
  4769. SendClientMessage(playerid, COLOR_WHITE, str);
  4770. }
  4771. }
  4772. }
  4773. else
  4774. {
  4775. SendClientMessage(playerid, COLOR_GREY, "Invalid IRC Channel Number! ");
  4776. return 1;
  4777. }
  4778. return 1;
  4779. }
  4780. if(strcmp(cmd, "/channel", true) == 0)
  4781. {
  4782. if(PlayerInfo[playerid][pWT] != 1)
  4783. {
  4784. SendClientMessage(playerid, COLOR_GREY, "You don`t have a Walkie Talkie.");
  4785. return 1;
  4786. }
  4787. tmp = strtok(cmdtext, idx);
  4788. if(!strlen(tmp))
  4789. {
  4790. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /channel [channel number]");
  4791. return 1;
  4792. }
  4793. new channel = strvalEx(tmp);
  4794. if(channel < 1 || channel > 999999)
  4795. return SendClientMessage(playerid, COLOR_GRAD1, "The channel number must not be below 1 or above 999999 .");
  4796. PlayerInfo[playerid][pWTc] = channel;
  4797. format(str, sizeof(str), "* You have set your Walkie Talkie to channel to %d.", channel);
  4798. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4799. return 1;
  4800. }
  4801. if(strcmp(cmd, "/settax", true) == 0)
  4802. {
  4803. if(PlayerInfo[playerid][pMember] != 6) return SendClientMessage(playerid, COLOR_GREY, "You are not a part of the government.");
  4804. if(PlayerInfo[playerid][pRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "Only R5+ can use this.");
  4805. tmp = strtok(cmdtext, idx);
  4806. if(!strlen(tmp))
  4807. {
  4808. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /settax [percent]");
  4809. return 1;
  4810. }
  4811. moneys = strvalEx(tmp);
  4812. if(moneys < 1 || moneys > 50)
  4813. {
  4814. SendClientMessage(playerid, COLOR_GREY, "Tax rate may not be below 1 or above 50.");
  4815. return 1;
  4816. }
  4817. Tax = moneys;
  4818. SaveStuff();
  4819. format(str, sizeof(str), "* The Income Tax has been set to %d percent per paycheck.", Tax);
  4820. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4821. return 1;
  4822. }
  4823. if(strcmp(cmd, "/change", true) == 0)
  4824. {
  4825. if(!IsPlayerInRangeOfPoint(playerid, 2, 754.5243, -39.7095, 1000.5859) && !IsPlayerInRangeOfPoint(playerid, 2, 2200.5842, -1970.2686, 13.7841))
  4826. {
  4827. SendClientMessage(playerid, COLOR_GRAD2, "You are not at the locker.");
  4828. return 1;
  4829. }
  4830. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  4831. if(IsPlayerInRangeOfPoint(playerid, 2, 754.5243, -39.7095, 1000.5859))
  4832. {
  4833. if(PlayerInfo[playerid][pClothes] != 0)
  4834. {
  4835. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  4836. PlayerInfo[playerid][pClothes] = 0;
  4837. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  4838. ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  4839. format(str, sizeof(str), "* %s switches back to their clothes.", sendername);
  4840. ProxDetector(20.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4841. }
  4842. else
  4843. {
  4844. new uniforms[2];
  4845. uniforms[0] = 203;
  4846. uniforms[1] = 204;
  4847. new rand = random(sizeof(uniforms));
  4848. SetPlayerSkin(playerid, uniforms[rand]);
  4849. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  4850. ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  4851. PlayerInfo[playerid][pClothes] = uniforms[rand];
  4852. format(str, sizeof(str), "* %s switches to a karate uniform.", sendername);
  4853. ProxDetector(20.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4854. }
  4855. }
  4856. return 1;
  4857. }
  4858. if(strcmp(cmd, "/lotto", true) == 0)
  4859. {
  4860. if(PlayerInfo[playerid][pAdminJailed]) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error{FFFFFF}: You cannot participate in the lottery while in OOC prison.");
  4861. if(PlayerInfo[playerid][pLottoNr] > 0)
  4862. {
  4863. format(str, sizeof(str), "Your lotto number is %d.", PlayerInfo[playerid][pLottoNr]);
  4864. SendClientMessage(playerid, COLOR_GRAD3, str);
  4865. return 1;
  4866. }
  4867. if(PlayerInfo[playerid][pCash] < 1500)
  4868. {
  4869. SendClientMessage(playerid, COLOR_GREY, "You need $1500 for a Lottery Ticket.");
  4870. return 1;
  4871. }
  4872. tmp = strtok(cmdtext, idx);
  4873. if(!strlen(tmp))
  4874. {
  4875. SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /lotto [number]");
  4876. return 1;
  4877. }
  4878. new lottonr = strvalEx(tmp);
  4879. if(lottonr < 1 || lottonr > 80)
  4880. {
  4881. SendClientMessage(playerid, COLOR_GREY, "Your Lotto Number can't be below 1 or above 80.");
  4882. return 1;
  4883. }
  4884. format(str, sizeof(str), "* You bought a Lottery Ticket with number: %d.", lottonr);
  4885. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  4886. GiveMoney(playerid, -1500);
  4887. PlayerInfo[playerid][pLottoNr] = lottonr;
  4888. return 1;
  4889. }
  4890. if(strcmp(cmd, "/get", true) == 0)
  4891. {
  4892. new x_nr[64];
  4893. x_nr = strtok(cmdtext, idx);
  4894. if(!strlen(x_nr))
  4895. {
  4896. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /get [name]");
  4897. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Weapon, Pot, Crack, Materials, Kevlar, Briefcase");
  4898. return 1;
  4899. }
  4900. if(strcmp(x_nr, "weapon", true) == 0)
  4901. {
  4902. if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_GRAD1, "You cannot use this at this time.");
  4903. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon.");
  4904. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_GREY, "You cannot use this at this time");
  4905. new f = 100 +1;
  4906. for(new a = 0; a < sizeof(ObjCoords); a++)
  4907. {
  4908. if(IsPlayerInRangeOfPoint(playerid, 3.0, ObjCoords[a][0], ObjCoords[a][1], ObjCoords[a][2]))
  4909. {
  4910. f = a;
  4911. break;
  4912. }
  4913. }
  4914. if(f > 100) return SendClientMessage(playerid, COLOR_GREY, "You are not near the weapon which you can pick up.");
  4915. if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOR_GREY, "You must be on foot.");
  4916. else
  4917. {
  4918. new gunname[25];
  4919. new buffer[100];
  4920. ObjCoords[f][0] = 0.0;
  4921. ObjCoords[f][1] = 0.0;
  4922. ObjCoords[f][2] = 0.0;
  4923. if(object[f]) { DestroyDynamicObjectEx(object[f]); }
  4924. object[f] = 0;
  4925. GivePlayerGun(playerid, wObjectID[f][0]);
  4926. GetWeaponName(wObjectID[f][0], gunname, sizeof(gunname));
  4927. format(buffer, sizeof(buffer), "You picked up a %s", gunname);
  4928. SendClientMessage(playerid, 0x33AA3300, buffer);
  4929. format(str, sizeof(str), "* %s has picked up a %s.", PlayerICName(playerid), gunname);
  4930. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4931. }
  4932. }
  4933. if(strcmp(x_nr, "kevlar", true) == 0)
  4934. {
  4935. new f = 100 +1;
  4936. for(new a = 0; a < sizeof(ObjCoords); a++)
  4937. {
  4938. if(IsPlayerInRangeOfPoint(playerid, 3.0, kObjCoords[a][0], kObjCoords[a][1], kObjCoords[a][2]))
  4939. {
  4940. f = a;
  4941. break;
  4942. }
  4943. }
  4944. if(f > 100) return SendClientMessage(playerid, COLOR_GREY, "You are not near any kevlar which you can pick up.");
  4945. if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOR_GREY, "You must be on foot.");
  4946. kObjCoords[f][0] = 0.0;
  4947. kObjCoords[f][1] = 0.0;
  4948. kObjCoords[f][2] = 0.0;
  4949. if(kobject[f]) { DestroyDynamicObjectEx(kobject[f]); }
  4950. kobject[f] = 0;
  4951. SetPlayerArmour(playerid, kObjectVal[f][0]);
  4952. SendClientMessage(playerid, 0x33AA3300, "You picked up a kevlar");
  4953. format(str, sizeof(str), "* %s has picked up a kevlar.", PlayerICName(playerid));
  4954. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4955. }
  4956. if(strcmp(x_nr, "materials", true) == 0)
  4957. {
  4958. new f = 100 +1;
  4959. for(new a = 0; a < sizeof(mObjCoords); a++)
  4960. {
  4961. if(IsPlayerInRangeOfPoint(playerid, 3.0, mObjCoords[a][0], mObjCoords[a][1], mObjCoords[a][2]))
  4962. {
  4963. f = a;
  4964. break;
  4965. }
  4966. }
  4967. if(f > 100) return SendClientMessage(playerid, COLOR_GREY, "You are not near any materials which you can pick up.");
  4968. if(GetPlayerState(playerid) != 1) return SendClientMessage(playerid, COLOR_GREY, "You must be on foot.");
  4969. else
  4970. {
  4971. mObjCoords[f][0] = 0.0;
  4972. mObjCoords[f][1] = 0.0;
  4973. mObjCoords[f][2] = 0.0;
  4974. if(mobject[f]) { DestroyDynamicObjectEx(mobject[f]); }
  4975. mobject[f] = 0;
  4976. PlayerInfo[playerid][pMats] += mObjectID[f][0];
  4977. SendClientMessage(playerid, 0x33AA3300, "You picked up some materials");
  4978. format(str, sizeof(str), "* %s has picked up some materials.", PlayerICName(playerid));
  4979. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  4980. }
  4981. }
  4982. return 1;
  4983. }
  4984. if(strcmp(cmd, "/drop", true) == 0)
  4985. {
  4986. if(IsPlayerInAnyVehicle(playerid))
  4987. return SendClientMessage(playerid, COLOR_GREY, "You cannot do that while in a car!");
  4988. if(pDeathState[playerid] != PLAYER_STATE_NORMAL)
  4989. return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
  4990. if(IsAtEvent[playerid] == 1)
  4991. return SendClientMessage(playerid, COLOR_GREY, "You can't use this in events.");
  4992. new curr_Time = gettime();
  4993. if((curr_Time - CanDrop[playerid]) <= 2)
  4994. {
  4995. return 1;
  4996. }
  4997. CanDrop[playerid] = curr_Time;
  4998. new x_nr[64];
  4999. x_nr = strtok(cmdtext, idx);
  5000. if(!strlen(x_nr))
  5001. {
  5002. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /drop [name]");
  5003. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Weapon, Materials, Packages, Crates, Tikis, Seeds, Meal, Kevlar, Boombox");
  5004. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Cellphone, Products, Screwdrivers, Ropes, Gags, Jerrycan, Trash");
  5005. return 1;
  5006. }
  5007. if(strcmp(x_nr, "Jerrycan", true) == 0)
  5008. {
  5009. if(PlayerInfo[playerid][pJerrycan] < 1)
  5010. return SendClientMessage(playerid, COLOR_GREY, "You do not have a Jerrycan to drop.");
  5011. format(str, sizeof(str), "* %s has dropped a Jerrycan.", PlayerICName(playerid));
  5012. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5013. PlayerInfo[playerid][pJerrycan] = 0;
  5014. return 1;
  5015. }
  5016. if(strcmp(x_nr, "weapon", true) == 0)
  5017. {
  5018. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_GREY, "You cannot use this at this time");
  5019. new WeaponName[65];
  5020. if(PlayerInfo[playerid][pMember] != 0) //faction drop
  5021. {
  5022. new gunid = GetPlayerWeapon(playerid);
  5023. if(gunid)
  5024. {
  5025. if(gunid == 45)
  5026. {
  5027. WeaponName = "Infrared Goggles.";
  5028. }
  5029. else
  5030. {
  5031. GetWeaponName(gunid, WeaponName, 64);
  5032. }
  5033. format(str, sizeof(str), "* %s has dropped a %s.", PlayerICName(playerid), WeaponName);
  5034. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5035. TakePlayerWeapon(playerid, GetPlayerWeapon(playerid));
  5036. SetPlayerArmedWeapon(playerid, 0);
  5037. }
  5038. else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You're not holding a weapon.");
  5039. return 1;
  5040. }
  5041. if(DropWeaponTimer[playerid] == 1)
  5042. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before dropping a weapon again!");
  5043. if(playerHoldingTazer[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't drop a tazer.");
  5044. if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_GRAD1, "You cannot drop a weapon at this time.");
  5045. if(OfferedGunTo[playerid] != -1) //offering someone a gun
  5046. {
  5047. OfferedGunFrom[OfferedGunTo[playerid]] = -1;
  5048. GunOffered[OfferedGunTo[playerid]] = 0;
  5049. OfferedGunTo[playerid] = -1;
  5050. }
  5051. new gunid = GetPlayerWeapon(playerid);
  5052. if(gunid)
  5053. {
  5054. //make sure it's a scripted gun to prevent people from dropping hacked weapons (people could pick them up)
  5055. if(HaveWeapon(playerid, gunid) != gunid)
  5056. {
  5057. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has attempted to drop a fake weapon.", PlayerICName(playerid));
  5058. ABroadCast(COLOR_WHITE, str, 1);
  5059. return SendClientMessage(playerid, COLOR_GREY, "You are not carrying a weapon!");
  5060. }
  5061. new f = 100 +1;
  5062. for(new a = 0; a < sizeof(ObjCoords); a++)
  5063. {
  5064. if(ObjCoords[a][0] == 0.0)
  5065. {
  5066. f = a;
  5067. break;
  5068. }
  5069. }
  5070. if(f > 100) return SendClientMessage(playerid, COLOR_GREY, "You can not throw weapons at the moment, try back later!");
  5071. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5072. GetWeaponName(gunid, WeaponName, 64);
  5073. if(gunid == 40 && BombID[playerid] != 0)
  5074. {
  5075. if(BombID[playerid]) { DestroyDynamicObjectEx(BombID[playerid]); }
  5076. BombID[playerid] = -1;
  5077. }
  5078. if(gunid == 18)
  5079. {
  5080. WeaponName = "Molotovs";
  5081. }
  5082. if(gunid == 44)
  5083. {
  5084. WeaponName = "Nightvision Goggles";
  5085. }
  5086. if(gunid == 45)
  5087. {
  5088. WeaponName = "Infared Goggles";
  5089. }
  5090. new gunID = GetPlayerWeapon(playerid);
  5091. new pgun0 = PlayerInfo[playerid][pGun0];
  5092. new pgun1 = PlayerInfo[playerid][pGun1];
  5093. new pgun2 = PlayerInfo[playerid][pGun2];
  5094. new pgun3 = PlayerInfo[playerid][pGun3];
  5095. new pgun4 = PlayerInfo[playerid][pGun4];
  5096. new pgun5 = PlayerInfo[playerid][pGun5];
  5097. new pgun6 = PlayerInfo[playerid][pGun6];
  5098. new pgun7 = PlayerInfo[playerid][pGun7];
  5099. new pgun8 = PlayerInfo[playerid][pGun8];
  5100. new pgun9 = PlayerInfo[playerid][pGun9];
  5101. new pgun10 = PlayerInfo[playerid][pGun10];
  5102. new pgun11 = PlayerInfo[playerid][pGun11];
  5103. new pgun12 = PlayerInfo[playerid][pGun12];
  5104. new isadmingun = 0;
  5105. if(pgun0 != gunID && pgun1 != gunID && pgun2 != gunID && pgun3 != gunID && pgun4 != gunID && pgun5 != gunID && pgun6 != gunID && pgun7 != gunID && pgun8 != gunID && pgun9 != gunID && pgun10 != gunID && pgun11 != gunID && pgun12 != gunID)
  5106. {
  5107. isadmingun = 1;
  5108. }
  5109. else
  5110. {
  5111. isadmingun = 0;
  5112. }
  5113. TakePlayerWeapon(playerid, gunid);
  5114. if(IsACop(playerid) == 0 && IsANG(playerid) == 0 && IsAMedic(playerid) == 0 && isadmingun == 0 || PlayerInfo[playerid][pMember] != 6)
  5115. {
  5116. wObjectID[f][0] = gunid;
  5117. GetPlayerPos(playerid, ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
  5118. object[f] = CreateDynamicObject(GunObjects[gunid][0], ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2] -1, 93.7, 120.0, 120.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
  5119. Streamer_Update(playerid);
  5120. //300000 = 5minutes.
  5121. SetTimerEx("DeleteGun", 300000, 0, "dd", object[f], f);
  5122. DropWeaponTimer[playerid] = 1;
  5123. SetTimerEx("Timer_DropWepTimer", 60*1000, 0, "i", playerid);
  5124. }
  5125. format(str, sizeof(str), "* %s has dropped a %s (/get to pick it up).", PlayerICName(playerid), WeaponName);
  5126. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5127. SetPlayerArmedWeapon(playerid, 0);
  5128. return 1;
  5129. }
  5130. else
  5131. {
  5132. SendClientMessage(playerid, COLOR_GREY, "You are not holding a weapon.");
  5133. return 1;
  5134. }
  5135. }
  5136. else if(strcmp(x_nr, "kevlar", true) == 0)
  5137. {
  5138. //cancel the kevlar offer
  5139. if(KevlarOfferTo[playerid] != -1) //offering someone a kevlar
  5140. {
  5141. KevlarOfferFrom[KevlarOfferTo[playerid]] = -1;
  5142. KevlarOfferTo[playerid] = -1;
  5143. }
  5144. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || PlayerInfo[playerid][pMember] == 9 || IsAMedic(playerid) == 1 || IsASenate(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/DoC can not use this command.");
  5145. new Float:armorpt;
  5146. GetPlayerArmour(playerid, armorpt);
  5147. if(!(armorpt == 0))
  5148. {
  5149. new f = 100 +1;
  5150. for(new a = 0; a < sizeof(kObjCoords); a++)
  5151. {
  5152. if(ObjCoords[a][0] == 0.0)
  5153. {
  5154. f = a;
  5155. break;
  5156. }
  5157. }
  5158. if(FVestProtected[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot /drop kevlar after spawn, wait few minutes.");
  5159. if(KevlarDropped[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot /drop kevlar within 45 seconds");
  5160. if(f > 100) return SendClientMessage(playerid, COLOR_GREY, "You can not throw kevlars at the moment, try back later.");
  5161. kObjectVal[f][0] = armorpt;
  5162. SetPlayerArmour(playerid, 0);
  5163. GetPlayerPos(playerid, kObjCoords[f][0], kObjCoords[f][1], kObjCoords[f][2]);
  5164. kobject[f] = CreateDynamicObject(1242, kObjCoords[f][0], kObjCoords[f][1], (kObjCoords[f][2] -1), 90.0, 90.0, 0.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
  5165. Streamer_Update(playerid);
  5166. SetTimerEx("DeleteKevlar", 30000, 0, "dd", kobject[f], f);
  5167. KevlarDropped[playerid] = 1; //It shows that player droppped the Kevlar
  5168. SetTimerEx("DropKevlarTimer", 45000, 0, "d", playerid);//45seconds must be passed for use /drop kevlar again.
  5169. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5170. format(str, sizeof(str), "* %s has dropped their kevlar (/get to pick it up).", PlayerICName(playerid));
  5171. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5172. return 1;
  5173. }
  5174. else return SendClientMessage(playerid, COLOR_GREY, "You are not wearing a kevlar.");
  5175. }
  5176. else if(strcmp(x_nr, "products", true) == 0)
  5177. {
  5178. if(PlayerInfo[playerid][pProducts] != 0)
  5179. {
  5180. PlayerInfo[playerid][pProducts] = 0;
  5181. format(str, sizeof(str), "* %s has dropped all of their products.", PlayerICName(playerid));
  5182. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5183. }
  5184. else return SendClientMessage(playerid, COLOR_GREY, "You don't have any products to drop.");
  5185. }
  5186. else if(strcmp(x_nr, "screwdrivers", true) == 0)
  5187. {
  5188. if(PlayerInfo[playerid][pScrew] != 0)
  5189. {
  5190. PlayerInfo[playerid][pScrew] = 0;
  5191. format(str, sizeof(str), "* %s has dropped all of their screwdrivers.", PlayerICName(playerid));
  5192. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5193. }
  5194. else return SendClientMessage(playerid, COLOR_GREY, "You don't have any screwdrivers to drop.");
  5195. }
  5196. else if(strcmp(x_nr, "ropes", true) == 0)
  5197. {
  5198. if(PlayerInfo[playerid][pRope] != 0)
  5199. {
  5200. PlayerInfo[playerid][pRope] = 0;
  5201. format(str, sizeof(str), "* %s has dropped all of their ropes.", PlayerICName(playerid));
  5202. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5203. }
  5204. else return SendClientMessage(playerid, COLOR_GREY, "You don't have any ropes to drop.");
  5205. }
  5206. else if(strcmp(x_nr, "gags", true) == 0)
  5207. {
  5208. if(PlayerInfo[playerid][pGag] != 0)
  5209. {
  5210. PlayerInfo[playerid][pGag] = 0;
  5211. format(str, sizeof(str), "* %s has dropped all of their gags.", PlayerICName(playerid));
  5212. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5213. }
  5214. else return SendClientMessage(playerid, COLOR_GREY, "You don't have any gags to drop.");
  5215. }
  5216. else if(strcmp(x_nr, "tikis", true) == 0)
  5217. {
  5218. if(PlayerInfo[playerid][pTikis] == 0)return SendClientMessage(playerid, COLOR_GREY, "You don't have any Tikis.");
  5219. PlayerInfo[playerid][pTikis] = 0;
  5220. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5221. format(str, sizeof(str), "* %s has dropped all of their tikis.", sendername);
  5222. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5223. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5224. return 1;
  5225. }
  5226. else if(strcmp(x_nr, "meth", true) == 0)
  5227. {
  5228. SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: {FFFFFF}/dropdrug [drug name (/drugs)] [amount] [bag/box]");
  5229. }
  5230. else if(strcmp(x_nr, "pot", true) == 0)
  5231. {
  5232. SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: {FFFFFF}/dropdrug [drug name (/drugs)] [amount] [bag/box]");
  5233. }
  5234. else if(strcmp(x_nr, "seeds", true) == 0)
  5235. {
  5236. if(PlayerInfo[playerid][pPotSeeds] > 0)
  5237. {
  5238. PlayerInfo[playerid][pPotSeeds] = 0;
  5239. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5240. format(str, sizeof(str), "* %s has dropped a bag of seeds.", sendername);
  5241. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5242. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5243. return 1;
  5244. }
  5245. else
  5246. {
  5247. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Seeds to throw away.");
  5248. return 1;
  5249. }
  5250. }
  5251. else if(strcmp(x_nr, "materials", true) == 0)
  5252. {
  5253. if(PlayerInfo[playerid][pMats] > 0)
  5254. {
  5255. new f = 100 +1;
  5256. for(new a = 0; a < sizeof(mObjCoords); a++)
  5257. {
  5258. if(mObjCoords[a][0] == 0.0)
  5259. {
  5260. f = a;
  5261. break;
  5262. }
  5263. }
  5264. mObjectID[f][0] = PlayerInfo[playerid][pMats];
  5265. PlayerInfo[playerid][pMats] = 0;
  5266. GetPlayerPos(playerid, mObjCoords[f][0], mObjCoords[f][1], mObjCoords[f][2]);
  5267. mobject[f] = CreateDynamicObject(1580, mObjCoords[f][0], mObjCoords[f][1], mObjCoords[f][2] -1, 180.0, 180.0, 120.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
  5268. Streamer_Update(playerid);
  5269. SetTimerEx("DeleteMats", 30000, 0, "dd", mobject[f], f);
  5270. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5271. format(str, sizeof(str), "* %s has dropped a bag of materials (/get to pick it up).", sendername);
  5272. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5273. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5274. return 1;
  5275. }
  5276. else
  5277. {
  5278. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Materials to throw away.");
  5279. return 1;
  5280. }
  5281. }
  5282. else if(strcmp(x_nr, "packages", true) == 0)
  5283. {
  5284. if(Packages[playerid] > 0)
  5285. {
  5286. Packages[playerid] = 0;
  5287. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5288. format(str, sizeof(str), "* %s has dropped their packages.", sendername);
  5289. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5290. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5291. if(CP[playerid] != CHECKPOINT_NONE)
  5292. {
  5293. CP[playerid] = CHECKPOINT_NONE;
  5294. DisablePlayerCheckpointEx(playerid);
  5295. SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed! ");
  5296. }
  5297. else if(goingJob[playerid] == true)
  5298. {
  5299. DisablePlayerCheckpointEx(playerid);
  5300. goingJob[playerid] = false;
  5301. SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed! ");
  5302. }
  5303. else if(isRepairing[playerid] == true)
  5304. {
  5305. isRepairing[playerid] = false;
  5306. DisablePlayerCheckpointEx(playerid);
  5307. SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed.");
  5308. }
  5309. return 1;
  5310. }
  5311. else
  5312. {
  5313. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any Packages to throw away.");
  5314. return 1;
  5315. }
  5316. }
  5317. else if(strcmp(x_nr, "crates", true) == 0)
  5318. {
  5319. if(Crates[playerid] > 0)
  5320. {
  5321. Crates[playerid] = 0;
  5322. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5323. format(str, sizeof(str), "* %s has dropped their drug crates.", sendername);
  5324. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5325. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5326. return 1;
  5327. }
  5328. else
  5329. {
  5330. SendClientMessage(playerid, COLOR_GREY, "You are not carrying any drug crates.");
  5331. return 1;
  5332. }
  5333. }
  5334. else if(strcmp(x_nr, "meal", true) == 0)
  5335. {
  5336. if(hasFoodTray[playerid])
  5337. {
  5338. format(str, sizeof(str), "* %s has thrown away their Meal.", PlayerICName(playerid));
  5339. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5340. throwAwayFoodTray(playerid);
  5341. }
  5342. else
  5343. {
  5344. SendClientMessage(playerid, COLOR_GREY, "You are not carrying a Meal.");
  5345. return 1;
  5346. }
  5347. }
  5348. else if(strcmp(x_nr, "boombox", true) == 0)
  5349. {
  5350. if(PlayerInfo[playerid][pStereo] == 0)return SendClientMessage(playerid, COLOR_GREY, "You don't have a Boombox.");
  5351. PlayerInfo[playerid][pStereo] = 0;
  5352. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5353. format(str, sizeof(str), "* %s has dropped their boombox.", sendername);
  5354. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5355. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  5356. return 1;
  5357. }
  5358. else if(strcmp(x_nr, "cellphone", true) == 0)
  5359. {
  5360. if(PlayerInfo[playerid][pPnumber])
  5361. {
  5362. if(Mobile[playerid] != 999) return SendClientMessage(playerid, COLOR_GRAD2, "You can't throw away your Cellphone while you are on a call.");
  5363. format(str, sizeof(str), "* %s has thrown away their Cellphone.", PlayerICName(playerid));
  5364. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5365. PlayerInfo[playerid][pPnumber] = 0;
  5366. PhoneOffline[playerid] = 0;
  5367. }
  5368. else
  5369. {
  5370. SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone.");
  5371. return 1;
  5372. }
  5373. }
  5374. else if(strcmp(x_nr, "trash", true) == 0)
  5375. {
  5376. if(CP[playerid] == CHECKPOINT_GARBAGE)
  5377. {
  5378. CP[playerid] = CHECKPOINT_NONE;
  5379. DisablePlayerCheckpointEx(playerid);
  5380. format(str, sizeof(str), "* %s has thrown away their Trash.", PlayerICName(playerid));
  5381. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5382. if(IsPlayerAttachedObjectSlotUsed(playerid, INDEX_8))
  5383. {
  5384. RemovePlayerAttachedObject(playerid, INDEX_8);
  5385. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  5386. }
  5387. //reset variables
  5388. hasTruckCheckpoint[playerid] = -1;
  5389. }
  5390. else
  5391. {
  5392. SendClientMessage(playerid, COLOR_GRAD2, "You are not holding any Trash.");
  5393. return 1;
  5394. }
  5395. }
  5396. else
  5397. {
  5398. SendClientMessage(playerid, COLOR_GREY, "Invalid drop name.");
  5399. return 1;
  5400. }
  5401. return 1;
  5402. }
  5403. if(strcmp(cmd, "/give", true) == 0)
  5404. {
  5405. if(pDeathState[playerid] != PLAYER_STATE_NORMAL)
  5406. return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
  5407. if(IsAtEvent[playerid] == 1)
  5408. return SendClientMessage(playerid, COLOR_GREY, "You can't use this in events.");
  5409. tmp = strtok(cmdtext, idx);
  5410. if(!strlen(tmp))
  5411. {
  5412. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5413. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Cannabis, Cocaine, Materials, Seeds, Weapon, Kevlar, Beer, Tiki");
  5414. return 1;
  5415. }
  5416. giveplayerid = ReturnUser(tmp);
  5417. tmp = strtok(cmdtext, idx);
  5418. if(!strlen(tmp))
  5419. {
  5420. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5421. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Cannabis, Cocaine, Materials, Seeds, Weapon, Kevlar, Tiki");
  5422. return 1;
  5423. }
  5424. new givetoid = giveplayerid;
  5425. if(strcmp(tmp, "weapon", true) == 0)
  5426. {
  5427. if(GetPlayerSpecialAction(givetoid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_GREY, "You cannot use this at this time");
  5428. if(GetPlayerWeapon(playerid) == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You are not holding any weapon.");
  5429. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, "You can't do this at this time.");
  5430. if(IsAtEvent[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "You cannot give someone a weapon at this time.");
  5431. if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_GRAD1, "You cannot give someone a weapon at this time.");
  5432. if(PlayerInfo[playerid][pGroup] != GROUP_CRIME)
  5433. {
  5434. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || IsAMedic(playerid) == 1 || IsASenate(playerid) || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == FACTION_SANG)
  5435. return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/SANG/DoC/SAN/Taxi Company can not use this command.");
  5436. }
  5437. if(PlayerInfo[giveplayerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must play for at least 2 hours before they can get a weapon.");
  5438. if(IsPlayerInAnyVehicle(givetoid)) return SendClientMessage(playerid, COLOR_GREY, "You can't give a weapon to players if they are inside of a vehicle.");
  5439. //make sure it's a scripted gun to prevent people from dropping hacked weapons (people could pick them up)
  5440. new gunid = GetPlayerWeapon(playerid);
  5441. if(HaveWeapon(playerid, gunid) != gunid)
  5442. {
  5443. format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has attempted to give a fake weapon.", PlayerICName(playerid));
  5444. ABroadCast(COLOR_WHITE, str, 1);
  5445. return SendClientMessage(playerid, COLOR_GREY, "You are not carrying a weapon!");
  5446. }
  5447. new Float:fX, Float:fY, Float:fZ;
  5448. GetPlayerPos(givetoid, fX, fY, fZ);
  5449. if(!IsPlayerInRangeOfPoint(playerid, 3.0, fX, fY, fZ)) return SendClientMessage(playerid, COLOR_GRAD1, "You are not close enough to that player to offer him weapons.");
  5450. OfferedGunTo[playerid] = givetoid;
  5451. OfferedGunFrom[givetoid] = playerid;
  5452. GunOffered[givetoid] = GetPlayerWeapon(playerid);
  5453. new weaponname[50];
  5454. GetWeaponName(GetPlayerWeapon(playerid), weaponname, sizeof(weaponname));
  5455. format(string5, sizeof(string5), "You have offered your %s to %s, wait to see if he will accept it.", weaponname, PlayerICName(givetoid));
  5456. SendClientMessage(playerid, COLOR_LIGHTBLUE, string5);
  5457. format(string5, sizeof(string5), "%s has offered you their %s, /accept weapon to accept it.", PlayerICName(playerid), weaponname);
  5458. SendClientMessage(givetoid, COLOR_LIGHTBLUE, string5);
  5459. }
  5460. else if(strcmp(tmp, "kevlar", true) == 0)
  5461. {
  5462. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || IsAMedic(playerid) == 1 || IsASenate(playerid) || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == FACTION_SANG) return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/DoC/SAN/Taxi Company can not use this command.");
  5463. if(PlayerPaused[givetoid])
  5464. return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}You cannot give kevlar to tabbed/afk players!");
  5465. if(FVestProtected[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot /give kevlar after spawn, wait few minutes.");
  5466. if(IsPlayerConnected(givetoid))
  5467. {
  5468. new Float:armorpt;
  5469. GetPlayerArmour(playerid, armorpt);
  5470. if(!(armorpt == 0))
  5471. {
  5472. new Float:x, Float:y, Float:z;
  5473. GetPlayerPos(givetoid, x, y, z);
  5474. if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z))
  5475. {
  5476. format(string5, sizeof(string5), "You have offered your vest to %s, wait to see if he will accept it.", PlayerICName(givetoid));
  5477. SendClientMessage(playerid, COLOR_LIGHTBLUE, string5);
  5478. format(string5, sizeof(string5), "%s has offered you their kevlar, /accept kevlar to accept it.", PlayerICName(playerid));
  5479. SendClientMessage(givetoid, COLOR_LIGHTBLUE, string5);
  5480. KevlarOfferTo[playerid] = givetoid;
  5481. KevlarOfferFrom[givetoid] = playerid;
  5482. }
  5483. else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5484. }
  5485. else return SendClientMessage(playerid, COLOR_GREY, "You are not wearing a kevlar.");
  5486. }
  5487. else return SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5488. }
  5489. else if(strcmp(tmp, "materials", true) == 0)
  5490. {
  5491. tmp = strtok(cmdtext, idx);
  5492. if(!strlen(tmp))
  5493. {
  5494. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5495. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Pot, Crack, Materials, Seeds");
  5496. return 1;
  5497. }
  5498. new amount = strvalEx(tmp);
  5499. if(IsPlayerConnected(giveplayerid))
  5500. {
  5501. if(giveplayerid != INVALID_PLAYER_ID)
  5502. {
  5503. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5504. {
  5505. if(playerid == giveplayerid)
  5506. {
  5507. SendClientMessage(playerid, COLOR_GREY, "You can't give to yourself.");
  5508. return 1;
  5509. }
  5510. if(amount > PlayerInfo[playerid][pMats] || amount < 1)
  5511. {
  5512. SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
  5513. return 1;
  5514. }
  5515. if(amount > 50000)
  5516. {
  5517. SendClientMessage(playerid, COLOR_GREY, "You can't give more than 50,000 at a time.");
  5518. return 1;
  5519. }
  5520. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5521. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5522. format(str, sizeof(str), "You have given %s %d Materials.", giveplayer, amount);
  5523. SendClientMessage(playerid, COLOR_GRAD1, str);
  5524. format(str, sizeof(str), "You have received %d Materials from %s.", amount, sendername);
  5525. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5526. format(str, sizeof(str), "* %s has given %s some Materials.", sendername, giveplayer);
  5527. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5528. PlayerInfo[playerid][pMats] = PlayerInfo[playerid][pMats] -amount;
  5529. PlayerInfo[giveplayerid][pMats] = PlayerInfo[giveplayerid][pMats] +amount;
  5530. format(str, sizeof(str), "%s has given %s %d Materials.", sendername, giveplayer, amount);
  5531. PayLog(str);
  5532. return 1;
  5533. }
  5534. else
  5535. {
  5536. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5537. return 1;
  5538. }
  5539. }
  5540. }
  5541. else
  5542. {
  5543. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5544. return 1;
  5545. }
  5546. }
  5547. else if(strcmp(tmp, "seeds", true) == 0)
  5548. {
  5549. tmp = strtok(cmdtext, idx);
  5550. if(!strlen(tmp))
  5551. {
  5552. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5553. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Pot, Crack, Materials, Seeds");
  5554. return 1;
  5555. }
  5556. new amount = strvalEx(tmp);
  5557. if(IsPlayerConnected(giveplayerid))
  5558. {
  5559. if(giveplayerid != INVALID_PLAYER_ID)
  5560. {
  5561. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5562. {
  5563. if(playerid == giveplayerid)
  5564. {
  5565. SendClientMessage(playerid, COLOR_GREY, "You can't give to yourself.");
  5566. return 1;
  5567. }
  5568. if(amount > PlayerInfo[playerid][pPotSeeds] || amount < 1)
  5569. {
  5570. SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
  5571. return 1;
  5572. }
  5573. if(amount + PlayerInfo[giveplayerid][pPotSeeds] > 50)
  5574. {
  5575. SendClientMessage(playerid, COLOR_GREY, "That player can only hold a maximum of 50 seeds.");
  5576. return 1;
  5577. }
  5578. if(amount > 500)
  5579. {
  5580. SendClientMessage(playerid, COLOR_GREY, "You can't give more than 50 at a time.");
  5581. return 1;
  5582. }
  5583. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5584. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5585. format(str, sizeof(str), "You have given %s %d Seeds.", giveplayer, amount);
  5586. SendClientMessage(playerid, COLOR_GRAD1, str);
  5587. format(str, sizeof(str), "You have received %d Seeds from %s.", amount, sendername);
  5588. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5589. format(str, sizeof(str), "* %s has given %s some Seeds.", sendername, giveplayer);
  5590. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5591. PlayerInfo[playerid][pPotSeeds] = PlayerInfo[playerid][pPotSeeds] -amount;
  5592. PlayerInfo[giveplayerid][pPotSeeds] = PlayerInfo[giveplayerid][pPotSeeds] +amount;
  5593. format(str, sizeof(str), "%s has given %s %d Seeds.", sendername, giveplayer, amount);
  5594. PayLog(str);
  5595. return 1;
  5596. }
  5597. else
  5598. {
  5599. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5600. return 1;
  5601. }
  5602. }
  5603. }
  5604. else
  5605. {
  5606. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5607. return 1;
  5608. }
  5609. }
  5610. else if(strcmp(tmp, "tiki", true) == 0)
  5611. {
  5612. tmp = strtok(cmdtext, idx);
  5613. if(!strlen(tmp))
  5614. {
  5615. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5616. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Tiki");
  5617. return 1;
  5618. }
  5619. new amount = strvalEx(tmp);
  5620. if(IsPlayerConnected(giveplayerid))
  5621. {
  5622. if(giveplayerid != INVALID_PLAYER_ID)
  5623. {
  5624. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5625. {
  5626. if(playerid == giveplayerid)
  5627. {
  5628. SendClientMessage(playerid, COLOR_GREY, "You can't give to yourself.");
  5629. return 1;
  5630. }
  5631. if(amount > PlayerInfo[playerid][pTikis] || amount < 1)
  5632. {
  5633. SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
  5634. return 1;
  5635. }
  5636. if(amount + PlayerInfo[giveplayerid][pTikis] > 100)
  5637. {
  5638. SendClientMessage(playerid, COLOR_GREY, "That player can only have 100 tikis from a player.");
  5639. return 1;
  5640. }
  5641. if(amount > 100)
  5642. {
  5643. SendClientMessage(playerid, COLOR_GREY, "You can't give more than 100 at a time.");
  5644. return 1;
  5645. }
  5646. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5647. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5648. format(str, sizeof(str), "You have given %s %d Tikis.", giveplayer, amount);
  5649. SendClientMessage(playerid, COLOR_GRAD1, str);
  5650. format(str, sizeof(str), "You have received %d Tikis from %s.", amount, sendername);
  5651. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5652. PlayerInfo[playerid][pTikis] = PlayerInfo[playerid][pTikis] -amount;
  5653. PlayerInfo[giveplayerid][pTikis] = PlayerInfo[giveplayerid][pTikis] +amount;
  5654. format(str, sizeof(str), "%s has given %s %d Tikis.", sendername, giveplayer, amount);
  5655. PayLog(str);
  5656. return 1;
  5657. }
  5658. else
  5659. {
  5660. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5661. return 1;
  5662. }
  5663. }
  5664. }
  5665. else
  5666. {
  5667. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5668. return 1;
  5669. }
  5670. }
  5671. else if(strcmp(tmp, "beer", true) == 0)
  5672. {
  5673. tmp = strtok(cmdtext, idx);
  5674. if(!strlen(tmp))
  5675. {
  5676. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /give [playerid/PartOfName] [name] [amount]");
  5677. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Pot, Crack, Materials, Seeds, Beer");
  5678. return 1;
  5679. }
  5680. new amount = strvalEx(tmp);
  5681. if(IsPlayerConnected(giveplayerid))
  5682. {
  5683. if(giveplayerid != INVALID_PLAYER_ID)
  5684. {
  5685. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5686. {
  5687. if(playerid == giveplayerid)
  5688. {
  5689. SendClientMessage(playerid, COLOR_GREY, "You can't give to yourself.");
  5690. return 1;
  5691. }
  5692. if(amount > PlayerInfo[playerid][pBeer] || amount < 1)
  5693. {
  5694. SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
  5695. return 1;
  5696. }
  5697. if(amount > 5)
  5698. {
  5699. SendClientMessage(playerid, COLOR_GREY, "You can't give more than 5 at a time.");
  5700. return 1;
  5701. }
  5702. if(PlayerInfo[giveplayerid][pBeer] + amount > 5)
  5703. {
  5704. SendClientMessage(playerid, COLOR_GREY, "That player can't carry more than 5 beer.");
  5705. return 1;
  5706. }
  5707. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5708. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5709. format(str, sizeof(str), "You have given %s %d Beer.", giveplayer, amount);
  5710. SendClientMessage(playerid, COLOR_GRAD1, str);
  5711. format(str, sizeof(str), "You have received %d Beer from %s.", amount, sendername);
  5712. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5713. format(str, sizeof(str), "* %s has given %s Beer.", sendername, giveplayer);
  5714. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5715. PlayerInfo[playerid][pBeer] = PlayerInfo[playerid][pBeer] -amount;
  5716. PlayerInfo[giveplayerid][pBeer] = PlayerInfo[giveplayerid][pBeer] +amount;
  5717. format(str, sizeof(str), "%s has given %s %d Beer.", sendername, giveplayer, amount);
  5718. PayLog(str);
  5719. return 1;
  5720. }
  5721. else
  5722. {
  5723. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5724. return 1;
  5725. }
  5726. }
  5727. }
  5728. else
  5729. {
  5730. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5731. return 1;
  5732. }
  5733. }
  5734. else
  5735. {
  5736. SendClientMessage(playerid, COLOR_GREY, "Invalid give name.");
  5737. return 1;
  5738. }
  5739. return 1;
  5740. }
  5741. if(strcmp(cmd, "/take", true) == 0)
  5742. {
  5743. if(IsACop(playerid) || IsANG(playerid) || PlayerInfo[playerid][pMember] == 11)
  5744. {
  5745. if(PlayerInfo[playerid][pRank] < 1 && PlayerInfo[playerid][pMember] != 11)
  5746. {
  5747. SendClientMessage(playerid, COLOR_GREY, "Your rank is not high enough.");
  5748. return 1;
  5749. }
  5750. new x_nr[64];
  5751. x_nr = strtok(cmdtext, idx);
  5752. if(!strlen(x_nr))
  5753. {
  5754. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [player]");
  5755. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Weapons, Drugs, Materials, Cellphone, Seeds");
  5756. return 1;
  5757. }
  5758. if(strcmp(x_nr, "weapons", true) == 0)
  5759. {
  5760. tmp = strtok(cmdtext, idx);
  5761. if(!strlen(tmp))
  5762. {
  5763. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5764. return 1;
  5765. }
  5766. giveplayerid = ReturnUser(tmp);
  5767. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5768. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5769. if(IsPlayerConnected(giveplayerid))
  5770. {
  5771. if(giveplayerid != INVALID_PLAYER_ID)
  5772. {
  5773. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5774. {
  5775. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5776. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5777. format(str, sizeof(str), "You have taken %s's Weapons.", giveplayer);
  5778. SendClientMessage(playerid, COLOR_GRAD1, str);
  5779. format(str, sizeof(str), "%s has taken your Weapons.", sendername);
  5780. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5781. format(str, sizeof(str), "* %s %s has taken %s's Weapons.", GetPlayerRank(playerid), sendername, giveplayer);
  5782. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5783. ClearGuns(giveplayerid);
  5784. ResetPlayerWeapons(giveplayerid);
  5785. format(str, sizeof(str), "%s has taken %s's Weapons.", sendername, giveplayer);
  5786. PayLog(str);
  5787. }
  5788. else
  5789. {
  5790. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5791. return 1;
  5792. }
  5793. }
  5794. }
  5795. else
  5796. {
  5797. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5798. return 1;
  5799. }
  5800. }
  5801. /*else if(strcmp(x_nr, "drugs", true) == 0)
  5802. {
  5803. tmp = strtok(cmdtext, idx);
  5804. if(!strlen(tmp))
  5805. {
  5806. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5807. return 1;
  5808. }
  5809. giveplayerid = ReturnUser(tmp);
  5810. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5811. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5812. if(IsPlayerConnected(giveplayerid))
  5813. {
  5814. if(giveplayerid != INVALID_PLAYER_ID)
  5815. {
  5816. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5817. {
  5818. format(str, sizeof(str), "You have taken %d grams of cannabis, %d grams of cocaine, and %d grams of meth from %s.", PlayerInfo[giveplayerid][pCannabis], PlayerInfo[giveplayerid][pCocaine], PlayerInfo[giveplayerid][pMeth], PlayerICName(giveplayerid));
  5819. SendClientMessage(playerid, COLOR_GRAD1, str);
  5820. format(str, sizeof(str), "%s has taken %d grams of cannabis, %d grams of cocaine, and %d grams of meth.", PlayerICName(playerid), PlayerInfo[giveplayerid][pCannabis], PlayerInfo[giveplayerid][pCocaine], PlayerInfo[giveplayerid][pMeth]);
  5821. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5822. format(str, sizeof(str), "* %s %s has taken away %s's drugs.", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(giveplayerid));
  5823. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5824. PlayerInfo[giveplayerid][pCannabis] = 0;
  5825. PlayerInfo[giveplayerid][pCocaine] = 0;
  5826. PlayerInfo[giveplayerid][pMeth] = 0;
  5827. }
  5828. else
  5829. {
  5830. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5831. return 1;
  5832. }
  5833. }
  5834. }
  5835. else
  5836. {
  5837. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5838. return 1;
  5839. }
  5840. }*/
  5841. else if(strcmp(x_nr, "drugs", true) == 0)
  5842. {
  5843. tmp = strtok(cmdtext, idx);
  5844. if(!strlen(tmp))
  5845. {
  5846. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5847. return 1;
  5848. }
  5849. giveplayerid = ReturnUser(tmp);
  5850. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5851. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5852. if(IsPlayerConnected(giveplayerid))
  5853. {
  5854. if(giveplayerid != INVALID_PLAYER_ID)
  5855. {
  5856. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5857. {
  5858. format(str, sizeof(str), "You have taken %d grams of cannabis, %d grams of cocaine, %d grams of meth, %d grams of xanax, %d grams of promethazine, %d grams of codeine, and %d grams of lean from %s.", PlayerInfo[giveplayerid][pCannabis], PlayerInfo[giveplayerid][pCocaine], PlayerInfo[giveplayerid][pMeth], PlayerInfo[giveplayerid][pXanax], PlayerInfo[giveplayerid][pPromethazine], PlayerInfo[giveplayerid][pCodeine], PlayerInfo[giveplayerid][pLean], PlayerICName(giveplayerid));
  5859. SendClientMessage(playerid, COLOR_GRAD1, str);
  5860. format(str, sizeof(str), "%s has taken %d grams of cannabis, %d grams of cocaine, %d grams of meth, %d grams of xanax, %d grams of promethazine, %d grams of codeine, and %d grams of lean.", PlayerICName(playerid), PlayerInfo[giveplayerid][pCannabis], PlayerInfo[giveplayerid][pCocaine], PlayerInfo[giveplayerid][pMeth], PlayerInfo[giveplayerid][pXanax], PlayerInfo[giveplayerid][pPromethazine], PlayerInfo[giveplayerid][pCodeine], PlayerInfo[giveplayerid][pLean]);
  5861. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5862. format(str, sizeof(str), "* %s %s has taken away %s's drugs.", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(giveplayerid));
  5863. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5864. PlayerInfo[giveplayerid][pCannabis] = 0;
  5865. PlayerInfo[giveplayerid][pCocaine] = 0;
  5866. PlayerInfo[giveplayerid][pMeth] = 0;
  5867. }
  5868. else
  5869. {
  5870. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5871. return 1;
  5872. }
  5873. }
  5874. }
  5875. else
  5876. {
  5877. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5878. return 1;
  5879. }
  5880. }
  5881. else if(strcmp(x_nr, "seeds", true) == 0)
  5882. {
  5883. tmp = strtok(cmdtext, idx);
  5884. if(!strlen(tmp))
  5885. {
  5886. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5887. return 1;
  5888. }
  5889. giveplayerid = ReturnUser(tmp);
  5890. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5891. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5892. if(IsPlayerConnected(giveplayerid))
  5893. {
  5894. if(giveplayerid != INVALID_PLAYER_ID)
  5895. {
  5896. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5897. {
  5898. if(PlayerInfo[giveplayerid][pPotSeeds] < 1) return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have any Seeds.");
  5899. if(PlayerInfo[giveplayerid][pLevel] < 4)
  5900. {
  5901. format(str, sizeof(str), "You can't confisticate seeds from this player because their level is %d.", PlayerInfo[giveplayerid][pLevel]);
  5902. SendClientMessage(playerid, COLOR_GRAD1, str);
  5903. return 1;
  5904. }
  5905. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5906. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5907. format(str, sizeof(str), "You have taken %d Seeds from %s.", PlayerInfo[giveplayerid][pPotSeeds], giveplayer);
  5908. SendClientMessage(playerid, COLOR_GRAD1, str);
  5909. format(str, sizeof(str), "%s has taken your %d Seeds.", sendername, PlayerInfo[giveplayerid][pPotSeeds]);
  5910. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5911. format(str, sizeof(str), "* %s %s has taken away %s's Seeds.", GetPlayerRank(playerid), sendername, giveplayer);
  5912. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5913. //PlayerInfo[playerid][pPotSeeds] += PlayerInfo[giveplayerid][pPotSeeds];
  5914. PlayerInfo[giveplayerid][pPotSeeds] = 0;
  5915. format(str, sizeof(str), "%s has taken %d Seeds from %s.", sendername, PlayerInfo[giveplayerid][pPotSeeds], giveplayer);
  5916. PayLog(str);
  5917. }
  5918. else
  5919. {
  5920. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5921. return 1;
  5922. }
  5923. }
  5924. }
  5925. else
  5926. {
  5927. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5928. return 1;
  5929. }
  5930. }
  5931. else if(strcmp(x_nr, "materials", true) == 0)
  5932. {
  5933. tmp = strtok(cmdtext, idx);
  5934. if(!strlen(tmp))
  5935. {
  5936. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5937. return 1;
  5938. }
  5939. giveplayerid = ReturnUser(tmp);
  5940. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5941. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5942. if(IsPlayerConnected(giveplayerid))
  5943. {
  5944. if(giveplayerid != INVALID_PLAYER_ID)
  5945. {
  5946. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5947. {
  5948. if(PlayerInfo[giveplayerid][pMats] < 1) return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have any Materials.");
  5949. if(PlayerInfo[giveplayerid][pLevel] < 4)
  5950. {
  5951. format(str, sizeof(str), "You can't confisticate materials from this player because their level is %d.", PlayerInfo[giveplayerid][pLevel]);
  5952. SendClientMessage(playerid, COLOR_GRAD1, str);
  5953. return 1;
  5954. }
  5955. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  5956. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  5957. format(str, sizeof(str), "You have taken %d Materials from %s.", PlayerInfo[giveplayerid][pMats], giveplayer);
  5958. SendClientMessage(playerid, COLOR_GRAD1, str);
  5959. format(str, sizeof(str), "%s has taken your %d Materials.", sendername, PlayerInfo[giveplayerid][pMats]);
  5960. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  5961. format(str, sizeof(str), "* %s %s has taken away %s's Materials.", GetPlayerRank(playerid), sendername, giveplayer);
  5962. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  5963. //PlayerInfo[playerid][pMats] += PlayerInfo[giveplayerid][pMats];
  5964. PlayerInfo[giveplayerid][pMats] = 0;
  5965. format(str, sizeof(str), "%s has taken %d Materials from %s.", sendername, PlayerInfo[giveplayerid][pMats], giveplayer);
  5966. PayLog(str);
  5967. }
  5968. else
  5969. {
  5970. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  5971. return 1;
  5972. }
  5973. }
  5974. }
  5975. else
  5976. {
  5977. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  5978. return 1;
  5979. }
  5980. }
  5981. else if(strcmp(x_nr, "cellphone", true) == 0)
  5982. {
  5983. tmp = strtok(cmdtext, idx);
  5984. if(!strlen(tmp))
  5985. {
  5986. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /take [name] [playerid/PartOfName]");
  5987. return 1;
  5988. }
  5989. giveplayerid = ReturnUser(tmp);
  5990. if(PlayerCuffed[giveplayerid] == 0 && PlayerPaused[giveplayerid] == 0 && PlayerTied[giveplayerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't restrained.");
  5991. if(PlayerInfo[giveplayerid][pConnectTime] < 24) return SendClientMessage(playerid, COLOR_GRAD1, "That player needs to have 24 playing hours.");
  5992. if(IsPlayerConnected(giveplayerid))
  5993. {
  5994. if(giveplayerid != INVALID_PLAYER_ID)
  5995. {
  5996. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  5997. {
  5998. if(PlayerInfo[giveplayerid][pPnumber] == 0)
  5999. {
  6000. SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a Cellphone.");
  6001. return 1;
  6002. }
  6003. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6004. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6005. format(str, sizeof(str), "* You have taken away %s's Cellphone.", giveplayer);
  6006. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6007. format(str, sizeof(str), "* %s %s as taken away your Cellphone.", GetPlayerRank(playerid), sendername);
  6008. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6009. format(str, sizeof(str), "* %s %s has taken away %s's Cellphone.", GetPlayerRank(playerid), sendername, giveplayer);
  6010. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6011. PlayerInfo[giveplayerid][pPnumber] = 0;
  6012. format(str, sizeof(str), "%s has taken %s's Cellphone.", sendername, giveplayer);
  6013. PayLog(str);
  6014. }
  6015. else
  6016. {
  6017. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6018. return 1;
  6019. }
  6020. }
  6021. }
  6022. else
  6023. {
  6024. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  6025. return 1;
  6026. }
  6027. }
  6028. else
  6029. {
  6030. SendClientMessage(playerid, COLOR_GREY, "Invalid take name.");
  6031. return 1;
  6032. }
  6033. }
  6034. else
  6035. {
  6036. SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / DEA / SASD / NG member.");
  6037. return 1;
  6038. }
  6039. return 1;
  6040. }
  6041. if(strcmp(cmd, "/boxstats", true) == 0)
  6042. {
  6043. if(PlayerInfo[playerid][pJob] != 12)
  6044. {
  6045. SendClientMessage(playerid, COLOR_GREY, "You are not a Boxer.");
  6046. return 1;
  6047. }
  6048. new ttext[20];//Title
  6049. new clevel = PlayerInfo[playerid][pBoxSkill];
  6050. if(clevel >= 0 && clevel <= 49)
  6051. {
  6052. ttext = "Beginner";
  6053. }
  6054. else if(clevel >= 50 && clevel <= 199)
  6055. {
  6056. ttext = "Amateur";
  6057. }
  6058. else if(clevel >= 200 && clevel <= 399)
  6059. {
  6060. ttext = "Professional";
  6061. }
  6062. new ntext[20];//NickName
  6063. new level = PlayerInfo[playerid][pWins];
  6064. if(level > 0 && PlayerInfo[playerid][pLoses] == 0)
  6065. {
  6066. ntext = "Undefeated";
  6067. }
  6068. else
  6069. {
  6070. if(level >= 0 && level <= 10)
  6071. {
  6072. ntext = "Newcomer";
  6073. }
  6074. else if(level >= 11 && level <= 20)
  6075. {
  6076. ntext = "Touchy Fist";
  6077. }
  6078. else if(level >= 21 && level <= 30)
  6079. {
  6080. ntext = "Nut Cracker";
  6081. }
  6082. else if(level >= 31 && level <= 40)
  6083. {
  6084. ntext = "Tommygun";
  6085. }
  6086. else if(level >= 41 && level <= 50)
  6087. {
  6088. ntext = "Skull Breaker";
  6089. }
  6090. else if(level >= 51 && level <= 60)
  6091. {
  6092. ntext = "Light Speed";
  6093. }
  6094. else if(level >= 61 && level <= 70)
  6095. {
  6096. ntext = "Unbroken Warrior";
  6097. }
  6098. else if(level >= 71)
  6099. {
  6100. ntext = "Italian Stallion";
  6101. }
  6102. }
  6103. SendClientMessage(playerid, COLOR_WHITE, "Boxing Records:");
  6104. if(Titel[TitelWins] == 0)format(str, sizeof(str), "| Current Champion: Nobody");
  6105. else format(str, sizeof(str), "| Current Champion: %s, with [%d] Winnings and [%d] Losses.", Titel[TitelName], Titel[TitelWins], Titel[TitelLoses]);
  6106. SendClientMessage(playerid, COLOR_GREY, str);
  6107. format(str, sizeof(str), "| Current Title: %s.", ttext);
  6108. SendClientMessage(playerid, COLOR_GREY, str);
  6109. format(str, sizeof(str), "| Current NickName: %s.", ntext);
  6110. SendClientMessage(playerid, COLOR_GREY, str);
  6111. format(str, sizeof(str), "| Total Wins: %d.", PlayerInfo[playerid][pWins]);
  6112. SendClientMessage(playerid, COLOR_GREY, str);
  6113. format(str, sizeof(str), "| Total Losses: %d.", PlayerInfo[playerid][pLoses]);
  6114. SendClientMessage(playerid, COLOR_GREY, str);
  6115. return 1;
  6116. }
  6117. if(strcmp(cmd, "/fight", true) == 0)
  6118. {
  6119. if(PlayerInfo[playerid][pJob] != 12)
  6120. {
  6121. SendClientMessage(playerid, COLOR_GREY, "You are not a Boxer.");
  6122. return 1;
  6123. }
  6124. if(InRing > 0)
  6125. {
  6126. SendClientMessage(playerid, COLOR_GREY, "There is already a Fight going on, wait for it to Finish.");
  6127. return 1;
  6128. }
  6129. if(PlayerBoxing[playerid] > 0)
  6130. {
  6131. SendClientMessage(playerid, COLOR_GREY, "You are already Fighting.");
  6132. return 1;
  6133. }
  6134. if(!IsPlayerInRangeOfPoint(playerid, 20.0, 765.9343, 0.2761, 1000.7173))
  6135. {
  6136. SendClientMessage(playerid, COLOR_GREY, "You are not at the Ganton Gym.");
  6137. return 1;
  6138. }
  6139. tmp = strtok(cmdtext, idx);
  6140. if(!strlen(tmp))
  6141. {
  6142. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fight [Playerid/PartOfName]");
  6143. return 1;
  6144. }
  6145. giveplayerid = ReturnUser(tmp);
  6146. if(IsPlayerConnected(giveplayerid))
  6147. {
  6148. if(giveplayerid != INVALID_PLAYER_ID)
  6149. {
  6150. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  6151. {
  6152. if(giveplayerid == playerid)
  6153. {
  6154. SendClientMessage(playerid, COLOR_GREY, "You cannot Box with yourself.");
  6155. return 1;
  6156. }
  6157. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6158. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6159. format(str, sizeof(str), "* You offered a Boxing Challenge to %s.", giveplayer);
  6160. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6161. format(str, sizeof(str), "* Boxer %s wants to Fight with you (type /accept boxing) to accept.", sendername);
  6162. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6163. BoxOffer[giveplayerid] = playerid;
  6164. }
  6165. else
  6166. {
  6167. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6168. return 1;
  6169. }
  6170. }
  6171. }
  6172. else
  6173. {
  6174. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  6175. return 1;
  6176. }
  6177. return 1;
  6178. }
  6179. if(strcmp(cmd, "/service", true) == 0)
  6180. {
  6181. new x_nr[64];
  6182. x_nr = strtok(cmdtext, idx);
  6183. if(!strlen(x_nr))
  6184. {
  6185. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /service [name]");
  6186. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Medic, Mechanic, EMS, Taxi, Lawyer");
  6187. return 1;
  6188. }
  6189. else if(strcmp(x_nr, "taxi", true) == 0)
  6190. {
  6191. if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
  6192. if(PlayerInfo[playerid][pJob] == 14 || PlayerInfo[playerid][pMember] == 10) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot call your own company !");
  6193. SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
  6194. new bool:lineflooded = true;
  6195. for(new i = 1; i < MAX_TAXICALLS; i++)
  6196. {
  6197. if(strcmp(TaxiCInfo[i][taxiname], PlayerICName(playerid), false) == 0) return OnHangup(playerid, "(cellphone) Taxi Operator: We have already recieved a call from you, be patient !");
  6198. if((strlen(TaxiCInfo[i][taxiname]) < 3))
  6199. {
  6200. TaxiCInfoID[i] = playerid;
  6201. TaxiCInfo[i][taxiname] = PlayerICName(playerid); //name
  6202. GetPlayer2DZone(playerid, TaxiCInfo[i][taxilocation], sizeof(TaxiCInfo[][])); //location
  6203. valstr(TaxiCInfo[i][taxiphone], PlayerInfo[playerid][pPnumber]); //phone
  6204. format(str, sizeof(str), "[Taxi Hotline] %s needs a taxi to %s, pronto ((/calls))!", TaxiCInfo[i][taxiname], TaxiCInfo[i][taxilocation]);
  6205. SendFamilyMessage(10, COLOR_YELLOW, str);
  6206. format(str, sizeof(str), "[Taxi Hotline] %s needs a taxi to %s, pronto ((/accept taxi))!", TaxiCInfo[i][taxiname], TaxiCInfo[i][taxilocation]);
  6207. SendTaxiMessage(COLOR_YELLOW, str);
  6208. LastCaller = PlayerName(playerid);
  6209. i = MAX_TAXICALLS;
  6210. lineflooded = false;
  6211. }
  6212. if((i == MAX_TAXICALLS - 1) && lineflooded == true) return OnHangup(playerid, "(cellphone) Taxi Operator: We have no more employees available right now, try again later.");
  6213. }
  6214. return OnHangup(playerid, "(cellphone) Taxi Operator: A taxi driver will be with you soon!");
  6215. }
  6216. else if(strcmp(x_nr, "medic", true) == 0)
  6217. {
  6218. if(pDeathState[playerid] != PLAYER_STATE_REVIVE) return SendClientMessage(playerid, COLOR_GREY, "You are not injured.");
  6219. if(PlayerCalledEMS[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are already awaiting the EMS.");
  6220. new count =0;
  6221. foreach( new i: Player )if(PlayerInfo[i][pMember] == 4)count++;
  6222. if(count ==0) return SendClientMessage(playerid, COLOR_GREY, "There are currently no EMS online.");
  6223. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6224. format(str, sizeof(str), "Dispatch: %s is in need of a Paramedic (/EMScalls to list the calls).", PlayerICName(playerid));
  6225. SendParaMessage(COLOR_DOCTOR, str);
  6226. PlayerCalledEMS[playerid] = 1;
  6227. displayCenterHUDInfo(playerid, "~r~EMS Called.", 8); //display for 8 seconds
  6228. TextDrawHideForPlayer(playerid, Text:DieText);
  6229. TextDrawHideForPlayer(playerid, Text:InjuredText);
  6230. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The emergency services have been notified of your position.");
  6231. return 1;
  6232. }
  6233. else if(strcmp(x_nr, "lawyer", true) == 0)
  6234. {
  6235. new Lawyers = 0;
  6236. foreach( new i: Player )
  6237. {
  6238. if(IsPlayerConnected(i))
  6239. {
  6240. if(PlayerInfo[i][pJob] == 2 && JobDuty[i] == 1)
  6241. {
  6242. Lawyers += 1;
  6243. }
  6244. }
  6245. }
  6246. if(!(Lawyers >= 1))
  6247. {
  6248. SendClientMessage(playerid, COLOR_GREY, "There are no Lawyers on duty at the moment, try again later.");
  6249. return 1;
  6250. }
  6251. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6252. format(str, sizeof(str), "** %s is in need of a Lawyer. (use /accept lawyer to accept the call)", sendername);
  6253. SendJobMessage(2, TEAM_AZTECAS_COLOR, str);
  6254. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Lawyer, wait for a reply.");
  6255. LawyerCall = playerid;
  6256. return 1;
  6257. }
  6258. else if(strcmp(x_nr, "mechanic", true) == 0)
  6259. {
  6260. new Mechanics = 0;
  6261. foreach( new i: Player )
  6262. {
  6263. if(IsPlayerConnected(i))
  6264. {
  6265. if(PlayerInfo[i][pJob] == 7 && JobDuty[i] == 1)
  6266. {
  6267. Mechanics += 1;
  6268. }
  6269. }
  6270. }
  6271. if(!(Mechanics >= 1))
  6272. {
  6273. SendClientMessage(playerid, COLOR_GREY, "There are no Mechanics on duty at the moment, try again later.");
  6274. return 1;
  6275. }
  6276. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6277. format(str, sizeof(str), "** %s is in need of a Mechanic. (use /accept mechanic to accept the call)", sendername);
  6278. SendJobMessage(7, TEAM_AZTECAS_COLOR, str);
  6279. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have called for a Mechanic, wait for a reply.");
  6280. MechanicCall = playerid;
  6281. return 1;
  6282. }
  6283. else if(strcmp(x_nr, "EMS", true) == 0)
  6284. {
  6285. if(pDeathState[playerid] != PLAYER_STATE_REVIVE) return SendClientMessage(playerid, COLOR_GREY, "You are not injured.");
  6286. if(PlayerCalledEMS[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are already awaiting the EMS.");
  6287. new count = 0;
  6288. foreach( new i: Player )if(PlayerInfo[i][pMember] == 4 || FakeFaction[i] == FACTION_FMD) count++;
  6289. if(count ==0) return SendClientMessage(playerid, COLOR_GREY, "There are currently no EMS online.");
  6290. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6291. format(str, sizeof(str), "Dispatch: %s is in need of a Paramedic (/EMScalls to list the calls).", PlayerICName(playerid));
  6292. SendParaMessage(COLOR_DOCTOR, str);
  6293. PlayerCalledEMS[playerid] = 1;
  6294. displayCenterHUDInfo(playerid, "~r~EMS Called.", 8); //display for 8 seconds
  6295. TextDrawHideForPlayer(playerid, Text:DieText);
  6296. TextDrawHideForPlayer(playerid, Text:InjuredText);
  6297. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* The emergency services have been notified of your position.");
  6298. }
  6299. else
  6300. {
  6301. SendClientMessage(playerid, COLOR_GREY, "Unknown service name.");
  6302. return 1;
  6303. }
  6304. return 1;
  6305. }
  6306. if(strcmp(cmd, "/tie", true) == 0)
  6307. {
  6308. if(PlayerInfo[playerid][pRope] < 1)
  6309. {
  6310. SendClientMessage(playerid, COLOR_GREY, "You don't have any rope, buy some from the 24/7.");
  6311. return 1;
  6312. }
  6313. tmp = strtok(cmdtext, idx);
  6314. if(!strlen(tmp))
  6315. {
  6316. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /tie [Playerid/PartOfName]");
  6317. return 1;
  6318. }
  6319. giveplayerid = ReturnUser(tmp);
  6320. if(IsPlayerConnected(giveplayerid))
  6321. {
  6322. if(giveplayerid != INVALID_PLAYER_ID)
  6323. {
  6324. if(giveplayerid == playerid)
  6325. {
  6326. SendClientMessage(playerid, COLOR_GREY, "You can't Tie yourself.");
  6327. return 1;
  6328. }
  6329. if(PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0 || PlayerBlinded[playerid] > 0 || PlayerTied[playerid] > 0)
  6330. {
  6331. SendClientMessage(playerid, COLOR_GREY, "You can not tie someone up at this time.");
  6332. return 1;
  6333. }
  6334. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  6335. {
  6336. new car = GetPlayerVehicleID(playerid);
  6337. if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
  6338. {
  6339. format(str, sizeof(str), "* You were tied up by %s.", PlayerICName(playerid));
  6340. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6341. format(str, sizeof(str), "* You tied %s up.", PlayerICName(giveplayerid));
  6342. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6343. format(str, sizeof(str), "* %s ties %s up, so he wont go anywhere.", PlayerICName(playerid), PlayerICName(giveplayerid));
  6344. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6345. displayCenterHUDInfo(giveplayerid, "~r~Tied.", 8); //display for 8 seconds
  6346. TogglePlayerControllable(giveplayerid, 0);
  6347. PlayerTied[giveplayerid] = 1;
  6348. PlayerTiedTime[giveplayerid] = 150;
  6349. PlayerInfo[playerid][pRope]--;
  6350. }
  6351. else
  6352. {
  6353. SendClientMessage(playerid, COLOR_GREY, "Either that player is not in your vehicle, or you're not the driver.");
  6354. return 1;
  6355. }
  6356. }
  6357. else
  6358. {
  6359. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6360. return 1;
  6361. }
  6362. }
  6363. }
  6364. else
  6365. {
  6366. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  6367. return 1;
  6368. }
  6369. return 1;
  6370. }
  6371. if(strcmp(cmd, "/usecigar", true) == 0)
  6372. {
  6373. if(PlayerInfo[playerid][pCigars] < 1)
  6374. {
  6375. SendClientMessage(playerid, COLOR_GREY, "You don't have any cigars, buy some from the 24/7.");
  6376. return 1;
  6377. }
  6378. if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || PlayerFrozen[playerid] != 0 || IsPlayerInAnyVehicle(playerid) || IsFishing[playerid] != 0 || GetPlayerAnimationIndex(playerid) == 1130)
  6379. {
  6380. SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  6381. return 1;
  6382. }
  6383. format(str, sizeof(str), "* %s takes out a cigar and lights it.", PlayerICName(playerid));
  6384. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6385. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  6386. PlayerInfo[playerid][pCigars]--;
  6387. return 1;
  6388. }
  6389. if(strcmp(cmd, "/usesprunk", true) == 0 || strcmp(cmd, "/usesoda", true) == 0)
  6390. {
  6391. if(PlayerBoxing[playerid] > 0)
  6392. {
  6393. SendClientMessage(playerid, COLOR_GREY, "You can't use soda whilst you're boxing.");
  6394. return 1;
  6395. }
  6396. if(PlayerInfo[playerid][pSprunk] < 1)
  6397. {
  6398. SendClientMessage(playerid, COLOR_GREY, "You don't have any soda, buy some from a 24/7 store or a fast food business.");
  6399. return 1;
  6400. }
  6401. if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || PlayerFrozen[playerid] != 0 || IsFishing[playerid] != 0 || GetPlayerAnimationIndex(playerid) == 1130)
  6402. {
  6403. SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
  6404. return 1;
  6405. }
  6406. if(IsNearBank(playerid) && bankactive) return SendClientMessage(playerid, COLOR_GREY, "You can not use this inside/outside the bank during an active bank robbery.");
  6407. format(str, sizeof(str), "* %s opens a can of soda.", PlayerICName(playerid));
  6408. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6409. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  6410. PlayerInfo[playerid][pSprunk]--;
  6411. return 1;
  6412. }
  6413. if(strcmp(cmd, "/untie", true) == 0)
  6414. {
  6415. tmp = strtok(cmdtext, idx);
  6416. if(!strlen(tmp))
  6417. {
  6418. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /untie [Playerid/PartOfName]");
  6419. return 1;
  6420. }
  6421. giveplayerid = ReturnUser(tmp);
  6422. if(IsPlayerConnected(giveplayerid))
  6423. {
  6424. if(giveplayerid != INVALID_PLAYER_ID)
  6425. {
  6426. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  6427. {
  6428. if(giveplayerid == playerid)
  6429. {
  6430. SendClientMessage(playerid, COLOR_GREY, "You can't untie yourself.");
  6431. return 1;
  6432. }
  6433. if(PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0 || PlayerBlinded[playerid] > 0 || PlayerTied[playerid] > 0)
  6434. {
  6435. SendClientMessage(playerid, COLOR_GREY, "You can not untie someone at this time.");
  6436. return 1;
  6437. }
  6438. if(PlayerTied[giveplayerid])
  6439. {
  6440. format(str, sizeof(str), "* You were untied by %s.", PlayerICName(playerid));
  6441. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  6442. format(str, sizeof(str), "* You untied %s.", PlayerICName(giveplayerid));
  6443. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6444. format(str, sizeof(str), "* %s loosens the ropes on %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
  6445. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6446. displayCenterHUDInfo(giveplayerid, "~g~Untied.", 8); //display for 8 seconds
  6447. TogglePlayerControllable(giveplayerid, 1);
  6448. PlayerTied[giveplayerid] = 0;
  6449. }
  6450. else
  6451. {
  6452. SendClientMessage(playerid, COLOR_GREY, "That player isn't Tied up.");
  6453. return 1;
  6454. }
  6455. }
  6456. else
  6457. {
  6458. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6459. return 1;
  6460. }
  6461. }
  6462. }
  6463. else
  6464. {
  6465. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  6466. return 1;
  6467. }
  6468. return 1;
  6469. }
  6470. if(strcmp(cmd, "/fare", true) == 0)
  6471. {
  6472. if( PlayerInfo[playerid][pJailed] > 0 ) {
  6473. return SendClientMessage( playerid, COLOR_GREY, "You cannot do this while you are imprisoned." );
  6474. }
  6475. if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pJob] == 14)
  6476. {
  6477. if(UseFareTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, " You must wait 10 seconds before you can use /fare again.");
  6478. if(TransportDuty[playerid] > 0)
  6479. {
  6480. if(TransportDuty[playerid] == 1)
  6481. {
  6482. TaxiDrivers -= 1;
  6483. }
  6484. else if(TransportDuty[playerid] == 2)
  6485. {
  6486. BusDrivers -= 1;
  6487. }
  6488. TransportDuty[playerid] = 0;
  6489. format(str, sizeof(str), "* You are now off duty and earned $%d. 30 percent of your wage was given to the taxi company.", TaxiDriverMoney[playerid]);
  6490. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  6491. GiveMoney(playerid, floatround((TaxiDriverMoney[playerid] * 70)/100));
  6492. TAXI += floatround((TaxiDriverMoney[playerid] * 30)/100);
  6493. SaveFactionBanks();
  6494. TaxiDriverMoney[playerid] = 0;
  6495. SetPlayerColor(playerid, TCOLOR_WHITE);
  6496. return 1;
  6497. }
  6498. new Veh = GetPlayerVehicleID(playerid);
  6499. if(IsATaxiCar(Veh) || PlayerInfo[playerid][pMember] == 10 && PlayerInfo[playerid][pRank] >= 4 || PlayerInfo[playerid][pLeader] == 10)
  6500. {
  6501. if(GetPlayerState(playerid) == 2)
  6502. {
  6503. tmp = strtok(cmdtext, idx);
  6504. if(!strlen(tmp))
  6505. {
  6506. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fare [price]");
  6507. return 1;
  6508. }
  6509. moneys = strvalEx(tmp);
  6510. if(moneys < 1 || moneys > 20)
  6511. {
  6512. SendClientMessage(playerid, COLOR_GREY, "Fare price must be between $1 and $20 per yard travelled.");
  6513. return 1;
  6514. }
  6515. TaxiDrivers += 1;
  6516. TransportDuty[playerid] = 1;
  6517. TransportValue[playerid] = moneys;
  6518. GetPlayerICName(playerid, sendername, sizeof(sendername));
  6519. format(str, sizeof(str), "Taxi Driver %s is On Duty, Fare: $%d, If you need a Taxi, type /service.", sendername, TransportValue[playerid]);
  6520. SetPlayerColor(playerid, TCOLOR_YELLOW);
  6521. OOCNews(TEAM_GROVE_COLOR, str);
  6522. UseFareTimer[playerid] = true;
  6523. SetTimerEx("Timer_UseFare", 10000, 0, "i", playerid);
  6524. }
  6525. else
  6526. {
  6527. SendClientMessage(playerid, COLOR_GREY, "You are not the Driver.");
  6528. return 1;
  6529. }
  6530. }
  6531. else if(IsABus(Veh) || PlayerInfo[playerid][pMember] == 10 && PlayerInfo[playerid][pRank] >= 4 || PlayerInfo[playerid][pLeader] == 10)
  6532. {
  6533. if(GetPlayerState(playerid) == 2)
  6534. {
  6535. tmp = strtok(cmdtext, idx);
  6536. if(!strlen(tmp))
  6537. {
  6538. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fare [price]");
  6539. return 1;
  6540. }
  6541. moneys = strvalEx(tmp);
  6542. if(moneys < 1 || moneys > 500)
  6543. {
  6544. SendClientMessage(playerid, COLOR_GREY, "Fare price must be between $1 and $500 for each yard travelled.");
  6545. return 1;
  6546. }
  6547. BusDrivers += 1;
  6548. TransportDuty[playerid] = 2;
  6549. TransportValue[playerid] = moneys;
  6550. GetPlayerICName(playerid, sendername, sizeof(sendername));
  6551. format(str, sizeof(str), "Bus Driver %s is On Duty, fare: $%d, If you need a Bus, type /service.", sendername, TransportValue[playerid]);
  6552. SetPlayerColor(playerid, TCOLOR_YELLOW);
  6553. OOCNews(TEAM_GROVE_COLOR, str);
  6554. UseFareTimer[playerid] = true;
  6555. SetTimerEx("Timer_UseFare", 10000, 0, "i", playerid);
  6556. }
  6557. else
  6558. {
  6559. SendClientMessage(playerid, COLOR_GREY, "You are not the Driver.");
  6560. return 1;
  6561. }
  6562. }
  6563. else
  6564. {
  6565. SendClientMessage(playerid, COLOR_GREY, "You are not in a Taxi / Bus, or a high enough Rank.");
  6566. }
  6567. }
  6568. else
  6569. {
  6570. SendClientMessage(playerid, COLOR_GREY, "You are not a Taxi / Bus Driver.");
  6571. return 1;
  6572. }
  6573. return 1;
  6574. }
  6575. /*if(strcmp(cmd, "/frisk", true) ==0)
  6576. {
  6577. new stringFrisk[5024];
  6578. tmp = strtok(cmdtext, idx);
  6579. if(!strlen(tmp))
  6580. {
  6581. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /frisk [playerid/PartOfName]");
  6582. return 1;
  6583. }
  6584. giveplayerid = ReturnUser(tmp);
  6585. if(IsPlayerConnected(giveplayerid))
  6586. {
  6587. if(giveplayerid != INVALID_PLAYER_ID)
  6588. {
  6589. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  6590. {
  6591. if(GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6592. //if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GREY, "You cannot frisk yourself.");
  6593. if(PlayerTied[giveplayerid] || PlayerCuffed[giveplayerid] || PlayerTazed[giveplayerid])
  6594. {
  6595. new WeaponName[65];
  6596. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6597. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6598. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  6599. format(stringFrisk, sizeof(stringFrisk), "*** %s's Items ***", giveplayer);
  6600. SendClientMessage(playerid, COLOR_WHITE, stringFrisk);
  6601. if(PlayerInfo[giveplayerid][pCash] > 0){
  6602. format(stringFrisk, sizeof(stringFrisk), "Money (%d)", PlayerInfo[giveplayerid][pCash]);
  6603. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6604. }
  6605. if(PlayerInfo[giveplayerid][pCannabis] > 0) {
  6606. format(stringFrisk, sizeof(stringFrisk), "Cannabis (%d.0g)", PlayerInfo[giveplayerid][pCannabis]);
  6607. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6608. }
  6609. if(PlayerInfo[giveplayerid][pCocaine] > 0) {
  6610. format(stringFrisk, sizeof(stringFrisk), "Cocaine (%d.0g)", PlayerInfo[giveplayerid][pCocaine]);
  6611. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6612. }
  6613. if(PlayerInfo[giveplayerid][pMeth] > 0) {
  6614. format(stringFrisk, sizeof(stringFrisk), "Meth (%d.0g)", PlayerInfo[giveplayerid][pMeth]);
  6615. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6616. }
  6617. if(PlayerInfo[giveplayerid][pXanax] > 0) {
  6618. format(stringFrisk, sizeof(stringFrisk), "Xanax (%d pills)", PlayerInfo[giveplayerid][pXanax]);
  6619. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6620. }
  6621. if(PlayerInfo[giveplayerid][pPromethazine] > 0) {
  6622. format(stringFrisk, sizeof(stringFrisk), "Promethazine (%d.0 fl oz)", PlayerInfo[giveplayerid][pPromethazine]);
  6623. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6624. }
  6625. if(PlayerInfo[giveplayerid][pCodeine] > 0) {
  6626. format(stringFrisk, sizeof(stringFrisk), "Codeine (%d.0 fl oz)", PlayerInfo[giveplayerid][pCodeine]);
  6627. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6628. }
  6629. if(PlayerInfo[giveplayerid][pLean] > 0) {
  6630. format(stringFrisk, sizeof(stringFrisk), "Mixed substance (Promethazine/Codeine) (%d.0g)", PlayerInfo[giveplayerid][pLean]);
  6631. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6632. }
  6633. if(PlayerInfo[giveplayerid][pPotSeeds] > 0) {
  6634. format(stringFrisk, sizeof(stringFrisk), "Seeds (%dg)", PlayerInfo[giveplayerid][pPotSeeds]);
  6635. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6636. }
  6637. if(PlayerInfo[giveplayerid][pMats] > 0) {
  6638. format(stringFrisk, sizeof(stringFrisk), "Materials (%d)", PlayerInfo[giveplayerid][pMats]);
  6639. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6640. }
  6641. if(Packages[playerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Materials Packages");
  6642. if(Crates[playerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Drug Crates");
  6643. if(Fishes[giveplayerid][pWeight1] > 0 || Fishes[giveplayerid][pWeight2] > 0 || Fishes[giveplayerid][pWeight3] > 0 || Fishes[giveplayerid][pWeight4] > 0 || Fishes[giveplayerid][pWeight5] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Fish");
  6644. if(PlayerInfo[giveplayerid][pPhoneBook] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Phone Book");
  6645. if(PlayerInfo[giveplayerid][piPod] > 0) SendClientMessage(playerid, COLOR_GRAD3, "iPod");
  6646. if(PlayerInfo[giveplayerid][pPnumber] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Cellphone");
  6647. if(PlayerInfo[giveplayerid][pSpraycan] > 0) {
  6648. format(stringFrisk, sizeof(stringFrisk), "Spraycans (%d)", PlayerInfo[giveplayerid][pSpraycan]);
  6649. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6650. }
  6651. if(PlayerInfo[giveplayerid][pScrew] > 0) {
  6652. format(stringFrisk, sizeof(stringFrisk), "Screwdrivers (%d)", PlayerInfo[giveplayerid][pScrew]);
  6653. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6654. }
  6655. if(PlayerInfo[giveplayerid][pDice] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Dice");
  6656. if(PlayerInfo[giveplayerid][pRope] > 0) {
  6657. format(stringFrisk, sizeof(stringFrisk), "Rope (%d)", PlayerInfo[giveplayerid][pRope]);
  6658. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6659. }
  6660. if(PlayerInfo[giveplayerid][pGag] > 0) {
  6661. format(stringFrisk, sizeof(stringFrisk), "Gag (%d)", PlayerInfo[giveplayerid][pGag]);
  6662. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6663. }
  6664. if(PlayerInfo[giveplayerid][pCigars] > 0) {
  6665. format(stringFrisk, sizeof(stringFrisk), "Cigars (%d)", PlayerInfo[giveplayerid][pCigars]);
  6666. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6667. }
  6668. if(PlayerInfo[giveplayerid][pSprunk] > 0) {
  6669. format(stringFrisk, sizeof(stringFrisk), "Sprunk (%d)", PlayerInfo[giveplayerid][pSprunk]);
  6670. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6671. }
  6672. if(PlayerInfo[giveplayerid][pBombs] > 0) SendClientMessage(playerid, COLOR_BITEM, "C4 Explosives");
  6673. //if(PlayerInfo[giveplayerid][pPoison] > 0) SendClientMessage(playerid, COLOR_BITEM, "Poison");
  6674. if(PlayerInfo[giveplayerid][pWire] > 0) SendClientMessage(playerid, COLOR_BITEM, "Wire");
  6675. if(PlayerInfo[giveplayerid][pJammer] > 0) SendClientMessage(playerid, COLOR_BITEM, "Signal Jammer");
  6676. if(PlayerInfo[giveplayerid][pBlindfolds] > 0) {
  6677. format(stringFrisk, sizeof(stringFrisk), "Blindfolds (%d)", PlayerInfo[giveplayerid][pBlindfolds]);
  6678. SendClientMessage(playerid, COLOR_GREY, stringFrisk);
  6679. }
  6680. if(PlayerInfo[giveplayerid][pGun0] != 0)
  6681. {
  6682. GetWeaponName(PlayerInfo[giveplayerid][pGun0], WeaponName, 64);
  6683. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6684. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6685. }
  6686. if(PlayerInfo[giveplayerid][pPortMDC] != 0)
  6687. {
  6688. SendClientMessage(playerid, COLOR_BITEM, "Portable MDC");
  6689. }
  6690. if(PlayerInfo[giveplayerid][pGun1] != 0)
  6691. {
  6692. GetWeaponName(PlayerInfo[giveplayerid][pGun1], WeaponName, 64);
  6693. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6694. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6695. }
  6696. if(PlayerInfo[giveplayerid][pGun2] != 0)
  6697. {
  6698. GetWeaponName(PlayerInfo[giveplayerid][pGun2], WeaponName, 64);
  6699. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6700. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6701. }
  6702. if(PlayerInfo[giveplayerid][pGun3] != 0)
  6703. {
  6704. GetWeaponName(PlayerInfo[giveplayerid][pGun3], WeaponName, 64);
  6705. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6706. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6707. }
  6708. if(PlayerInfo[giveplayerid][pGun4] != 0)
  6709. {
  6710. GetWeaponName(PlayerInfo[giveplayerid][pGun4], WeaponName, 64);
  6711. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6712. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6713. }
  6714. if(PlayerInfo[giveplayerid][pGun5] != 0)
  6715. {
  6716. GetWeaponName(PlayerInfo[giveplayerid][pGun5], WeaponName, 64);
  6717. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6718. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6719. }
  6720. if(PlayerInfo[giveplayerid][pGun6] != 0)
  6721. {
  6722. GetWeaponName(PlayerInfo[giveplayerid][pGun6], WeaponName, 64);
  6723. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6724. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6725. }
  6726. if(PlayerInfo[giveplayerid][pGun7] != 0)
  6727. {
  6728. GetWeaponName(PlayerInfo[giveplayerid][pGun7], WeaponName, 64);
  6729. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6730. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6731. }
  6732. if(PlayerInfo[giveplayerid][pGun8] != 0)
  6733. {
  6734. GetWeaponName(PlayerInfo[giveplayerid][pGun8], WeaponName, 64);
  6735. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6736. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6737. }
  6738. if(PlayerInfo[giveplayerid][pGun9] != 0)
  6739. {
  6740. GetWeaponName(PlayerInfo[giveplayerid][pGun9], WeaponName, 64);
  6741. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6742. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6743. }
  6744. if(PlayerInfo[giveplayerid][pGun10] != 0)
  6745. {
  6746. GetWeaponName(PlayerInfo[giveplayerid][pGun10], WeaponName, 64);
  6747. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6748. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6749. }
  6750. if(PlayerInfo[giveplayerid][pGun11] == 44)
  6751. {
  6752. SendClientMessage(playerid, COLOR_GRAD3, "Nightvision Goggles");
  6753. }
  6754. if(PlayerInfo[giveplayerid][pGun11] == 45)
  6755. {
  6756. SendClientMessage(playerid, COLOR_GRAD3, "Infared Goggles");
  6757. }
  6758. if(PlayerInfo[giveplayerid][pGun12] != 0)
  6759. {
  6760. GetWeaponName(PlayerInfo[giveplayerid][pGun12], WeaponName, 64);
  6761. format(stringFrisk, sizeof(stringFrisk), "%s", WeaponName);
  6762. SendClientMessage(playerid, COLOR_BITEM, stringFrisk);
  6763. }
  6764. for(new weap = 1; weap < 47; weap++)
  6765. {
  6766. if(HaveAdminWeapon(giveplayerid, weap) == weap)
  6767. {
  6768. GetWeaponName(weap, WeaponName, 64);
  6769. format(stringFrisk, sizeof(stringFrisk), "{FF0000}Admin Given %s", WeaponName);
  6770. SendClientMessage(playerid, COLOR_WHITE, stringFrisk);
  6771. }
  6772. }
  6773. if(Crates[giveplayerid] == 1)
  6774. {
  6775. SendClientMessage(playerid, COLOR_BITEM, "Drugs Crate");
  6776. }
  6777. if(PlayerInfo[giveplayerid][pHasCBomb])
  6778. {
  6779. SendClientMessage(playerid, COLOR_BITEM, "C2 explosives");
  6780. }
  6781. LastFriskedPlayer[playerid] = giveplayerid;
  6782. format(stringFrisk, sizeof(stringFrisk), "* %s has frisked %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
  6783. ProxDetector(30.0, playerid, stringFrisk, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  6784. }
  6785. else
  6786. {
  6787. format(stringFrisk, sizeof(stringFrisk), "* You offered to frisk %s.", PlayerICName(giveplayerid));
  6788. SendClientMessage(playerid, COLOR_LIGHTBLUE, stringFrisk);
  6789. format(stringFrisk, sizeof(stringFrisk), "* %s wants to frisk you, (type /accept frisk) to accept.", PlayerICName(playerid));
  6790. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, stringFrisk);
  6791. FriskOffer[giveplayerid] = playerid;
  6792. }
  6793. }
  6794. else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6795. }
  6796. }
  6797. else return SendClientMessage(playerid, COLOR_GREY, "That player is offline.");
  6798. return 1;
  6799. }*/
  6800. if(strcmp(cmd, "/frisk", true) ==0)
  6801. {
  6802. tmp = strtok(cmdtext, idx);
  6803. if(!strlen(tmp))
  6804. {
  6805. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /frisk [playerid/PartOfName]");
  6806. return 1;
  6807. }
  6808. giveplayerid = ReturnUser(tmp);
  6809. if(IsPlayerConnected(giveplayerid))
  6810. {
  6811. if(giveplayerid != INVALID_PLAYER_ID)
  6812. {
  6813. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  6814. {
  6815. if(GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  6816. //if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GREY, "You cannot frisk yourself.");
  6817. if(PlayerTied[giveplayerid] || PlayerCuffed[giveplayerid] || PlayerTazed[giveplayerid])
  6818. {
  6819. new WeaponName[65];
  6820. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  6821. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  6822. SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
  6823. format(str, sizeof(str), "*** %s's Items ***", giveplayer);
  6824. SendClientMessage(playerid, COLOR_WHITE, str);
  6825. if(PlayerInfo[giveplayerid][pCash] > 0){
  6826. format(str, sizeof(str), "Money (%d)", PlayerInfo[giveplayerid][pCash]);
  6827. SendClientMessage(playerid, COLOR_GREY, str);
  6828. }
  6829. if(PlayerInfo[giveplayerid][pCannabis] > 0) {
  6830. format(str, sizeof(str), "Cannabis (%d.0g)", PlayerInfo[giveplayerid][pCannabis]);
  6831. SendClientMessage(playerid, COLOR_BITEM, str);
  6832. }
  6833. if(PlayerInfo[giveplayerid][pCocaine] > 0) {
  6834. format(str, sizeof(str), "Cocaine (%d.0g)", PlayerInfo[giveplayerid][pCocaine]);
  6835. SendClientMessage(playerid, COLOR_BITEM, str);
  6836. }
  6837. if(PlayerInfo[giveplayerid][pMeth] > 0) {
  6838. format(str, sizeof(str), "Meth (%d.0g)", PlayerInfo[giveplayerid][pMeth]);
  6839. SendClientMessage(playerid, COLOR_BITEM, str);
  6840. }
  6841. if(PlayerInfo[giveplayerid][pXanax] > 0) {
  6842. format(str, sizeof(str), "Xanax (%d pills)", PlayerInfo[giveplayerid][pXanax]);
  6843. SendClientMessage(playerid, COLOR_BITEM, str);
  6844. }
  6845. if(PlayerInfo[giveplayerid][pPromethazine] > 0) {
  6846. format(str, sizeof(str), "Promethazine (%d.0 fl oz)", PlayerInfo[giveplayerid][pPromethazine]);
  6847. SendClientMessage(playerid, COLOR_BITEM, str);
  6848. }
  6849. if(PlayerInfo[giveplayerid][pCodeine] > 0) {
  6850. format(str, sizeof(str), "Codeine (%d.0 fl oz)", PlayerInfo[giveplayerid][pCodeine]);
  6851. SendClientMessage(playerid, COLOR_BITEM, str);
  6852. }
  6853. if(PlayerInfo[giveplayerid][pLean] > 0) {
  6854. format(str, sizeof(str), "Mixed substance (Promethazine/Codeine) (%d.0g)", PlayerInfo[giveplayerid][pLean]);
  6855. SendClientMessage(playerid, COLOR_BITEM, str);
  6856. }
  6857. if(PlayerInfo[giveplayerid][pPotSeeds] > 0) {
  6858. format(str, sizeof(str), "Seeds (%dg)", PlayerInfo[giveplayerid][pPotSeeds]);
  6859. SendClientMessage(playerid, COLOR_BITEM, str);
  6860. }
  6861. if(PlayerInfo[giveplayerid][pMats] > 0) {
  6862. format(str, sizeof(str), "Materials (%d)", PlayerInfo[giveplayerid][pMats]);
  6863. SendClientMessage(playerid, COLOR_BITEM, str);
  6864. }
  6865. if(Packages[giveplayerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Materials Packages");
  6866. if(Crates[giveplayerid] > 0) SendClientMessage(playerid, COLOR_BITEM, "Drug Crates");
  6867. if(Fishes[giveplayerid][pWeight1] > 0 || Fishes[giveplayerid][pWeight2] > 0 || Fishes[giveplayerid][pWeight3] > 0 || Fishes[giveplayerid][pWeight4] > 0 || Fishes[giveplayerid][pWeight5] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Fish");
  6868. if(PlayerInfo[giveplayerid][pPhoneBook] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Phone Book");
  6869. if(PlayerInfo[giveplayerid][piPod] > 0) SendClientMessage(playerid, COLOR_GRAD3, "iPod");
  6870. if(PlayerInfo[giveplayerid][pPnumber] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Cellphone");
  6871. if(PlayerInfo[giveplayerid][pSpraycan] > 0) {
  6872. format(str, sizeof(str), "Spraycans (%d)", PlayerInfo[giveplayerid][pSpraycan]);
  6873. SendClientMessage(playerid, COLOR_GREY, str);
  6874. }
  6875. if(PlayerInfo[giveplayerid][pScrew] > 0) {
  6876. format(str, sizeof(str), "Screwdrivers (%d)", PlayerInfo[giveplayerid][pScrew]);
  6877. SendClientMessage(playerid, COLOR_GREY, str);
  6878. }
  6879. if(PlayerInfo[giveplayerid][pDice] > 0) SendClientMessage(playerid, COLOR_GRAD3, "Dice");
  6880. if(PlayerInfo[giveplayerid][pRope] > 0) {
  6881. format(str, sizeof(str), "Rope (%d)", PlayerInfo[giveplayerid][pRope]);
  6882. SendClientMessage(playerid, COLOR_GREY, str);
  6883. }
  6884. if(PlayerInfo[giveplayerid][pGag] > 0) {
  6885. format(str, sizeof(str), "Gag (%d)", PlayerInfo[giveplayerid][pGag]);
  6886. SendClientMessage(playerid, COLOR_GREY, str);
  6887. }
  6888. if(PlayerInfo[giveplayerid][pCigars] > 0) {
  6889. format(str, sizeof(str), "Cigars (%d)", PlayerInfo[giveplayerid][pCigars]);
  6890. SendClientMessage(playerid, COLOR_GREY, str);
  6891. }
  6892. if(PlayerInfo[giveplayerid][pSprunk] > 0) {
  6893. format(str, sizeof(str), "Sprunk (%d)", PlayerInfo[giveplayerid][pSprunk]);
  6894. SendClientMessage(playerid, COLOR_GREY, str);
  6895. }
  6896. if(PlayerInfo[giveplayerid][pBombs] > 0) SendClientMessage(playerid, COLOR_BITEM, "C4 Explosives");
  6897. //if(PlayerInfo[giveplayerid][pPoison] > 0) SendClientMessage(playerid, COLOR_BITEM, "Poison");
  6898. if(PlayerInfo[giveplayerid][pWire] > 0) SendClientMessage(playerid, COLOR_BITEM, "Wire");
  6899. if(PlayerInfo[giveplayerid][pJammer] > 0) SendClientMessage(playerid, COLOR_BITEM, "Signal Jammer");
  6900. if(PlayerInfo[giveplayerid][pBlindfolds] > 0) {
  6901. format(str, sizeof(str), "Blindfolds (%d)", PlayerInfo[giveplayerid][pBlindfolds]);
  6902. SendClientMessage(playerid, COLOR_GREY, str);
  6903. }
  6904. if(PlayerInfo[giveplayerid][pGun0] != 0)
  6905. {
  6906. GetWeaponName(PlayerInfo[giveplayerid][pGun0], WeaponName, 64);
  6907. format(str, sizeof(str), "%s", WeaponName);
  6908. SendClientMessage(playerid, COLOR_BITEM, str);
  6909. }
  6910. if(PlayerInfo[giveplayerid][pPortMDC] != 0)
  6911. {
  6912. SendClientMessage(playerid, COLOR_BITEM, "Portable MDC");
  6913. }
  6914. if(PlayerInfo[giveplayerid][pGun1] != 0)
  6915. {
  6916. GetWeaponName(PlayerInfo[giveplayerid][pGun1], WeaponName, 64);
  6917. format(str, sizeof(str), "%s", WeaponName);
  6918. SendClientMessage(playerid, COLOR_BITEM, str);
  6919. }
  6920. if(PlayerInfo[giveplayerid][pGun2] != 0)
  6921. {
  6922. GetWeaponName(PlayerInfo[giveplayerid][pGun2], WeaponName, 64);
  6923. format(str, sizeof(str), "%s", WeaponName);
  6924. SendClientMessage(playerid, COLOR_BITEM, str);
  6925. }
  6926. if(PlayerInfo[giveplayerid][pGun3] != 0)
  6927. {
  6928. GetWeaponName(PlayerInfo[giveplayerid][pGun3], WeaponName, 64);
  6929. format(str, sizeof(str), "%s", WeaponName);
  6930. SendClientMessage(playerid, COLOR_BITEM, str);
  6931. }
  6932. if(PlayerInfo[giveplayerid][pGun4] != 0)
  6933. {
  6934. GetWeaponName(PlayerInfo[giveplayerid][pGun4], WeaponName, 64);
  6935. format(str, sizeof(str), "%s", WeaponName);
  6936. SendClientMessage(playerid, COLOR_BITEM, str);
  6937. }
  6938. if(PlayerInfo[giveplayerid][pGun5] != 0)
  6939. {
  6940. GetWeaponName(PlayerInfo[giveplayerid][pGun5], WeaponName, 64);
  6941. format(str, sizeof(str), "%s", WeaponName);
  6942. SendClientMessage(playerid, COLOR_BITEM, str);
  6943. }
  6944. if(PlayerInfo[giveplayerid][pGun6] != 0)
  6945. {
  6946. GetWeaponName(PlayerInfo[giveplayerid][pGun6], WeaponName, 64);
  6947. format(str, sizeof(str), "%s", WeaponName);
  6948. SendClientMessage(playerid, COLOR_BITEM, str);
  6949. }
  6950. if(PlayerInfo[giveplayerid][pGun7] != 0)
  6951. {
  6952. GetWeaponName(PlayerInfo[giveplayerid][pGun7], WeaponName, 64);
  6953. format(str, sizeof(str), "%s", WeaponName);
  6954. SendClientMessage(playerid, COLOR_BITEM, str);
  6955. }
  6956. if(PlayerInfo[giveplayerid][pGun8] != 0)
  6957. {
  6958. GetWeaponName(PlayerInfo[giveplayerid][pGun8], WeaponName, 64);
  6959. format(str, sizeof(str), "%s", WeaponName);
  6960. SendClientMessage(playerid, COLOR_BITEM, str);
  6961. }
  6962. if(PlayerInfo[giveplayerid][pGun9] != 0)
  6963. {
  6964. GetWeaponName(PlayerInfo[giveplayerid][pGun9], WeaponName, 64);
  6965. format(str, sizeof(str), "%s", WeaponName);
  6966. SendClientMessage(playerid, COLOR_BITEM, str);
  6967. }
  6968. if(PlayerInfo[giveplayerid][pGun10] != 0)
  6969. {
  6970. GetWeaponName(PlayerInfo[giveplayerid][pGun10], WeaponName, 64);
  6971. format(str, sizeof(str), "%s", WeaponName);
  6972. SendClientMessage(playerid, COLOR_BITEM, str);
  6973. }
  6974. if(PlayerInfo[giveplayerid][pGun11] == 44)
  6975. {
  6976. SendClientMessage(playerid, COLOR_GRAD3, "Nightvision Goggles");
  6977. }
  6978. if(PlayerInfo[giveplayerid][pGun11] == 45)
  6979. {
  6980. SendClientMessage(playerid, COLOR_GRAD3, "Infared Goggles");
  6981. }
  6982. if(PlayerInfo[giveplayerid][pGun12] != 0)
  6983. {
  6984. GetWeaponName(PlayerInfo[giveplayerid][pGun12], WeaponName, 64);
  6985. format(str, sizeof(str), "%s", WeaponName);
  6986. SendClientMessage(playerid, COLOR_BITEM, str);
  6987. }
  6988. for(new weap = 1; weap < 47; weap++)
  6989. {
  6990. if(HaveAdminWeapon(giveplayerid, weap) == weap)
  6991. {
  6992. GetWeaponName(weap, WeaponName, 64);
  6993. format(str, sizeof(str), "{FF0000}Admin Given %s", WeaponName);
  6994. SendClientMessage(playerid, COLOR_WHITE, str);
  6995. }
  6996. }
  6997. if(Crates[giveplayerid] == 1)
  6998. {
  6999. SendClientMessage(playerid, COLOR_BITEM, "Drugs Crate");
  7000. }
  7001. if(PlayerInfo[giveplayerid][pHasCBomb])
  7002. {
  7003. SendClientMessage(playerid, COLOR_BITEM, "C2 explosives");
  7004. }
  7005. LastFriskedPlayer[playerid] = giveplayerid;
  7006. format(str, sizeof(str), "* %s has frisked %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
  7007. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7008. }
  7009. else
  7010. {
  7011. format(str, sizeof(str), "* You offered to frisk %s.", PlayerICName(giveplayerid));
  7012. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7013. format(str, sizeof(str), "* %s wants to frisk you, (type /accept frisk) to accept.", PlayerICName(playerid));
  7014. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7015. FriskOffer[giveplayerid] = playerid;
  7016. }
  7017. }
  7018. else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  7019. }
  7020. }
  7021. else return SendClientMessage(playerid, COLOR_GREY, "That player is offline.");
  7022. return 1;
  7023. }
  7024. if(strcmp(cmd, "/sellgun", true) == 0)
  7025. {
  7026. if(PlayerInfo[playerid][pJailed] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can not sell weapons while in jail!");
  7027. if(PlayerInfo[playerid][pJob] != 9 && PlayerInfo[playerid][pGroup] != GROUP_CRIME) return SendClientMessage(playerid, COLOR_GREY, "You are not a Arms Dealer!");
  7028. if(PlayerCuffed[playerid] == 1)return SendClientMessage(playerid, COLOR_GREY, "You can't do this whilst cuffed.");
  7029. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_GREY, "You cannot use this at this time");
  7030. if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst inside of a vehicle.");
  7031. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use the command now.");
  7032. tmp = strtok(cmdtext, idx);
  7033. if(!strlen(tmp))
  7034. {
  7035. SendWeaponMessage(playerid);
  7036. return 1;
  7037. }
  7038. giveplayerid = ReturnUser(tmp);
  7039. if(IsPlayerConnected(giveplayerid))
  7040. {
  7041. if(giveplayerid != INVALID_PLAYER_ID)
  7042. {
  7043. tmp = strtok(cmdtext, idx);
  7044. if(!strlen(tmp))
  7045. {
  7046. SendWeaponMessage(playerid);
  7047. return 1;
  7048. }
  7049. }
  7050. if(SellGunTimer[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 2)
  7051. return SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute before selling another weapon !");
  7052. if(IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid))
  7053. {
  7054. if(IsPlayerInAnyVehicle(giveplayerid))return SendClientMessage(playerid, COLOR_GREY, "You can't sell a vehicle to them whilst they are driving.");
  7055. /*if(GetPlayerVehicleSeat(giveplayerid) == 0) {
  7056. return SendClientMessage(playerid, COLOR_GRAD2, " You can not sell a weapon to someone while they are driving !");
  7057. }*/
  7058. new weapon, price, loggun;
  7059. if(strcmp(tmp, "knuckles", true) == 0)
  7060. {
  7061. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7062. weapon = 1;
  7063. price = 25;
  7064. }
  7065. else if(strcmp(tmp, "golfclub", true) == 0)
  7066. {
  7067. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7068. weapon = 2;
  7069. price = 25;
  7070. }
  7071. else if(strcmp(tmp, "baseballbat", true) == 0)
  7072. {
  7073. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7074. weapon = 5;
  7075. price = 25;
  7076. }
  7077. else if(strcmp(tmp, "shovel", true) == 0)
  7078. {
  7079. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7080. weapon = 6;
  7081. price = 25;
  7082. }
  7083. else if(strcmp(tmp, "poolcue", true) == 0)
  7084. {
  7085. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7086. weapon = 7;
  7087. price = 25;
  7088. }
  7089. else if(strcmp(tmp, "katana", true) == 0)
  7090. {
  7091. if(PlayerInfo[playerid][pMats] < 50) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7092. weapon = 8;
  7093. price = 50;
  7094. }
  7095. else if(strcmp(tmp, "dildo", true) == 0)
  7096. {
  7097. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7098. weapon = 10;
  7099. price = 25;
  7100. }
  7101. else if(strcmp(tmp, "flowers", true) == 0)
  7102. {
  7103. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7104. weapon = 14;
  7105. price = 25;
  7106. }
  7107. else if(strcmp(tmp, "cane", true) == 0)
  7108. {
  7109. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7110. weapon = 15;
  7111. price = 25;
  7112. }
  7113. else if(strcmp(tmp, "parachute", true) == 0)
  7114. {
  7115. if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7116. weapon = 46;
  7117. price = 25;
  7118. }
  7119. else if(strcmp(tmp, "colt45", true) == 0)
  7120. {
  7121. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7122. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7123. if(PlayerInfo[playerid][pMats] < 150) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7124. if(PlayerInfo[giveplayerid][pGun2] == 22 || PlayerInfo[giveplayerid][pGun2] == 24) return SendClientMessage(playerid, COLOR_GREY, "That player is already carrying a weapon in that slot !");
  7125. weapon = 22;
  7126. price = 150;
  7127. }
  7128. else if(strcmp(tmp, "shotgun", true) == 0)
  7129. {
  7130. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7131. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7132. new level = PlayerInfo[playerid][pArmsSkill];
  7133. if(level < 50) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7134. if(PlayerInfo[playerid][pMats] < 200) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7135. if(PlayerInfo[giveplayerid][pGun3] == 27) return SendClientMessage(playerid, COLOR_GREY, "That player is already carrying a weapon in that slot !");
  7136. weapon = 25;
  7137. price = 200;
  7138. }
  7139. else if(strcmp(tmp, "rifle", true) == 0)
  7140. {
  7141. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7142. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7143. new level = PlayerInfo[playerid][pArmsSkill];
  7144. if(level < 50) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7145. if(PlayerInfo[playerid][pMats] < 1000) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7146. if(PlayerInfo[giveplayerid][pGun6] == 34) return SendClientMessage(playerid, COLOR_GREY, "That player is already carrying a weapon in that slot !");
  7147. weapon = 33;
  7148. price = 1000;
  7149. }
  7150. else if(strcmp(tmp, "mp5", true) == 0)
  7151. {
  7152. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7153. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7154. new level = PlayerInfo[playerid][pArmsSkill];
  7155. if(level < 100) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7156. if(PlayerInfo[playerid][pMats] < 400) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7157. weapon = 29;
  7158. price = 400;
  7159. }
  7160. else if(strcmp(tmp, "uzi", true) == 0)
  7161. {
  7162. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7163. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7164. new level = PlayerInfo[playerid][pArmsSkill];
  7165. if(level < 100) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7166. if(PlayerInfo[playerid][pMats] < 1500) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7167. weapon = 28;
  7168. price = 1500;
  7169. }
  7170. else if(strcmp(tmp, "tec9", true) == 0)
  7171. {
  7172. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7173. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7174. new level = PlayerInfo[playerid][pArmsSkill];
  7175. if(level < 100) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7176. if(PlayerInfo[playerid][pMats] < 1500) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7177. weapon = 32;
  7178. price = 1500;
  7179. }
  7180. else if(strcmp(tmp, "deagle", true) == 0)
  7181. {
  7182. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7183. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7184. new level = PlayerInfo[playerid][pArmsSkill];
  7185. if(level < 200) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7186. if(PlayerInfo[playerid][pMats] < 2000) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7187. weapon = 24;
  7188. price = 2000;
  7189. }
  7190. else if(strcmp(tmp, "sdpistol", true) == 0)
  7191. {
  7192. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7193. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7194. new level = PlayerInfo[playerid][pArmsSkill];
  7195. if(level < 200) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7196. if(PlayerInfo[playerid][pMats] < 1500) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7197. weapon = 23;
  7198. price = 1500;
  7199. }
  7200. else if(strcmp(tmp, "sawnoff", true) == 0)
  7201. {
  7202. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7203. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7204. new level = PlayerInfo[playerid][pArmsSkill];
  7205. if(level < 200) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7206. if(PlayerInfo[playerid][pMats] < 1000) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7207. weapon = 26;
  7208. price = 1000;
  7209. }
  7210. else if(strcmp(tmp, "ak47", true) == 0)
  7211. {
  7212. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7213. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7214. new level = PlayerInfo[playerid][pArmsSkill];
  7215. if(level < 400) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7216. if(PlayerInfo[playerid][pMats] < 5000) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7217. if(PlayerInfo[giveplayerid][pGun5] == 31) return SendClientMessage(playerid, COLOR_GREY, "That player is already carrying a weapon in that slot !");
  7218. weapon = 30;
  7219. price = 5000;
  7220. }
  7221. else if(PlayerInfo[playerid][pFMember] != 255) {
  7222. if(strcmp(tmp, "m4", true) == 0)
  7223. {
  7224. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7225. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7226. new level = PlayerInfo[playerid][pArmsSkill];
  7227. if(level < 400) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7228. if(PlayerInfo[playerid][pMats] < 5500) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7229. weapon = 31;
  7230. price = 5500;
  7231. }
  7232. else if(strcmp(tmp, "sniper", true) == 0)
  7233. {
  7234. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7235. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7236. // Still requires level 4 arms dealer to craft this
  7237. new level = PlayerInfo[playerid][pArmsSkill];
  7238. if(level < 400) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7239. if(PlayerInfo[playerid][pMats] < 7500) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7240. weapon = 34;
  7241. price = 7500;
  7242. }
  7243. else // bug fix for fam members being able to give any input. the script will check if they typed all of the weapons above and then if not, if they are in a family..
  7244. { // -.. then they could make m4 or sniper. however, where is the else for that? there is no else, so the code continues below and does the part of "You have received a WEAPONNAME from SELLER"
  7245. SendClientMessage(playerid, COLOR_GREY, "Invalid weapon name !");
  7246. return 1;
  7247. }
  7248. }
  7249. /*
  7250. else if(strcmp(tmp, "spas12", true) == 0)
  7251. {
  7252. if(giveplayerid == playerid && PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can get a weapon."); //selling to yourself
  7253. if(PlayerInfo[giveplayerid][pConnectTime] < 2 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "That player must be playing for at least 2 hours before receiving a weapon."); //selling to another
  7254. new level = PlayerInfo[playerid][pArmsSkill];
  7255. if(level < 400) return SendClientMessage(playerid, COLOR_GREY, "You are not the required level to create that !");
  7256. if(PlayerInfo[playerid][pMats] < 10000) return SendClientMessage(playerid, COLOR_GREY, "Not enough Materials for that Weapon !");
  7257. weapon = 27;
  7258. price = 10000;
  7259. }*/
  7260. else
  7261. {
  7262. SendClientMessage(playerid, COLOR_GREY, "Invalid weapon name !");
  7263. return 1;
  7264. }
  7265. if(weapon != 0) //sell gun
  7266. {
  7267. GivePlayerGun(giveplayerid, weapon);
  7268. }
  7269. if(weapon ==27 ||weapon ==34 ||weapon ==31 ||weapon ==30 ||weapon ==24 ||weapon ==33 ||weapon ==29 ||weapon ==25 ||weapon ==22) //increase level
  7270. {
  7271. if(weapon != 23 || weapon != 25)
  7272. {
  7273. loggun = 1;
  7274. }
  7275. PlayerInfo[playerid][pArmsSkill]++;
  7276. }
  7277. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  7278. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7279. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  7280. PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  7281. format(str, sizeof(str), "You have received a %s from %s.", tmp, sendername);
  7282. SendClientMessage(giveplayerid, COLOR_GRAD1, str);
  7283. format(str, sizeof(str), "* %s creates a weapon from materials and hands it to %s.", sendername, giveplayer);
  7284. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7285. if(loggun == 1)
  7286. {
  7287. format(str, sizeof(str), "%s has sold a %s to %s", sendername, tmp, giveplayer);
  7288. PayLog(str);
  7289. }
  7290. PlayerInfo[playerid][pMats] -= price;
  7291. if(PlayerInfo[playerid][pAdmin] < 2)
  7292. {
  7293. SellGunTimer[playerid] = 1;
  7294. SetTimerEx("Timer_SellGun", 60 *1000, 0, "i", playerid);
  7295. }
  7296. if(PlayerInfo[playerid][pArmsSkill] == 50)
  7297. {
  7298. SendClientMessage(playerid, COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 2, you have unlocked the shotgun and the rifle.");
  7299. }
  7300. else if(PlayerInfo[playerid][pArmsSkill] == 100)
  7301. {
  7302. SendClientMessage(playerid, COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 3, you have unlocked the TEC9, UZI and MP5.");
  7303. }
  7304. else if(PlayerInfo[playerid][pArmsSkill] == 200)
  7305. {
  7306. SendClientMessage(playerid, COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 4, you have unlocked the Sawn-Off shotgun and the Desert Eagle.");
  7307. }
  7308. else if(PlayerInfo[playerid][pArmsSkill] == 400)
  7309. {
  7310. SendClientMessage(playerid, COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 5, you have unlocked the AK47.");
  7311. }
  7312. // if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  7313. // {
  7314. // SetPlayerArmedWeapon(playerid, 0);
  7315. // }
  7316. // if(GetPlayerVehicleSeat(giveplayerid) == 0 || GetPlayerVehicleSeat(giveplayerid) == 128)
  7317. // {
  7318. // SetPlayerArmedWeapon(giveplayerid, 0);
  7319. // }
  7320. if(IsPlayerInAnyVehicle(giveplayerid))
  7321. {
  7322. if(GetPlayerVehicleSeat(giveplayerid) == 0)
  7323. {
  7324. SetPlayerArmedWeapon(giveplayerid, 0);
  7325. //return SendClientMessage(playerid, COLOR_GRAD2, " You can not sell a weapon to someone while they are driving !");
  7326. }
  7327. if(weapon != 29 && weapon != 22)
  7328. {
  7329. SetPlayerArmedWeapon(giveplayerid, 0);
  7330. }
  7331. }
  7332. }
  7333. else
  7334. {
  7335. SendClientMessage(playerid, COLOR_GREY, "You are too far away !");
  7336. return 1;
  7337. }
  7338. }
  7339. else
  7340. {
  7341. format(str, sizeof(str), "That player is offline.");
  7342. SendClientMessage(playerid, COLOR_GRAD1, str);
  7343. }
  7344. return 1;
  7345. }
  7346. if(strcmp(cmd, "/getseeds", true) == 0)
  7347. {
  7348. if(PlayerInfo[playerid][pJob] != 4)
  7349. {
  7350. SendClientMessage(playerid, COLOR_GREY, "You are not a Drug Dealer.");
  7351. return 1;
  7352. }
  7353. if(!IsPlayerInRangeOfPoint(playerid, 2.0, 323.0342, 1118.5804, 1083.8828))
  7354. {
  7355. SendClientMessage(playerid, COLOR_GREY, "You are not at the Drug House.");
  7356. return 1;
  7357. }
  7358. if(PlayerInfo[playerid][pPotSeeds] > 49)
  7359. {
  7360. format(str, sizeof(str), "You still have %d seeds with you, sell or /drop them first.", PlayerInfo[playerid][pPotSeeds]);
  7361. SendClientMessage(playerid, COLOR_GREY, str);
  7362. return 1;
  7363. }
  7364. tmp = strtok(cmdtext, idx);
  7365. if(!strlen(tmp))
  7366. {
  7367. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getseeds [amount]");
  7368. return 1;
  7369. }
  7370. new price;
  7371. new ammount;
  7372. new level = PlayerInfo[playerid][pDrugsSkill];
  7373. new drugs = PlayerInfo[playerid][pPotSeeds];
  7374. ammount = strvalEx(tmp);
  7375. if(ammount > dhstock)
  7376. {
  7377. SendClientMessage(playerid, COLOR_GREY, "The Drug House doesn't have that much seeds at this time.");
  7378. return 1;
  7379. }
  7380. if(level >= 0 && level <= 49)
  7381. {
  7382. if(drugs > 9)
  7383. {
  7384. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more seeds.");
  7385. return 1;
  7386. }
  7387. if(ammount < 1 || ammount > 10)
  7388. {
  7389. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 10 at your current skill level.");
  7390. return 1;
  7391. }
  7392. if(drugs + ammount > 10)
  7393. {
  7394. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 10 at your current skill level.");
  7395. return 1;
  7396. }
  7397. }
  7398. else if(level >= 50 && level <= 99)
  7399. {
  7400. if(drugs > 19)
  7401. {
  7402. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more seeds.");
  7403. return 1;
  7404. }
  7405. if(ammount < 1 || ammount > 20)
  7406. {
  7407. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 20 at your current skill level.");
  7408. return 1;
  7409. }
  7410. if(drugs + ammount > 20)
  7411. {
  7412. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 20 at your current skill level.");
  7413. return 1;
  7414. }
  7415. }
  7416. else if(level >= 100 && level <= 199)
  7417. {
  7418. if(drugs > 29)
  7419. {
  7420. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more seeds.");
  7421. return 1;
  7422. }
  7423. if(ammount < 1 || ammount > 30)
  7424. {
  7425. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 30 at your current skill level.");
  7426. return 1;
  7427. }
  7428. if(drugs + ammount > 30)
  7429. {
  7430. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 30 at your current skill level.");
  7431. return 1;
  7432. }
  7433. }
  7434. else if(level >= 200 && level <= 399)
  7435. {
  7436. if(drugs > 39)
  7437. {
  7438. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more seeds.");
  7439. return 1;
  7440. }
  7441. if(ammount < 1 || ammount > 40)
  7442. {
  7443. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 40 at your current skill level.");
  7444. return 1;
  7445. }
  7446. if(drugs + ammount > 40)
  7447. {
  7448. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 40 at your current skill level.");
  7449. return 1;
  7450. }
  7451. }
  7452. else if(level >= 400)
  7453. {
  7454. if(drugs > 49)
  7455. {
  7456. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more seeds.");
  7457. return 1;
  7458. }
  7459. if(ammount < 1 || ammount > 50)
  7460. {
  7461. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 50 at your current skill level.");
  7462. return 1;
  7463. }
  7464. if(drugs + ammount > 50)
  7465. {
  7466. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 50 at your current skill level.");
  7467. return 1;
  7468. }
  7469. }
  7470. price = ammount * seedprice;
  7471. if(PlayerInfo[playerid][pCash] >= price)
  7472. {
  7473. format(str, sizeof(str), "* You bought %d seeds for $%d.", ammount, price);
  7474. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7475. GiveMoney(playerid, -price);
  7476. PlayerInfo[playerid][pPotSeeds] = ammount + drugs;
  7477. dhstock = dhstock -ammount;
  7478. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  7479. }
  7480. else
  7481. {
  7482. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7483. return 1;
  7484. }
  7485. return 1;
  7486. }
  7487. if(strcmp(cmd, "/getcrack", true) == 0)
  7488. {
  7489. if(PlayerInfo[playerid][pJob] != 4)
  7490. {
  7491. SendClientMessage(playerid, COLOR_GREY, "You are not a Drug Dealer.");
  7492. return 1;
  7493. }
  7494. if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2346.2937, -1185.2551, 1027.9766))
  7495. {
  7496. SendClientMessage(playerid, COLOR_GREY, "You are not at the Crack Lab.");
  7497. return 1;
  7498. }
  7499. if(PlayerInfo[playerid][pCocaine] > 24)
  7500. {
  7501. format(str, sizeof(str), "You still have %d grams of crack with you, sell or /drop them first.", PlayerInfo[playerid][pCocaine]);
  7502. SendClientMessage(playerid, COLOR_GREY, str);
  7503. return 1;
  7504. }
  7505. tmp = strtok(cmdtext, idx);
  7506. if(!strlen(tmp))
  7507. {
  7508. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getcrack [amount]");
  7509. return 1;
  7510. }
  7511. new price;
  7512. new ammount;
  7513. new level = PlayerInfo[playerid][pDrugsSkill];
  7514. new drugs = PlayerInfo[playerid][pCocaine];
  7515. ammount = strvalEx(tmp);
  7516. if(ammount > chstock)
  7517. {
  7518. SendClientMessage(playerid, COLOR_GREY, "The Crack Lab doesn't have that much crack at this time.");
  7519. return 1;
  7520. }
  7521. if(level >= 0 && level <= 49)
  7522. {
  7523. if(drugs > 4)
  7524. {
  7525. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more crack.");
  7526. return 1;
  7527. }
  7528. if(ammount < 1 || ammount > 5)
  7529. {
  7530. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 5 at your current skill level.");
  7531. return 1;
  7532. }
  7533. if(drugs + ammount > 5)
  7534. {
  7535. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 5 at your current skill level.");
  7536. return 1;
  7537. }
  7538. }
  7539. else if(level >= 50 && level <= 99)
  7540. {
  7541. if(drugs > 9)
  7542. {
  7543. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more crack.");
  7544. return 1;
  7545. }
  7546. if(ammount < 1 || ammount > 10)
  7547. {
  7548. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 10 at your current skill level.");
  7549. return 1;
  7550. }
  7551. if(drugs + ammount > 10)
  7552. {
  7553. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 10 at your current skill level.");
  7554. return 1;
  7555. }
  7556. }
  7557. else if(level >= 100 && level <= 199)
  7558. {
  7559. if(drugs > 14)
  7560. {
  7561. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more crack.");
  7562. return 1;
  7563. }
  7564. if(ammount < 1 || ammount > 15)
  7565. {
  7566. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 15 at your current skill level.");
  7567. return 1;
  7568. }
  7569. if(drugs + ammount > 15)
  7570. {
  7571. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 15 at your current skill level.");
  7572. return 1;
  7573. }
  7574. }
  7575. else if(level >= 200 && level <= 399)
  7576. {
  7577. if(drugs > 19)
  7578. {
  7579. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more crack.");
  7580. return 1;
  7581. }
  7582. if(ammount < 1 || ammount > 20)
  7583. {
  7584. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 20 at your current skill level.");
  7585. return 1;
  7586. }
  7587. if(drugs + ammount > 20)
  7588. {
  7589. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 20 at your current skill level.");
  7590. return 1;
  7591. }
  7592. }
  7593. else if(level >= 400)
  7594. {
  7595. if(drugs > 24)
  7596. {
  7597. SendClientMessage(playerid, COLOR_GREY, "You can't carry any more crack.");
  7598. return 1;
  7599. }
  7600. if(ammount < 1 || ammount > 25)
  7601. {
  7602. SendClientMessage(playerid, COLOR_GREY, "You can't purchase more than 25 at your current skill level.");
  7603. return 1;
  7604. }
  7605. if(drugs + ammount > 25)
  7606. {
  7607. SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 25 at your current skill level.");
  7608. return 1;
  7609. }
  7610. }
  7611. price = ammount * crackgprice;
  7612. if(PlayerInfo[playerid][pCash] > price)
  7613. {
  7614. format(str, sizeof(str), "* You bought %d grams of crack for $%d.", ammount, price);
  7615. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7616. GiveMoney(playerid, -price);
  7617. PlayerInfo[playerid][pCocaine] = ammount + drugs;
  7618. chstock = chstock -ammount;
  7619. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  7620. }
  7621. else
  7622. {
  7623. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  7624. return 1;
  7625. }
  7626. return 1;
  7627. }
  7628. if(strcmp(cmd, "/fill", true) == 0)
  7629. {
  7630. if(IsAtGasStation(playerid))
  7631. {
  7632. if(engineOn[GetPlayerVehicleID(playerid)] == 0)
  7633. {
  7634. if(Gas[GetPlayerVehicleID(playerid)] >= 99) return SendClientMessage(playerid, COLOR_WHITE, "This vehicle doesn't need filling.");
  7635. displayCenterHUDInfo(playerid, "~w~Refueling vehicle,~n~~r~please wait...", 8); //display for 8 seconds
  7636. SetTimerEx("Timer_Fillup", 5000, 0, "i", playerid);
  7637. Refueling[playerid] = 1;
  7638. }
  7639. else return SendClientMessage(playerid, COLOR_GREY, "You must turn off your engine first ! (/engine)");
  7640. }
  7641. else
  7642. {
  7643. SendClientMessage(playerid, COLOR_GREY, "You are not at a Gas Station.");
  7644. }
  7645. return 1;
  7646. }
  7647. if(strcmp(cmd, "/detain", true) == 0)
  7648. {
  7649. if(IsACop(playerid) || IsANG(playerid) || PlayerInfo[playerid][pMember] == FACTION_SANG)
  7650. {
  7651. if(IsPlayerInAnyVehicle(playerid))
  7652. {
  7653. SendClientMessage(playerid, COLOR_GREY, "Cannot use this while being in the Car.");
  7654. return 1;
  7655. }
  7656. tmp = strtok(cmdtext, idx);
  7657. if(!strlen(tmp))
  7658. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detain [playerid/PartOfName] [seatid]");
  7659. giveplayerid = ReturnUser(tmp);
  7660. tmp = strtok(cmdtext, idx);
  7661. if(!strlen(tmp))
  7662. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detain [playerid/PartOfName] [seatid]");
  7663. new seat = strvalEx(tmp);
  7664. if(IsPlayerConnected(giveplayerid))
  7665. {
  7666. if(giveplayerid != INVALID_PLAYER_ID)
  7667. {
  7668. if(seat < 1 || seat > 3) return SendClientMessage(playerid, COLOR_GREY, "Seat cannot be below 1 or above 3.");
  7669. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  7670. {
  7671. if(GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  7672. if(IsPlayerInAnyVehicle(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Suspect is in a Car, get him out first.");
  7673. if(giveplayerid == playerid)
  7674. {
  7675. SendClientMessage(playerid, COLOR_GREY, "You cannot Detain yourself.");
  7676. return 1;
  7677. }
  7678. if(PlayerCuffed[giveplayerid])
  7679. {
  7680. new carid = gLastCar[playerid];
  7681. if(IsInvalidDetainVehicle(carid))
  7682. {
  7683. SendClientMessage(playerid, COLOR_GREY, "You can't Detain someone in that vehicle.");
  7684. return 1;
  7685. }
  7686. foreach( new i: Player )
  7687. {
  7688. if(IsPlayerInAnyVehicle(i))
  7689. {
  7690. if(GetPlayerVehicleID(i) == gLastCar[playerid])
  7691. {
  7692. if(GetPlayerVehicleSeat(i) == seat)
  7693. {
  7694. format(str, sizeof(str), "That seat is occupied by %s.", PlayerICName(i));
  7695. SendClientMessage(playerid, COLOR_GREY, str);
  7696. return 1;
  7697. }
  7698. }
  7699. }
  7700. }
  7701. format(str, sizeof(str), "* You were detained by %s.", PlayerICName(playerid));
  7702. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7703. format(str, sizeof(str), "* You have detained %s.", PlayerICName(giveplayerid));
  7704. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7705. format(str, sizeof(str), "* %s grabs %s and throws him in the car.", PlayerICName(playerid), PlayerICName(giveplayerid));
  7706. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7707. displayCenterHUDInfo(giveplayerid, "~r~Detained.", 8); //display for 8 seconds
  7708. SetPlayerInterior(giveplayerid, 0);
  7709. ClearAnimations(giveplayerid, 1);
  7710. TogglePlayerControllable(giveplayerid, 0);
  7711. TogglePlayerControllable(giveplayerid, 0);
  7712. SetPlayerVirtualWorld(giveplayerid, 0);
  7713. ClearAnimations(giveplayerid, 1);
  7714. SetPlayerInterior(giveplayerid,0);
  7715. if(IsInvalidDetainSeat(carid))
  7716. {
  7717. PutPlayerInVehicle(giveplayerid, carid, 1);
  7718. }
  7719. else
  7720. {
  7721. PutPlayerInVehicle(giveplayerid, carid, seat);
  7722. }
  7723. }
  7724. else
  7725. {
  7726. SendClientMessage(playerid, COLOR_GREY, "That player needs to be restrained first.");
  7727. return 1;
  7728. }
  7729. }
  7730. else
  7731. {
  7732. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  7733. return 1;
  7734. }
  7735. }
  7736. }
  7737. else
  7738. {
  7739. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  7740. return 1;
  7741. }
  7742. }
  7743. else
  7744. {
  7745. SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / DEA / SASD / NG Member.");
  7746. }
  7747. return 1;
  7748. }
  7749. if(strcmp(cmd, "/gps", true) == 0)
  7750. {
  7751. TogglePlayerGPS(playerid);
  7752. return 1;
  7753. }
  7754. if(strcmp(cmd, "/stretcher", true) == 0)
  7755. {
  7756. if(IsAMedic(playerid))
  7757. {
  7758. if(IsPlayerInAnyVehicle(playerid))
  7759. {
  7760. SendClientMessage(playerid, COLOR_GREY, "Cannot use this while being in the Car.");
  7761. return 1;
  7762. }
  7763. tmp = strtok(cmdtext, idx);
  7764. if(!strlen(tmp))
  7765. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /stretcher [playerid/PartOfName] [seatid]");
  7766. giveplayerid = ReturnUser(tmp);
  7767. tmp = strtok(cmdtext, idx);
  7768. if(!strlen(tmp))
  7769. return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /stretcher [playerid/PartOfName] [seatid]");
  7770. new seat = strvalEx(tmp);
  7771. if(IsPlayerConnected(giveplayerid))
  7772. {
  7773. if(giveplayerid != INVALID_PLAYER_ID)
  7774. {
  7775. if(seat < 1 || seat > 3)
  7776. {
  7777. SendClientMessage(playerid, COLOR_GREY, "Seat cannot be below 1 or above 3.");
  7778. return 1;
  7779. }
  7780. if(IsPlayerInAnyVehicle(giveplayerid))
  7781. {
  7782. SendClientMessage(playerid, COLOR_GREY, "Patient is in a Car, get him out first.");
  7783. return 1;
  7784. }
  7785. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  7786. {
  7787. if(giveplayerid == playerid)
  7788. {
  7789. SendClientMessage(playerid, COLOR_GREY, "You cannot place yourself on a stretcher.");
  7790. return 1;
  7791. }
  7792. {
  7793. new carid = gLastCar[playerid];
  7794. if(!(IsValidStretcherVehicle(carid)))
  7795. {
  7796. SendClientMessage(playerid, COLOR_GREY, "You can't fit a stretcher in that vehicle.");
  7797. return 1;
  7798. }
  7799. foreach( new i: Player )
  7800. {
  7801. if(IsPlayerInAnyVehicle(i))
  7802. {
  7803. if(GetPlayerVehicleID(i) == gLastCar[playerid])
  7804. {
  7805. if(GetPlayerVehicleSeat(i) == seat)
  7806. {
  7807. format(str, sizeof(str), "That seat is occupied by %s.", PlayerICName(i));
  7808. SendClientMessage(playerid, COLOR_GREY, str);
  7809. return 1;
  7810. }
  7811. }
  7812. }
  7813. }
  7814. format(str, sizeof(str), "* You were placed on a stretcher by %s.", PlayerICName(playerid));
  7815. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7816. format(str, sizeof(str), "* You have placed %s on a stretcher.", PlayerICName(giveplayerid));
  7817. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7818. format(str, sizeof(str), "* %s places %s on a stretcher and wheels him to the vehicle.", PlayerICName(playerid), PlayerICName(giveplayerid));
  7819. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  7820. displayCenterHUDInfo(giveplayerid, "~r~You were placed on a stretcher.", 8); //display for 8 seconds
  7821. ClearAnimations(giveplayerid, 1);
  7822. PlayerCalledEMS[giveplayerid] = 0;
  7823. TextDrawHideForPlayer(giveplayerid, DieText);
  7824. TextDrawHideForPlayer(giveplayerid, InjuredText);
  7825. TogglePlayerControllable(giveplayerid, false);
  7826. pDeathState[giveplayerid] = PLAYER_STATE_TREAT;
  7827. //ResetPlayerWeapons(giveplayerid);
  7828. //ClearGuns(giveplayerid);
  7829. ResetPlayerAdminWeaponsEx(giveplayerid);
  7830. if(IsInvalidDetainSeat(carid)) PutPlayerInVehicle(giveplayerid, carid, 1);
  7831. else PutPlayerInVehicle(giveplayerid, carid, seat);
  7832. }
  7833. }
  7834. else
  7835. {
  7836. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  7837. return 1;
  7838. }
  7839. }
  7840. }
  7841. else
  7842. {
  7843. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  7844. return 1;
  7845. }
  7846. }
  7847. else
  7848. {
  7849. SendClientMessage(playerid, COLOR_GREY, "You are not a SAFMD member.");
  7850. }
  7851. }
  7852. if(strcmp(cmd, "/guard", true) == 0)
  7853. {
  7854. if(PlayerInfo[playerid][pJob] != 8)
  7855. {
  7856. SendClientMessage(playerid, COLOR_GREY, "You are not a Bodyguard.");
  7857. return 1;
  7858. }
  7859. if(Guarding[playerid] != 999)
  7860. {
  7861. return SendClientMessage(playerid, COLOR_GRAD2, "You are already guarding someone.");
  7862. }
  7863. tmp = strtok(cmdtext, idx);
  7864. if(!strlen(tmp))
  7865. {
  7866. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /guard [playerid/PartOfName] [price]");
  7867. return 1;
  7868. }
  7869. new money;
  7870. giveplayerid = ReturnUser(tmp);
  7871. if(GuardedBy[giveplayerid] != 999)
  7872. {
  7873. SendClientMessage(playerid, COLOR_GRAD2, "That person is already being guarded.");
  7874. return 1;
  7875. }
  7876. if(Guarding[giveplayerid] != 999)
  7877. {
  7878. return SendClientMessage(playerid, COLOR_GRAD2, "That person is already guarding someone.");
  7879. }
  7880. tmp = strtok(cmdtext, idx);
  7881. if(!strlen(tmp))
  7882. {
  7883. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /guard [playerid/PartOfName] [price]");
  7884. return 1;
  7885. }
  7886. money = strval(tmp);
  7887. if(money < 2000 || money > 10000)
  7888. {
  7889. SendClientMessage(playerid, COLOR_GREY, "Price can't be lower than $2000, or above $10,000.");
  7890. return 1;
  7891. }
  7892. if(IsPlayerConnected(giveplayerid))
  7893. {
  7894. if(giveplayerid != INVALID_PLAYER_ID)
  7895. {
  7896. if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  7897. {
  7898. if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't offer protection to yourself.");
  7899. //for(new i = 0;i < MAX_PLAYERS;i++)
  7900. foreach( new i: Player )
  7901. {
  7902. if(GuardOffer[i] == playerid)
  7903. {
  7904. GuardOffer[i] = 999;
  7905. GuardPrice[i] = 0;
  7906. }
  7907. }
  7908. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  7909. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  7910. format(str, sizeof(str), "* You offered protection to %s for $%d.", giveplayer, money);
  7911. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  7912. format(str, sizeof(str), "* Bodyguard %s wants to protect you for $%d, (type /accept bodyguard) to accept.", sendername, money);
  7913. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  7914. GuardOffer[giveplayerid] = playerid;
  7915. GuardPrice[giveplayerid] = money;
  7916. }
  7917. else
  7918. {
  7919. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  7920. }
  7921. }
  7922. }
  7923. else
  7924. {
  7925. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  7926. }
  7927. return 1;
  7928. }
  7929. if(strcmp(cmd, "/sellbiztomarket", true) == 0)
  7930. {
  7931. if(PlayerInfo[playerid][pBizKey] == -1) return SendClientMessage(playerid, COLOR_GREY, "You do not own a business.");
  7932. new biz = IsPlayerNearBiz(playerid);
  7933. if(biz == -1) return SendClientMessage(playerid, COLOR_GREY, "You must be near your business.");
  7934. if(PlayerInfo[playerid][pBizKey] != biz) return SendClientMessage(playerid, COLOR_GREY, "This is not your business.");
  7935. if(BizInfo[biz][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business is currently property of the government.");
  7936. tmp = strtok(cmdtext, idx);
  7937. if(!strlen(tmp))
  7938. {
  7939. new pricestring[32];
  7940. new price = BizInfo[biz][bValue] /4;
  7941. new j = valstr(pricestring, price);
  7942. while(j >= 4)
  7943. {
  7944. j -= 3;
  7945. strins(pricestring, ",", j);
  7946. }
  7947. strins(pricestring, "$", 0);
  7948. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellbiztomarket [confirm]");
  7949. format(str, sizeof(str), "Your business is worth %s.", pricestring);
  7950. SendClientMessage(playerid, COLOR_GRAD3, str);
  7951. return 1;
  7952. }
  7953. if(strcmp(tmp, "confirm", true) == 0)
  7954. {
  7955. GiveMoney(playerid, BizInfo[biz][bValue] /4);
  7956. strmid(BizInfo[biz][bOwner], "None", 0, strlen("None"), 255);
  7957. BizInfo[biz][bOwned] = 0;
  7958. BizInfo[biz][bSeized] = 0;
  7959. PlayerInfo[playerid][pBizKey] = -1;
  7960. new pricestring[32];
  7961. new price = BizInfo[biz][bValue] /4;
  7962. new j = valstr(pricestring, price);
  7963. while(j >= 4)
  7964. {
  7965. j -= 3;
  7966. strins(pricestring, ",", j);
  7967. }
  7968. strins(pricestring, "$", 0);
  7969. format(str, sizeof(str), "Congratulations, you have sold %s to the market and received 25 percent of the value, %s.", BizInfo[biz][bName], pricestring);
  7970. SendClientMessage(playerid, COLOR_YELLOW, str);
  7971. format(str, sizeof(str), "~w~Congratulations!~n~ You have sold your business for ~n~~g~%s.", pricestring);
  7972. displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
  7973. new pricestring2[32];
  7974. new price2 = BizInfo[biz][bValue];
  7975. new j2 = valstr(pricestring2, price2);
  7976. while(j2 >= 4)
  7977. {
  7978. j2 -= 3;
  7979. strins(pricestring2, ",", j2);
  7980. }
  7981. strins(pricestring2, "$", 0);
  7982. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nStatus: For Sale\nPrice: %s", BizInfo[biz][bName], pricestring2);
  7983. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  7984. }
  7985. return 1;
  7986. }
  7987. if(strcmp(cmd, "/sellbiz", true) == 0)
  7988. {
  7989. new biz = PlayerInfo[playerid][pBizKey];
  7990. if(biz == -1) return SendClientMessage(playerid, COLOR_GREY, "You do not own a business.");
  7991. if(BizInfo[biz][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business is currently property of the government.");
  7992. if(BizInfo[biz][bDonated]) return SendClientMessage(playerid, COLOR_GREY, "You may not sell this business as it is donated.");
  7993. tmp = strtok(cmdtext, idx);
  7994. if(!strlen(tmp))
  7995. {
  7996. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellbusiness [playerid/PartOfName] [price]");
  7997. return 1;
  7998. }
  7999. giveplayerid = ReturnUser(tmp);
  8000. tmp = strtok(cmdtext, idx);
  8001. if(!strlen(tmp))
  8002. {
  8003. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellbusiness [playerid/PartOfName] [price]");
  8004. return 1;
  8005. }
  8006. new price = strval(tmp);
  8007. if(price < 50000 || price > 10000000) return SendClientMessage(playerid, COLOR_GREY, "Price cannot be lower than $50,000 or higher than $10,000,000.");
  8008. if(playerid == giveplayerid)
  8009. {
  8010. return SendClientMessage(playerid, COLOR_GREY, "You cannot sell yourself a business.");
  8011. }
  8012. if(PlayerInfo[giveplayerid][pBizKey] != -1)
  8013. {
  8014. return SendClientMessage(playerid, COLOR_GREY, "That player already owns a business.");
  8015. }
  8016. if(!IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
  8017. {
  8018. return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  8019. }
  8020. format(str, sizeof(str), "* You offered %s to buy your business (%s) for $%d.", PlayerICName(giveplayerid), BizInfo[biz][bName], price);
  8021. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8022. format(str, sizeof(str), "* %s wants to sell you a business (%s) for $%d, (type /accept business) to accept.", PlayerICName(playerid), BizInfo[biz][bName], price);
  8023. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  8024. format(str, sizeof(str), "* %s hands %s the contract to their business.", PlayerICName(playerid), PlayerICName(giveplayerid));
  8025. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  8026. BizOffer[giveplayerid] = playerid;
  8027. BizPrice[giveplayerid] = price;
  8028. BizID[giveplayerid] = biz;
  8029. return 1;
  8030. }
  8031. if(strcmp(cmd, "/buybiz", true) == 0)
  8032. {
  8033. new biz = IsPlayerNearBiz(playerid);
  8034. if(biz == -1) return SendClientMessage(playerid, COLOR_GREY, "You aren't at a buyable business.");
  8035. if(BizInfo[biz][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business is currently property of the government.");
  8036. if(BizInfo[biz][bOwned] == 1) return SendClientMessage(playerid, COLOR_GREY, "This business is already owned.");
  8037. if(PlayerInfo[playerid][pBizKey] != -1) return SendClientMessage(playerid, COLOR_GREY, "You already own a business.");
  8038. if(GetMoney(playerid) >= BizInfo[biz][bValue])
  8039. {
  8040. format(str, sizeof(str), "* Congratulations! You bought the %s business. Type /help to view your commands.", BizInfo[biz][bName]);
  8041. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8042. GiveMoney(playerid, -BizInfo[biz][bValue]);
  8043. BizInfo[biz][bOwned] = 1;
  8044. PlayerInfo[playerid][pBizKey] = biz;
  8045. strmid(BizInfo[biz][bOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
  8046. if(BizInfo[biz][bLocked] == 1)
  8047. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  8048. else
  8049. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  8050. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  8051. return 1;
  8052. }
  8053. else
  8054. {
  8055. SendClientMessage(playerid, COLOR_GREY, "You do not have enough money to purchase this business.");
  8056. }
  8057. return 1;
  8058. }
  8059. if(strcmp(cmd, "/free", true) == 0)
  8060. {
  8061. if(PlayerInfo[playerid][pJob] != 2)
  8062. {
  8063. SendClientMessage(playerid, COLOR_GREY, "You are not a Lawyer.");
  8064. return 1;
  8065. }
  8066. if(PlayerInfo[playerid][pLawyerFreeTime] != 0)
  8067. {
  8068. SendClientMessage(playerid, COLOR_GREY, "You must wait 2 minutes before you can free someone again.");
  8069. return 1;
  8070. }
  8071. tmp = strtok(cmdtext, idx);
  8072. if(!strlen(tmp))
  8073. {
  8074. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /free [playerid/PartOfName]");
  8075. return 1;
  8076. }
  8077. giveplayerid = ReturnUser(tmp);
  8078. if(IsPlayerConnected(giveplayerid))
  8079. {
  8080. if(giveplayerid != INVALID_PLAYER_ID)
  8081. {
  8082. if(IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid))
  8083. {
  8084. if(giveplayerid == playerid)
  8085. {
  8086. SendClientMessage(playerid, COLOR_GREY, "You can't free yourself.");
  8087. return 1;
  8088. }
  8089. if(PlayerInfo[giveplayerid][pAdminJailed] == 1)
  8090. {
  8091. return SendClientMessage(playerid, COLOR_LIGHTBLUE, "This player was admin prisoned, you cannot decrease their time.");
  8092. }
  8093. if(PlayerInfo[giveplayerid][pJailed] == 1)
  8094. {
  8095. new minutes;
  8096. new level = PlayerInfo[playerid][pLawSkill];
  8097. if(level >= 0 && level <= 49)
  8098. {
  8099. minutes = 1;
  8100. }
  8101. else if(level >= 50 && level <= 99)
  8102. {
  8103. minutes = 2;
  8104. }
  8105. else if(level >= 100 && level <= 199)
  8106. {
  8107. minutes = 3;
  8108. }
  8109. else if(level >= 200 && level <= 399)
  8110. {
  8111. minutes = 4;
  8112. }
  8113. else if(level >= 400)
  8114. {
  8115. minutes = 5;
  8116. }
  8117. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  8118. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  8119. format(str, sizeof(str), "* You have reduced %s's jail time by %d minutes.", giveplayer, minutes);
  8120. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8121. format(str, sizeof(str), "* Lawyer %s has reduced your jail time by %d minutes.", sendername, minutes);
  8122. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  8123. WantLawyer[giveplayerid] = 0;
  8124. CallLawyer[giveplayerid] = 0;
  8125. JailPrice[giveplayerid] = 0;
  8126. PlayerInfo[giveplayerid][pJailTime] = PlayerInfo[giveplayerid][pJailTime] -minutes * 60;
  8127. PlayerInfo[playerid][pLawSkill] ++;
  8128. PlayerInfo[playerid][pLawyerFreeTime] = 120;
  8129. if(PlayerInfo[playerid][pLawSkill] == 50)
  8130. {
  8131. SendClientMessage(playerid, COLOR_YELLOW, "* Your Lawyer Skill is now Level 2, you will now earn more Money and have a quicker Reload Time.");
  8132. }
  8133. else if(PlayerInfo[playerid][pLawSkill] == 100)
  8134. {
  8135. SendClientMessage(playerid, COLOR_YELLOW, "* Your Lawyer Skill is now Level 3, you will now earn more Money and have a quicker Reload Time.");
  8136. }
  8137. else if(PlayerInfo[playerid][pLawSkill] == 200)
  8138. {
  8139. SendClientMessage(playerid, COLOR_YELLOW, "* Your Lawyer Skill is now Level 4, you will now earn more Money and have a quicker Reload Time.");
  8140. }
  8141. else if(PlayerInfo[playerid][pLawSkill] == 400)
  8142. {
  8143. SendClientMessage(playerid, COLOR_YELLOW, "* Your Lawyer Skill is now Level 5, you will now earn more Money and have a quicker Reload Time.");
  8144. }
  8145. }
  8146. else
  8147. {
  8148. SendClientMessage(playerid, COLOR_GRAD1, "Player is not Jailed.");
  8149. return 1;
  8150. }
  8151. }
  8152. else
  8153. {
  8154. SendClientMessage(playerid, COLOR_GRAD1, "You're too far away.");
  8155. return 1;
  8156. }
  8157. }
  8158. }
  8159. else
  8160. {
  8161. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  8162. }
  8163. return 1;
  8164. }
  8165. if(strcmp(cmd, "/cancel", true) ==0)
  8166. {
  8167. new x_job[64];
  8168. x_job = strtok(cmdtext, idx);
  8169. if(!strlen(x_job))
  8170. {
  8171. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /cancel [name]");
  8172. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Pot, Crack, Repair, Lawyer, Defense, Vest, Live, Refill, Boxing");
  8173. SendClientMessage(playerid, COLOR_GRAD2, "Available names: Taxi, Bus, Medic, Mechanic, Ticket, Handshake, Kiss, Witness, Marriage, Divorce");
  8174. SendClientMessage(playerid, COLOR_GRAD2, "Available names: Family, Faction, Group, Contract, Biz, Call");
  8175. return 1;
  8176. }
  8177. else if(strcmp(x_job, "pot", true) == 0)
  8178. {
  8179. PotOffer[playerid] = 999;
  8180. PotPrice[playerid] = 0;
  8181. PotGram[playerid] = 0;
  8182. }
  8183. else if(strcmp(x_job, "crack", true) == 0)
  8184. {
  8185. CrackOffer[playerid] = 999;
  8186. CrackPrice[playerid] = 0;
  8187. CrackGram[playerid] = 0;
  8188. }
  8189. else if(strcmp(x_job, "materials", true) == 0)
  8190. {
  8191. MatsOffer[playerid] = 999;
  8192. MatsPrice[playerid] = 0;
  8193. MatsGram[playerid] = 0;
  8194. MatsGram2[playerid] = 0;
  8195. }
  8196. else if(strcmp(x_job, "prod", true) == 0)
  8197. {
  8198. ProdOffer[playerid] = 999;
  8199. ProdPrice[playerid] = 0;
  8200. ProdAmount[playerid] = 0;
  8201. }
  8202. else if(strcmp(x_job, "repair", true) == 0)
  8203. {
  8204. RepairOffer[playerid] = 999;
  8205. RepairPrice[playerid] = 0;
  8206. RepairCar[playerid] = 0;
  8207. repairVeh[playerid] = -1;
  8208. CP[playerid] = CHECKPOINT_NONE;
  8209. DisablePlayerCheckpointEx(playerid);
  8210. isRepairing[playerid] = false;
  8211. }
  8212. else if(strcmp(x_job, "lawyer", true) == 0)
  8213. {
  8214. WantLawyer[playerid] = 0;
  8215. CallLawyer[playerid] = 0;
  8216. }
  8217. else if(strcmp(x_job, "defense", true) == 0)
  8218. {
  8219. DefenseOffer[playerid] = 999;
  8220. DefensePrice[playerid] = 0;
  8221. }
  8222. else if(strcmp(x_job, "vest", true) == 0)
  8223. {
  8224. VestOffer[playerid] = 999;
  8225. VestPrice[playerid] = 0;
  8226. }
  8227. else if(strcmp(x_job, "bodyguard", true) == 0)
  8228. {
  8229. if(GuardedBy[playerid] == 999) return SendClientMessage(playerid, COLOR_GREY, "You aren't being guarded.");
  8230. SetPlayerToTeamColor(playerid);
  8231. SetPlayerToTeamColor(GuardedBy[playerid]);
  8232. Guarding[GuardedBy[playerid]] = 999;
  8233. GuardedBy[playerid] = 999;
  8234. GuardingPrice[playerid] = 0;
  8235. SetPlayerArmour(playerid, 0.0);
  8236. }
  8237. else if(strcmp(x_job, "biz", true) == 0)
  8238. {
  8239. BizID[playerid] = 999;
  8240. BizOffer[playerid] = 999;
  8241. BizPrice[playerid] = 0;
  8242. }
  8243. else if(strcmp(x_job, "live", true) == 0)
  8244. {
  8245. LiveOffer[playerid] = 999;
  8246. }
  8247. else if(strcmp(x_job, "refill", true) == 0)
  8248. {
  8249. RefillOffer[playerid] = INVALID_PLAYER_ID;
  8250. RefillPrice[playerid] = 0;
  8251. }
  8252. else if(strcmp(x_job, "boxing", true) == 0)
  8253. {
  8254. BoxOffer[playerid] = 999;
  8255. }
  8256. else if(strcmp(x_job, "witness", true) == 0)
  8257. {
  8258. MarryWitnessOffer[playerid] = 999;
  8259. }
  8260. else if(strcmp(x_job, "marriage", true) == 0)
  8261. {
  8262. ProposeOffer[playerid] = 999;
  8263. }
  8264. else if(strcmp(x_job, "divorce", true) == 0)
  8265. {
  8266. DivorceOffer[playerid] = 999;
  8267. }
  8268. else if(strcmp(x_job, "family", true) == 0)
  8269. {
  8270. FamilyOffer[playerid] = 999;
  8271. }
  8272. else if(strcmp(x_job, "faction", true) == 0)
  8273. {
  8274. FactionOffer[playerid] = 999;
  8275. }
  8276. else if(strcmp(x_job, "group", true) == 0)
  8277. {
  8278. GroupOffer[playerid] = 999;
  8279. }
  8280. else if(strcmp(x_job, "frisk", true) == 0)
  8281. {
  8282. FriskOffer[playerid] = 999;
  8283. }
  8284. else if(strcmp(x_job, "handshake", true) == 0)
  8285. {
  8286. HSHAKEOFFER[playerid] = 999;
  8287. HShakeType[playerid] = 0;
  8288. }
  8289. else if(strcmp(x_job, "kiss", true) == 0)
  8290. {
  8291. KissOffer[playerid] = 999;
  8292. KissType[playerid] = 0;
  8293. }
  8294. else if(strcmp(x_job, "contract", true) == 0)
  8295. {
  8296. if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
  8297. if(GoChase[playerid] < 999)
  8298. {
  8299. format(str, sizeof(str), "Hitman %s has cancelled the contract on %s.", PlayerICName(playerid), PlayerICName(GoChase[playerid]));
  8300. foreach( new i: Player )
  8301. {
  8302. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  8303. {
  8304. SendClientMessage(i, COLOR_YELLOW, str);
  8305. }
  8306. }
  8307. }
  8308. ContractOffer[playerid] = 999;
  8309. ContractID[playerid] = 999;
  8310. GoChase[playerid] = 999;
  8311. }
  8312. else if(strcmp(x_job, "medic", true) == 0)
  8313. {
  8314. if(IsPlayerConnected(MedicCall))
  8315. {
  8316. if(MedicCall == playerid)
  8317. {
  8318. MedicCall = 999;
  8319. }
  8320. else
  8321. {
  8322. SendClientMessage(playerid, COLOR_GREY, "You are not the current Caller.");
  8323. return 1;
  8324. }
  8325. }
  8326. }
  8327. else if(strcmp(x_job, "mechanic", true) == 0)
  8328. {
  8329. if(IsPlayerConnected(MechanicCall))
  8330. {
  8331. if(MechanicCall == playerid)
  8332. {
  8333. MechanicCall = 999;
  8334. }
  8335. else
  8336. {
  8337. SendClientMessage(playerid, COLOR_GREY, "You are not the current Caller.");
  8338. return 1;
  8339. }
  8340. }
  8341. }
  8342. else if(strcmp(x_job, "taxi", true) == 0)
  8343. {
  8344. if(TaxiCall < 999)
  8345. {
  8346. if(TransportDuty[playerid] == 1 && TaxiCallTime[playerid] > 0)
  8347. {
  8348. TaxiAccepted[playerid] = 999;
  8349. displayCenterHUDInfo(playerid, "~w~You have canceled the~n~~r~call", 8); //display for 8 seconds
  8350. TaxiCallTime[playerid] = 0;
  8351. DisablePlayerCheckpointEx(playerid);
  8352. TaxiCall = 999;
  8353. }
  8354. else
  8355. {
  8356. if(IsPlayerConnected(TaxiCall))
  8357. {
  8358. if(TaxiCall == playerid)
  8359. {
  8360. TaxiCall = 999;
  8361. }
  8362. }
  8363. foreach( new i: Player )
  8364. {
  8365. if(IsPlayerConnected(i))
  8366. {
  8367. if(TaxiAccepted[i] < 999)
  8368. {
  8369. if(TaxiAccepted[i] == playerid)
  8370. {
  8371. TaxiAccepted[i] = 999;
  8372. displayCenterHUDInfo(i, "~w~Taxi Caller has canceled the~n~~r~call", 8); //display for 8 seconds
  8373. TaxiCallTime[i] = 0;
  8374. DisablePlayerCheckpointEx(i);
  8375. }
  8376. }
  8377. }
  8378. }
  8379. }
  8380. }
  8381. }
  8382. else if(strcmp(x_job, "call", true) == 0)
  8383. {
  8384. if(PlayerInfo[playerid][pMember] == FACTION_FMD || PlayerInfo[playerid][pLeader] == FACTION_FMD || FakeFaction[playerid] == FACTION_FMD)
  8385. {
  8386. if(ParaOnACall[playerid] == 1)
  8387. {
  8388. ParaOnACall[playerid] = 0;
  8389. CallAccepted[PlayerVictim[playerid]] = 0;
  8390. EMSArrived[PlayerVictim[playerid]] = 0;
  8391. DisablePlayerCheckpointEx(playerid);
  8392. format(str, sizeof(str), "* Your call was put back in line.");
  8393. SendClientMessage(PlayerVictim[playerid], COLOR_LIGHTBLUE, str);
  8394. format(str, sizeof(str), "Dispatch: Paramedic %s has canceled the call of %s.", PlayerICName(playerid), PlayerICName(PlayerVictim[playerid]));
  8395. SendParaMessage(COLOR_DOCTOR, str);
  8396. return 1;
  8397. }
  8398. else
  8399. {
  8400. SendClientMessage(playerid, COLOR_GREY, "You are not on a call.");
  8401. }
  8402. }
  8403. else
  8404. {
  8405. SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
  8406. }
  8407. }
  8408. else if(strcmp(x_job, "bus", true) == 0)
  8409. {
  8410. if(BusCall < 999)
  8411. {
  8412. if(TransportDuty[playerid] == 2 && BusCallTime[playerid] > 0)
  8413. {
  8414. BusAccepted[playerid] = 999;
  8415. displayCenterHUDInfo(playerid, "~w~You have canceled the~n~~r~call", 8); //display for 8 seconds
  8416. BusCallTime[playerid] = 0;
  8417. DisablePlayerCheckpointEx(playerid);
  8418. BusCall = 999;
  8419. }
  8420. else
  8421. {
  8422. if(IsPlayerConnected(BusCall))
  8423. {
  8424. if(BusCall == playerid)
  8425. {
  8426. BusCall = 999;
  8427. }
  8428. }
  8429. foreach( new i: Player )
  8430. {
  8431. if(IsPlayerConnected(i))
  8432. {
  8433. if(BusAccepted[i] < 999)
  8434. {
  8435. if(BusAccepted[i] == playerid)
  8436. {
  8437. BusAccepted[i] = 999;
  8438. displayCenterHUDInfo(i, "~w~Bus caller has canceled the~n~~r~call", 8); //display for 8 seconds
  8439. BusCallTime[i] = 0;
  8440. DisablePlayerCheckpointEx(i);
  8441. }
  8442. }
  8443. }
  8444. }
  8445. }
  8446. }
  8447. }
  8448. else
  8449. {
  8450. return 1;
  8451. }
  8452. format(str, sizeof(str), "* You have canceled the %s.", x_job);
  8453. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8454. return 1;
  8455. }
  8456. if(strcmp(cmd, "/accept", true) ==0)
  8457. {
  8458. new x_job[64];
  8459. x_job = strtok(cmdtext, idx);
  8460. if(!strlen(x_job))
  8461. {
  8462. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /accept [name]");
  8463. SendClientMessage(playerid, COLOR_GRAD1, "Available names: Sex, Pot, Crack, Repair, Lawyer, Defense, Vest, Job, Live, Refill, Weapon");
  8464. SendClientMessage(playerid, COLOR_GRAD2, "Available names: Taxi, Boxing, Medic, Mechanic, Ticket, Family, Bodyguard, Heal, Business, Kevlar");
  8465. SendClientMessage(playerid, COLOR_GRAD2, "Available names: Namechange");
  8466. return 1;
  8467. }
  8468. else if(strcmp(x_job, "keys", true) == 0)
  8469. {
  8470. if(KeysOfferFrom[playerid] != -1 && KeysOfferIndex[playerid] != 0)
  8471. {
  8472. if(!IsPlayerConnected(KeysOfferFrom[playerid])) return SendClientMessage(playerid, COLOR_GRAD1, "The offerer isn't connected to the server anymore.");
  8473. PlayerInfo[playerid][pKeys] = KeysOfferIndex[playerid];
  8474. format(x_job, sizeof(x_job), "** %s has accepted your keys offer.", PlayerICName(playerid));
  8475. SendClientMessage(KeysOfferFrom[playerid], COLOR_LIGHTBLUE, x_job);
  8476. format(x_job, sizeof(x_job), "** You have accepted %s's keys offer.", PlayerICName(KeysOfferFrom[playerid]));
  8477. SendClientMessage(playerid, COLOR_LIGHTBLUE, x_job);
  8478. KeysOfferFrom[playerid] = -1;
  8479. KeysOfferIndex[playerid] = 0;
  8480. }
  8481. else
  8482. {
  8483. SendClientMessage(playerid, COLOR_GRAD1, "Noone has offered you their vehicle keys.");
  8484. }
  8485. return 1;
  8486. }
  8487. else if(strcmp(x_job, "house", true) == 0)
  8488. {
  8489. new houseid = PlayerInfo[OfferedSellHouse[playerid][0]][pHouseID];
  8490. new sellerid = OfferedSellHouse[playerid][0];
  8491. new Float:pgx, Float:pgy, Float:pgz;
  8492. GetPlayerPos(sellerid, pgx, pgy, pgz);
  8493. if(!IsPlayerInRangeOfPoint(playerid, 3.0, pgx, pgy, pgz)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the player! ");
  8494. if(OfferedSellHouse[playerid][0] != -1 && OfferedSellHouse[playerid][1] != -1 && OfferedSellHouse[playerid][2] != -1)
  8495. {
  8496. if(houseid != 0 && houseid == OfferedSellHouse[playerid][2] && HouseInfo[houseid][hOwned] == 1)
  8497. {
  8498. if(GetMoney(playerid) >= OfferedSellHouse[playerid][1])
  8499. {
  8500. if(PlayerInfo[playerid][pHouseID] != 0) return SendClientMessage(playerid, COLOR_GRAD1, "You already own a house.");
  8501. new location[MAX_ZONE_NAME];
  8502. Get2DZone(location, MAX_ZONE_NAME, HouseInfo[houseid][hOutsideX], HouseInfo[houseid][hOutsideY], HouseInfo[houseid][hOutsideZ]);
  8503. GiveMoney(OfferedSellHouse[playerid][0], OfferedSellHouse[playerid][1]);
  8504. GiveMoney(playerid, -OfferedSellHouse[playerid][1]);
  8505. strmid(HouseInfo[houseid][hOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
  8506. if(IsACop(sellerid) || IsANG(sellerid) || IsAMedic(sellerid) || IsASenate(sellerid))
  8507. {
  8508. HouseInfo[houseid][hGun1] = 0;
  8509. HouseInfo[houseid][hGun2] = 0;
  8510. HouseInfo[houseid][hGun3] = 0;
  8511. HouseInfo[houseid][hGun4] = 0;
  8512. HouseInfo[houseid][hGun5] = 0;
  8513. HouseInfo[houseid][hGun6] = 0;
  8514. HouseInfo[houseid][hGun7] = 0;
  8515. }
  8516. PlayerInfo[playerid][pHouseID] = houseid;
  8517. HouseInfo[houseid][hOwnerID] = PlayerInfo[playerid][pID];
  8518. PlayerInfo[OfferedSellHouse[playerid][0]][pHouseID] = 0;
  8519. format(str, sizeof(str), "Congratulations, you have sold {FFFF00}%d %s{FAFAFA} for $%d to %s.", houseid, location, OfferedSellHouse[playerid][1], PlayerICName(playerid));
  8520. SendClientMessage(OfferedSellHouse[playerid][0], COLOR_WHITE, str);
  8521. format(str, sizeof(str), "Congratulations, you have bought {FFFF00}%d %s{FAFAFA} for $%d from %s.", houseid, location, OfferedSellHouse[playerid][1], PlayerICName(OfferedSellHouse[playerid][0]));
  8522. SendClientMessage(playerid, COLOR_WHITE, str);
  8523. SetHouseTag(houseid);
  8524. OfferedSellHouse[playerid][0] = -1;
  8525. OfferedSellHouse[playerid][1] = -1;
  8526. OfferedSellHouse[playerid][2] = -1;
  8527. HouseInfo[houseid][hModified] = 1;
  8528. return 1;
  8529. }
  8530. else
  8531. {
  8532. SendClientMessage(playerid, COLOR_GRAD1, "You can not afford this.");
  8533. return 1;
  8534. }
  8535. }
  8536. }
  8537. else
  8538. {
  8539. SendClientMessage(playerid, COLOR_GRAD1, "No one offered to sell you a house.");
  8540. return 1;
  8541. }
  8542. return 1;
  8543. }
  8544. else if(strcmp(x_job, "weapon", true) == 0)
  8545. {
  8546. if(OfferedGunFrom[playerid] == -1) return SendClientMessage(playerid, COLOR_GRAD1, "No one offered you a weapon.");
  8547. if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours before you can use this.");
  8548. if(OfferedGunTo[OfferedGunFrom[playerid]] != playerid)
  8549. {
  8550. OfferedGunFrom[playerid] = -1;
  8551. GunOffered[playerid] = 0;
  8552. return SendClientMessage(playerid, COLOR_GRAD1, "Player is no longer offering you a weapon.");
  8553. }
  8554. if(GunOffered[playerid] != GetPlayerWeapon(OfferedGunFrom[playerid]))
  8555. return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have the right weapon in their hands.");
  8556. if(GetPlayerWeapon(OfferedGunFrom[playerid]) != GunOffered[playerid]) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't holding the offered weapon.");
  8557. new Float:X23, Float:Y23, Float:Z23;
  8558. GetPlayerPos(OfferedGunFrom[playerid], X23, Y23, Z23);
  8559. if(!IsPlayerInRangeOfPoint(playerid, 3.0, X23, Y23, Z23)) return SendClientMessage(playerid, COLOR_GRAD1, "You are not close enough to that player to accept his weapon.");
  8560. new weaponname[50];
  8561. GetWeaponName(GunOffered[playerid], weaponname, sizeof(weaponname));
  8562. format(string5, sizeof(string5), "%s has accepted your %s.", PlayerICName(playerid), weaponname);
  8563. SendClientMessage(OfferedGunFrom[playerid], COLOR_LIGHTBLUE, string5);
  8564. format(string5, sizeof(string5), "You have accepted %s's %s.", PlayerICName(OfferedGunFrom[playerid]), weaponname);
  8565. SendClientMessage(playerid, COLOR_LIGHTBLUE, string5);
  8566. format(string5, sizeof(string5), "%s has accepted a gun (%s) from %s.", PlayerOOCName(playerid), weaponname, PlayerOOCName(OfferedGunFrom[playerid]));
  8567. PayLog(string5);
  8568. TakePlayerWeapon(OfferedGunFrom[playerid], GunOffered[playerid]);
  8569. GivePlayerGun(playerid, GunOffered[playerid]);
  8570. OfferedGunTo[OfferedGunFrom[playerid]] = -1;
  8571. OfferedGunFrom[playerid] = -1;
  8572. GunOffered[playerid] = 0;
  8573. if(IsPlayerInAnyVehicle(playerid))
  8574. {
  8575. if(GetPlayerVehicleSeat(playerid) == 0)
  8576. {
  8577. SetPlayerArmedWeapon(playerid, 0);
  8578. }
  8579. if((GetPlayerWeapon(playerid) != 38 && GetPlayerWeapon(playerid) != 29 && GetPlayerWeapon(playerid) != 22))
  8580. {
  8581. SetPlayerArmedWeapon(playerid, 0);
  8582. }
  8583. }
  8584. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  8585. {
  8586. SetPlayerArmedWeapon(playerid, 0);
  8587. }
  8588. return 1;
  8589. }
  8590. else if(strcmp(x_job, "kevlar", true) == 0)
  8591. {
  8592. if(IsACop(playerid) == 1 || IsANG(playerid) == 1 || IsAMedic(playerid) == 1 || IsASenate(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "Cops/DEA/DoC can not use this command.");
  8593. if(!(KevlarOfferFrom[playerid] == -1))
  8594. {
  8595. new Float:x, Float:y, Float:z;
  8596. GetPlayerPos(KevlarOfferFrom[playerid], x, y, z);
  8597. if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z))
  8598. {
  8599. new Float:hasArmor;
  8600. GetPlayerArmour(KevlarOfferFrom[playerid], hasArmor);
  8601. if(hasArmor < 1) return SendClientMessage(playerid, COLOR_GRAD1, "That player doesn't have a kevlar vest.");
  8602. SetPlayerArmour(KevlarOfferFrom[playerid], 0);
  8603. SetPlayerArmour(playerid, hasArmor);
  8604. format(string5, sizeof(string5), "%s has accepted your kevlar.", PlayerICName(playerid));
  8605. SendClientMessage(KevlarOfferFrom[playerid], COLOR_LIGHTBLUE, string5);
  8606. format(string5, sizeof(string5), "You have accepted %s's kevlar.", PlayerICName(KevlarOfferFrom[playerid]));
  8607. SendClientMessage(playerid, COLOR_LIGHTBLUE, string5);
  8608. KevlarOfferTo[KevlarOfferFrom[playerid]] = -1;
  8609. KevlarOfferFrom[playerid] = -1;
  8610. return 1;
  8611. }
  8612. else return SendClientMessage(playerid, COLOR_GRAD1, "You are not close enough to that player to accept his kevlar.");
  8613. }
  8614. else return SendClientMessage(playerid, COLOR_GREY, "No one offered you a kevlar.");
  8615. }
  8616. /*else if(strcmp(x_job, "frisk", true) == 0)
  8617. {
  8618. if(FriskOffer[playerid] < 999)
  8619. {
  8620. if(IsPlayerConnected(FriskOffer[playerid]))
  8621. {
  8622. if(IsPlayerInRangeOfPlayer(12.0, playerid, FriskOffer[playerid]))
  8623. {
  8624. format(str, sizeof(str), "* You accepted %s's offer to frisk you.", PlayerICName(FriskOffer[playerid]));
  8625. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8626. format(str, sizeof(str), "* %s has accepted your offer to frisk them.", PlayerICName(playerid));
  8627. SendClientMessage(FriskOffer[playerid], COLOR_LIGHTBLUE, str);
  8628. new WeaponName[65];
  8629. strmid(giveplayer, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  8630. GetPlayerICName(FriskOffer[playerid], sendername, sizeof(sendername));
  8631. SendClientMessage(FriskOffer[playerid], COLOR_GREEN, "_______________________________________");
  8632. format(str, sizeof(str), "*** %s's Items ***", giveplayer);
  8633. SendClientMessage(FriskOffer[playerid], COLOR_WHITE, str);
  8634. if(PlayerInfo[playerid][pCash] > 0)
  8635. {
  8636. format(str, sizeof(str), "Money (%d)", PlayerInfo[playerid][pCash]);
  8637. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8638. }
  8639. if(PlayerInfo[playerid][pCannabis] > 0)
  8640. {
  8641. format(str, sizeof(str), "Cannabis (%dg)", PlayerInfo[playerid][pCannabis]);
  8642. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8643. }
  8644. if(PlayerInfo[playerid][pCocaine] > 0)
  8645. {
  8646. format(str, sizeof(str), "Cocaine (%dg)", PlayerInfo[playerid][pCocaine]);
  8647. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8648. }
  8649. if(PlayerInfo[playerid][pMeth] > 0)
  8650. {
  8651. format(str, sizeof(str), "Meth (%dg)", PlayerInfo[playerid][pMeth]);
  8652. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8653. }
  8654. if(PlayerInfo[giveplayerid][pXanax] > 0) {
  8655. format(str, sizeof(str), "Xanax (%d pills)", PlayerInfo[giveplayerid][pXanax]);
  8656. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8657. }
  8658. if(PlayerInfo[giveplayerid][pPromethazine] > 0) {
  8659. format(str, sizeof(str), "Promethazine (%d.0 fl oz)", PlayerInfo[giveplayerid][pPromethazine]);
  8660. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8661. }
  8662. if(PlayerInfo[giveplayerid][pCodeine] > 0) {
  8663. format(str, sizeof(str), "Codeine (%d.0 fl oz)", PlayerInfo[giveplayerid][pCodeine]);
  8664. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8665. }
  8666. if(PlayerInfo[giveplayerid][pLean] > 0) {
  8667. format(str, sizeof(str), "Mixed substance (Promethazine/Codeine) (%d.0g)", PlayerInfo[giveplayerid][pLean]);
  8668. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8669. }
  8670. if(PlayerInfo[playerid][pPotSeeds] > 0)
  8671. {
  8672. format(str, sizeof(str), "Seeds (%dg)", PlayerInfo[playerid][pPotSeeds]);
  8673. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8674. }
  8675. if(PlayerInfo[playerid][pMats] > 0)
  8676. {
  8677. format(str, sizeof(str), "Materials (%d)", PlayerInfo[playerid][pMats]);
  8678. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8679. }
  8680. if(Packages[playerid] > 0)
  8681. {
  8682. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Materials Packages");
  8683. }
  8684. if(Crates[playerid] > 0)
  8685. {
  8686. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Drug Crates");
  8687. }
  8688. if(Fishes[playerid][pWeight1] > 0 || Fishes[playerid][pWeight2] > 0 || Fishes[playerid][pWeight3] > 0 || Fishes[playerid][pWeight4] > 0 || Fishes[playerid][pWeight5] > 0)
  8689. {
  8690. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Fish");
  8691. }
  8692. if(PlayerInfo[playerid][pPhoneBook] > 0)
  8693. {
  8694. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Phone Book");
  8695. }
  8696. if(PlayerInfo[playerid][piPod] > 0)
  8697. {
  8698. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "iPod");
  8699. }
  8700. if(PlayerInfo[playerid][pPnumber] > 0)
  8701. {
  8702. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Cellphone");
  8703. }
  8704. if(PlayerInfo[playerid][pSpraycan] > 0)
  8705. {
  8706. format(str, sizeof(str), "Spraycans (%d)", PlayerInfo[playerid][pSpraycan]);
  8707. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8708. }
  8709. if(PlayerInfo[playerid][pScrew] > 0)
  8710. {
  8711. format(str, sizeof(str), "Screwdrivers (%d)", PlayerInfo[playerid][pScrew]);
  8712. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8713. }
  8714. if(PlayerInfo[playerid][pDice] > 0)
  8715. {
  8716. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Dice");
  8717. }
  8718. if(PlayerInfo[playerid][pRope] > 0)
  8719. {
  8720. format(str, sizeof(str), "Rope (%d)", PlayerInfo[playerid][pRope]);
  8721. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8722. }
  8723. if(PlayerInfo[playerid][pGag] > 0)
  8724. {
  8725. format(str, sizeof(str), "Gag (%d)", PlayerInfo[playerid][pGag]);
  8726. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8727. }
  8728. if(PlayerInfo[playerid][pCigars] > 0)
  8729. {
  8730. format(str, sizeof(str), "Cigars (%d)", PlayerInfo[playerid][pCigars]);
  8731. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8732. }
  8733. if(PlayerInfo[playerid][pSprunk] > 0)
  8734. {
  8735. format(str, sizeof(str), "Sprunk (%d)", PlayerInfo[playerid][pSprunk]);
  8736. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8737. }
  8738. if(PlayerInfo[playerid][pBombs] > 0)
  8739. {
  8740. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "C4 Explosives");
  8741. }*/
  8742. /*if(PlayerInfo[playerid][pPoison] > 0)
  8743. {
  8744. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Poison");
  8745. }*/
  8746. /*if(PlayerInfo[playerid][pBlindfolds] > 0)
  8747. {
  8748. format(str, sizeof(str), "Blindfolds (%d)", PlayerInfo[playerid][pBlindfolds]);
  8749. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8750. }
  8751. if(PlayerInfo[playerid][pPortMDC] != 0)
  8752. {
  8753. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Portable MDC");
  8754. }
  8755. if(PlayerInfo[playerid][pGun0] != 0)
  8756. {
  8757. GetWeaponName(PlayerInfo[playerid][pGun0], WeaponName, 64);
  8758. format(str, sizeof(str), "%s", WeaponName);
  8759. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8760. }
  8761. if(PlayerInfo[playerid][pGun1] != 0)
  8762. {
  8763. GetWeaponName(PlayerInfo[playerid][pGun1], WeaponName, 64);
  8764. format(str, sizeof(str), "%s", WeaponName);
  8765. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8766. }
  8767. if(PlayerInfo[playerid][pGun2] != 0)
  8768. {
  8769. GetWeaponName(PlayerInfo[playerid][pGun2], WeaponName, 64);
  8770. format(str, sizeof(str), "%s", WeaponName);
  8771. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8772. }
  8773. if(PlayerInfo[playerid][pGun3] != 0)
  8774. {
  8775. GetWeaponName(PlayerInfo[playerid][pGun3], WeaponName, 64);
  8776. format(str, sizeof(str), "%s", WeaponName);
  8777. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8778. }
  8779. if(PlayerInfo[playerid][pGun4] != 0)
  8780. {
  8781. GetWeaponName(PlayerInfo[playerid][pGun4], WeaponName, 64);
  8782. format(str, sizeof(str), "%s", WeaponName);
  8783. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8784. }
  8785. if(PlayerInfo[playerid][pGun5] != 0)
  8786. {
  8787. GetWeaponName(PlayerInfo[playerid][pGun5], WeaponName, 64);
  8788. format(str, sizeof(str), "%s", WeaponName);
  8789. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8790. }
  8791. if(PlayerInfo[playerid][pGun6] != 0)
  8792. {
  8793. GetWeaponName(PlayerInfo[playerid][pGun6], WeaponName, 64);
  8794. format(str, sizeof(str), "%s", WeaponName);
  8795. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8796. }
  8797. if(PlayerInfo[playerid][pGun7] != 0)
  8798. {
  8799. GetWeaponName(PlayerInfo[playerid][pGun7], WeaponName, 64);
  8800. format(str, sizeof(str), "%s", WeaponName);
  8801. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8802. }
  8803. if(PlayerInfo[playerid][pGun8] != 0)
  8804. {
  8805. GetWeaponName(PlayerInfo[playerid][pGun8], WeaponName, 64);
  8806. format(str, sizeof(str), "%s", WeaponName);
  8807. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8808. }
  8809. if(PlayerInfo[playerid][pGun9] != 0)
  8810. {
  8811. GetWeaponName(PlayerInfo[playerid][pGun9], WeaponName, 64);
  8812. format(str, sizeof(str), "%s", WeaponName);
  8813. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8814. }
  8815. if(PlayerInfo[playerid][pGun10] != 0)
  8816. {
  8817. GetWeaponName(PlayerInfo[playerid][pGun10], WeaponName, 64);
  8818. format(str, sizeof(str), "%s", WeaponName);
  8819. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8820. }
  8821. if(PlayerInfo[playerid][pGun11] == 44)
  8822. {
  8823. SendClientMessage(playerid, COLOR_GRAD3, "Nightvision Goggles");
  8824. }
  8825. if(PlayerInfo[playerid][pGun11] == 45)
  8826. {
  8827. SendClientMessage(playerid, COLOR_GRAD3, "Infared Goggles");
  8828. }
  8829. if(PlayerInfo[playerid][pGun12] != 0)
  8830. {
  8831. GetWeaponName(PlayerInfo[playerid][pGun12], WeaponName, 64);
  8832. format(str, sizeof(str), "%s", WeaponName);
  8833. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8834. }
  8835. for(new weap = 1; weap < 47; weap++)
  8836. {
  8837. if(HaveAdminWeapon(playerid, weap) == weap)
  8838. {
  8839. GetWeaponName(weap, WeaponName, 64);
  8840. format(str, sizeof(str), "{FF0000}Admin Given %s", WeaponName);
  8841. SendClientMessage(FriskOffer[playerid], COLOR_WHITE, str);
  8842. }
  8843. }
  8844. format(str, sizeof(str), "* %s has frisked %s.", PlayerICName(FriskOffer[playerid]), PlayerICName(playerid));
  8845. ProxDetector(30.0, FriskOffer[playerid], str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  8846. FriskOffer[playerid] = 999;
  8847. return 1;
  8848. }
  8849. else
  8850. {
  8851. SendClientMessage(playerid, COLOR_GREY, "The frisker is too far away.");
  8852. return 1;
  8853. }
  8854. }
  8855. }
  8856. else
  8857. {
  8858. SendClientMessage(playerid, COLOR_GREY, "Nobody offered to frisk you.");
  8859. return 1;
  8860. }
  8861. }*/
  8862. else if(strcmp(x_job, "frisk", true) == 0)
  8863. {
  8864. if(FriskOffer[playerid] < 999)
  8865. {
  8866. if(IsPlayerConnected(FriskOffer[playerid]))
  8867. {
  8868. if(IsPlayerInRangeOfPlayer(12.0, playerid, FriskOffer[playerid]))
  8869. {
  8870. format(str, sizeof(str), "* You accepted %s's offer to frisk you.", PlayerICName(FriskOffer[playerid]));
  8871. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  8872. format(str, sizeof(str), "* %s has accepted your offer to frisk them.", PlayerICName(playerid));
  8873. SendClientMessage(FriskOffer[playerid], COLOR_LIGHTBLUE, str);
  8874. new WeaponName[65];
  8875. strmid(giveplayer, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  8876. GetPlayerICName(FriskOffer[playerid], sendername, sizeof(sendername));
  8877. SendClientMessage(FriskOffer[playerid], COLOR_GREEN, "_______________________________________");
  8878. format(str, sizeof(str), "*** %s's Items ***", giveplayer);
  8879. SendClientMessage(FriskOffer[playerid], COLOR_WHITE, str);
  8880. if(PlayerInfo[playerid][pCash] > 0)
  8881. {
  8882. format(str, sizeof(str), "Money (%d)", PlayerInfo[playerid][pCash]);
  8883. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8884. }
  8885. if(PlayerInfo[playerid][pCannabis] > 0)
  8886. {
  8887. format(str, sizeof(str), "Cannabis (%dg)", PlayerInfo[playerid][pCannabis]);
  8888. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8889. }
  8890. if(PlayerInfo[playerid][pCocaine] > 0)
  8891. {
  8892. format(str, sizeof(str), "Cocaine (%dg)", PlayerInfo[playerid][pCocaine]);
  8893. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8894. }
  8895. if(PlayerInfo[playerid][pMeth] > 0)
  8896. {
  8897. format(str, sizeof(str), "Meth (%dg)", PlayerInfo[playerid][pMeth]);
  8898. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8899. }
  8900. if(PlayerInfo[playerid][pXanax] > 0) {
  8901. format(str, sizeof(str), "Xanax (%d pills)", PlayerInfo[playerid][pXanax]);
  8902. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8903. }
  8904. if(PlayerInfo[playerid][pPromethazine] > 0) {
  8905. format(str, sizeof(str), "Promethazine (%d.0 fl oz)", PlayerInfo[playerid][pPromethazine]);
  8906. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8907. }
  8908. if(PlayerInfo[playerid][pCodeine] > 0) {
  8909. format(str, sizeof(str), "Codeine (%d.0 fl oz)", PlayerInfo[playerid][pCodeine]);
  8910. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8911. }
  8912. if(PlayerInfo[playerid][pLean] > 0) {
  8913. format(str, sizeof(str), "Mixed substance (Promethazine/Codeine) (%d.0g)", PlayerInfo[playerid][pLean]);
  8914. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8915. }
  8916. if(PlayerInfo[playerid][pPotSeeds] > 0)
  8917. {
  8918. format(str, sizeof(str), "Seeds (%dg)", PlayerInfo[playerid][pPotSeeds]);
  8919. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8920. }
  8921. if(PlayerInfo[playerid][pMats] > 0)
  8922. {
  8923. format(str, sizeof(str), "Materials (%d)", PlayerInfo[playerid][pMats]);
  8924. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  8925. }
  8926. if(Packages[playerid] > 0)
  8927. {
  8928. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Materials Packages");
  8929. }
  8930. if(Crates[playerid] > 0)
  8931. {
  8932. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Drug Crates");
  8933. }
  8934. if(Fishes[playerid][pWeight1] > 0 || Fishes[playerid][pWeight2] > 0 || Fishes[playerid][pWeight3] > 0 || Fishes[playerid][pWeight4] > 0 || Fishes[playerid][pWeight5] > 0)
  8935. {
  8936. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Fish");
  8937. }
  8938. if(PlayerInfo[playerid][pPhoneBook] > 0)
  8939. {
  8940. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Phone Book");
  8941. }
  8942. if(PlayerInfo[playerid][piPod] > 0)
  8943. {
  8944. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "iPod");
  8945. }
  8946. if(PlayerInfo[playerid][pPnumber] > 0)
  8947. {
  8948. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Cellphone");
  8949. }
  8950. if(PlayerInfo[playerid][pSpraycan] > 0)
  8951. {
  8952. format(str, sizeof(str), "Spraycans (%d)", PlayerInfo[playerid][pSpraycan]);
  8953. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8954. }
  8955. if(PlayerInfo[playerid][pScrew] > 0)
  8956. {
  8957. format(str, sizeof(str), "Screwdrivers (%d)", PlayerInfo[playerid][pScrew]);
  8958. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8959. }
  8960. if(PlayerInfo[playerid][pDice] > 0)
  8961. {
  8962. SendClientMessage(FriskOffer[playerid], COLOR_GRAD3, "Dice");
  8963. }
  8964. if(PlayerInfo[playerid][pRope] > 0)
  8965. {
  8966. format(str, sizeof(str), "Rope (%d)", PlayerInfo[playerid][pRope]);
  8967. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8968. }
  8969. if(PlayerInfo[playerid][pGag] > 0)
  8970. {
  8971. format(str, sizeof(str), "Gag (%d)", PlayerInfo[playerid][pGag]);
  8972. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8973. }
  8974. if(PlayerInfo[playerid][pCigars] > 0)
  8975. {
  8976. format(str, sizeof(str), "Cigars (%d)", PlayerInfo[playerid][pCigars]);
  8977. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8978. }
  8979. if(PlayerInfo[playerid][pSprunk] > 0)
  8980. {
  8981. format(str, sizeof(str), "Sprunk (%d)", PlayerInfo[playerid][pSprunk]);
  8982. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8983. }
  8984. if(PlayerInfo[playerid][pBombs] > 0)
  8985. {
  8986. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "C4 Explosives");
  8987. }
  8988. /*if(PlayerInfo[playerid][pPoison] > 0)
  8989. {
  8990. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Poison");
  8991. }*/
  8992. if(PlayerInfo[playerid][pBlindfolds] > 0)
  8993. {
  8994. format(str, sizeof(str), "Blindfolds (%d)", PlayerInfo[playerid][pBlindfolds]);
  8995. SendClientMessage(FriskOffer[playerid], COLOR_GREY, str);
  8996. }
  8997. if(PlayerInfo[playerid][pPortMDC] != 0)
  8998. {
  8999. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, "Portable MDC");
  9000. }
  9001. if(PlayerInfo[playerid][pGun0] != 0)
  9002. {
  9003. GetWeaponName(PlayerInfo[playerid][pGun0], WeaponName, 64);
  9004. format(str, sizeof(str), "%s", WeaponName);
  9005. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9006. }
  9007. if(PlayerInfo[playerid][pGun1] != 0)
  9008. {
  9009. GetWeaponName(PlayerInfo[playerid][pGun1], WeaponName, 64);
  9010. format(str, sizeof(str), "%s", WeaponName);
  9011. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9012. }
  9013. if(PlayerInfo[playerid][pGun2] != 0)
  9014. {
  9015. GetWeaponName(PlayerInfo[playerid][pGun2], WeaponName, 64);
  9016. format(str, sizeof(str), "%s", WeaponName);
  9017. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9018. }
  9019. if(PlayerInfo[playerid][pGun3] != 0)
  9020. {
  9021. GetWeaponName(PlayerInfo[playerid][pGun3], WeaponName, 64);
  9022. format(str, sizeof(str), "%s", WeaponName);
  9023. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9024. }
  9025. if(PlayerInfo[playerid][pGun4] != 0)
  9026. {
  9027. GetWeaponName(PlayerInfo[playerid][pGun4], WeaponName, 64);
  9028. format(str, sizeof(str), "%s", WeaponName);
  9029. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9030. }
  9031. if(PlayerInfo[playerid][pGun5] != 0)
  9032. {
  9033. GetWeaponName(PlayerInfo[playerid][pGun5], WeaponName, 64);
  9034. format(str, sizeof(str), "%s", WeaponName);
  9035. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9036. }
  9037. if(PlayerInfo[playerid][pGun6] != 0)
  9038. {
  9039. GetWeaponName(PlayerInfo[playerid][pGun6], WeaponName, 64);
  9040. format(str, sizeof(str), "%s", WeaponName);
  9041. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9042. }
  9043. if(PlayerInfo[playerid][pGun7] != 0)
  9044. {
  9045. GetWeaponName(PlayerInfo[playerid][pGun7], WeaponName, 64);
  9046. format(str, sizeof(str), "%s", WeaponName);
  9047. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9048. }
  9049. if(PlayerInfo[playerid][pGun8] != 0)
  9050. {
  9051. GetWeaponName(PlayerInfo[playerid][pGun8], WeaponName, 64);
  9052. format(str, sizeof(str), "%s", WeaponName);
  9053. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9054. }
  9055. if(PlayerInfo[playerid][pGun9] != 0)
  9056. {
  9057. GetWeaponName(PlayerInfo[playerid][pGun9], WeaponName, 64);
  9058. format(str, sizeof(str), "%s", WeaponName);
  9059. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9060. }
  9061. if(PlayerInfo[playerid][pGun10] != 0)
  9062. {
  9063. GetWeaponName(PlayerInfo[playerid][pGun10], WeaponName, 64);
  9064. format(str, sizeof(str), "%s", WeaponName);
  9065. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9066. }
  9067. if(PlayerInfo[playerid][pGun11] == 44)
  9068. {
  9069. SendClientMessage(playerid, COLOR_GRAD3, "Nightvision Goggles");
  9070. }
  9071. if(PlayerInfo[playerid][pGun11] == 45)
  9072. {
  9073. SendClientMessage(playerid, COLOR_GRAD3, "Infared Goggles");
  9074. }
  9075. if(PlayerInfo[playerid][pGun12] != 0)
  9076. {
  9077. GetWeaponName(PlayerInfo[playerid][pGun12], WeaponName, 64);
  9078. format(str, sizeof(str), "%s", WeaponName);
  9079. SendClientMessage(FriskOffer[playerid], COLOR_BITEM, str);
  9080. }
  9081. for(new weap = 1; weap < 47; weap++)
  9082. {
  9083. if(HaveAdminWeapon(playerid, weap) == weap)
  9084. {
  9085. GetWeaponName(weap, WeaponName, 64);
  9086. format(str, sizeof(str), "{FF0000}Admin Given %s", WeaponName);
  9087. SendClientMessage(FriskOffer[playerid], COLOR_WHITE, str);
  9088. }
  9089. }
  9090. format(str, sizeof(str), "* %s has frisked %s.", PlayerICName(FriskOffer[playerid]), PlayerICName(playerid));
  9091. ProxDetector(30.0, FriskOffer[playerid], str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9092. FriskOffer[playerid] = 999;
  9093. return 1;
  9094. }
  9095. else
  9096. {
  9097. SendClientMessage(playerid, COLOR_GREY, "The frisker is too far away.");
  9098. return 1;
  9099. }
  9100. }
  9101. }
  9102. else
  9103. {
  9104. SendClientMessage(playerid, COLOR_GREY, "Nobody offered to frisk you.");
  9105. return 1;
  9106. }
  9107. }
  9108. else if(strcmp(x_job, "gag", true) == 0)
  9109. {
  9110. if(IsPlayerGagged(playerid))
  9111. return SendClientMessage(playerid, COLOR_GREY, "You are already gagged.");
  9112. if(gagRequester[playerid] == INVALID_PLAYER_ID)
  9113. return SendClientMessage(playerid, COLOR_GREY, "Nobody offered to gag you.");
  9114. new gagger = gagRequester[playerid];
  9115. if(!IsPlayerConnected(gagger)) {
  9116. gagRequester[playerid] = INVALID_PLAYER_ID;
  9117. return SendClientMessage(playerid, COLOR_GREY, "The person who tried to gag has left the server.");
  9118. }
  9119. if(GetDistanceBetweenPlayers(gagger, playerid) > 4) {
  9120. gagRequester[playerid] = INVALID_PLAYER_ID;
  9121. return SendClientMessage(playerid, COLOR_GREY, "The person who tried to gag you is too far away.");
  9122. }
  9123. ApplyGag(gagger, playerid);
  9124. gagRequester[playerid] = INVALID_PLAYER_ID;
  9125. return 1;
  9126. }
  9127. else if(strcmp(x_job, "business", true) == 0)
  9128. {
  9129. if(BizOffer[playerid] < 999)
  9130. {
  9131. if(GetMoney(playerid) >= BizPrice[playerid])
  9132. {
  9133. if(IsPlayerConnected(BizOffer[playerid]))
  9134. {
  9135. if(IsPlayerInRangeOfPlayer(12.0, playerid, BizOffer[playerid]))
  9136. {
  9137. if(PlayerInfo[playerid][pBizKey] != -1)
  9138. {
  9139. SendClientMessage(playerid, COLOR_GREY, "You already own a business.");
  9140. return 1;
  9141. }
  9142. new biz = BizID[playerid];
  9143. format(str, sizeof(str), "* You sold the %s business to %s, and received $%d.", BizInfo[biz][bName], PlayerICName(playerid), BizPrice[playerid]);
  9144. SendClientMessage(BizOffer[playerid], COLOR_LIGHTBLUE, str);
  9145. strmid(BizInfo[biz][bOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
  9146. if(BizInfo[biz][bLocked] == 1)
  9147. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName]);
  9148. else
  9149. format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
  9150. UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
  9151. GiveMoney(playerid, -BizPrice[playerid]);
  9152. GiveMoney(BizOffer[playerid], BizPrice[playerid]);
  9153. format(str, sizeof(str), "* %s signs the contract.", PlayerICName(playerid));
  9154. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9155. format(str, sizeof(str), "* Congratulations! You bought the %s business from %s. Type /help to view your commands.", BizInfo[biz][bName], PlayerICName(BizOffer[playerid]));
  9156. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9157. PlayerInfo[BizOffer[playerid]][pBizKey] = -1;
  9158. PlayerInfo[playerid][pBizKey] = biz;
  9159. BizInfo[biz][bOwned] = 1;
  9160. BizOffer[playerid] = 999;
  9161. BizPrice[playerid] = 0;
  9162. BizID[playerid] = 0;
  9163. return 1;
  9164. }
  9165. else
  9166. {
  9167. SendClientMessage(playerid, COLOR_GREY, "The business owner is too far away.");
  9168. return 1;
  9169. }
  9170. }
  9171. return 1;
  9172. }
  9173. else
  9174. {
  9175. SendClientMessage(playerid, COLOR_GREY, "You can't afford the business.");
  9176. return 1;
  9177. }
  9178. }
  9179. else
  9180. {
  9181. SendClientMessage(playerid, COLOR_GREY, "No-one offered you a business.");
  9182. return 1;
  9183. }
  9184. }
  9185. else if(strcmp(x_job, "divorce", true) == 0)
  9186. {
  9187. if(DivorceOffer[playerid] < 999)
  9188. {
  9189. if(IsPlayerConnected(DivorceOffer[playerid]))
  9190. {
  9191. if(IsPlayerInRangeOfPlayer(10.0, playerid, DivorceOffer[playerid]))
  9192. {
  9193. GetPlayerICName(DivorceOffer[playerid], giveplayer, sizeof(giveplayer));
  9194. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9195. format(str, sizeof(str), "* You have accepted %s's request to divorce.", giveplayer);
  9196. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9197. format(str, sizeof(str), "* %s has accepted your request to be divorce.", sendername);
  9198. SendClientMessage(DivorceOffer[playerid], COLOR_LIGHTBLUE, str);
  9199. ClearMarriage(playerid);
  9200. ClearMarriage(DivorceOffer[playerid]);
  9201. return 1;
  9202. }
  9203. else
  9204. {
  9205. SendClientMessage(playerid, COLOR_GREY, "The player that sent you the Divorce Papers is not near you.");
  9206. return 1;
  9207. }
  9208. }
  9209. }
  9210. else
  9211. {
  9212. SendClientMessage(playerid, COLOR_GREY, "Nobody sent you any Divorce Papers.");
  9213. return 1;
  9214. }
  9215. }
  9216. //Player Position when /accept family isn't needed at all as there already Freeze system ~Troy
  9217. else if(strcmp(x_job, "family", true) == 0)
  9218. {
  9219. if(FamilyOffer[playerid] < 999)
  9220. {
  9221. if(IsPlayerConnected(FamilyOffer[playerid]))
  9222. {
  9223. if(PlayerInfo[FamilyOffer[playerid]][pFMember] != 255)
  9224. {
  9225. if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pFMember] != 255)
  9226. return SendClientMessage(playerid, COLOR_GREY, "You are already in a Faction / Family.");
  9227. if(IsPlayerInAnyVehicle(playerid))
  9228. return SendClientMessage(playerid, COLOR_GREY, "You can not be in a vehicle to do this.");
  9229. /*
  9230. new Float:x, Float:y, Float:z;
  9231. GetPlayerPos(playerid, x, y, z);
  9232. */
  9233. new family = PlayerInfo[FamilyOffer[playerid]][pFMember];
  9234. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9235. GetPlayerICName(FamilyOffer[playerid], giveplayer, sizeof(giveplayer));
  9236. format(str, sizeof(str), "* You have accepted %s's request to join %s, you are now a Member of it.", giveplayer, FamilyInfo[family][FamilyName]);
  9237. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9238. format(str, sizeof(str), "* %s has accepted your request and is now a Member of your Family.", sendername);
  9239. SendClientMessage(FamilyOffer[playerid], COLOR_LIGHTBLUE, str);
  9240. //SendClientMessage(playerid, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use.");
  9241. //SendClientMessage(playerid, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
  9242. //TogglePlayerControllable(playerid, false);
  9243. PlayerInfo[playerid][pFMember] = family;
  9244. PlayerInfo[playerid][pRank] = 1;
  9245. PlayerInfo[playerid][pClothes] = 0;
  9246. FamilyOffer[playerid] = 999;
  9247. FamilyInfo[family][FamilyMembers] ++;
  9248. // SetPlayerPos(playerid, x, y, z);
  9249. SaveFamilies();
  9250. return 1;
  9251. }
  9252. else
  9253. {
  9254. SendClientMessage(playerid, COLOR_GREY, "The Player who invited you is no longer a Member of a Family.");
  9255. return 1;
  9256. }
  9257. }
  9258. }
  9259. else
  9260. {
  9261. SendClientMessage(playerid, COLOR_GREY, "Nobody sent you a Family Invite.");
  9262. return 1;
  9263. }
  9264. }
  9265. else if(strcmp(x_job, "faction", true) == 0)
  9266. {
  9267. if(FactionOffer[playerid] < 999)
  9268. {
  9269. if(IsPlayerConnected(FactionOffer[playerid]))
  9270. {
  9271. if(PlayerInfo[FactionOffer[playerid]][pLeader] == 0 && PlayerInfo[FactionOffer[playerid]][pRecruiter] == 0) return SendClientMessage(playerid, COLOR_GREY, "The Player who invited you is no longer a Faction Leader.");
  9272. if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pFMember] != 255)
  9273. {
  9274. SendClientMessage(playerid, COLOR_GREY, "You are already in a Faction / Family.");
  9275. return 1;
  9276. }
  9277. PlayerInfo[playerid][pMember] = PlayerInfo[FactionOffer[playerid]][pMember];
  9278. PlayerInfo[playerid][pRank] = 0;
  9279. format(str, sizeof(str), "* You have accepted %s's request to join the %s, you are now a Member of it.", PlayerICName(FactionOffer[playerid]), GetFactionName(PlayerInfo[playerid][pMember]));
  9280. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9281. format(str, sizeof(str), "* %s has accepted your request and is now a Member of the %s.", PlayerICName(playerid), GetFactionName(PlayerInfo[playerid][pMember]));
  9282. SendClientMessage(FactionOffer[playerid], COLOR_LIGHTBLUE, str);
  9283. FactionOffer[playerid] = 999;
  9284. customRankName[playerid] = false;
  9285. format(customRank[playerid], 24, "None");
  9286. new member = PlayerInfo[playerid][pMember]; // stop revealing :)
  9287. if(member == 2 || member == 8 || member == 11) return 1;
  9288. return 1;
  9289. }
  9290. }
  9291. else
  9292. {
  9293. SendClientMessage(playerid, COLOR_GREY, "Nobody sent you a Faction Invite.");
  9294. return 1;
  9295. }
  9296. }
  9297. else if(strcmp(x_job, "group", true) == 0)
  9298. {
  9299. if(GroupOffer[playerid] < 999)
  9300. {
  9301. if(IsPlayerConnected(GroupOffer[playerid]))
  9302. {
  9303. if(PlayerInfo[playerid][pGroup] != 0) return SendClientMessage(playerid, COLOR_GREY, "You are already in a group, use /quitgroup.");
  9304. if(PlayerInfo[GroupOffer[playerid]][pGroup] == GROUP_NONE) return SendClientMessage(playerid, COLOR_GREY, "That player is no longer a member of the group.");
  9305. format(str, sizeof(str), "* You have accepted %s's request to join the %s, you are now a Member of it.", PlayerOOCName(GroupOffer[playerid]), GetPlayerGroupName(GroupOffer[playerid]));
  9306. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9307. format(str, sizeof(str), "* %s has accepted your request and is now a Member of the %s.", PlayerOOCName(playerid), GetPlayerGroupName(GroupOffer[playerid]));
  9308. SendClientMessage(GroupOffer[playerid], COLOR_LIGHTBLUE, str);
  9309. PlayerInfo[playerid][pGroup] = PlayerInfo[GroupOffer[playerid]][pGroup];
  9310. PlayerInfo[playerid][pGroupRank] = 0;
  9311. GroupOffer[playerid] = 999;
  9312. return 1;
  9313. }
  9314. }
  9315. else
  9316. {
  9317. SendClientMessage(playerid, COLOR_GREY, "Nobody sent you a Group Invite.");
  9318. return 1;
  9319. }
  9320. }
  9321. else if(strcmp(x_job, "witness", true) == 0)
  9322. {
  9323. if(MarryWitnessOffer[playerid] < 999)
  9324. {
  9325. if(IsPlayerConnected(MarryWitnessOffer[playerid]))
  9326. {
  9327. if(IsPlayerInRangeOfPlayer(10.0, playerid, MarryWitnessOffer[playerid]))
  9328. {
  9329. GetPlayerICName(MarryWitnessOffer[playerid], giveplayer, sizeof(giveplayer));
  9330. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9331. format(str, sizeof(str), "* You have accepted %s's request to be their Marriage Witness.", giveplayer);
  9332. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9333. format(str, sizeof(str), "* %s has accepted your request to be your Marriage Witness.", sendername);
  9334. SendClientMessage(MarryWitnessOffer[playerid], COLOR_LIGHTBLUE, str);
  9335. MarryWitness[MarryWitnessOffer[playerid]] = playerid;
  9336. MarryWitnessOffer[playerid] = 999;
  9337. return 1;
  9338. }
  9339. else
  9340. {
  9341. SendClientMessage(playerid, COLOR_GREY, "The player that requested you to be their Marriage Witness is not near you.");
  9342. return 1;
  9343. }
  9344. }
  9345. }
  9346. else
  9347. {
  9348. SendClientMessage(playerid, COLOR_GREY, "Nobody has asked you to be their Marriage Witness.");
  9349. return 1;
  9350. }
  9351. }
  9352. else if(strcmp(x_job, "marriage", true) == 0)
  9353. {
  9354. if(ProposeOffer[playerid] < 999)
  9355. {
  9356. if(!IsPlayerInRangeOfPoint(playerid, 100.0, -1268.99, 56.59, 991.94))
  9357. {
  9358. SendClientMessage(playerid, COLOR_GREY, "You are not at the Church in Jefferson.");
  9359. return 1;
  9360. }
  9361. if(IsPlayerConnected(ProposeOffer[playerid]))
  9362. {
  9363. if(IsPlayerInRangeOfPlayer(10.0, playerid, ProposeOffer[playerid]))
  9364. {
  9365. if(MarryWitness[ProposeOffer[playerid]] == 999)
  9366. {
  9367. SendClientMessage(playerid, COLOR_GREY, "The proposer doesn't have a Marriage Witness.");
  9368. return 1;
  9369. }
  9370. if(IsPlayerConnected(MarryWitness[ProposeOffer[playerid]]))
  9371. {
  9372. if(IsPlayerInRangeOfPlayer(12.0, ProposeOffer[playerid], MarryWitness[ProposeOffer[playerid]]))
  9373. {
  9374. GetPlayerICName(ProposeOffer[playerid], giveplayer, sizeof(giveplayer));
  9375. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9376. format(str, sizeof(str), "* You have accepted %s's request to be your Husband.", giveplayer);
  9377. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9378. format(str, sizeof(str), "* %s has accepted your request to be your Wife.", sendername);
  9379. SendClientMessage(ProposeOffer[playerid], COLOR_LIGHTBLUE, str);
  9380. format(str, sizeof(str), "Priest: %s do you take %s as your lovely Husband? (type 'yes', anything else will reject the Marriage)", sendername, giveplayer);
  9381. SendClientMessage(playerid, COLOR_WHITE, str);
  9382. MarriageCeremoney[playerid] = 1;
  9383. ProposedTo[ProposeOffer[playerid]] = playerid;
  9384. GotProposedBy[playerid] = ProposeOffer[playerid];
  9385. MarryWitness[ProposeOffer[playerid]] = 999;
  9386. ProposeOffer[playerid] = 999;
  9387. return 1;
  9388. }
  9389. else
  9390. {
  9391. SendClientMessage(playerid, COLOR_GREY, "The Marriage Witness is not near your proposer.");
  9392. return 1;
  9393. }
  9394. }
  9395. return 1;
  9396. }
  9397. else
  9398. {
  9399. SendClientMessage(playerid, COLOR_GREY, "The player that proposed to you is not near you.");
  9400. return 1;
  9401. }
  9402. }
  9403. }
  9404. else
  9405. {
  9406. SendClientMessage(playerid, COLOR_GREY, "Nobody Proposed to you.");
  9407. return 1;
  9408. }
  9409. }
  9410. else if(strcmp(x_job, "ticket", true) == 0)
  9411. {
  9412. /* if(TicketOffer[playerid] < 999)
  9413. {
  9414. if(IsPlayerConnected(TicketOffer[playerid]))
  9415. {
  9416. if(IsPlayerInRangeOfPlayer(5.0, playerid, TicketOffer[playerid]))
  9417. {
  9418. if(PlayerInfo[playerid][pCash] < TicketMoney[playerid])
  9419. {
  9420. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  9421. return 1;
  9422. }
  9423. GetPlayerICName(TicketOffer[playerid], giveplayer, sizeof(giveplayer));
  9424. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9425. format(str, sizeof(str), "* You have paid the Ticket of $%d to %s %s.", TicketMoney[playerid], GetPlayerRank(TicketOffer[playerid]), giveplayer);
  9426. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9427. format(str, sizeof(str), "* %s has paid your Ticket of $%d.", sendername, TicketMoney[playerid]);
  9428. SendClientMessage(TicketOffer[playerid], COLOR_LIGHTBLUE, str);
  9429. format(str, sizeof(str), "* %s has paid the Ticket.", sendername);
  9430. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  9431. PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] -TicketMoney[playerid];
  9432. GivePlayerMoney(playerid, -TicketMoney[playerid]);
  9433. TaxValue += TicketMoney[playerid];
  9434. SAPD += (TicketMoney[playerid] / 2);
  9435. TicketOffer[playerid] = 999;
  9436. TicketMoney[playerid] = 0;
  9437. SaveStuff();
  9438. return 1;
  9439. }
  9440. else return SendClientMessage(playerid, COLOR_GREY, "The Officer is not near you.");
  9441. }
  9442. }
  9443. else return SendClientMessage(playerid, COLOR_GREY, "Nobody offered you a Ticket.");*/
  9444. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Type /mytickets to view your tickets.");
  9445. }
  9446. else if(strcmp(x_job, "handshake", true) == 0)
  9447. {
  9448. if(HSHAKEOFFER[playerid] < 999)
  9449. {
  9450. if(IsPlayerConnected(HSHAKEOFFER[playerid]))
  9451. {
  9452. if(!IsPlayerInAnyVehicle(playerid))
  9453. {
  9454. if(IsPlayerInRangeOfPlayer(2.0, playerid, HSHAKEOFFER[playerid]))
  9455. {
  9456. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  9457. if(IsPlayerInAnyVehicle(HSHAKEOFFER[playerid])) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  9458. format(str, sizeof(str), "* You have shaken %s's hand.", PlayerICName(HSHAKEOFFER[playerid]));
  9459. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9460. format(str, sizeof(str), "* %s has accepted the Handshake.", PlayerICName(playerid));
  9461. SendClientMessage(HSHAKEOFFER[playerid], COLOR_LIGHTBLUE, str);
  9462. ClearAnimationsEx(playerid);
  9463. ClearAnimationsEx(HSHAKEOFFER[playerid]);
  9464. SetPlayerFacingPlayer(playerid, HSHAKEOFFER[playerid]);
  9465. SetPlayerFacingPlayer(HSHAKEOFFER[playerid], playerid);
  9466. if(HShakeType[playerid] == 1)
  9467. {
  9468. ApplyAnimationEx(playerid, "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0);
  9469. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "hndshkaa", 4.0, 0, 0, 0, 0, 0);
  9470. }
  9471. else if(HShakeType[playerid] == 2)
  9472. {
  9473. ApplyAnimationEx(playerid, "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0);
  9474. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "hndshkba", 4.0, 0, 0, 0, 0, 0);
  9475. }
  9476. else if(HShakeType[playerid] == 3)
  9477. {
  9478. ApplyAnimationEx(playerid, "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0);
  9479. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "hndshkda", 4.0, 0, 0, 0, 0, 0);
  9480. }
  9481. else if(HShakeType[playerid] == 4)
  9482. {
  9483. ApplyAnimationEx(playerid, "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0);
  9484. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "hndshkea", 4.0, 0, 0, 0, 0, 0);
  9485. }
  9486. else if(HShakeType[playerid] == 5)
  9487. {
  9488. ApplyAnimationEx(playerid, "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0);
  9489. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "hndshkfa", 4.0, 0, 0, 0, 0, 0);
  9490. }
  9491. else if(HShakeType[playerid] == 6)
  9492. {
  9493. ApplyAnimationEx(playerid, "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0);
  9494. ApplyAnimationEx(HSHAKEOFFER[playerid], "GANGS", "prtial_hndshk_biz_01", 4.0, 0, 0, 0, 0, 0);
  9495. }
  9496. HSHAKEOFFER[playerid] = 999;
  9497. HShakeType[playerid] = 0;
  9498. return 1;
  9499. }
  9500. else
  9501. {
  9502. SendClientMessage(playerid, COLOR_GREY, "You must be standing closer.");
  9503. return 1;
  9504. }
  9505. }
  9506. else
  9507. {
  9508. SendClientMessage(playerid, COLOR_GREY, "You must exit the vehicle.");
  9509. return 1;
  9510. }
  9511. }
  9512. }
  9513. else
  9514. {
  9515. SendClientMessage(playerid, COLOR_GREY, "Nobody offered to shake your hand.");
  9516. return 1;
  9517. }
  9518. }
  9519. else if(strcmp(x_job, "kiss", true) == 0)
  9520. {
  9521. if(KissOffer[playerid] < 999)
  9522. {
  9523. if(IsPlayerConnected(KissOffer[playerid]))
  9524. {
  9525. if(!IsPlayerInAnyVehicle(playerid))
  9526. {
  9527. if(IsPlayerInRangeOfPlayer(2.0, playerid, KissOffer[playerid]))
  9528. {
  9529. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  9530. if(IsPlayerInAnyVehicle(KissOffer[playerid])) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  9531. GetPlayerICName(KissOffer[playerid], giveplayer, sizeof(giveplayer));
  9532. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9533. format(str, sizeof(str), "* You have kissed %s.", giveplayer);
  9534. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9535. format(str, sizeof(str), "* %s has accepted the Kiss.", sendername);
  9536. SendClientMessage(KissOffer[playerid], COLOR_LIGHTBLUE, str);
  9537. ClearAnimationsEx(playerid);
  9538. ClearAnimationsEx(KissOffer[playerid]);
  9539. /*new Float: fX, Float: fY, Float: fZ, Float: fA, Float: dist = 0.9;
  9540. SetPlayerFacingPlayer(playerid, KissOffer[playerid]); //face the person
  9541. GetXYInFrontOfPlayer(playerid, fX, fY, fZ, fA, dist); //get the position infront of me to setpos them
  9542. SetPlayerPos(KissOffer[playerid], fX, fY, fZ); //set their pos
  9543. SetPlayerFacingPlayer(KissOffer[playerid], playerid); //make them face me*/
  9544. if(KissType[playerid] == 1)
  9545. {
  9546. ApplyAnimationEx(playerid, "KISSING", "Grlfrd_Kiss_01", 4.0, 0, 0, 0, 0, 0);
  9547. ApplyAnimationEx(KissOffer[playerid], "KISSING", "Playa_Kiss_01", 4.0, 0, 0, 0, 0, 0);
  9548. }
  9549. else if(KissType[playerid] == 2)
  9550. {
  9551. ApplyAnimationEx(playerid, "KISSING", "Grlfrd_Kiss_02", 4.0, 0, 0, 0, 0, 0);
  9552. ApplyAnimationEx(KissOffer[playerid], "KISSING", "Playa_Kiss_02", 4.0, 0, 0, 0, 0, 0);
  9553. }
  9554. else if(KissType[playerid] == 3)
  9555. {
  9556. ApplyAnimationEx(playerid, "KISSING", "Grlfrd_Kiss_03", 4.0, 0, 0, 0, 0, 0);
  9557. ApplyAnimationEx(KissOffer[playerid], "KISSING", "Playa_Kiss_03", 4.0, 0, 0, 0, 0, 0);
  9558. }
  9559. KissOffer[playerid] = 999;
  9560. KissType[playerid] = 0;
  9561. return 1;
  9562. }
  9563. else
  9564. {
  9565. SendClientMessage(playerid, COLOR_GREY, "You must be standing closer.");
  9566. return 1;
  9567. }
  9568. }
  9569. else
  9570. {
  9571. SendClientMessage(playerid, COLOR_GREY, "You must exit the vehicle.");
  9572. return 1;
  9573. }
  9574. }
  9575. }
  9576. else
  9577. {
  9578. SendClientMessage(playerid, COLOR_GREY, "Nobody offered to kiss you.");
  9579. return 1;
  9580. }
  9581. }
  9582. else if(strcmp(x_job, "contract", true) == 0)
  9583. {
  9584. if(ContractOffer[playerid] < 999)
  9585. {
  9586. if(GoChase[playerid] == 999)
  9587. {
  9588. if(IsPlayerConnected(ContractOffer[playerid]))
  9589. {
  9590. if(PlayerInfo[ContractID[playerid]][pHeadValue] != 0)
  9591. {
  9592. new hitname[MAX_PLAYER_NAME];
  9593. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9594. GetPlayerICName(ContractOffer[playerid], giveplayer, sizeof(giveplayer));
  9595. GetPlayerICName(ContractID[playerid], hitname, sizeof(hitname));
  9596. format(str, sizeof(str), "* You have accepted the contract to kill %s, you will receive $%d when completed.", hitname, PlayerInfo[ContractID[playerid]][pHeadValue] /2);
  9597. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9598. format(str, sizeof(str), "Hitman %s has accepted the contract to kill %s.", sendername, hitname);
  9599. foreach( new i: Player )
  9600. {
  9601. if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
  9602. {
  9603. SendClientMessage(i, COLOR_YELLOW, str);
  9604. }
  9605. }
  9606. GoChase[playerid] = ContractID[playerid];
  9607. ContractOffer[playerid] = 999;
  9608. ContractID[playerid] = 999;
  9609. return 1;
  9610. }
  9611. else
  9612. {
  9613. SendClientMessage(playerid, COLOR_GREY, "The contract has expired.");
  9614. return 1;
  9615. }
  9616. }
  9617. }
  9618. else
  9619. {
  9620. SendClientMessage(playerid, COLOR_GREY, "You are currently busy with a contract.");
  9621. return 1;
  9622. }
  9623. }
  9624. else
  9625. {
  9626. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you a contract.");
  9627. return 1;
  9628. }
  9629. }
  9630. else if(strcmp(x_job, "boxing", true) == 0)
  9631. {
  9632. if(BoxOffer[playerid] < 999)
  9633. {
  9634. if(IsPlayerConnected(BoxOffer[playerid]))
  9635. {
  9636. new points;
  9637. new mypoints;
  9638. GetPlayerICName(BoxOffer[playerid], giveplayer, sizeof(giveplayer));
  9639. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9640. new level = PlayerInfo[BoxOffer[playerid]][pBoxSkill];
  9641. if(level >= 0 && level <= 49)
  9642. {
  9643. points = 40;
  9644. }
  9645. else if(level >= 50 && level <= 99)
  9646. {
  9647. points = 50;
  9648. }
  9649. else if(level >= 100 && level <= 199)
  9650. {
  9651. points = 60;
  9652. }
  9653. else if(level >= 200 && level <= 399)
  9654. {
  9655. points = 70;
  9656. }
  9657. else if(level >= 400)
  9658. {
  9659. points = 80;
  9660. }
  9661. if(PlayerInfo[playerid][pJob] == 12)
  9662. {
  9663. new clevel = PlayerInfo[playerid][pBoxSkill];
  9664. if(clevel >= 0 && clevel <= 49)
  9665. {
  9666. mypoints = 40;
  9667. }
  9668. else if(clevel >= 50 && clevel <= 99)
  9669. {
  9670. mypoints = 50;
  9671. }
  9672. else if(clevel >= 100 && clevel <= 199)
  9673. {
  9674. mypoints = 60;
  9675. }
  9676. else if(clevel >= 200 && clevel <= 399)
  9677. {
  9678. mypoints = 70;
  9679. }
  9680. else if(clevel >= 400)
  9681. {
  9682. mypoints = 80;
  9683. }
  9684. }
  9685. else
  9686. {
  9687. mypoints = 30;
  9688. }
  9689. format(str, sizeof(str), "* You have accepted the Boxing Challenge from %s, and will fight with %d Health.", giveplayer, mypoints);
  9690. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9691. format(str, sizeof(str), "* %s has accepted your Boxing Challenge Request, you will fight with %d Health.", sendername, points);
  9692. GetPlayerArmour(playerid, PlayerKevBox[playerid]);
  9693. GetPlayerArmour(BoxOffer[playerid], PlayerKevBox[BoxOffer[playerid]]);
  9694. SendClientMessage(BoxOffer[playerid], COLOR_LIGHTBLUE, str);
  9695. SetPlayerHealth(playerid, mypoints);
  9696. SetPlayerHealth(BoxOffer[playerid], points);
  9697. SetPlayerArmour(playerid, 0);
  9698. SetPlayerArmour(BoxOffer[playerid], 0);
  9699. SetPlayerInterior(playerid, 5);
  9700. SetPlayerInterior(BoxOffer[playerid], 5);
  9701. SetPlayerPos(playerid, 762.9852, 2.4439, 1001.5942);
  9702. SetPlayerFacingAngle(playerid, 131.8632);
  9703. SetPlayerPos(BoxOffer[playerid], 758.7064, -1.8038, 1001.5942);
  9704. SetPlayerFacingAngle(BoxOffer[playerid], 313.1165);
  9705. TogglePlayerControllable(playerid, false);
  9706. TogglePlayerControllable(BoxOffer[playerid], 0);
  9707. SetCameraBehindPlayer(playerid);
  9708. SetCameraBehindPlayer(BoxOffer[playerid]);
  9709. displayCenterHUDInfo(playerid, "~r~Waiting.", 8); //display for 8 seconds
  9710. displayCenterHUDInfo(BoxOffer[playerid], "~r~Waiting.", 8); //display for 8 seconds
  9711. new name[MAX_PLAYER_NAME];
  9712. new dstring[MAX_PLAYER_NAME];
  9713. new wstring[MAX_PLAYER_NAME];
  9714. GetPlayerICName(playerid, name, sizeof(name));
  9715. format(dstring, sizeof(dstring), "%s", name);
  9716. strmid(wstring, dstring, 0, strlen(dstring), 255);
  9717. if(strcmp(Titel[TitelName], wstring, true) == 0)
  9718. {
  9719. format(str, sizeof(str), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", sendername, giveplayer);
  9720. BoxingAnn(COLOR_WHITE, str);
  9721. TBoxer = playerid;
  9722. BoxDelay = 60;
  9723. }
  9724. GetPlayerICName(BoxOffer[playerid], name, sizeof(name));
  9725. format(dstring, sizeof(dstring), "%s", name);
  9726. strmid(wstring, dstring, 0, strlen(dstring), 255);
  9727. if(strcmp(Titel[TitelName], wstring, true) == 0)
  9728. {
  9729. format(str, sizeof(str), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", giveplayer, sendername);
  9730. BoxingAnn(COLOR_WHITE, str);
  9731. TBoxer = BoxOffer[playerid];
  9732. BoxDelay = 60;
  9733. }
  9734. BoxWaitTime[playerid] = 1;
  9735. BoxWaitTime[BoxOffer[playerid]] = 1;
  9736. if(BoxDelay < 1)
  9737. {
  9738. BoxDelay = 20;
  9739. }
  9740. InRing = 1;
  9741. Boxer1 = BoxOffer[playerid];
  9742. Boxer2 = playerid;
  9743. SetPlayerArmedWeapon(playerid, 0);
  9744. SetPlayerArmedWeapon(BoxOffer[playerid], 0);
  9745. PlayerBoxing[playerid] = 1;
  9746. PlayerBoxing[BoxOffer[playerid]] = 1;
  9747. BoxOffer[playerid] = 999;
  9748. return 1;
  9749. }
  9750. return 1;
  9751. }
  9752. else
  9753. {
  9754. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you a Boxing Challenge.");
  9755. return 1;
  9756. }
  9757. }
  9758. else if(strcmp(x_job, "taxi", true) == 0)
  9759. {
  9760. if(PlayerInfo[playerid][pJob] != 14 && PlayerInfo[playerid][pMember] != 10)
  9761. return SendClientMessage(playerid, COLOR_GREY, "You are not a taxi driver.");
  9762. if(TransportDuty[playerid] != 1)
  9763. {
  9764. SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
  9765. return 1;
  9766. }
  9767. new
  9768. customerid = GetPlayerIDFromName(LastCaller);
  9769. if(IsPlayerConnected(customerid))
  9770. {
  9771. new Float:X, Float:Y, Float:Z;
  9772. for(new i = 0; i < MAX_TAXICALLS; i++)
  9773. {
  9774. if(strlen(LastCaller) > 3)
  9775. {
  9776. if(strcmp(TaxiCInfo[i][taxiname], PlayerICName(customerid), false) == 0)
  9777. {
  9778. format(str, sizeof(str), "%s in %s, has been marked on your GPS.", TaxiCInfo[i][taxiname], TaxiCInfo[i][taxilocation]);
  9779. SendClientMessage(playerid, -1, str);
  9780. TaxiCID[playerid] = TaxiCInfoID[i];
  9781. TaxiCInfoID[i] = -1;
  9782. TaxiCInfo[i][taxiname] = "0";
  9783. break;
  9784. }
  9785. }
  9786. }
  9787. GetPlayerPos(TaxiCID[playerid], X, Y, Z);
  9788. SetPlayerCheckpointEx(playerid, X, Y, Z, 1.0);
  9789. CP[playerid] = CHECKPOINT_TAXI_CALLER;
  9790. LastCaller = "0";
  9791. return 1;
  9792. }
  9793. else
  9794. {
  9795. SendClientMessage(playerid, COLOR_GREY, "Nobody called for a Taxi yet.");
  9796. return 1;
  9797. }
  9798. }
  9799. else if(strcmp(x_job, "bus", true) == 0)
  9800. {
  9801. if(TransportDuty[playerid] != 2)
  9802. {
  9803. SendClientMessage(playerid, COLOR_GREY, "You are not a Bus Driver.");
  9804. return 1;
  9805. }
  9806. if(BusCallTime[playerid] > 0)
  9807. {
  9808. SendClientMessage(playerid, COLOR_GREY, "You have already accepted a Bus Call.");
  9809. return 1;
  9810. }
  9811. if(BusCall < 999)
  9812. {
  9813. if(IsPlayerConnected(BusCall))
  9814. {
  9815. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9816. GetPlayerICName(BusCall, giveplayer, sizeof(giveplayer));
  9817. format(str, sizeof(str), "* You have accepted the Bus Call from %s, you will see the marker untill you have reached it.", giveplayer);
  9818. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9819. format(str, sizeof(str), "* Bus Driver %s has accepted your Bus Call please wait at your current Position.", sendername);
  9820. SendClientMessage(BusCall, COLOR_LIGHTBLUE, str);
  9821. new Float:X, Float:Y, Float:Z;
  9822. GetPlayerPos(BusCall, X, Y, Z);
  9823. SetPlayerCheckpointEx(playerid, X, Y, Z, 5);
  9824. displayCenterHUDInfo(playerid, "~w~Bus Caller drive to the~n~~r~redmarker", 8); //display for 8 seconds
  9825. BusCallTime[playerid] = 1;
  9826. BusAccepted[playerid] = BusCall;
  9827. BusCall = 999;
  9828. return 1;
  9829. }
  9830. }
  9831. else
  9832. {
  9833. SendClientMessage(playerid, COLOR_GREY, "Nobody called for a Bus yet.");
  9834. return 1;
  9835. }
  9836. }
  9837. else if(strcmp(x_job, "medic", true) == 0)
  9838. {
  9839. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
  9840. {
  9841. if(MedicCallTime[playerid] > 0)
  9842. {
  9843. SendClientMessage(playerid, COLOR_GREY, "You have already accepted a Medic Call.");
  9844. return 1;
  9845. }
  9846. if(MedicCall < 999)
  9847. {
  9848. if(IsPlayerConnected(MedicCall))
  9849. {
  9850. new Float:X, Float:Y, Float:Z;
  9851. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9852. GetPlayerICName(MedicCall, giveplayer, sizeof(giveplayer));
  9853. format(str, sizeof(str), "* You have accepted the Medic Call from %s, you have 30 Seconds to get there.", giveplayer);
  9854. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9855. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* After the 30 Seconds the Red Marker will disappear.");
  9856. format(str, sizeof(str), "* Medic %s has accepted your Medic Call please wait at your current Position.", sendername);
  9857. SendClientMessage(MedicCall, COLOR_LIGHTBLUE, str);
  9858. GetPlayerPos(MedicCall, X, Y, Z);
  9859. SetPlayerCheckpointEx(playerid, X, Y, Z, 5);
  9860. displayCenterHUDInfo(playerid, "~w~Medic Caller drive to the~n~~r~redmarker", 8); //display for 8 seconds
  9861. MedicCallTime[playerid] = 1;
  9862. MedicCall = 999;
  9863. return 1;
  9864. }
  9865. }
  9866. else
  9867. {
  9868. SendClientMessage(playerid, COLOR_GREY, "Nobody called for a Medic yet.");
  9869. return 1;
  9870. }
  9871. }
  9872. else
  9873. {
  9874. SendClientMessage(playerid, COLOR_GREY, "You are not a Medic.");
  9875. return 1;
  9876. }
  9877. }
  9878. else if(strcmp(x_job, "lawyer", true) == 0)
  9879. {
  9880. if(PlayerInfo[playerid][pJob] == 2)
  9881. {
  9882. if(LawyerCallTime[playerid] > 0)
  9883. {
  9884. SendClientMessage(playerid, COLOR_GREY, "You have already accepted a Lawyer Call.");
  9885. return 1;
  9886. }
  9887. if(LawyerCall < 999)
  9888. {
  9889. if(IsPlayerConnected(LawyerCall))
  9890. {
  9891. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9892. GetPlayerICName(LawyerCall, giveplayer, sizeof(giveplayer));
  9893. format(str, sizeof(str), "* You have accepted the Lawyer Call from %s, you have 30 Seconds to get there.", giveplayer);
  9894. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9895. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* After the 30 Seconds the Red Marker will disappear.");
  9896. format(str, sizeof(str), "* Lawyer %s has accepted your Lawyer Call please wait at your current Position.", sendername);
  9897. SendClientMessage(LawyerCall, COLOR_LIGHTBLUE, str);
  9898. new Float:X, Float:Y, Float:Z;
  9899. GetPlayerPos(LawyerCall, X, Y, Z);
  9900. SetPlayerCheckpointEx(playerid, X, Y, Z, 5);
  9901. displayCenterHUDInfo(playerid, "~w~Lawyer Caller drive to the~n~~r~redmarker", 8); //display for 8 seconds
  9902. LawyerCallTime[playerid] = 1;
  9903. LawyerCall = 999;
  9904. return 1;
  9905. }
  9906. }
  9907. else
  9908. {
  9909. SendClientMessage(playerid, COLOR_GREY, "Nobody called for a Lawyer yet.");
  9910. return 1;
  9911. }
  9912. }
  9913. else
  9914. {
  9915. SendClientMessage(playerid, COLOR_GREY, "You are not a Lawyer.");
  9916. return 1;
  9917. }
  9918. }
  9919. else if(strcmp(x_job, "mechanic", true) == 0)
  9920. {
  9921. if(PlayerInfo[playerid][pJob] != 7)
  9922. {
  9923. SendClientMessage(playerid, COLOR_GREY, "You are not a Mechanic.");
  9924. return 1;
  9925. }
  9926. if(MechanicCallTime[playerid] > 0)
  9927. {
  9928. SendClientMessage(playerid, COLOR_GREY, "You have already accepted a Mechanic Call.");
  9929. return 1;
  9930. }
  9931. if(MechanicCall < 999)
  9932. {
  9933. if(IsPlayerConnected(MechanicCall))
  9934. {
  9935. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  9936. GetPlayerICName(MechanicCall, giveplayer, sizeof(giveplayer));
  9937. format(str, sizeof(str), "* You have accepted the Mechanic Call from %s, you have 30 Seconds to get there.", giveplayer);
  9938. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  9939. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* After the 30 Seconds the Red Marker will disappear.");
  9940. format(str, sizeof(str), "* Mechanic %s has accepted your Mechanic Call please wait at your current Position.", sendername);
  9941. SendClientMessage(MechanicCall, COLOR_LIGHTBLUE, str);
  9942. new Float:X, Float:Y, Float:Z;
  9943. GetPlayerPos(MechanicCall, X, Y, Z);
  9944. SetPlayerCheckpointEx(playerid, X, Y, Z, 5);
  9945. displayCenterHUDInfo(playerid, "~w~Mechanic Caller drive to the~n~~r~redmarker", 8); //display for 8 seconds
  9946. MechanicCallTime[playerid] = 1;
  9947. MechanicCall = 999;
  9948. return 1;
  9949. }
  9950. }
  9951. else
  9952. {
  9953. SendClientMessage(playerid, COLOR_GREY, "Nobody called for a Mechanic yet.");
  9954. return 1;
  9955. }
  9956. }
  9957. else if(strcmp(x_job, "refill", true) == 0)
  9958. {
  9959. OnRefillAccept(playerid);
  9960. }
  9961. else if(strcmp(x_job, "live", true) == 0)
  9962. {
  9963. if(LiveOffer[playerid] < 999)
  9964. {
  9965. if(IsPlayerConnected(LiveOffer[playerid]))
  9966. {
  9967. if(IsPlayerInRangeOfPlayer(5.0, playerid, LiveOffer[playerid]))
  9968. {
  9969. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are frozen until the live conversation ends.");
  9970. SendClientMessage(LiveOffer[playerid], COLOR_LIGHTBLUE, "* You are frozen until the live conversation ends (use /live again).");
  9971. TogglePlayerControllable(playerid, false);
  9972. TogglePlayerControllable(LiveOffer[playerid], 0);
  9973. TalkingLive[playerid] = LiveOffer[playerid];
  9974. TalkingLive[LiveOffer[playerid]] = playerid;
  9975. LiveOffer[playerid] = 999;
  9976. return 1;
  9977. }
  9978. else
  9979. {
  9980. SendClientMessage(playerid, COLOR_GREY, "You are to far away from the News Reporter.");
  9981. return 1;
  9982. }
  9983. }
  9984. return 1;
  9985. }
  9986. else
  9987. {
  9988. SendClientMessage(playerid, COLOR_GREY, "Nobody gave you a Live Conversation offer.");
  9989. return 1;
  9990. }
  9991. }
  9992. else if(strcmp(x_job, "defense", true) == 0)
  9993. {
  9994. if(DefenseOffer[playerid] < 999)
  9995. {
  9996. if(PlayerInfo[playerid][pCash] > DefensePrice[playerid])
  9997. {
  9998. if(IsPlayerConnected(DefenseOffer[playerid]))
  9999. {
  10000. new points = PlayerInfo[playerid][pWantedLevel];
  10001. if(points == 0)
  10002. {
  10003. SendClientMessage(playerid, COLOR_GREY, "You are not wanted.");
  10004. DefenseOffer[playerid] = 999;
  10005. DefensePrice[playerid] = 0;
  10006. return 1;
  10007. }
  10008. GetPlayerICName(DefenseOffer[playerid], giveplayer, sizeof(giveplayer));
  10009. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10010. format(str, sizeof(str), "* Lawyer %s has defended you and lowered your wanted level for $%d.", giveplayer, DefensePrice[playerid]);
  10011. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10012. format(str, sizeof(str), "* %s accepted the Defense, the $%d was transferred to your Bank Account.", sendername, DefensePrice[playerid]);
  10013. SendClientMessage(DefenseOffer[playerid], COLOR_LIGHTBLUE, str);
  10014. format(str, sizeof(str), "%s has accepted the defense from %s for $%d", sendername, giveplayer, DefensePrice[playerid]);
  10015. PayLog(str);
  10016. PlayerInfo[DefenseOffer[playerid]][pAccount] += DefensePrice[playerid];
  10017. GiveMoney(playerid, -DefensePrice[playerid]);
  10018. PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
  10019. PlayerInfo[playerid][pWantedLevel] = points -1;
  10020. if(points == 6) SetPlayerToTeamColor(playerid);
  10021. DefenseOffer[playerid] = 999;
  10022. DefensePrice[playerid] = 0;
  10023. return 1;
  10024. }
  10025. return 1;
  10026. }
  10027. else
  10028. {
  10029. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10030. return 1;
  10031. }
  10032. }
  10033. else
  10034. {
  10035. SendClientMessage(playerid, COLOR_GREY, "Nobody has offered to defend you.");
  10036. return 1;
  10037. }
  10038. }
  10039. else if(strcmp(x_job, "bodyguard", true) == 0)
  10040. {
  10041. if(GuardOffer[playerid] < 999)
  10042. {
  10043. if(GetMoney(playerid) > GuardPrice[playerid])
  10044. {
  10045. if(IsPlayerConnected(GuardOffer[playerid]))
  10046. {
  10047. if(IsPlayerInRangeOfPlayer(12.0, playerid, GuardOffer[playerid]))
  10048. {
  10049. if(UseAcceptTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 60 seconds.");
  10050. GetPlayerICName(GuardOffer[playerid], giveplayer, sizeof(giveplayer));
  10051. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10052. format(str, sizeof(str), "* You accepted the protection for $%d from bodyguard %s.", GuardPrice[playerid], giveplayer);
  10053. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10054. format(str, sizeof(str), "%s accepted the protection for $%d from bodyguard %s.", sendername, GuardPrice[playerid], giveplayer);
  10055. PayLog(str);
  10056. format(str, sizeof(str), "* %s accepted your protection the $%d was added to your bank account.", sendername, GuardPrice[playerid]);
  10057. SendClientMessage(GuardOffer[playerid], COLOR_LIGHTBLUE, str);
  10058. PlayerInfo[GuardOffer[playerid]][pAccount] += GuardPrice[playerid];
  10059. GuardingPrice[playerid] = GuardPrice[playerid];
  10060. GiveMoney(playerid, -GuardPrice[playerid]);
  10061. GuardedBy[playerid] = GuardOffer[playerid];
  10062. Guarding[GuardedBy[playerid]] = playerid;
  10063. SetPlayerMarkerForPlayer(GuardOffer[playerid], playerid, COLOR_LIGHTRED);
  10064. SetPlayerMarkerForPlayer(playerid, GuardOffer[playerid], COLOR_LIGHTRED);
  10065. GuardOffer[playerid] = 999;
  10066. GuardPrice[playerid] = 0;
  10067. UseAcceptTimer[playerid] = 1;
  10068. SetTimerEx("Timer_UseAccept", 60 *1000, 0, "i", playerid);
  10069. return 1;
  10070. }
  10071. else
  10072. {
  10073. SendClientMessage(playerid, COLOR_GREY, "Your bodyguard is too far away.");
  10074. }
  10075. return 1;
  10076. }
  10077. return 1;
  10078. }
  10079. else
  10080. {
  10081. SendClientMessage(playerid, COLOR_GREY, "You can't afford the protection.");
  10082. return 1;
  10083. }
  10084. }
  10085. else
  10086. {
  10087. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you protection.");
  10088. return 1;
  10089. }
  10090. }
  10091. else if(strcmp(x_job, "heal", true) == 0)
  10092. {
  10093. if(healOffer[playerid] < 999)
  10094. {
  10095. if(GetMoney(playerid) > healPrice[playerid])
  10096. {
  10097. if(IsPlayerConnected(healOffer[playerid]))
  10098. {
  10099. if(IsPlayerInRangeOfPlayer(12.0, playerid, healOffer[playerid]))
  10100. {
  10101. if(UseAcceptTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 60 seconds.");
  10102. GetPlayerICName(healOffer[playerid], giveplayer, sizeof(giveplayer));
  10103. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10104. format(str, sizeof(str), "* You accepted the medical treatment for $%d from paramedic %s.", healPrice[playerid], giveplayer);
  10105. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10106. format(str, sizeof(str), "%s accepted the medical treatment for $%d from paramedic %s.", sendername, healPrice[playerid], giveplayer);
  10107. PayLog(str);
  10108. format(str, sizeof(str), "* %s accepted your medical treatment, the $%d was added to your bank account.", sendername, healPrice[playerid]);
  10109. SendClientMessage(healOffer[playerid], COLOR_LIGHTBLUE, str);
  10110. PlayerInfo[healOffer[playerid]][pAccount] += healPrice[playerid];
  10111. GiveMoney(playerid, -healPrice[playerid]);
  10112. SetPlayerHealth(playerid, 100);
  10113. healOffer[playerid] = 999;
  10114. healPrice[playerid] = 0;
  10115. UseAcceptTimer[playerid] = 1;
  10116. SetTimerEx("Timer_UseAccept", 60 *1000, 0, "i", playerid);
  10117. return 1;
  10118. }
  10119. else
  10120. {
  10121. SendClientMessage(playerid, COLOR_GREY, "The paramedic is too far away.");
  10122. }
  10123. return 1;
  10124. }
  10125. return 1;
  10126. }
  10127. else
  10128. {
  10129. SendClientMessage(playerid, COLOR_GREY, "You can't afford the heal.");
  10130. return 1;
  10131. }
  10132. }
  10133. else
  10134. {
  10135. SendClientMessage(playerid, COLOR_GREY, "Nobody offered to heal you.");
  10136. return 1;
  10137. }
  10138. }
  10139. else if(strcmp(x_job, "vest", true) == 0)
  10140. {
  10141. if(VestOffer[playerid] < 999)
  10142. {
  10143. if(PlayerInfo[playerid][pCash] > VestPrice[playerid])
  10144. {
  10145. if(IsPlayerConnected(VestOffer[playerid]))
  10146. {
  10147. if(IsPlayerInRangeOfPlayer(3.0, playerid, VestOffer[playerid]))
  10148. {
  10149. if(UseAcceptTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 60 seconds.");
  10150. GetPlayerICName(VestOffer[playerid], giveplayer, sizeof(giveplayer));
  10151. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10152. format(str, sizeof(str), "* You accepted the kevlar vest for $%d from bodyguard %s.", VestPrice[playerid], giveplayer);
  10153. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10154. format(str, sizeof(str), "* %s accepted your vest, and the $%d was added to your bank account.", sendername, VestPrice[playerid]);
  10155. SendClientMessage(VestOffer[playerid], COLOR_LIGHTBLUE, str);
  10156. format(str, sizeof(str), "%s has accepted the kevlar vest from %s for $%d", sendername, giveplayer, VestPrice[playerid]);
  10157. PayLog(str);
  10158. new Float:armor;
  10159. GetPlayerArmour(playerid, armor);
  10160. if(armor > 0) format(str, sizeof(str), "* %s takes off their vest and straps on a new one.", PlayerICName(playerid));
  10161. else format(str, sizeof(str), "* %s grabs the kevlar vest and straps it on.", PlayerICName(playerid));
  10162. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10163. PlayerInfo[VestOffer[playerid]][pAccount] += VestPrice[playerid];
  10164. GiveMoney(playerid, -VestPrice[playerid]);
  10165. VestOffer[playerid] = 999;
  10166. VestPrice[playerid] = 0;
  10167. SetPlayerArmour(playerid, 50.0);
  10168. UseAcceptTimer[playerid] = 1;
  10169. SetTimerEx("Timer_UseAccept", 60 *1000, 0, "i", playerid);
  10170. return 1;
  10171. }
  10172. else
  10173. {
  10174. SendClientMessage(playerid, COLOR_GRAD1, "You're too far away.");
  10175. return 1;
  10176. }
  10177. }
  10178. return 1;
  10179. }
  10180. else
  10181. {
  10182. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10183. return 1;
  10184. }
  10185. }
  10186. else
  10187. {
  10188. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you any Protection.");
  10189. return 1;
  10190. }
  10191. }
  10192. else if(strcmp(x_job, "pot", true) == 0)
  10193. {
  10194. if(PotOffer[playerid] < 999)
  10195. {
  10196. if(PlayerInfo[playerid][pCash] > PotPrice[playerid])
  10197. {
  10198. if(PlayerInfo[playerid][pCannabis] < 7)
  10199. {
  10200. if(IsPlayerConnected(PotOffer[playerid]))
  10201. {
  10202. if(PotGram[playerid] != PlayerInfo[PotOffer[playerid]][pCannabis]) SendClientMessage(playerid, COLOR_GREY, "That player doesn't have enough pot.");
  10203. GetPlayerICName(PotOffer[playerid], giveplayer, sizeof(giveplayer));
  10204. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10205. format(str, sizeof(str), "* You bought %d grams of pot for $%d from drug dealer %s.", PotGram[playerid], PotPrice[playerid], giveplayer);
  10206. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10207. format(str, sizeof(str), "* %s has bought your %d grams, the $%d was added to your bank account.", sendername, PotGram[playerid], PotPrice[playerid]);
  10208. SendClientMessage(PotOffer[playerid], COLOR_LIGHTBLUE, str);
  10209. PlayerInfo[PotOffer[playerid]][pAccount] += PotPrice[playerid];
  10210. PlayerInfo[PotOffer[playerid]][pDrugsSkill] ++;
  10211. GiveMoney(playerid, -PotPrice[playerid]);
  10212. PlayerInfo[playerid][pCannabis] += PotGram[playerid];
  10213. PlayerInfo[PotOffer[playerid]][pCannabis] -= PotGram[playerid];
  10214. if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 50)
  10215. {
  10216. SendClientMessage(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more Grams.");
  10217. }
  10218. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 100)
  10219. {
  10220. SendClientMessage(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more Grams.");
  10221. }
  10222. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 200)
  10223. {
  10224. SendClientMessage(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more Grams.");
  10225. }
  10226. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 400)
  10227. {
  10228. SendClientMessage(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more Grams.");
  10229. }
  10230. PotOffer[playerid] = 999;
  10231. PotPrice[playerid] = 0;
  10232. PotGram[playerid] = 0;
  10233. return 1;
  10234. }
  10235. return 1;
  10236. }
  10237. else
  10238. {
  10239. SendClientMessage(playerid, COLOR_GREY, "You are fully loaded with Pot, /usepot or /drop it first.");
  10240. return 1;
  10241. }
  10242. }
  10243. else
  10244. {
  10245. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10246. return 1;
  10247. }
  10248. }
  10249. else
  10250. {
  10251. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you any Pot.");
  10252. return 1;
  10253. }
  10254. }
  10255. else if(strcmp(x_job, "materials", true) == 0)
  10256. {
  10257. if(MatsOffer[playerid] < 999)
  10258. {
  10259. if(PlayerInfo[playerid][pCash] > MatsPrice[playerid])
  10260. {
  10261. if(IsPlayerConnected(MatsOffer[playerid]))
  10262. {
  10263. giveplayerid = MatsOffer[playerid];
  10264. if(MatsGram2[playerid] != PlayerInfo[giveplayerid][pMats])
  10265. {
  10266. SendClientMessage(playerid, COLOR_GREY, "Transaction failed! The deal has been changed.");
  10267. SendClientMessage(giveplayerid, COLOR_GREY, "Transaction failed! The deal has been changed.");
  10268. MatsOffer[playerid] = 999;
  10269. MatsPrice[playerid] = 0;
  10270. MatsGram[playerid] = 0;
  10271. MatsGram2[playerid] = 0;
  10272. return 1;
  10273. }
  10274. GetPlayerICName(MatsOffer[playerid], giveplayer, sizeof(giveplayer));
  10275. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10276. format(str, sizeof(str), "* You bought %d materials for $%d from arms dealer %s.", MatsGram[playerid], MatsPrice[playerid], giveplayer);
  10277. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10278. format(str, sizeof(str), "* %s has bought your %d materials, the $%d was added to your bank account.", sendername, MatsGram[playerid], MatsPrice[playerid]);
  10279. SendClientMessage(MatsOffer[playerid], COLOR_LIGHTBLUE, str);
  10280. PlayerInfo[MatsOffer[playerid]][pAccount] += MatsPrice[playerid];
  10281. GiveMoney(playerid, -MatsPrice[playerid]);
  10282. PlayerInfo[playerid][pMats] += MatsGram[playerid];
  10283. PlayerInfo[MatsOffer[playerid]][pMats] -= MatsGram[playerid];
  10284. MatsOffer[playerid] = 999;
  10285. MatsPrice[playerid] = 0;
  10286. MatsGram[playerid] = 0;
  10287. MatsGram2[playerid] = 0;
  10288. return 1;
  10289. }
  10290. return 1;
  10291. }
  10292. else
  10293. {
  10294. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10295. return 1;
  10296. }
  10297. }
  10298. else
  10299. {
  10300. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you any Materials.");
  10301. return 1;
  10302. }
  10303. }
  10304. else if(strcmp(x_job, "products", true) == 0)
  10305. {
  10306. if(ProdOffer[playerid] < 999)
  10307. {
  10308. if(PlayerInfo[playerid][pCash] > ProdPrice[playerid])
  10309. {
  10310. if(IsPlayerConnected(ProdOffer[playerid]))
  10311. {
  10312. GetPlayerICName(ProdOffer[playerid], giveplayer, sizeof(giveplayer));
  10313. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10314. format(str, sizeof(str), "* You bought %d products for $%d from product dealer %s.", ProdAmount[playerid], ProdPrice[playerid], giveplayer);
  10315. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10316. format(str, sizeof(str), "* %s has bought your %d products, the $%d was added to your bank account.", sendername, ProdAmount[playerid], ProdPrice[playerid]);
  10317. SendClientMessage(ProdOffer[playerid], COLOR_LIGHTBLUE, str);
  10318. PlayerInfo[ProdOffer[playerid]][pAccount] += ProdPrice[playerid];
  10319. GiveMoney(playerid, -ProdPrice[playerid]);
  10320. PlayerInfo[playerid][pProducts] += ProdAmount[playerid];
  10321. PlayerInfo[ProdOffer[playerid]][pProducts] -= ProdAmount[playerid];
  10322. ProdOffer[playerid] = 999;
  10323. ProdPrice[playerid] = 0;
  10324. ProdAmount[playerid] = 0;
  10325. return 1;
  10326. }
  10327. return 1;
  10328. }
  10329. else
  10330. {
  10331. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10332. return 1;
  10333. }
  10334. }
  10335. else
  10336. {
  10337. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you any Products.");
  10338. return 1;
  10339. }
  10340. }
  10341. else if(strcmp(x_job, "repair", true) == 0)
  10342. {
  10343. if(RepairOffer[playerid] < 999)
  10344. {
  10345. if(PlayerInfo[playerid][pCash] > RepairPrice[playerid])
  10346. {
  10347. if(IsPlayerInAnyVehicle(playerid))
  10348. {
  10349. if(IsPlayerConnected(RepairOffer[playerid]))
  10350. {
  10351. new level = PlayerInfo[RepairOffer[playerid]][pMechSkill];
  10352. if(UseAcceptTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You must wait 60 seconds.");
  10353. RepairCar[playerid] = GetPlayerVehicleID(playerid);
  10354. SetVehicleHealth(RepairCar[playerid], 999.0);
  10355. format(str, sizeof(str), "* Mechanic %s has repaired your vehicle for %d.", PlayerICName(RepairOffer[playerid]), RepairPrice[playerid]);
  10356. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10357. format(str, sizeof(str), "* You fixed %s's vehicle, the $%d has been added to your Bank Account.", PlayerICName(playerid), RepairPrice[playerid]);
  10358. SendClientMessage(RepairOffer[playerid], COLOR_LIGHTBLUE, str);
  10359. format(str, sizeof(str), "* %s has repaired %s's vehicle.", PlayerICName(RepairOffer[playerid]), PlayerICName(playerid));
  10360. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10361. format(str, sizeof(str), "%s has accepted the repairs from %s for $%d", PlayerName(playerid), PlayerName(RepairOffer[playerid]), RepairPrice[playerid]);
  10362. PayLog(str);
  10363. PlayerInfo[RepairOffer[playerid]][pMechSkill]++;
  10364. if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 50)
  10365. {
  10366. SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Your Mechanic Skill is now Level 2, you can add more Fuel to Players Cars.");
  10367. }
  10368. else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 100)
  10369. {
  10370. SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Your Mechanic Skill is now Level 3, you can add more Fuel to Players Cars.");
  10371. }
  10372. else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 200)
  10373. {
  10374. SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Your Mechanic Skill is now Level 4, you can add more Fuel to Players Cars.");
  10375. }
  10376. else if(PlayerInfo[RepairOffer[playerid]][pMechSkill] == 400)
  10377. {
  10378. SendClientMessage(RepairOffer[playerid], COLOR_YELLOW, "* Your Mechanic Skill is now Level 5, you can add more Fuel to Players Cars.");
  10379. }
  10380. PlayerInfo[RepairOffer[playerid]][pAccount] += RepairPrice[playerid];
  10381. GiveMoney(playerid, -RepairPrice[playerid]);
  10382. new rtf;
  10383. if(level >= 0 && level <= 50) rtf = 180;//level 1
  10384. else if(level >= 51 && level <= 100) rtf = 140;//level 2
  10385. else if(level >= 101 && level <= 200) rtf = 100;//level 3
  10386. else if(level >= 201 && level <= 400) rtf = 80;//level 4
  10387. else if(level >= 401) rtf = 40;//level 5
  10388. PlayerInfo[RepairOffer[playerid]][pRepairTime] = rtf;
  10389. RepairOffer[playerid] = 999;
  10390. RepairPrice[playerid] = 0;
  10391. UseAcceptTimer[playerid] = 1;
  10392. SetTimerEx("Timer_UseAccept", 60 *1000, 0, "i", playerid);
  10393. return 1;
  10394. }
  10395. return 1;
  10396. }
  10397. return 1;
  10398. }
  10399. else
  10400. {
  10401. SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
  10402. return 1;
  10403. }
  10404. }
  10405. else
  10406. {
  10407. SendClientMessage(playerid, COLOR_GREY, "Nobody offered you to repair your vehicle.");
  10408. return 1;
  10409. }
  10410. }
  10411. else if(strcmp(x_job, "death", true) == 0)
  10412. {
  10413. if(pDeathState[playerid] != PLAYER_STATE_REVIVE) return SendClientMessage(playerid, COLOR_GREY, "You are not injured.");
  10414. new Float:phealth;
  10415. GetPlayerHealth(playerid, phealth);
  10416. if(phealth > 50) return SendClientMessage(playerid, COLOR_GREY, "You can only use this with 50 HP or less.");
  10417. SetPlayerHealth(playerid, 0);
  10418. return 1;
  10419. }
  10420. else if(strcmp(x_job, "call", true) == 0)
  10421. {
  10422. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || FakeFaction[playerid] == FACTION_FMD)
  10423. {
  10424. if(ParaOnACall[playerid] == 0)
  10425. {
  10426. tmp = strtok(cmdtext, idx);
  10427. if(!strlen(tmp))
  10428. {
  10429. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /accept call [playerid/PartOfName]");
  10430. return 1;
  10431. }
  10432. new victim;
  10433. victim = ReturnUser(tmp);
  10434. if(IsPlayerConnected(victim))
  10435. {
  10436. if(victim != INVALID_PLAYER_ID)
  10437. {
  10438. if(victim == playerid)
  10439. return SendClientMessage(playerid, COLOR_GREY, "You cannot accept your own calls.");
  10440. if(pDeathState[victim] == PLAYER_STATE_REVIVE)
  10441. {
  10442. if(CallAccepted[victim] == 0)
  10443. {
  10444. PlayerParamedic[victim] = playerid;
  10445. PlayerVictim[playerid] = victim;
  10446. format(str, sizeof(str), "Dispatch: Paramedic %s has accepted the EMS call of %s.", PlayerICName(playerid), PlayerICName(victim));
  10447. SendParaMessage(COLOR_DOCTOR, str);
  10448. format(str, sizeof(str), "* You have accepted the call of %s, a checkpoint was set at their location.", PlayerICName(victim));
  10449. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10450. SendClientMessage(playerid, COLOR_DOCTOR, "A beacon to your victim's location has been sent to the Police Department.");
  10451. CP[playerid] = CHECKPOINT_INJURED;
  10452. SetPlayerCheckpointEx(playerid, DeathPos[victim][DeathX], DeathPos[victim][DeathY], DeathPos[victim][DeathZ], 3);
  10453. format(str, sizeof(str), "* Paramedic %s has accepted your EMS call.", PlayerICName(playerid));
  10454. SendClientMessage(victim, COLOR_LIGHTBLUE, str);
  10455. CallAccepted[victim] = 1;
  10456. ParaOnACall[playerid] = 1;
  10457. for(new i = 0; i <= GetPlayerPoolSize(); i++)
  10458. {
  10459. if(PlayerInfo[i][pMember] == 1)
  10460. {
  10461. SetPlayerMarkerForPlayer(i, victim, COLOR_DOCTOR);
  10462. }
  10463. }
  10464. return 1;
  10465. }
  10466. else
  10467. {
  10468. SendClientMessage(playerid, COLOR_GREY, "That call was already accepted.");
  10469. return 1;
  10470. }
  10471. }
  10472. else
  10473. {
  10474. SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
  10475. return 1;
  10476. }
  10477. }
  10478. }
  10479. else
  10480. {
  10481. SendClientMessage(playerid, COLOR_GREY, "That player is offline.");
  10482. return 1;
  10483. }
  10484. }
  10485. else
  10486. {
  10487. SendClientMessage(playerid, COLOR_GREY, "You are already on a call, \"/cancel call\" in order to cancel it.");
  10488. return 1;
  10489. }
  10490. }
  10491. else
  10492. {
  10493. SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
  10494. return 1;
  10495. }
  10496. }
  10497. else
  10498. {
  10499. return 1;
  10500. }
  10501. return 1;
  10502. }
  10503. if(strcmp(cmd, "/family", true) == 0 || strcmp(cmd, "/f", true) == 0)
  10504. {
  10505. if(famTog[PlayerInfo[playerid][pFMember]] == true) return SendClientMessage(playerid, COLOR_GREY, "The family chat has been toggled off.");
  10506. if(PlayerInfo[playerid][pFMember] == 255) return SendClientMessage(playerid, COLOR_GREY, "You are not a member of a Family.");
  10507. if(gFam[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Family chat is currently turned off, use /togfam.");
  10508. if(famMuted[playerid] == true) return SendClientMessage(playerid, COLOR_GREY, "You can't use this chat as you're currently muted.");
  10509. new length = strlen(cmdtext);
  10510. while((idx < length) && (cmdtext[idx] <= ' '))
  10511. {
  10512. idx++;
  10513. }
  10514. new offset = idx;
  10515. new result[128];
  10516. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10517. {
  10518. result[idx - offset] = cmdtext[idx];
  10519. idx++;
  10520. }
  10521. result[idx - offset] = EOS;
  10522. if(!strlen(result))
  10523. {
  10524. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/f)amily [family chat]");
  10525. return 1;
  10526. }
  10527. format(str, sizeof(str), "(( ** (%d) %s %s: %s ** ))", PlayerInfo[playerid][pRank], GetPlayerRank(playerid), PlayerICName(playerid), result);
  10528. SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, str);
  10529. format(str, sizeof(str), "(( ** (%d) %s %s: %s ** ))", PlayerInfo[playerid][pRank], GetPlayerRank(playerid), PlayerOOCName(playerid), result);
  10530. SendShadowMsg(COLOR_GREEN, str);
  10531. if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
  10532. {
  10533. if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
  10534. {
  10535. format(str, sizeof(str), "[AdmWrn] %s used /f: %s", PlayerICName(playerid), result);
  10536. SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
  10537. }
  10538. }
  10539. return 1;
  10540. }
  10541. if(strcmp(cmd, "/news", true) == 0)
  10542. {
  10543. if(PlayerInfo[playerid][pMember] != 9 && PlayerInfo[playerid][pLeader] != 9)
  10544. return SendClientMessage(playerid, COLOR_GREY, "You are not a news reporter.");
  10545. if(PlayerInfo[playerid][pOnDuty] == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to be on duty.");
  10546. if(PlayerInfo[playerid][pRank] < 1)
  10547. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 1 to use this.");
  10548. if(gNews[playerid]) return SendClientMessage(playerid, COLOR_GREY, "News chat is currently turned off, use /tognews.");
  10549. if(!IsPlayerInAnyVehicle(playerid))
  10550. {
  10551. if(PlayerInfo[playerid][pRank] < 4)
  10552. return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 4 to use this outside of a vehicle.");
  10553. strmid(tmp, cmdtext, idx, strlen(cmdtext));
  10554. new length = strlen(cmdtext);
  10555. while((idx < length) && (cmdtext[idx] <= ' '))
  10556. {
  10557. idx++;
  10558. }
  10559. new offset = idx;
  10560. new result[128];
  10561. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10562. {
  10563. result[idx - offset] = cmdtext[idx];
  10564. idx++;
  10565. }
  10566. result[idx - offset] = EOS;
  10567. if(!strlen(result))
  10568. {
  10569. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /news [text]");
  10570. return 1;
  10571. }
  10572. format(str, sizeof(str), "SAN %s: %s", PlayerICName(playerid), result);
  10573. OOCNews(COLOR_NEWS, str);
  10574. }
  10575. else
  10576. {
  10577. new vehid = GetPlayerVehicleID(playerid);
  10578. new newcar = GetVehicleModel(vehid);
  10579. if(newcar == 488 || newcar == 582 || PlayerInfo[playerid][pRank] >= 3)
  10580. {
  10581. strmid(tmp, cmdtext, idx, strlen(cmdtext));
  10582. new length = strlen(cmdtext);
  10583. while((idx < length) && (cmdtext[idx] <= ' '))
  10584. {
  10585. idx++;
  10586. }
  10587. new offset = idx;
  10588. new result[128];
  10589. while((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10590. {
  10591. result[idx - offset] = cmdtext[idx];
  10592. idx++;
  10593. }
  10594. result[idx - offset] = EOS;
  10595. if(!strlen(result))
  10596. {
  10597. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /news [text]");
  10598. return 1;
  10599. }
  10600. format(str, sizeof(str), "SAN %s: %s", PlayerICName(playerid), result);
  10601. OOCNews(COLOR_NEWS, str);
  10602. }
  10603. else return SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 3 to use this on foot/in any vehicle.");
  10604. }
  10605. return 1;
  10606. }
  10607. if(strcmp(cmd, "/live", true) == 0)
  10608. {
  10609. if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
  10610. {
  10611. if(TalkingLive[playerid] != 255)
  10612. {
  10613. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Live conversation ended.");
  10614. SendClientMessage(TalkingLive[playerid], COLOR_LIGHTBLUE, "* Live conversation ended.");
  10615. TogglePlayerControllable(playerid, true);
  10616. TogglePlayerControllable(TalkingLive[playerid], 1);
  10617. TalkingLive[TalkingLive[playerid]] = 255;
  10618. TalkingLive[playerid] = 255;
  10619. return 1;
  10620. }
  10621. if(PlayerInfo[playerid][pRank] < 3)
  10622. {
  10623. SendClientMessage(playerid, COLOR_GREY, "You must be at least rank 3 to do live interviews.");
  10624. return 1;
  10625. }
  10626. tmp = strtok(cmdtext, idx);
  10627. if(!strlen(tmp))
  10628. {
  10629. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /live [playerid/PartOfName] [player's live name]");
  10630. return 1;
  10631. }
  10632. giveplayerid = ReturnUser(tmp);
  10633. if(IsPlayerConnected(giveplayerid))
  10634. {
  10635. if(giveplayerid != INVALID_PLAYER_ID)
  10636. {
  10637. if(IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid))
  10638. {
  10639. if(giveplayerid == playerid)
  10640. {
  10641. SendClientMessage(playerid, COLOR_GREY, "You can't talk live with yourself.");
  10642. return 1;
  10643. }
  10644. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  10645. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10646. format(str, sizeof(str), "* You offered %s to have a live conversation.", giveplayer);
  10647. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10648. format(str, sizeof(str), "* %s offered you to have a live conversation, type (/accept live) to accept.", sendername);
  10649. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  10650. LiveOffer[giveplayerid] = playerid;
  10651. strmid(LiveName[giveplayerid], cmdtext, idx + 1, strlen(cmdtext));
  10652. if(strlen(LiveName[giveplayerid]) < 1)
  10653. {
  10654. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have not given that player a live prefix, their prefix has been autoset to 'Anonymous'");
  10655. LiveName[giveplayerid] = "Anonymous";
  10656. }
  10657. }
  10658. else
  10659. {
  10660. SendClientMessage(playerid, COLOR_GREY, "You are too far away from that player.");
  10661. return 1;
  10662. }
  10663. }
  10664. }
  10665. else
  10666. {
  10667. SendClientMessage(playerid, COLOR_GREY, "Invalid ID/Name.");
  10668. return 1;
  10669. }
  10670. }
  10671. else
  10672. {
  10673. SendClientMessage(playerid, COLOR_GREY, "You are not a news reporter.");
  10674. }
  10675. return 1;
  10676. }
  10677. if(strcmp(cmd, "/sellmats", true) == 0)
  10678. {
  10679. if(PlayerInfo[playerid][pJob] != 9 && PlayerInfo[playerid][pGroup] != GROUP_CRIME)
  10680. {
  10681. SendClientMessage(playerid, COLOR_GREY, "You are not a Arms Dealer.");
  10682. return 1;
  10683. }
  10684. tmp = strtok(cmdtext, idx);
  10685. if(!strlen(tmp))
  10686. {
  10687. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellmats [playerid/PartOfName] [amount] [price]");
  10688. return 1;
  10689. }
  10690. new playa;
  10691. playa = ReturnUser(tmp);
  10692. tmp = strtok(cmdtext, idx);
  10693. if(!strlen(tmp))
  10694. {
  10695. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellmats [playerid/PartOfName] [amount] [price]");
  10696. return 1;
  10697. }
  10698. new needed;
  10699. needed = strvalEx(tmp);
  10700. tmp = strtok(cmdtext, idx);
  10701. if(!strlen(tmp))
  10702. {
  10703. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellmats [playerid/PartOfName] [amount] [price]");
  10704. return 1;
  10705. }
  10706. new money;
  10707. money = strvalEx(tmp);
  10708. if(needed < 1 || needed > 100000)
  10709. {
  10710. SendClientMessage(playerid, COLOR_GREY, "Materials can't be lower than 1, or above 100000.");
  10711. return 1;
  10712. }
  10713. if(money < 1 || money > 150000)
  10714. {
  10715. SendClientMessage(playerid, COLOR_GREY, "Price can't be lower than $1, or above $150,000.");
  10716. return 1;
  10717. }
  10718. if(needed > PlayerInfo[playerid][pMats])
  10719. {
  10720. SendClientMessage(playerid, COLOR_GREY, "You don't have that much materials with you.");
  10721. return 1;
  10722. }
  10723. if(IsPlayerConnected(playa))
  10724. {
  10725. if(playa != INVALID_PLAYER_ID)
  10726. {
  10727. if(IsPlayerInRangeOfPlayer(8.0, playerid, playa))
  10728. {
  10729. if(playa == playerid)
  10730. {
  10731. SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
  10732. return 1;
  10733. }
  10734. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10735. strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
  10736. format(str, sizeof(str), "* You offered %s to buy %d materials for $%d .", giveplayer, needed, money);
  10737. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10738. format(str, sizeof(str), "* Arms Dealer %s wants to sell you %d materials for $%d, (type /accept materials) to buy.", sendername, needed, money);
  10739. SendClientMessage(playa, COLOR_LIGHTBLUE, str);
  10740. MatsOffer[playa] = playerid;
  10741. MatsPrice[playa] = money;
  10742. MatsGram[playa] = needed;
  10743. MatsGram2[playa] = PlayerInfo[playerid][pMats];
  10744. }
  10745. else
  10746. {
  10747. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  10748. }
  10749. }
  10750. }
  10751. else
  10752. {
  10753. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  10754. }
  10755. return 1;
  10756. }
  10757. if(strcmp(cmd, "/eject", true) == 0)
  10758. {
  10759. if(IsPlayerInAnyVehicle(playerid))
  10760. {
  10761. if(GetPlayerState(playerid) != 2)
  10762. {
  10763. SendClientMessage(playerid, COLOR_GREY, "You can only eject people as the driver.");
  10764. return 1;
  10765. }
  10766. tmp = strtok(cmdtext, idx);
  10767. if(!strlen(tmp))
  10768. {
  10769. SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /eject [playerid/PartOfName]");
  10770. return 1;
  10771. }
  10772. giveplayerid = ReturnUser(tmp);
  10773. if(IsPlayerConnected(giveplayerid))
  10774. {
  10775. if(giveplayerid != INVALID_PLAYER_ID)
  10776. {
  10777. if(giveplayerid == playerid)
  10778. {
  10779. SendClientMessage(playerid, COLOR_GREY, "You cannot Eject yourself.");
  10780. return 1;
  10781. }
  10782. new vehid;
  10783. vehid = GetPlayerVehicleID(playerid);
  10784. if(IsPlayerInVehicle(giveplayerid, vehid))
  10785. {
  10786. GetPlayerICName(playerid, sendername, sizeof(sendername));
  10787. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  10788. format(str, sizeof(str), "* You have thrown %s out of the car.", giveplayer);
  10789. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10790. format(str, sizeof(str), "* You have been thrown out the car by %s.", sendername);
  10791. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  10792. format(str, sizeof(str), "* %s has thrown %s out of the vehicle.", sendername, giveplayer);
  10793. ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  10794. if(GetVehicleModel(GetPlayerVehicleID(giveplayerid)) == 416 && pDeathState[giveplayerid] == PLAYER_STATE_TREAT) // fix to injured players getting /eject'd but still frozen/not in a normal state.
  10795. {
  10796. pDeathState[giveplayerid] = PLAYER_STATE_NORMAL;
  10797. TogglePlayerControllable(giveplayerid, true);
  10798. }
  10799. RemovePlayerFromVehicle(giveplayerid);
  10800. }
  10801. else
  10802. {
  10803. SendClientMessage(playerid, COLOR_GREY, "That player is not in your Car.");
  10804. return 1;
  10805. }
  10806. }
  10807. }
  10808. else
  10809. {
  10810. SendClientMessage(playerid, COLOR_GREY, "Invalid ID/Name.");
  10811. }
  10812. }
  10813. else
  10814. {
  10815. SendClientMessage(playerid, COLOR_GREY, "You need to be in a Vehicle to use this.");
  10816. }
  10817. return 1;
  10818. }
  10819. if(strcmp(cmd, "/kiss", true) == 0)
  10820. {
  10821. if(PlayerInfo[playerid][pJailed] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can do that while in jail!");
  10822. tmp = strtok(cmdtext, idx);
  10823. if(!strlen(tmp))
  10824. {
  10825. SendClientMessage(playerid, 0xFF0000FF, "{00BFFF}Usage:{FFFFFF} /kiss [playerid/PartOfName] [1-3]");
  10826. return 1;
  10827. }
  10828. giveplayerid = ReturnUser(tmp);
  10829. tmp = strtok(cmdtext, idx);
  10830. if(!strlen(tmp))
  10831. {
  10832. SendClientMessage(playerid, 0xFF0000FF, "{00BFFF}Usage:{FFFFFF} /kiss [playerid/PartOfName] [1-3]");
  10833. return 1;
  10834. }
  10835. new snumber;
  10836. snumber = strval(tmp);
  10837. if(snumber < 1 || snumber > 3)
  10838. {
  10839. SendClientMessage(playerid, 0xFF0000FF, "{00BFFF}Usage:{FFFFFF} /kiss [playerid/PartOfName] [1-3]");
  10840. return 1;
  10841. }
  10842. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  10843. if(IsPlayerConnected(giveplayerid))
  10844. {
  10845. if(giveplayerid != INVALID_PLAYER_ID)
  10846. {
  10847. if(IsPlayerInRangeOfPlayer(2.0, playerid, giveplayerid))
  10848. {
  10849. if(IsPlayerInAnyVehicle(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at this time.");
  10850. if(giveplayerid == playerid)
  10851. {
  10852. SendClientMessage(playerid, COLOR_GREY, "You cannot offer to kiss yourself.");
  10853. return 1;
  10854. }
  10855. strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
  10856. strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
  10857. format(str, sizeof(str), "* You offered to kiss %s.", giveplayer);
  10858. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  10859. format(str, sizeof(str), "* %s has offered to kiss you (type /accept kiss), to accept it.", sendername);
  10860. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
  10861. KissOffer[giveplayerid] = playerid;
  10862. KissType[giveplayerid] = snumber;
  10863. }
  10864. else
  10865. {
  10866. SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
  10867. return 1;
  10868. }
  10869. }
  10870. }
  10871. else
  10872. {
  10873. SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
  10874. return 1;
  10875. }
  10876. return 1;
  10877. }
  10878. return 1;
  10879. }