| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034 |
- CMD:listserial(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- new query[128], serial[40];
- if(sscanf(params, "s[45]", serial)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /listserial [serial]");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT Name, LastLogin FROM players WHERE Serial = '%e'", serial);
- mysql_pquery(sqlGameConnection, query, "onListSerial", "i", playerid);
- return 1;
- }
- CMD:matchserial(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBanAppealer])
- {
- new name[24], query[128];
- if(sscanf(params, "s[24]", name))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /serialmatchname [player name]");
- {
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name`='%e' ORDER BY `ID` DESC", name);
- mysql_tquery(sqlGameConnection, query, "onSerialNameChecks", "i", playerid);
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- forward onSerialNameChecks(playerid);
- public onSerialNameChecks(playerid)
- {
- new rows, fields, serial[512], query[128];
- cache_get_data(rows, fields);
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "Serial", serial);
- }
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Serial`='%e' ORDER BY `ID` DESC", serial);
- mysql_tquery(sqlGameConnection, query, "onSerialMatchName", "i", playerid);
- return 1;
- }
- forward onSerialMatchName(playerid);
- public onSerialMatchName(playerid)
- {
- if(cache_num_rows() == 0)return SendClientMessage(playerid, COLOR_GREY, "There are no alternative accounts to show for this name.");
- new rows, fields, dstr[2048], player[24], IP[16], serial[128], lastlog[64];
- cache_get_data(rows, fields);
- format(dstr, sizeof(dstr), "Player\t\tIp\t\tSerial\t\tLastlogin\n");
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "Name", player);
- cache_get_field_content(i, "IP", IP); //get the IP in ban log
- cache_get_field_content(i, "LastLogin", lastlog);
- cache_get_field_content(i, "Serial", serial);
- format(dstr, sizeof(dstr), "%s%s\t\t%s\t\t%s\t\t{FF3366}%s\n", dstr, player, IP, serial, lastlog);
- }
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Serial Match Name", dstr, "Ok", "");
- return 1;
- }
- CMD:listip(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- new i_numcount, i_period, i_pos, query[128], ips[40];
- if(sscanf(params, "s[40]", ips)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /listip [ip]");
- while(params[i_pos])
- {
- if('0' <= params[i_pos] <= '9') i_numcount++;
- else if(params[i_pos] == '.') i_period++;
- i_pos++;
- }
- if(!(i_numcount >= 8 && i_period >= 3)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /listip [ip]");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT Name, LastLogin FROM players WHERE IP = '%e'", ips);
- mysql_pquery(sqlGameConnection, query, "onListIP", "i", playerid);
- return 1;
- }
- CMD:sqltoname( playerid, params[] ) {
- if( PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pMapper] < 1 ) {
- return SendClientMessage( playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You're not authorized to use that command." );
- }
- new sqlid;
- if( sscanf( params, "i", sqlid ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/sqltoname [sqlid]" );
- }
- if( sqlid > 1000000000 ) return SendClientMessage( playerid, COLOR_GREY, "Invalid ID given." );
- new query[100];
- mysql_format( sqlGameConnection, query, sizeof( query ), "SELECT Name FROM players WHERE ID = %d LIMIT 1;", sqlid );
- mysql_pquery( sqlGameConnection, query, "GetNameFromSQL", "i", playerid );
- return 1;
- }
- CMD:lastloginsql(playerid, params[])
- {
- if( PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pAdmin] < 1 ) {
- return 1;
- }
- new sqlid, query[200];
- if(sscanf(params, "i", sqlid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /lastlogin [sqlid]");
- {
- if( sqlid > 100000 ) return SendClientMessage( playerid, COLOR_GREY, "Invalid ID given." );
- for( new i; i < GetPlayerPoolSize(); i++ ) {
- if( PlayerInfo[i][pID] == sqlid ) {
- return SendClientMessage( playerid, COLOR_GREY, "That player is currently logged in." );
- }
- }
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `LastLogin`, `Name` FROM `players` WHERE `ID` = %d LIMIT 1", sqlid);
- mysql_pquery(sqlGameConnection, query, "onLastLoginSQL", "ii", playerid, sqlid);
- }
- return 1;
- }
- CMD:devmotd( playerid, params[] ) {
- if( PlayerInfo[playerid][pDev] > 0 ) {
- return SendClientMessage( playerid, COLOR_DEV, DEVMOTD );
- }
- return 1;
- }
- CMD:setdevmotd( playerid, params[] ) {
- if( PlayerInfo[playerid][pDev] < 2 ) {
- return 1;
- }
- if( sscanf( params, "s[128]", DEVMOTD ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/setdevmotd [motd]" );
- }
- SaveStuff();
- return 1;
- }
- CMD:testermotd( playerid, params[] ) {
- if( PlayerInfo[playerid][pDev] > 0 ) {
- return SendClientMessage( playerid, SCOLOR_GREEN, TESTERMOTD );
- }
- return 1;
- }
- CMD:settestermotd( playerid, params[] ) {
- if( PlayerInfo[playerid][pTester] < 2 ) {
- return 1;
- }
- if( sscanf( params, "s[128]", TESTERMOTD ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/settestermotd [motd]" );
- }
- SaveStuff();
- return 1;
- }
- /*
- [======= Roadblocks =======]
- */
- CMD:deleteroadblocks(playerid, params[])
- {
- if(IsRoadblockFaction(playerid))
- {
- if(IsRoadblockRank(playerid))
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- for(new o = 0; o < 11; o++)
- {
- if(IsValidDynamicObject(roadblockObjects[i][o]))
- {
- if(roadblockObjects[i][o]) { DestroyDynamicObjectEx(roadblockObjects[i][o]); }
- roadblockObjects[i][o] = 0;
- }
- }
- roadblockTotal[i] = 0;
- }
- }
- new str[128];
- format(str, sizeof(str), "HQ: %s %s %s has deleted all roadblocks.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't a high rank enough to see this. (R5+)");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't in the correct faction.");
- return 1;
- }
- CMD:deleteroadblock(playerid, params[])
- {
- if(IsRoadblockFaction(playerid))
- {
- if(IsRoadblockRank(playerid))
- {
- new closestRoadBlockID = getClosestRoadblockID(playerid);
- if(closestRoadBlockID == -1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't near to any of your roadblocks.");
- if(roadblockObjects[playerid][closestRoadBlockID]) { DestroyDynamicObjectEx(roadblockObjects[playerid][closestRoadBlockID]); }
- roadblockObjects[playerid][closestRoadBlockID] = 0;
- roadblockTotal[playerid]--;
- new location[MAX_ZONE_NAME];
- GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
- new str[128];
- format(str, sizeof(str), "HQ: %s %s %s has deleted a roadblock at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't a high enough rank to use this.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't in the correct faction.");
- return 1;
- }
- CMD:deployroadblock(playerid, params[])
- {
- if(IsRoadblockFaction(playerid))
- {
- if(IsRoadblockRank(playerid))
- {
- if(roadblockTotal[playerid] >= MAX_PER_PLAYER - 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can only place 10 objects per player.");
- new type[10], location[MAX_ZONE_NAME], Float:rbPos[5];
- if(sscanf(params, "s[10]", type))
- {
- if(PlayerInfo[playerid][pMember] == 4) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /deployroadblock [cone, small, medium, large]");
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /deployroadblock [cone, detour, small, medium, large]");
- }
- new str[128];
- GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
- GetXYInFrontOfPlayer(playerid, rbPos[0], rbPos[1], rbPos[2], rbPos[3], 1);
- if(strmatch(type, "cone"))
- {
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- roadblockObjects[playerid][roadblockTotal[playerid]] = CreateDynamicObject(1238, rbPos[0], rbPos[1], rbPos[2] -0.7, 0, 0, rbPos[3]);
- format(str, sizeof(str), "[Roadblock System] You have placed a cone at %s, you now have %d of %d roadblocks placed.", location, roadblockTotal[playerid] +1, MAX_PER_PLAYER - 1);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "HQ: %s %s %s has placed a roadblock (cone) at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- roadblockTotal[playerid]++;
- }
- else if(strmatch(type, "detour"))
- {
- if(PlayerInfo[playerid][pMember] == 4) return AdmErrorMsg;
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- roadblockObjects[playerid][roadblockTotal[playerid]] = CreateDynamicObject(1425, rbPos[0], rbPos[1], rbPos[2] -0.5, 0, 0, rbPos[3]);
- format(str, sizeof(str), "[Roadblock System] You have placed a detour sign at %s, you now have %d of %d roadblocks placed.", location, roadblockTotal[playerid] +1, MAX_PER_PLAYER - 1);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "HQ: %s %s %s has placed a roadblock (detour sign) at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- roadblockTotal[playerid]++;
- }
- else if(strmatch(type, "medium"))
- {
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- roadblockObjects[playerid][roadblockTotal[playerid]] = CreateDynamicObject(1422, rbPos[0], rbPos[1], rbPos[2] -0.7, 0, 0, rbPos[3]);
- format(str, sizeof(str), "[Roadblock System] You have placed a small roadblock at %s, you now have %d of %d roadblocks placed.", location, roadblockTotal[playerid] +1, MAX_PER_PLAYER - 1);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "HQ: %s %s %s has placed a roadblock (small roadblock) at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- roadblockTotal[playerid]++;
- }
- else if(strmatch(type, "small"))
- {
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- roadblockObjects[playerid][roadblockTotal[playerid]] = CreateDynamicObject(1424, rbPos[0], rbPos[1], rbPos[2] -0.6, 0, 0, rbPos[3]);
- format(str, sizeof(str), "[Roadblock System] You have placed a large roadblock at %s, you now have %d of %d roadblocks placed.", location, roadblockTotal[playerid] +1, MAX_PER_PLAYER - 1);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "HQ: %s %s %s has placed a roadblock (large roadblock) at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- roadblockTotal[playerid]++;
- }
- else if(strmatch(type, "large"))
- {
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- roadblockObjects[playerid][roadblockTotal[playerid]] = CreateDynamicObject(973, rbPos[0], rbPos[1], rbPos[2] -0.6, 0, 0, rbPos[3]);
- format(str, sizeof(str), "[Roadblock System] You have placed a large roadblock at %s, you now have %d of %d roadblocks placed.", location, roadblockTotal[playerid] +1, MAX_PER_PLAYER - 1);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "HQ: %s %s %s has placed a roadblock (large roadblock) at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- SendRadioMessage(15, TEAM_BLUE_COLOR, str);
- roadblockTotal[playerid]++;
- }
- else
- {
- if(PlayerInfo[playerid][pMember] == 4) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /deployroadblock [cone, small, medium, large]");
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /deployroadblock [cone, detour, small, medium, large]");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't a high enough rank to use this.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't in the correct faction.");
- return 1;
- }
- CMD:unlockcar(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- new engine, lights, alarm, doors, bonnet, boot, objective, vehicleid;
- vehicleid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vehicleid, engine, lights, alarm, 0, bonnet, boot, objective);
- new str[128];
- format(str, sizeof(str), "You have unlocked car %d.", vehicleid);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- CMD:factions(playerid, params[])
- {
- new count[MAX_FACTIONS] = 0, facStr[1024];
- foreach(new i:Player) {
- new playerFac = PlayerInfo[i][pMember];
- if(playerFac != 0 && playerFac < sizeof(count))
- count[playerFac]++;
- }
- format(facStr, sizeof(facStr), "{0000FF}San Andreas Police Department ({FF0000}%i{FFFFFF})", count[FACTION_SAPD]);
- format(facStr, sizeof(facStr), "%s\n{aea1ff}Federal Bureau of Investigtion ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FBI]);
- format(facStr, sizeof(facStr), "%s\n{ffcccc}San Andreas Fire & Medical Department ({FF0000}%i{FFFFFF})", facStr, count[FACTION_FMD]);
- format(facStr, sizeof(facStr), "%s\n{7b7b7b}Government ({FF0000}%i{FFFFFF})", facStr, count[FACTION_GOV]);
- format(facStr, sizeof(facStr), "%s\n{008080}San Andreas Network ({FF0000}%i{FFFFFF})", facStr, count[FACTION_NEWS]);
- format(facStr, sizeof(facStr), "%s\n{7b7b7b}Judicial Department ({FF0000}%i{FFFFFF})", facStr, count[FACTION_JD]);
- format(facStr, sizeof(facStr), "%s\n{8DBF17}San Andreas National Guard ({FF0000}%i{FFFFFF})", facStr, count[FACTION_SANG]);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Factions", facStr, "Close", "");
- for(new i = 0; i < 12; i++)count[i] = 0;
- return 1;
- }
- CMD:bans(playerid, params[]){
- if(PlayerInfo[playerid][pAdmin] >= 2) {
- new name[24], query[128];
- if(sscanf(params, "s[24]", name))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /bans [player_name]");
- {
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `ID` FROM `players` WHERE `Name`='%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "onBansChecked", "is", playerid, name);
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:roof(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 4) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You're not in the correct Faction.");
- if(IsPlayerInRangeOfPoint(playerid, 5.0, 1086.6177, -1320.1859, 18.7000))
- {
- SetPlayerPos(playerid, 1087.3241, -1321.5375, 23.6500);
- SetPlayerFacingAngle(playerid, 263.8638);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1086.6504, -1321.7249, 23.6500))
- {
- SetPlayerPos(playerid, 1087.6918, -1320.1278, 18.7000);
- SetPlayerFacingAngle(playerid, 265.1641);
- }
- return 1;
- }
- /*CMD:changefreq(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- new faction[16], str2[64];
- if(sscanf(params, "s[16]", faction)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /changefreq [SAPD/FMD/DOC/GOV/DEA/SANG/FBI/NONE]");
- if(strcmp(faction, "sapd", true) == 0) // SAPD
- RadioFrequency[playerid] = FACTION_SAPD;
- else if(strcmp(faction, "fmd", true) == 0) // FMD
- RadioFrequency[playerid] = FACTION_FMD;
- else if(strcmp(faction, "doc", true) == 0) // DOC
- RadioFrequency[playerid] = FACTION_ARMY;
- else if(strcmp(faction, "gov", true) == 0) // GOV
- RadioFrequency[playerid] = FACTION_GOV;
- else if(strcmp(faction, "fbi", true) == 0) // FBI | DEA
- RadioFrequency[playerid] = FACTION_FBI;
- else if(strcmp(faction, "sang", true) == 0) // SANG
- RadioFrequency[playerid] = FACTION_SANG;
- else if(strcmp(faction, "none", true) == 0) // Nothing
- RadioFrequency[playerid] = 0;
- else
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /changefreq [SAPD/FMD/DOC/GOV/DEA/NONE]");
- // Uppercase the string
- for(new i=0, n=strlen(faction); i<n; i++)
- faction[i] = toupper(faction[i]);
- format(str2, sizeof(str2), "You have set your frequency to %s's.", faction);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str2);
- return 1;
- }*/
- CMD:changefreq(playerid,params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9 && PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- if(isnull(params))
- {
- return SendClientMessage(playerid,COLOR_GREY,"{00BFFF}Usage:{FFFFFF} /changefreq [name] [NONE, SAPD, FMD, FBI, LSSD, SANG, GOV]");
- }
- if(!strcmp(params,"sapd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening SAPD");
- }
- else if(!strcmp(params,"fbi",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening FBI");
- }
- else if(!strcmp(params,"none",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- SendClientMessage(playerid, COLOR_GREY, "Listening None");
- }
- else if(!strcmp(params,"lssd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening LSSD");
- }
- else if(!strcmp(params,"sang",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening SANG");
- }
- else if(!strcmp(params,"gov",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening GOV");
- }
- /*else if(!strcmp(params,"san",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pSANListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening SAN");
- }*/
- else if(!strcmp(params,"fmd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pFMDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening FMD");
- }
- return 1;
- }
- CMD:removebadge(playerid, parms[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- SetPlayerColor(playerid, TCOLOR_WHITE);
- SendClientMessage(playerid, COLOR_GRAD1, "Your badge has been removed.");
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pOnDuty] = 0;
- return 1;
- }
- CMD:fmotd(playerid, params[])
- {
- new faction = PlayerInfo[playerid][pLeader];
- new str[128];
- if(faction != 0)
- {
- new newmotd[128], file[20];
- if(sscanf(params, "s[128]", newmotd)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fmotd [new MOTD]");
- {
- if(strlen(newmotd) > 100) return SendClientMessage(playerid, COLOR_WHITE, "The message can't be above 100 characters.");
- file = "factionMOTD.ini";
- switch(faction)
- {
- case 1:
- {
- format(facMOTD[1][motdOne], 128, "%s", newmotd);
- dini_Set(file, "MOTD1", newmotd);
- }
- case 2:
- {
- format(facMOTD[2][motdTwo], 128, "%s", newmotd);
- dini_Set(file, "MOTD2", newmotd);
- }
- case 3:
- {
- format(facMOTD[3][motdThree], 128, "%s", newmotd);
- dini_Set(file, "MOTD3", newmotd);
- }
- case 4:
- {
- format(facMOTD[4][motdFour], 128, "%s", newmotd);
- dini_Set(file, "MOTD4", newmotd);
- }
- case 5:
- {
- format(facMOTD[5][motdFive], 128, "%s", newmotd);
- dini_Set(file, "MOTD5", newmotd);
- }
- case 6:
- {
- format(facMOTD[6][motdSix], 128, "%s", newmotd);
- dini_Set(file, "MOTD6", newmotd);
- }
- case 7:
- {
- format(facMOTD[7][motdSeven], 128, "%s", newmotd);
- dini_Set(file, "MOTD7", newmotd);
- }
- case 8:
- {
- format(facMOTD[8][motdEight], 128, "%s", newmotd);
- dini_Set(file, "MOTD8", newmotd);
- }
- case 9:
- {
- format(facMOTD[9][motdNine], 128, "%s", newmotd);
- dini_Set(file, "MOTD9", newmotd);
- }
- case 10:
- {
- format(facMOTD[10][motdTen], 128, "%s", newmotd);
- dini_Set(file, "MOTD10", newmotd);
- }
- case 11:
- {
- format(facMOTD[11][motdEleven], 128, "%s", newmotd);
- dini_Set(file, "MOTD11", newmotd);
- }
- case 12:
- {
- format(facMOTD[12][motdTwelve], 128, "%s", newmotd);
- dini_Set(file, "MOTD12", newmotd);
- }
- case 13:
- {
- format(facMOTD[13][motdThirteen], 128, "%s", newmotd);
- dini_Set(file, "MOTD13", newmotd);
- }
- case 14:
- {
- format(facMOTD[13][motdFourteen], 128, "%s", newmotd);
- dini_Set(file, "MOTD14", newmotd);
- }
- case 15:
- {
- format(facMOTD[13][motdFifteen], 128, "%s", newmotd);
- dini_Set(file, "MOTD15", newmotd);
- }
- default:
- SendClientMessage(playerid, COLOR_GREY, "ERROR CODE 152 - Report to iGetty.");
- }
- if(!strmatch(newmotd, "None"))
- {
- format(str, sizeof(str), "MOTD: You have set the faction MOTD for %s to the following:", GetPlayerFactionName(playerid));
- SendClientMessage(playerid, COLOR_ORANGE, str);
- format(str, sizeof(str), "%s", newmotd);
- SendClientMessage(playerid, COLOR_ORANGE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_ORANGE, "MOTD: You have removed the faction MOTD.");
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Only faction leaders can use this.");
- return 1;
- }
- CMD:amotd(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 99999)
- {
- new newmotd[128], file[20];
- if(sscanf(params, "s[128]", newmotd)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /amotd [new MOTD]");
- {
- if(strlen(newmotd) > 100) return SendClientMessage(playerid, COLOR_WHITE, "The message can't be above 100 characters.");
- file = "adminMOTD.ini";
- format(adminMOTD, 128, "%s", newmotd);
- dini_Set(file, "MOTD", newmotd);
- if(!strmatch(newmotd, "None"))
- {
- format(str, sizeof(str), "MOTD: You have set the admin MOTD to the following:");
- SendClientMessage(playerid, COLOR_RED, str);
- format(str, sizeof(str), "%s", newmotd);
- SendClientMessage(playerid, COLOR_RED, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "MOTD: You have removed the admin MOTD.");
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You're not authorized to use that command.");
- return 1;
- }
- CMD:checklicenses(playerid, params[])
- {
- new str[128];
- if(!IsACop(playerid))
- return AdmErrorMsg;
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checklicenses [player id or name]");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, targetid) || GetPlayerState(targetid) == PLAYER_STATE_SPECTATING)
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You aren't close enough to this player to use that command.");
- format(str, sizeof(str), "* %s's licenses:", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- new hasAnyLicenses = DisplayLicenses(targetid, playerid);
- if(!hasAnyLicenses)
- SendClientMessage(playerid, COLOR_GREY, "No achieved licenses.");
- return 1;
- }
- new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
- CMD:pay(playerid, params[])
- {
- new str[128];
- if(IsPlayerConnected(playerid))
- {
- new targetid, amount;
- if(sscanf(params, "ud", targetid, amount)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /pay [playerid/PartOfName] [amount]");
- {
- if(amount > 1000 && PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must be level 2 to pay more than $1000 at a time.");
- if(amount < 1 || amount > 1000000) return SendClientMessage(playerid, COLOR_GRAD1, "You can't pay under $1 or more than $1,000,000 at a time.");
- if(IsPlayerConnected(targetid))
- {
- if(targetid == playerid)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't pay money to yourself.");
- return 1;
- }
- if(targetid != INVALID_PLAYER_ID)
- {
- if(IsPlayerInRangeOfPlayer(5.0, playerid, targetid) && (GetPlayerState(targetid) != PLAYER_STATE_SPECTATING))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(targetid), 0, MAX_PLAYER_NAME);
- new playermoney = PlayerInfo[playerid][pCash];
- if(amount > 0 && playermoney >= amount)
- {
- GiveMoney(playerid, -amount);
- GiveMoney(targetid, amount);
- format(str, sizeof(str), "You have paid $%s to %s.", AddThousandsSeparators(amount), giveplayer);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- format(str, sizeof(str), "You have received $%s from %s.", AddThousandsSeparators(amount), sendername);
- SendClientMessage(targetid, COLOR_GRAD1, str);
- format(str, sizeof(str), "* %s takes out some cash, and hands it to %s.", sendername, giveplayer);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlaySound(targetid, 1052, 0.0, 0.0, 0.0);
- strmid(LastPaid[playerid], giveplayer, 0, strlen(giveplayer));
- // Pay Log
- new plrIP[16];
- new giveplrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- GetPlayerIp(targetid, giveplrIP, sizeof(giveplrIP));
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s (IP:%s) (ConTime:%d) has paid $%d to %s (IP:%s) at %02d %s %02d:%02d:%02d", sendername, plrIP, PlayerInfo[playerid][pConnectTime], amount, giveplayer, giveplrIP,day, GetMonthFromInt(month), hour, minute, second);
- PayLog(str);
- logswrite("pay.log", str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "Invalid transaction amount.");
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You're too far away.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- return 1;
- }
- CMD:paystranger(playerid, params[])
- {
- new str[128];
- if(IsPlayerConnected(playerid))
- {
- new targetid, amount;
- if(sscanf(params, "d", amount)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /paystranger [amount]");
- {
- if(amount > 1000 && PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must be level 2 to pay more than $1000 at a time.");
- if(amount < 1 || amount > 100000) return SendClientMessage(playerid, COLOR_GRAD1, "You can't pay under $1 or more than $100,000 at a time.");
- targetid = GetClosestStrangerID(playerid);
- if(targetid != INVALID_PLAYER_ID)
- {
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't pay money to yourself.");
- if(targetid != INVALID_PLAYER_ID)
- {
- if(IsPlayerInRangeOfPlayer(5.0, playerid, targetid) && (GetPlayerState(targetid) != PLAYER_STATE_SPECTATING))
- {
- new playermoney = PlayerInfo[playerid][pCash];
- if(amount > 0 && playermoney >= amount)
- {
- GiveMoney(playerid, -amount);
- GiveMoney(targetid, amount);
- format(str, sizeof(str), "You have paid $%s to a Stranger.", AddThousandsSeparators(amount));
- SendClientMessage(playerid, COLOR_GRAD1, str);
- format(str, sizeof(str), "You have received $%s from %s.", AddThousandsSeparators(amount), PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_GRAD1, str);
- format(str, sizeof(str), "* %s takes out some cash, and hands it to Stranger.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlaySound(targetid, 1052, 0.0, 0.0, 0.0);
- // Pay Log
- new plrIP[16];
- new giveplrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- GetPlayerIp(targetid, giveplrIP, sizeof(giveplrIP));
- format(str, sizeof(str), "%s (IP:%s) (Key:%s) (ConTime:%d) has paid $%d to %s (IP:%s) (Key:%s)", PlayerName(playerid), plrIP, PlayerInfo[playerid][pKey], PlayerInfo[playerid][pConnectTime], amount, PlayerName(targetid), giveplrIP, PlayerInfo[targetid][pKey]);
- PayLog(str);
- strmid(LastPaid[playerid], PlayerName(targetid), 0, strlen(PlayerName(targetid)));
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "Invalid transaction amount.");
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You're too far away.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You're not near a stranger.");
- }
- }
- return 1;
- }
- CMD:vipresetgifts(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use this command.");
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pDonateRank] != 0)
- {
- GottenTimeLeft[i] = 0;
- GottenGift[i] = 0;
- SendClientMessage(i, COLOR_LIGHTBLUE, "VIP Announcment: An admin has reset gifts. You can now /getgift again.");
- }
- }
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have reset VIP gifts.");
- return 1;
- }
- CMD:charity(playerid, params[])
- {
- new str[128];
- new amount;
- if(sscanf(params, "i", amount)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /charity [amount]");
- {
- if(amount < 1) return SendClientMessage(playerid, COLOR_GRAD1, "The minimum amount you can donate to charity is $1, and not below.");
- if(PlayerInfo[playerid][pCash] < amount) return SendClientMessage(playerid, COLOR_GRAD1, "You don't have that much money.");
- GiveMoney(playerid, -amount);
- format(str, sizeof(str), "%s, thank you for your donation of $%d.", PlayerOOCName(playerid), amount);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- TaxValue += amount;
- PayLog(str);
- }
- return 1;
- }
- CMD:checkinv(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new rod[20], bait[20], baita, line[20], line1[1000], line2[1000], line3[1000], mstring[3500], targetid, invname[30], name[24];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checkinv [playerid/name]");
- {
- strmid(name, str_replace('_', ' ', PlayerName(targetid)), 0, MAX_PLAYER_NAME);
- format(rod, sizeof(rod), "%s", GetFishingRodName(PlayerInfo[targetid][pFishRod]));
- format(bait, sizeof(bait), "%s", GetFishingBaitName(PlayerInfo[targetid][pBait]));
- format(line, sizeof(line), "%s", GetFishingLineName(PlayerInfo[targetid][pLine]));
- baita = PlayerInfo[targetid][pBaitAmount];
- if(baita == 0)
- bait = "None";
- new packages = Packages[targetid];
- new crates = Crates[targetid];
- format(line1, sizeof(line1), "{007BD0}[Inventory] {CBCCCE}Materials:[%d] Cannabis:[%s] Cocaine:[%s] Meth:[%s] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d]", PlayerInfo[targetid][pMats], AddThousandsSeparators(PlayerInfo[targetid][pCannabis]), AddThousandsSeparators(PlayerInfo[targetid][pCocaine]), AddThousandsSeparators(PlayerInfo[targetid][pMeth]), packages, crates, PlayerInfo[targetid][pPotSeeds], PlayerInfo[targetid][pProducts]);
- format(line2, sizeof(line2), "{007BD0}[Inventory] {D8D8D8}Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d] WTc:[%d]", PlayerInfo[targetid][pRope], PlayerInfo[targetid][pBlindfolds], PlayerInfo[targetid][pCigars], PlayerInfo[targetid][pSprunk], PlayerInfo[targetid][pSpraycan], PlayerInfo[targetid][pScrew], PlayerInfo[targetid][pDeck], PlayerInfo[targetid][pWTc]);
- format(line3, sizeof(line3), "{007BD0}[Inventory] {D8D8D8}Fishing Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line:[%s] Stereo:[%d] Box of Matches: [%d] Jerry Can:[%d]", rod, bait, baita, line, PlayerInfo[targetid][pStereo], PlayerInfo[targetid][pMatches], PlayerInfo[targetid][pJerrycan]);
- format(mstring, sizeof(mstring), "%s\n%s\n%s", line1, line2, line3);
- format(invname, 30, "%s - Inventory", name);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, invname, mstring, "Done", "");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
- return 1;
- }
- CMD:pinv(playerid, params[]){
- new rod[20], bait[20], baita, line[20], line1[1000], line2[1000], line3[1000];
- format(rod, sizeof(rod), "%s", GetFishingRodName(PlayerInfo[playerid][pFishRod]));
- format(bait, sizeof(bait), "%s", GetFishingBaitName(PlayerInfo[playerid][pBait]));
- format(line, sizeof(line), "%s", GetFishingLineName(PlayerInfo[playerid][pLine]));
- baita = PlayerInfo[playerid][pBaitAmount];
- if(baita == 0)
- bait = "None";
- new packages = Packages[playerid], crates = Crates[playerid];
- format(line1, sizeof(line1), "{007BD0}[Inventory] {CBCCCE}Materials:[%d] Cannabis:[%s] Cocaine:[%s] Meth:[%s] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d]", PlayerInfo[playerid][pMats], AddThousandsSeparators(PlayerInfo[playerid][pCannabis]), AddThousandsSeparators(PlayerInfo[playerid][pCocaine]), AddThousandsSeparators(PlayerInfo[playerid][pMeth]), packages, crates, PlayerInfo[playerid][pPotSeeds], PlayerInfo[playerid][pProducts]);
- format(line2, sizeof(line2), "{007BD0}[Inventory] {D8D8D8}Ropes:[%d] Blindfolds:[%d] Cigars:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d] WTc:[%d]", PlayerInfo[playerid][pRope], PlayerInfo[playerid][pBlindfolds], PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pSprunk], PlayerInfo[playerid][pSpraycan], PlayerInfo[playerid][pScrew], PlayerInfo[playerid][pDeck], PlayerInfo[playerid][pWTc]);
- format(line3, sizeof(line3), "{007BD0}[Inventory] {D8D8D8}Fishing Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line:[%s] Stereo:[%d] Box of Matches:[%d] Jerry Can:[%d]", rod, bait, baita, line, PlayerInfo[playerid][pStereo], PlayerInfo[playerid][pMatches], PlayerInfo[playerid][pJerrycan]);
- SendClientMessage(playerid, COLOR_WHITE, line1);
- SendClientMessage(playerid, COLOR_WHITE, line2);
- SendClientMessage(playerid, COLOR_WHITE, line3);
- return 1;
- }
- CMD:exit(playerid, params[])
- {
- new str[128];
- if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GRAD1, "You are unable to do that at this time.");
- if(gettime() < (ExitTimer[playerid] + 3))
- {
- format(str, sizeof(str), "You must wait %d seconds before you can use /exit again!", (ExitTimer[playerid] + 3) - gettime());
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- else
- {
- for(new i = 0; i < sizeof(EntranceRef); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2, Entrances[i][inside_x], Entrances[i][inside_y], Entrances[i][inside_z]) &&GetPlayerVirtualWorld(playerid) == Entrances[i][inside_w])
- {
- SetPlayerPos(playerid, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]);
- SetPlayerFacingAngle(playerid, Entrances[i][outside_a]);
- SetPlayerInterior(playerid, Entrances[i][outside_i]);
- PlayerInfo[playerid][pInt] = Entrances[i][outside_i]; //added
- SetPlayerVirtualWorld(playerid, Entrances[i][outside_w]);
- PlayerInfo[playerid][pVirtualWorld] = Entrances[i][outside_w]; //added
- if(Entrances[i][freeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- return 1;
- }
- }
- for(new h = 1; h < sizeof(HouseInfo); h++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hInsideX], HouseInfo[h][hInsideY], HouseInfo[h][hInsideZ]) && GetPlayerVirtualWorld(playerid) == HouseInfo[h][hSQLID])
- {
- SetPlayerPos(playerid, HouseInfo[h][hOutsideX], HouseInfo[h][hOutsideY], HouseInfo[h][hOutsideZ]);
- SetPlayerFacingAngle(playerid, HouseInfo[h][hOutsideA]);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetCameraBehindPlayer(playerid);
- inHouse[playerid] = false;
- if(HouseInfo[h][hFreeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- return 1;
- }
- }
- for(new g = 1; g < MAX_GARAGES; g++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 4.0, GarageInfo[g][gInsideX], GarageInfo[g][gInsideY], GarageInfo[g][gInsideZ]) && GetPlayerVirtualWorld(playerid) == g)
- {
- if(GarageInfo[g][gCreated] != 0)
- {
- if(GarageInfo[g][gLocked] != 1)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vhid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vhid, GarageInfo[g][gOutsideCarX], GarageInfo[g][gOutsideCarY], GarageInfo[g][gOutsideCarZ]);
- SetVehicleVirtualWorld(vhid, 0);
- //for(new l = 0; l < MAX_PLAYERS;l++)
- foreach( new l: Player )
- {
- if(IsPlayerConnected(l))
- {
- if(GetPlayerVehicleID(l) == vhid)
- {
- SetPlayerVirtualWorld(l, 0);
- PlayerInfo[l][pVirtualWorld] = 0;
- }
- }
- }
- SetVehicleZAngle(vhid, GarageInfo[g][gOutsideA]);
- }
- else
- {
- SetPlayerPos(playerid, GarageInfo[g][gOutsideX], GarageInfo[g][gOutsideY], GarageInfo[g][gOutsideZ]);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetCameraBehindPlayer(playerid);
- SetPlayerFacingAngle(playerid, GarageInfo[g][gOutsideA]);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "** This garage is locked.");
- }
- }
- return 1;
- }
- }
- for(new b = 0; b < sizeof(BizInfo); b++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[b][bInsideX], BizInfo[b][bInsideY], BizInfo[b][bInsideZ]) && GetPlayerVirtualWorld(playerid) == b)
- {
- if(GetPlayerVirtualWorld(playerid) == b)
- {
- SetPlayerPos(playerid, BizInfo[b][bOutsideX], BizInfo[b][bOutsideY], BizInfo[b][bOutsideZ]);
- SetPlayerFacingAngle(playerid, BizInfo[b][bOutsideAng]);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerInterior(playerid, BizInfo[b][bOutsideInt]);
- PlayerInfo[playerid][pInt] = BizInfo[b][bOutsideInt];
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- }
- }
- if(inPaintball[playerid])
- {
- if(PaintballDieTimer[playerid]) return SendClientMessage(playerid, COLOR_RED, "You can't do that at this moment.");
- pbKills[playerid] = 0;
- UpdatePaintBallLeader(inPaintball[playerid]);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- switch(inPaintball[playerid]){
- case 1: {
- SetPlayerPos(playerid, 1310.0685, -1367.6198, 13.5382);
- SetCameraBehindPlayer(playerid);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- ResetPlayerAdminWeaponsEx(playerid); //haven't really tested this but should remove admin weapons
- ResetPlayerWeapons(playerid);
- ClearGuns(playerid);
- ClearPaintballGuns(playerid);
- SetPlayerHealth(playerid, pbHealth[playerid]);
- SetPlayerArmour(playerid, pbArmor[playerid]);
- pDeathState[playerid] = PLAYER_STATE_NORMAL;
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- TextDrawHideForPlayer(playerid, PaintballLeaderTD);
- format(str, sizeof(str), "{FFFF00}[PAINTBALL] %s has quit the arena.", PlayerICName(playerid));
- SendPaintballMessage(playerid, -1, str);
- inPaintball[playerid] = 0;
- for(new i = 0; i < 12; i++)
- {
- GivePlayerGun(playerid, saveWeapon[playerid][i]);
- }
- }
- case 2: {
- SetPlayerPos(playerid, 1088.75, -1715.45, 1136.46);
- SetCameraBehindPlayer(playerid);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- ResetPlayerAdminWeaponsEx(playerid); //haven't really tested this but should remove admin weapons
- ResetPlayerWeapons(playerid);
- ClearGuns(playerid);
- ClearPaintballGuns(playerid);
- SetPlayerHealth(playerid, pbHealth[playerid]);
- SetPlayerArmour(playerid, pbArmor[playerid]);
- pDeathState[playerid] = PLAYER_STATE_NORMAL;
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- TextDrawHideForPlayer(playerid, PaintballLeaderTD2);
- format(str, sizeof(str), "{FFFF00}[PAINTBALL] %s has quit the arena.", PlayerICName(playerid));
- SendPaintballMessage(playerid, -1, str);
- inPaintball[playerid] = 0;
- for(new i = 0; i < 12; i++)
- {
- GivePlayerGun(playerid, saveWeapon[playerid][i]);
- }
- }
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1494.4031, 1304.5746, 1093.2891)) //DMV Exit
- {
- SetPlayerPos(playerid, 1221.9650, -1812.1187, 16.5938);
- SetPlayerFacingAngle(playerid, 2.0432);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SetPlayerInterior(playerid, 0);
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2529.1636, -1421.2941, -80.0201)) // On foot exit
- {
- if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- SetPlayerPos(playerid, 2464.8479, -1425.4089, 23.7500);
- SetPlayerFacingAngle(playerid, 359.6867);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2515.7349, -1398.8298, -79.9924)) //Hitmen
- {
- if(GetPlayerVirtualWorld(playerid) == 666)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerPos(playerid, 2464.8425, -1425.6056, 23.7500);
- SetPlayerFacingAngle(playerid, 0.000);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -2240.4736,137.1805,1035.4141)) // Hidden Package Store ( Tiki Heaven )
- {
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- SetPlayerPos(playerid, 2352.4529,-1463.3369,24.0000);
- SetPlayerFacingAngle(playerid, 90.3569);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 2, 2840.68, -1346.89, 959.74)) // House -> Outside
- {
- SetPlayerPos(playerid, 2852.42, -1366.04, 14.17);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetCameraBehindPlayer(playerid);
- SetPlayerFacingAngle(playerid, 270.31);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 2, 1226.55, -813.75, 1084.00)) // Office -> House
- {
- if(GetPlayerVirtualWorld(playerid) == 20)
- {
- SetPlayerPos(playerid, 2877.92, -1337.0, 965.66);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pInt] = 1;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetCameraBehindPlayer(playerid);
- SetPlayerFacingAngle(playerid, 180.0);
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1532.56, -1460.24, 1037.01) && GetPlayerVirtualWorld(playerid) == 0) // VIP Club
- {
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, 1518.83, -1453.27, 14.21);
- SetPlayerFacingAngle(playerid, 0.0);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 315.75, -143.66, 999.60) && PlayerInfo[playerid][pVirtualWorld] == 426) // VIP BlackMarket
- {
- if(PlayerInfo[playerid][pDonateRank] >= 2)
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerPos(playerid, 2276.50, -930.04, 28.04);
- SetPlayerFacingAngle(playerid, 268.05);
- SetCameraBehindPlayer(playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Silver or Gold VIP.");
- }
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 6.0, -1404.5299, -259.0602, 1043.6563))
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, 2695.6235, -1704.6960, 11.8438);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, -1443.0554, -581.1879, 1055.0472))
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, -2111.5686, -443.9720, 38.7344);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, 2.57, 33.14, 1200)) // SHAMAL
- {
- new vwcheck = GetPlayerVirtualWorld(playerid), Float:px, Float:py, Float:pz, Float:za, Float:vx, Float:vy, Float:vz, vehicle;
- vehicle = vwcheck;
- for( new i = 0; i < MAX_VEHICLES; i++ )
- {
- if(GetVehicleModel(i) == 519 || GetVehicleModel(i) == 592 || GetVehicleModel(i) == 553) //shamal, andromeda, nevada
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has left the plane.");
- else format(str, sizeof(str), "* %s has left the plane.", sendername);
- GetVehiclePos(vehicle, px, py, pz);
- GetVehicleZAngle(vehicle, za);
- GetVehicleVelocity(vehicle, vx, vy, vz);
- px -= (10 * floatsin(-za, degrees));
- py -= (10 * floatcos(-za, degrees));
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, px, py, pz);
- SetPlayerFacingAngle(playerid, za);
- SetPlayerVelocity(playerid, vx, vy, vz);
- }
- }
- return 1;
- }
- else if(inBarracksID[playerid] != INVALID_VEHICLE_ID){
- new barracksid = inBarracksID[playerid], Float:vx, Float:vy, Float:vz;
- GetVehiclePos(barracksid, vx, vy, vz);
- new
- Float:vinfox, Float:vinfoy, Float:vinfoz, Float:vinforz;
- GetVehicleModelInfo(433, VEHICLE_MODEL_INFO_SIZE, vinfox, vinfoy, vinfoz); //get barracks dimensions
- GetVehicleZAngle(barracksid, vinforz); //get barracks angle
- vx += (((vinfoy/2) + 0.8) * -floatsin(-vinforz, degrees));
- vy += (((vinfoy/2) + 0.8) * -floatcos(-vinforz, degrees));
- SetPlayerPos(playerid, vx, vy, vz);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- PlayerInfo[playerid][pInt] = 0;
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- inBarracksID[playerid] = INVALID_VEHICLE_ID;
- }
- else if(IsValidVehicle(inAndromadaID[playerid])) {
- new andromadaid = inAndromadaID[playerid], Float:vx, Float:vy, Float:vz;
- GetVehiclePos(andromadaid, vx, vy, vz);
- new
- Float:vinfox, Float:vinfoy, Float:vinfoz, Float:vinforz;
- GetVehicleModelInfo(592, VEHICLE_MODEL_INFO_SIZE, vinfox, vinfoy, vinfoz); //get barracks dimensions
- GetVehicleZAngle(andromadaid, vinforz); //get barracks angle
- vx += (((vinfoy/2) - 4.8) * -floatsin(-vinforz, degrees));
- vy += (((vinfoy/2) - 4.8) * -floatcos(-vinforz, degrees));
- SetPlayerPos(playerid, vx, vy, vz);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- PlayerInfo[playerid][pVirtualWorld] = 0;
- PlayerInfo[playerid][pInt] = 0;
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- inAndromadaID[playerid] = INVALID_VEHICLE_ID;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.5, 506.7636,1965.6157,999.4003)) //sang prison bus
- {
- new vehid = 0, dynveh = 0;
- for(new i = 0; i < sizeof(sVehicleInfo); i++)
- {
- if(sVehicleInfo[i][v_model] == 431 && sVehicleInfo[i][v_faction] == 5)
- {
- vehid = sVehicleInfo[i][v_id];
- if(GetPlayerVirtualWorld(playerid) == vehid) break;
- }
- }
- if(vehid == 0 && dynveh == 0) return 1;
- new
- Float:sangbuspos[4];
- GetVehiclePos(vehid, sangbuspos[0], sangbuspos[1], sangbuspos[2]);
- GetVehicleZAngle(vehid, sangbuspos[3]);
- new
- Float:sangbusvinfo[3];
- GetVehicleModelInfo(GetVehicleModel(vehid), VEHICLE_MODEL_INFO_SIZE, sangbusvinfo[0], sangbusvinfo[1], sangbusvinfo[2]);
- sangbuspos[0] += (((-sangbusvinfo[1]/2) + 0.5) * -floatsin(-(sangbuspos[3]), degrees));
- sangbuspos[1] += (((-sangbusvinfo[1]/2) + 0.5) * -floatcos(-(sangbuspos[3]), degrees));
- sangbuspos[0] += ((-sangbusvinfo[0] + 0.2) * -floatsin(-(sangbuspos[3] + 90), degrees));
- sangbuspos[1] += ((-sangbusvinfo[0] + 0.2) * -floatcos(-(sangbuspos[3] + 90), degrees));
- if(PlayerInfo[playerid][pMask] != 1) format(str, sizeof(str), "* %s has left the prison bus.", PlayerICName(playerid));
- else format(str, sizeof(str), "* Stranger has left the prison bus.");
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetPlayerPos(playerid, sangbuspos[0], sangbuspos[1], sangbuspos[2]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, 302.6667, 2510.3975, 499.9158)) // CARGOBOB
- {
- new vwcheck = GetPlayerVirtualWorld(playerid), Float:px, Float:py, Float:pz, Float:za, Float:vx, Float:vy, Float:vz, vehicle;
- vehicle = vwcheck;
- if(GetVehicleModel(vehicle) == 548)
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has left the cargobob.");
- else format(str, sizeof(str), "* %s has left the cargobob.", sendername);
- GetVehiclePos(vehicle, px, py, pz);
- GetVehicleZAngle(vehicle, za);
- GetVehicleVelocity(vehicle, vx, vy, vz);
- px -= (5 * floatsin(-za, degrees));
- py -= (5 * floatcos(-za, degrees));
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerPos(playerid, px, py, pz);
- SetPlayerFacingAngle(playerid, za -90);
- SetPlayerVelocity(playerid, vx, vy, vz);
- }
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 245.8718, 1406.4834, 1112.1130)) // AMBULANCE
- {
- new vwcheck = GetPlayerVirtualWorld(playerid), Float:px, Float:py, Float:pz, Float:za, Float:vx, Float:vy, Float:vz, vehicle;
- vehicle = vwcheck;
- if(GetVehicleModel(vehicle) == 416)
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has left the cargobob.");
- else format(str, sizeof(str), "* %s has left the cargobob.", sendername);
- GetVehiclePos(vehicle, px, py, pz);
- GetVehicleZAngle(vehicle, za);
- GetVehicleVelocity(vehicle, vx, vy, vz);
- px -= (5 * floatsin(-za, degrees));
- py -= (5 * floatcos(-za, degrees));
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- SetPlayerPos(playerid, px, py, pz);
- SetPlayerFacingAngle(playerid, za -90);
- SetPlayerVelocity(playerid, vx, vy, vz);
- }
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2205.2314, 1551.5662, 1008.4103)) //Drug Factory
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1318.8472, 392.6770, 19.5547);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerFacingAngle(playerid, 0);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3, -1269.07, 77.78, 991.94)) // Church
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, 2232.3, -1333.48, 23.98);
- SetPlayerFacingAngle(playerid, 90.0);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 6.0, -1404.5299, -259.0602, 1043.6563))
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, 2695.6235, -1704.6960, 11.8438);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, -1443.0554, -581.1879, 1055.0472))
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, -2111.5686, -443.9720, 38.7344);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, -1464.7732, 1557.5533, 1052.5313))
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid, -2080.3079, -406.0309, 38.7344);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 980.7294, 1472.9312, 1004.4619))
- {
- SetPlayerPos(playerid, 2025.2659, -1401.6707, 17.2100);
- SetPlayerFacingAngle(playerid, 180);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1004.3405, 1488.7122, 1016.0709))
- {
- SetPlayerPos(playerid, 2047.3463, -1396.1946, 48.3359);
- SetPlayerFacingAngle(playerid, 0);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1013.2662, 1491.3506, 1016.0709))
- {
- SetPlayerPos(playerid, 2049.5835, -1404.1725, 48.3359);
- SetPlayerFacingAngle(playerid, 270);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 975.0416, 1494.5276, 1010.2537))
- {
- SetPlayerPos(playerid, 975.0505, 1495.7568, 1010.2537);
- SetPlayerFacingAngle(playerid, 0);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 8);
- PlayerInfo[playerid][pInt] = 8;
- return 1;
- }
- ExitTimer[playerid] = gettime();
- }
- return 1;
- }
- CMD:dmv(playerid, params[]){
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_WHITE, "The DMV has been marked on your mini map!");
- SetPlayerCheckpointEx(playerid, 1221.9650, -1812.1187, 16.5938, 5.0);
- CP[playerid] = CHECKPOINT_DMV;
- return 1;
- }
- CMD:enter(playerid, params[])
- {
- new str[128];
- if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GRAD1, "You are unable to do that at this time.");
- if(gettime() < (EnterTimer[playerid] + 3))
- {
- // format(str, sizeof(str), "You must wait %d seconds before you can use /enter again!", (EnterTimer[playerid] + 3) - gettime());
- // SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- else
- {
- new Float:sucX, Float:sucY, Float:sucZ;
- GetPlayerPos(playerid, sucX, sucY, sucZ);
- for(new i = 0; i < sizeof(EntranceRef); i++)
- {
- if(
- IsPlayerInRangeOfPoint(playerid, 2.0, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]) &&
- GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w] &&
- GetPlayerInterior(playerid) == Entrances[i][outside_i])
- {
- if(strlen(Entrances[i][dpassword]) && !DisabledDoors[i] ) // has a pass
- {
- ShowPlayerDialog(playerid,
- DIALOG_ID_PLAYER_PASS,
- DIALOG_STYLE_INPUT,
- "Door Password",
- "Please enter the door's password to enter.",
- "Okay",
- "Cancel");
- return 1;
- }
- SetPlayerPos(playerid, Entrances[i][inside_x], Entrances[i][inside_y], Entrances[i][inside_z]);
- SetPlayerFacingAngle(playerid, Entrances[i][inside_a]);
- SetPlayerInterior(playerid, Entrances[i][inside_i]);
- PlayerInfo[playerid][pInt] = Entrances[i][inside_i]; //this was commented for some reason
- SetPlayerVirtualWorld(playerid, Entrances[i][inside_w]);
- PlayerInfo[playerid][pVirtualWorld] = Entrances[i][inside_w]; //this was commented for some reason
- SetCameraBehindPlayer(playerid);
- if(Entrances[i][freeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- return 1;
- }
- //format(str, sizeof(str), "LookupID: %d", i);
- //SendClientMessage(playerid, COLOR_WHITE, str);
- }
- for(new h = 1; h < sizeof(HouseInfo); h++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[h][hOutsideX], HouseInfo[h][hOutsideY], HouseInfo[h][hOutsideZ]))
- {
- if(HouseInfo[h][hLocked] != 1)
- {
- SetPlayerPos(playerid, HouseInfo[h][hInsideX], HouseInfo[h][hInsideY], HouseInfo[h][hInsideZ]);
- SetPlayerFacingAngle(playerid, HouseInfo[h][hInsideA]);
- SetPlayerInterior(playerid, HouseInfo[h][hInterior]);
- SetPlayerVirtualWorld(playerid, HouseInfo[h][hSQLID]);
- PlayerInfo[playerid][pInt] = HouseInfo[h][hInterior];
- PlayerInfo[playerid][pVirtualWorld] = h;
- SetCameraBehindPlayer(playerid);
- new string34[75];
- format(string34, sizeof(string34), "~b~%s", HouseInfo[h][hTag]);
- displayCenterHUDInfo(playerid, string34, 8); //display for 8 seconds
- inHouse[playerid] = true;
- if(HouseInfo[h][hFreeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "** This house is locked.");
- }
- return 1;
- }
- }
- for(new g = 1; g < MAX_GARAGES; g++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 4.0, GarageInfo[g][gOutsideX], GarageInfo[g][gOutsideY], GarageInfo[g][gOutsideZ]))
- {
- if(GarageInfo[g][gCreated] != 0)
- {
- if(GarageInfo[g][gLocked] != 1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vhid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vhid, GarageInfo[g][gInsideX], GarageInfo[g][gInsideY], GarageInfo[g][gInsideZ]);
- SetVehicleVirtualWorld(vhid, g);
- for(new l = 0; l < MAX_PLAYERS; l++)
- {
- if(IsPlayerConnected(l))
- {
- if(GetPlayerVehicleID(l) == vhid)
- {
- SetPlayerVirtualWorld(l, g);
- PlayerInfo[l][pVirtualWorld] = g;
- }
- }
- }
- SetVehicleZAngle(vhid, GarageInfo[g][gInsideA]);
- }
- else
- {
- SetPlayerPos(playerid, GarageInfo[g][gInsideX], GarageInfo[g][gInsideY], GarageInfo[g][gInsideZ]);
- SetPlayerVirtualWorld(playerid, g);
- SetCameraBehindPlayer(playerid);
- SetPlayerFacingAngle(playerid, GarageInfo[g][gInsideA]);
- PlayerInfo[playerid][pVirtualWorld] = g;
- }
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "** This garage is locked.");
- }
- }
- return 1;
- }
- }
- for(new b = 0; b < sizeof(BizInfo); b++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[b][bOutsideX], BizInfo[b][bOutsideY], BizInfo[b][bOutsideZ]))
- {
- if(BizInfo[b][bSeized]) return SendClientMessage(playerid, COLOR_GREY, "That business is currently seized.");
- if(BizInfo[b][bLocked]) return SendClientMessage(playerid, COLOR_GREY, "This business is closed, come back later.");
- if(PlayerInfo[playerid][pBizKey] != b && BizInfo[b][bProducts] <= 0) return SendClientMessage(playerid, COLOR_GREY, "This business has no products, come back later.");
- /*if(PlayerInfo[playerid][pBizKey] != b && BizInfo[b][bEntryFee] > 0)
- {
- if(GetMoney(playerid) >= BizInfo[b][bEntryFee])
- {
- GiveMoney(playerid, -BizInfo[b][bEntryFee]);
- BizInfo[b][bTill] += BizInfo[b][bEntryFee];
- format(str, sizeof(str), "~r~-$%d", BizInfo[b][bEntryFee]);
- GameTextForPlayer(playerid, str, 5000, 1);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}Error:{FFFFFF} You cannot afford the entry fee.");
- }
- }*/
- if(BizInfo[b][bType] == 1) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buygun to buy a weapon from this business.");
- else if(BizInfo[b][bType] == 2) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy food from this business.");
- else if(BizInfo[b][bType] == 3 || BizInfo[b][bType] == 5) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy Items from this business.");
- else if(BizInfo[b][bType] == 4) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /getdrink to buy a drink from this business.");
- else if(BizInfo[b][bType] == 5) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy Items from this business.");
- else if(BizInfo[b][bType] == 6) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buyclothes to buy clothes or /buygear to buy gear from this business.");
- else if(BizInfo[b][bType] == 7) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy donuts from this business.");
- else if(BizInfo[b][bType] == 8) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy food from this business.");
- else if(BizInfo[b][bType] == 9) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /buy to buy food from this business.");
- else if(BizInfo[b][bType] == 10) SendClientMessage(playerid, COLOR_LIGHTBLUE, "This business type hasn't been scripted yet.");
- else if(BizInfo[b][bType] == 11) SendClientMessage(playerid, COLOR_LIGHTBLUE, "This business type hasn't been scripted yet.");
- else if(BizInfo[b][bType] == 12) SendClientMessage(playerid, COLOR_LIGHTBLUE, "This business type hasn't been scripted yet.");
- else if(BizInfo[b][bType] == 13) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /store to buy fishing equipment from this business.");
- SetPlayerVirtualWorld(playerid, b);
- PlayerInfo[playerid][pVirtualWorld] = b; //this didn't exist for some reason
- SetPlayerInterior(playerid, BizInfo[b][bInsideInt]);
- PlayerInfo[playerid][pInt] = BizInfo[b][bInsideInt]; //this didn't exist for some reason
- SetPlayerPos(playerid, BizInfo[b][bInsideX], BizInfo[b][bInsideY], BizInfo[b][bInsideZ]);
- SetPlayerFacingAngle(playerid, BizInfo[b][bInsideAng]);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1221.9650, -1812.1187, 16.5938)) //DMV Enter
- {
- SetPlayerPos(playerid, 1494.4031, 1304.5746, 1093.2891);
- SetPlayerFacingAngle(playerid, 0.1631);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SetPlayerInterior(playerid, 3);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2352.9841,-1463.4185,24.0000)) // Tiki Store
- {
- PlayerInfo[playerid][pInt] = 6;
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- SetPlayerPos(playerid, -2240.4736,137.1805,1035.4141);
- SetPlayerFacingAngle(playerid, 267.2031);
- displayCenterHUDInfo(playerid, "~w~Tiki Store", 8); //display for 8 seconds
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- // LBCC Shit
- if(IsPlayerInRangeOfPoint(playerid, 2, 2851.94, -1366.00, 14.17)) // Outside -> House
- {
- SetPlayerPos(playerid, 2841.45, -1346.88, 959.74);
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- SetPlayerFacingAngle(playerid, 270.0);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 2, 2877.84, -1336.29, 965.66)) // House -> Office
- {
- SetPlayerPos(playerid, 1226.54, -813.24, 1084.00);
- SetPlayerInterior(playerid, 5);
- PlayerInfo[playerid][pInt] = 5;
- PlayerInfo[playerid][pVirtualWorld] = 20;
- SetPlayerVirtualWorld(playerid, 20);
- SetPlayerFacingAngle(playerid, 0.0);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1519.02, -1453.92, 14.20)) // VIP Club
- {
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- SetPlayerInterior(playerid, 69);
- PlayerInfo[playerid][pInt] = 69;
- SetPlayerPos(playerid, 1532.51, -1461.23, 1037.01);
- displayCenterHUDInfo(playerid, "~p~VIP Club", 8); //display for 8 seconds
- SetPlayerFacingAngle(playerid, 180.0);
- SetCameraBehindPlayer(playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You must be a VIP to enter the VIP Club.");
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 2275.39, -930.02, 28.04)) // VIP Black Market
- {
- if(PlayerInfo[playerid][pDonateRank] >= 2)
- {
- SetPlayerInterior(playerid, 7);
- PlayerInfo[playerid][pInt] = 7;
- SetPlayerVirtualWorld(playerid, 426);
- PlayerInfo[playerid][pVirtualWorld] = 426;
- SetPlayerPos(playerid, 315.70, -143.01, 999.60);
- displayCenterHUDInfo(playerid, "~b~Blackmarket", 8); //display for 8 seconds
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type /purchase to purchase weapons.");
- SetPlayerFacingAngle(playerid, 0.0);
- SetCameraBehindPlayer(playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Silver or Gold VIP.");
- }
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid, 3, 1310.0685, -1367.6198, 13.5382) || IsPlayerInRangeOfPoint(playerid, 3, 1088.75, -1715.45, 1136.46))
- {
- if(IsPlayerHoldingDuffleBag(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "Cannot enter paintball with Duffle Bag.");
- if(HasARapidResKit[playerid] == 1 || RapidResKitActive[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "Cannot enter paintball with a response kit.");
- if(PlayerInfo[playerid][pLevel] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You must play be level 1 or above before you can join Paintball.");
- if(!IsACop(playerid) && IsPlayerInRangeOfPoint(playerid, 3, 1088.75, -1715.45, 1136.46)) return 1;
- ShowPlayerDialog(playerid, DIALOG_PAINTBALL_WEAPONS1, DIALOG_STYLE_LIST, "Handgun Selection", "Colt 45\nDesert Eagle", "Select", "Quit");
- return 1;
- }
- for(new i = 0; i < MAX_VEHICLES; i++) //optimize
- {// For now all 3 planes will use shamal interior. I'll have a custom one mapped for later.
- if(GetVehicleModel(i) == 519 || GetVehicleModel(i) == 553) //shamal, andromeda, nevada
- {
- new Float:shax, Float:shay, Float:shaz;
- GetVehiclePos(i, shax, shay, shaz);
- if(IsPlayerInRangeOfPoint(playerid, 8.0, shax, shay, shaz))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has entered the plane.");
- else format(str, sizeof(str), "* %s has entered the plane.", sendername);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetPlayerVirtualWorld(playerid, i);
- PlayerInfo[playerid][pVirtualWorld] = i;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- SetPlayerPos(playerid, 2.57, 33.14, 1200);
- displayCenterHUDInfo(playerid, "~b~Airplane Interior", 8); //display for 8 seconds
- GivePlayerGun(playerid, 46);
- return 1;
- }
- }
- if(GetVehicleModel(i) == 433)//barracks
- {
- new Float:bx, Float:by, Float:bz;
- GetVehiclePos(i, bx, by, bz);
- new
- Float:vinfox, Float:vinfoy, Float:vinfoz, Float:vinforz;
- GetVehicleModelInfo(433, VEHICLE_MODEL_INFO_SIZE, vinfox, vinfoy, vinfoz); //get barracks dimensions
- GetVehicleZAngle(i, vinforz); //get barracks angle
- bx += (((vinfoy/2) + 0.8) * -floatsin(-vinforz, degrees));
- by += (((vinfoy/2) + 0.8) * -floatcos(-vinforz, degrees));
- if(IsPlayerInRangeOfPoint(playerid, 1.5, bx, by, bz)){
- SetPlayerVirtualWorld(playerid, i);
- PlayerInfo[playerid][pVirtualWorld] = i;
- SetPlayerPos(playerid, 1236.5437,2477.0471,1001.1534);
- SetPlayerFacingAngle(playerid, 359.7815);
- inBarracksID[playerid] = i;
- displayCenterHUDInfo(playerid, "~b~Barracks", 8);
- return 1;
- }
- }
- if(GetVehicleModel(i) == 592)//andromada
- {
- new Float:bx, Float:by, Float:bz;
- GetVehiclePos(i, bx, by, bz);
- new
- Float:vinfox, Float:vinfoy, Float:vinfoz, Float:vinforz;
- GetVehicleModelInfo(592, VEHICLE_MODEL_INFO_SIZE, vinfox, vinfoy, vinfoz); //get andro dimensions
- GetVehicleZAngle(i, vinforz); //get andro angle
- bx += (((vinfoy/2) - 4.8) * -floatsin(-vinforz, degrees));
- by += (((vinfoy/2) - 4.8) * -floatcos(-vinforz, degrees));
- if(IsPlayerInRangeOfPoint(playerid, 7.5, bx, by, bz)){
- SetPlayerVirtualWorld(playerid, i);
- PlayerInfo[playerid][pVirtualWorld] = i;
- SetPlayerPos(playerid, 363.4739,1027.3943,1952.3169);
- SetPlayerFacingAngle(playerid, 180.0);
- inAndromadaID[playerid] = i;
- displayCenterHUDInfo(playerid, "~b~Andromada", 8);
- GivePlayerGun(playerid, 46);
- return 1;
- }
- }
- if(GetVehicleModel(i) == 431)
- {
- new
- Float:sangbuspos[4], dynveh = GetDynamicVehicleID(i);
- if(sVehicleInfo[dynveh][v_faction] == 5)
- {
- GetVehiclePos(i, sangbuspos[0], sangbuspos[1], sangbuspos[2]);
- GetVehicleZAngle(i, sangbuspos[3]);
- new
- Float:sangbusvinfo[3];
- GetVehicleModelInfo(GetVehicleModel(i), VEHICLE_MODEL_INFO_SIZE, sangbusvinfo[0], sangbusvinfo[1], sangbusvinfo[2]);
- sangbuspos[0] += (((-sangbusvinfo[1]/2) + 0.5) * -floatsin(-(sangbuspos[3]), degrees));
- sangbuspos[1] += (((-sangbusvinfo[1]/2) + 0.5) * -floatcos(-(sangbuspos[3]), degrees));
- sangbuspos[0] += ((-sangbusvinfo[0] + 0.2) * -floatsin(-(sangbuspos[3] + 90), degrees));
- sangbuspos[1] += ((-sangbusvinfo[0] + 0.2) * -floatcos(-(sangbuspos[3] + 90), degrees));
- if(IsPlayerInRangeOfPoint(playerid, 2.5, sangbuspos[0], sangbuspos[1], sangbuspos[2]))
- {
- if(PlayerInfo[playerid][pMask] != 1) format(str, sizeof(str), "* %s has entered the prison bus.", PlayerICName(playerid));
- else format(str, sizeof(str), "* Stranger has entered the prison bus.");
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetPlayerPos(playerid, 506.7636,1965.6157,999.4003);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SetPlayerFacingAngle(playerid, 180);
- SetPlayerInterior(playerid, 50);
- SetPlayerVirtualWorld(playerid, i);
- displayCenterHUDInfo(playerid, "~b~Prison Bus", 8);
- }
- }
- }
- if(GetVehicleModel(i) == 548) //cargobob
- {
- new Float:cbobx, Float:cboby, Float:cbobz;
- GetVehiclePos(i, cbobx, cboby, cbobz);
- if(IsPlayerInRangeOfPoint(playerid, 8.0, cbobx, cboby, cbobz))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has entered the cargobob.");
- else format(str, sizeof(str), "* %s has entered the cargobob.", sendername);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetPlayerVirtualWorld(playerid, i);
- PlayerInfo[playerid][pVirtualWorld] = i;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- SetPlayerPos(playerid, 302.6667, 2510.3975, 499.9158);
- SetPlayerFacingAngle(playerid, 0);
- displayCenterHUDInfo(playerid, "~b~Cargobob", 8);
- GivePlayerGun(playerid, 46);
- return 1;
- }
- }
- //AMBULANCE SCRIPT.
- if(GetVehicleModel(i) == 416) //Ambulance
- {
- new Float:ambx, Float:amby, Float:ambz;
- GetVehiclePos(i, ambx, amby, ambz);
- if(IsPlayerInRangeOfPoint(playerid, 4.5, ambx, amby, ambz))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pMask] == 1) format(str, sizeof(str), "* Stanger has entered the Ambulance.");
- else format(str, sizeof(str), "* %s has entered the Ambulance.", sendername);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetPlayerVirtualWorld(playerid, i);
- PlayerInfo[playerid][pVirtualWorld] = i;
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SetPlayerPos(playerid, 245.8718, 1406.4834, 1112.1130);
- SetPlayerFacingAngle(playerid, 0);
- displayCenterHUDInfo(playerid, "~b~Ambulance", 8);
- return 1;
- }
- }
- }
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1318.8472, 392.6770, 19.5547)) //Drug Factory
- {
- SetPlayerInterior(playerid, 1);
- PlayerInfo[playerid][pInt] = 1;
- SetPlayerPos(playerid, 2205.2314, 1551.5662, 1008.4103);
- SetPlayerFacingAngle(playerid, 270.7354);
- displayCenterHUDInfo(playerid, "~b~Drug Factory", 8); //display for 8 seconds
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2232.89, -1333.48, 23.98)) //Church
- {
- SetPlayerInterior(playerid, 69);
- PlayerInfo[playerid][pInt] = 69;
- SetPlayerPos(playerid, -1269.07, 77.78, 992.04);
- displayCenterHUDInfo(playerid, "~b~Los Santos Chapel", 8); //display for 8 seconds
- SetPlayerFacingAngle(playerid, 180.0000);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, -2111.5686, -443.9720, 38.7344))
- {
- SetPlayerInterior(playerid, 4);
- PlayerInfo[playerid][pInt] = 4;
- SetPlayerPos(playerid, -1443.0554, -581.1879, 1055.0472);
- displayCenterHUDInfo(playerid, "~b~Welcome to the Dirt Track", 8); //display for 8 seconds
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 8.0, -2080.3079, -406.0309, 38.7344))
- {
- SetPlayerInterior(playerid, 14);
- PlayerInfo[playerid][pInt] = 14;
- SetPlayerPos(playerid, -1464.7732, 1557.5533, 1052.5313);
- displayCenterHUDInfo(playerid, "~b~Welcome to the Stunting Track", 8); //display for 8 seconds
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2025.2659, -1401.6707, 17.2100))
- {
- SetPlayerPos(playerid, 980.7294, 1472.9312, 1004.4619);
- SetPlayerFacingAngle(playerid, 0);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 8);
- PlayerInfo[playerid][pInt] = 8;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2047.3463, -1396.1946, 48.3359))
- {
- SetPlayerPos(playerid, 1004.3405, 1488.7122, 1016.0709);
- SetPlayerFacingAngle(playerid, 270);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 8);
- PlayerInfo[playerid][pInt] = 8;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2049.5835, -1404.1725, 48.3359))
- {
- SetPlayerPos(playerid, 1013.2662, 1491.3506, 1016.0709);
- SetPlayerFacingAngle(playerid, 180);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 8);
- PlayerInfo[playerid][pInt] = 8;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 975.0505, 1495.7568, 1010.2537))
- {
- SetPlayerPos(playerid, 975.0416, 1494.5276, 1010.2537);
- SetPlayerFacingAngle(playerid, 180);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 8);
- PlayerInfo[playerid][pInt] = 8;
- return 1;
- }
- EnterTimer[playerid] = gettime();
- new Float:asucX, Float:asucY, Float:asucZ;
- GetPlayerPos(playerid, asucX, asucY, asucZ);
- if(sucX != asucX || sucY != asucY || sucZ != asucZ) return 1;
- /* basically what we're doing here is check if the position of the player has changed since he typed the /enter
- if it did, it will return 1, meaning when pressing the key 'N' it won't execute cmd_exit (so it doesnt enter and exit)
- for the rest of this code search (CTRL F) "cmd_enter"
- */
- else return 0;
- }
- }
- CMD:inventory(playerid, params[])
- {
- new rod[20], bait[20], baita, line[20], line1[1000], line2[1000], line3[1000], mstring[3500];
- format(rod, sizeof(rod), "%s", GetFishingRodName(PlayerInfo[playerid][pFishRod]));
- format(bait, sizeof(bait), "%s", GetFishingBaitName(PlayerInfo[playerid][pBait]));
- format(line, sizeof(line), "%s", GetFishingLineName(PlayerInfo[playerid][pLine]));
- baita = PlayerInfo[playerid][pBaitAmount];
- if(baita == 0)
- bait = "None";
- new packages = Packages[playerid];
- new crates = Crates[playerid];
- format(line1, sizeof(line1), "{007BD0}[Inventory] {CBCCCE}Materials:[%d] Cannabis:[%d.0g] Cocaine:[%d.0g] Meth:[%d.0g] Xanax[%d.0 bars] Package:[%d] Crates:[%d] Seeds:[%d] Products:[%d]", PlayerInfo[playerid][pMats], PlayerInfo[playerid][pCannabis], PlayerInfo[playerid][pCocaine], PlayerInfo[playerid][pMeth], PlayerInfo[playerid][pXanax], packages, crates, PlayerInfo[playerid][pPotSeeds], PlayerInfo[playerid][pProducts]);
- format(line2, sizeof(line2), "{007BD0}[Inventory] {D8D8D8}Ropes:[%d] Blindfolds:[%d] Gags:[%d] Cigars:[%d] Beer:[%d] Sprunk:[%d] Spraycan:[%d] Screw Driver:[%d] Deck of Cards:[%d] WTc:[%d]", PlayerInfo[playerid][pRope], PlayerInfo[playerid][pBlindfolds], PlayerInfo[playerid][pGag], PlayerInfo[playerid][pCigars], PlayerInfo[playerid][pBeer], PlayerInfo[playerid][pSprunk], PlayerInfo[playerid][pSpraycan], PlayerInfo[playerid][pScrew], PlayerInfo[playerid][pDeck], PlayerInfo[playerid][pWTc]);
- format(line3, sizeof(line3), "{007BD0}[Inventory] {D8D8D8}Fishing Rod:[%s] Bait:[%s] Bait Left:[%d] Fishing Line:[%s] Stereo:[%d] Box of Matches:[%d] Jerry Can:[%d] Drill:[%d]", rod, bait, baita, line, PlayerInfo[playerid][pStereo], PlayerInfo[playerid][pMatches], PlayerInfo[playerid][pJerrycan], PlayerInfo[playerid][pDrill]);
- format(mstring, sizeof(mstring), "%s\n%s\n%s", line1, line2, line3);
- ShowPlayerDialog(playerid, DIALOG_STATS1, DIALOG_STYLE_MSGBOX, "Inventory", mstring, "Done", "Print");
- return 1;
- }
- CMD:inv(playerid, params[]) return cmd_inventory(playerid, params);
- CMD:stats(playerid, params[])
- {
- if(gPlayerLogged[playerid] != 0)
- {
- ShowStats(playerid, playerid);
- viewingStatsOf[playerid] = playerid;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not logged in.");
- return 1;
- }
- CMD:appearance(playerid, params[])
- {
- new aid;
- if(sscanf(params, "u", aid))
- {
- SendClientMessage(playerid, COLOR_GREY, "Use /appearance [ID/partOfName] to check their appearence.");
- ShowAppearanceMain(playerid);
- return 1;
- }
- if(IsPlayerConnected(aid))
- {
- new Float:pax, Float:pay, Float:paz;
- GetPlayerPos(aid, pax, pay, paz);
- if(IsPlayerInRangeOfPoint(playerid, 10.0, pax, pay, paz))
- {
- new astr[512];
- format(astr, sizeof(astr), "Gender:\t\t%s\nAge:\t\t\t%d\nEthnicity\t\t%s\nEye Colour:\t\t%s\nBody Build:\t\t%s\nHeight:\t\t\t%dcm\nUnique Features:\t%s",
- GetPlayerGender2(aid), PlayerInfo[aid][pAge], GetPlayerEthnicity(aid), GetPlayerEyeColour(aid), GetPlayerBuild(aid), PlayerInfo[aid][pHeight], PlayerInfo[aid][pAppearance]);
- ShowPlayerDialog(playerid, DIALOG_APPEARANCE_DISPLAY, DIALOG_STYLE_LIST, "Character Appearance", astr, "Close", "");
- return 1;
- }
- return SendClientMessage(playerid, COLOR_GREY, "You cannot see that player.");
- }
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player isn't connected.");
- }
- CMD:facrankname(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new tag[24];
- if(sscanf(params, "s[24]", tag)) return 1;
- {
- if(strlen(tag) > 23) return SendClientMessage(playerid, COLOR_GREY, "The maximum amount of characters is 24.");
- format(customRank[playerid], 24, "%s", tag);
- if(strmatch(tag, "None"))
- {
- customRankName[playerid] = false;
- }
- else
- {
- customRankName[playerid] = true;
- }
- }
- }
- return 1;
- }
- CMD:cnewbietag(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1999999999)
- {
- new tag[24];
- if(sscanf(params, "s[24]", tag)) return 1;
- {
- if(strlen(tag) > 23) return SendClientMessage(playerid, COLOR_GREY, "The maximum amount of characters is 24.");
- if(strmatch(tag, "none"))
- {
- PlayerInfo[playerid][pTag] = NTAG_NEWBIE;
- }
- else
- {
- PlayerInfo[playerid][pTag] = NTAG_CUSTOM;
- }
- format(CustomTag[playerid], 50, "%s", tag);
- }
- }
- return 1;
- }
- CMD:number(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pPhoneBook] == 1)
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /number [playerid/PartOfName]");
- {
- if(IsPlayerConnected(targetid))
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(targetid)), 0, MAX_PLAYER_NAME);
- if(targetid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[targetid][pPnumber] == 0) format(str, sizeof(str), "Name: %s, Ph: None", name);
- else format(str, sizeof(str), "Name: %s, Ph: %d", name, PlayerInfo[targetid][pPnumber]);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You don't have a Phonebook.");
- return 1;
- }
- CMD:phonebook(playerid, params[]) return cmd_number(playerid, params);
- CMD:buylevel(playerid, params[])
- {
- new str[128];
- if(gPlayerLogged[playerid] != 0)
- {
- if(PlayerInfo[playerid][pLevel] >= 0)
- {
- new nxtlevel = PlayerInfo[playerid][pLevel] +1, expamount = nxtlevel *levelexp;
- /*if(PlayerInfo[playerid][pCash] < costlevel)
- {
- format(str, sizeof(str), "You can't afford that ($%d).", costlevel);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }*/
- if(PlayerInfo[playerid][pExp] < expamount)
- {
- format(str, sizeof(str), "You need %d respect points, you curently have %d.", expamount, PlayerInfo[playerid][pExp]);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- else
- {
- if(nxtlevel == 2){
- SendClientMessage(playerid, COLOR_YELLOW, "Reminder: {FFFFFF}Global Chat is available for you now, use /toggc to enable it.");
- PlayerInfo[playerid][pTag] = NTAG_PLAYER;
- }
- format(str, sizeof(str), "~r~Level up~n~~w~level %d", nxtlevel);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- //GiveMoney(playerid, -costlevel);
- PlayerInfo[playerid][pLevel]++;
- PlayerInfo[playerid][pExp] -= expamount;
- new total = PlayerInfo[playerid][pExp];
- if(total > 0)
- {
- PlayerInfo[playerid][pExp] = total;
- }
- else
- {
- PlayerInfo[playerid][pExp] = 0;
- }
- PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade] +2;
- displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
- format(str, sizeof(str), "You bought level %d for FREE, type /upgrade.", nxtlevel);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "You have %d upgrade points remaining.", PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not logged in.");
- return 1;
- }
- CMD:resetgearpos(playerid, params[])
- {
- new conf[8];
- if(sscanf(params, "s[8]", conf)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /resetgearpos [confirm]");
- if(strmatch(conf, "confirm")) {
- for(new i = 0; i < 7; i++) {
- AccessoriesB[playerid][i] = 0;
- AccessoriesX[playerid][i] = 0;
- AccessoriesY[playerid][i] = 0;
- AccessoriesZ[playerid][i] = 0;
- AccessoriesrX[playerid][i] = 0;
- AccessoriesrY[playerid][i] = 0;
- AccessoriesrZ[playerid][i] = 0;
- AccessoriessX[playerid][i] = 1;
- AccessoriessY[playerid][i] = 1;
- AccessoriessZ[playerid][i] = 1;
- }
- SendClientMessage(playerid, COLOR_GRAD2, "* You have reset your gear positions.");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /resetgearpos [confirm]");
- SendClientMessage(playerid, COLOR_WHITE, "NOTICE: This will reset the position of each gear.");
- }
- return 1;
- }
- CMD:resetupgrades(playerid, params[])
- {
- new str[128];
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not logged in.");
- if(PlayerInfo[playerid][pCash] < 100000) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($100,000).");
- if(PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GREY, "You need to be at least level 2.");
- new conf[8];
- if(sscanf(params, "s[8]", conf)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /resetupgrades [confirm]");
- {
- if(strmatch(conf, "Confirm"))
- {
- PlayerInfo[playerid][gPupgrade] = (PlayerInfo[playerid][pLevel]) *2;
- PlayerInfo[playerid][pSHealth] = 0;
- PlayerInfo[playerid][pSHP] = 0;
- GiveMoney(playerid, -100000);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(str, sizeof(str), "* You have reset your upgrades, you have %d upgrades points remaining.", PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /resetupgrades [confirm]");
- }
- return 1;
- }
- CMD:up(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 1 || PlayerInfo[playerid][pMapper] >= 1 || PlayerInfo[playerid][pTester] >= TESTERRANK_SENIOR)
- {
- if(pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command whilst inside of a vehicle.");
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz +2);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:dn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 1 || PlayerInfo[playerid][pMapper] >= 1 || PlayerInfo[playerid][pTester] >= TESTERRANK_SENIOR)
- {
- if(pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command whilst inside of a vehicle.");
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz -2);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:bigup(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 1 || PlayerInfo[playerid][pMapper] >= 1 || PlayerInfo[playerid][pTester] >= TESTERRANK_SENIOR)
- {
- if(pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command whilst inside of a vehicle.");
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz +8);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:bigdn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 1 || PlayerInfo[playerid][pMapper] >= 1 || PlayerInfo[playerid][pTester] >= TESTERRANK_SENIOR)
- {
- if(pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "You can't use this at the moment.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command whilst inside of a vehicle.");
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz -8);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:getgift(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.5, 1548.55004883, -1477.00000000, 1037.90002441) && PlayerInfo[playerid][pDonateRank] != 0)
- {
- if(GottenGift[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "You have to wait 5 hours in between getting gifts! Try again later.");
- format(string5, sizeof(string5), "* %s closes his eyes reaching into the safe pulling something out...", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- new randomgift = random(9);
- if(randomgift == 0)
- {
- PlayerInfo[playerid][pMats] += 5000;
- format(string5, sizeof(string5), "* 5,000 Materials. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 1)
- {
- PlayerInfo[playerid][pCash] += 50000;
- format(string5, sizeof(string5), "* $50,000. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 2)
- {
- PlayerInfo[playerid][pCash] += 10000;
- format(string5, sizeof(string5), "* $10,000. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 3)
- {
- GivePlayerGun(playerid, 30);
- GivePlayerGun(playerid, 32);
- GivePlayerGun(playerid, 24);
- GivePlayerGun(playerid, 33);
- format(string5, sizeof(string5), "* A full weapon set. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 4)
- {
- PlayerInfo[playerid][pPotSeeds] += 20;
- format(string5, sizeof(string5), "* 20 cannabis seeds. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 5)
- {
- PlayerInfo[playerid][pPotSeeds] += 10;
- format(string5, sizeof(string5), "* 10 cannabis seeds. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(randomgift == 6)
- {
- PlayerInfo[playerid][pMats] += 10000;
- format(string5, sizeof(string5), "* 10,000 Materials. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(PlayerInfo[playerid][pDonateRank] == 4 && randomgift == 7)
- {
- PlayerInfo[playerid][pMats] += 50000;
- format(string5, sizeof(string5), "* 50,000 Materials. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- else if(PlayerInfo[playerid][pDonateRank] == 4 && randomgift == 8)
- {
- PlayerInfo[playerid][pCash] += 500000;
- format(string5, sizeof(string5), "* 500,000 Cash. (( %s ))", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string5, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- GottenGift[playerid] = 1;
- GottenTimeLeft[playerid] = 18000000;
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You are not in the VIP Club.");
- return 1;
- }
- CMD:getgifttime(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pDonateRank] != 0)
- {
- if(GottenTimeLeft[playerid] > 1)
- {
- format(str, sizeof(str), "You have %d minutes before you can /getgift again.", GottenTimeLeft[playerid]/60000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You may /getgift as you have no cooldown for it.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "You are not a VIP!");
- return 1;
- }
- CMD:breakin(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pScrew] >= 1 || PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new biz = IsPlayerNearBiz(playerid);
- new house = IsPlayerNearHouse(playerid);
- new car = -1;
- new Float:vX, Float:vY, Float:vZ;
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- GetVehiclePos(i, vX, vY, vZ);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, vX, vY, vZ))
- {
- car = i;
- break;
- }
- }
- if(biz == -1 && house == -1 && car == -1) return SendClientMessage(playerid, COLOR_GREY, "You aren't at a house/business/vehicle.");
- if(LockPickingBiz[playerid] != 999) return SendClientMessage(playerid, COLOR_GREY, "You are already lockpicking a business.");
- if(LockPickingHouse[playerid] != 999) return SendClientMessage(playerid, COLOR_GREY, "You are already lockpicking a house.");
- if(LockPickingCar[playerid] != -1) return SendClientMessage(playerid, COLOR_GREY, "You are already lockpicking a car.");
- if(biz != -1) //they are picking a biz
- {
- if(BizInfo[biz][bOwned] == 0) return SendClientMessage(playerid, COLOR_GREY, "This business is not owned.");
- if(BizInfo[biz][bLocked] == 0) return SendClientMessage(playerid, COLOR_GREY, "This business is already unlocked.");
- if(BizInfo[biz][bSeized] == 1) return SendClientMessage(playerid, COLOR_GREY, "That business is currently property of the government.");
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pBizKey] == biz)
- {
- format(str, sizeof(str), "SMS: This is an automated message informing you that your business alarm has been activated.", giveplayer);
- SendClientMessage(i, COLOR_YELLOW, str);
- break;
- }
- }
- }
- format(str, sizeof(str), "* %s pulls out a screwdriver and begins picking at the lock on the business.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- LockPickingBiz[playerid] = biz;
- if(PlayerInfo[playerid][pAdmin] < 1337) PlayerInfo[playerid][pScrew] -= 1;
- }
- else if(house != -1) //they are picking a home
- {
- if(HouseInfo[house][hOwned] == 0) return SendClientMessage(playerid, COLOR_GREY, "This house is not owned.");
- if(HouseInfo[house][hLocked] == 0) return SendClientMessage(playerid, COLOR_GREY, "This house is already unlocked.");
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pHouseID] == house)
- {
- format(str, sizeof(str), "SMS: This is an automated message informing you that your house alarm has been activated.", giveplayer);
- SendClientMessage(i, COLOR_YELLOW, str);
- break;
- }
- }
- }
- if(HouseInfo[house][hAlarm] == 1)
- {
- new Float:PX, Float:PY, Float:PZ, location[MAX_ZONE_NAME];
- Get2DZone(location, MAX_ZONE_NAME, HouseInfo[house][hOutsideX], HouseInfo[house][hOutsideY], HouseInfo[house][hOutsideZ]);
- format(str, sizeof(str), "** Dispatch: There has been reports of a break-in over at %d %s, postal code: %d, go check it out! **", house, location, HouseInfo[house][hSQLID]);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(IsPlayerInRangeOfPoint(i, 30.0, PX, PY, PZ))
- PlayerPlaySound(i, 3401, 0.0, 0.0, 0.0);
- }
- }
- format(str, sizeof(str), "* %s pulls out a screwdriver and begins picking at the lock on the house.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- LockPickingHouse[playerid] = house;
- if(PlayerInfo[playerid][pAdmin] < 1337) PlayerInfo[playerid][pScrew] -= 1;// the hell is this?
- return 1;
- }
- breakinPlayerVehicle( playerid );
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You do not have a screwdriver! You may purchase one from any 24/7.");
- return 1;
- }
- CMD:flashlight(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- new type[8];
- if(sscanf(params, "s[8]", type)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /flashlight [enable/disable]");
- {
- if(strmatch(type, "enable"))
- {
- if(!hasFlashlight[playerid])
- {
- SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT1, 18656, 5, 0.1, 0.038, -0.1, -90, 180, 0, 0.03, 0.03, 0.03);
- SetPlayerAttachedObject(playerid, FLASHLIGHT_SLOT2, 18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
- hasFlashlight[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "You have equipped your flashlight.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You already have the flashlight enabled.");
- }
- else if(strmatch(type, "disable"))
- {
- if(hasFlashlight[playerid])
- {
- RemovePlayerAttachedObject(playerid, FLASHLIGHT_SLOT1);
- RemovePlayerAttachedObject(playerid, FLASHLIGHT_SLOT2);
- hasFlashlight[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "You have un-equipped your flashlight.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You already have the flashlight disabled.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /flashlight [enable/disable]");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst inside of a vehicle.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You aren't in the authorized faction to use this.");
- return 1;
- }
- CMD:loadrubber(playerid, params[])
- {
- if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /loadrubber in the paintball.");
- if(IsAtEvent[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /loadrubber in an event.");
- if(hasRubberBullets[playerid])
- {
- if(loadedRubberBullets[playerid])
- {
- loadedRubberBullets[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "You have unloaded your rubber bullets.");
- }
- else
- {
- if(!HasGunInSlot(playerid, GetWeaponSlot(33))) return SendClientMessage(playerid, COLOR_GREY, "You must have a Country Rifle on your body to use these.");
- loadedRubberBullets[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "You have loaded your rubber bullets.");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:lockserver(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)
- {
- new pass[24];
- if(sscanf(params, "s[24]", pass)) {
- SendClientMessage(playerid, COLOR_GREY, "Note: use /lockserver 0 to unlock the server.");
- return SendClientMessage(playerid, COLOR_GREY, "Usage: /lockserver [new pass]");
- }
- format(str, sizeof(str), "Server password set to %s", pass);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "password %s", pass);
- SendRconCommand(str);
- }
- return 1;
- }
- CMD:lockpick(playerid, params[]) return cmd_breakin(playerid, params);
- CMD:rules(playerid, params[])
- {
- new vstr[5120];
- format(vstr, sizeof(vstr), "{FFFFFF}Please read the following rules, breaking them may result in a kick/prison/ban/fine.\n\n");
- strins(vstr, "- {FF0000}Hacking{FFFFFF} - Using third party software that gives you an unfair advantage.\n", strlen(vstr));
- strins(vstr, "- {FF0000}Money Farming{FFFFFF} - Transfering money from an alternative account onto a main.\n", strlen(vstr));
- strins(vstr, "- {FF0000}Account Sharing{FFFFFF} - The account is yours and only yours.\n", strlen(vstr));
- strins(vstr, "- {FF0000}Server Advertising{FFFFFF} - Messages with IP addresses / advertisements for a server is not acceptable.\n", strlen(vstr));
- strins(vstr, "- {FF0000}Scamming Donations{FFFFFF} - Decieving others into paying you for a donation you charge-back / don't fulfill.\n", strlen(vstr));
- strins(vstr, "- {FF0000}Creating Alts to Avoid{FFFFFF} - Using alternative accounts to avoid admin punishment.\n\n", strlen(vstr));
- strins(vstr, "- {FF9900}Metagaming{FFFFFF} - Using information obtained out of characterly in character.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Deathmatching{FFFFFF} - Killing someone without an in character reason.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Killing on Sight{FFFFFF} - Killing someone on sight.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Powergaming{FFFFFF} - Roleplaying something unrealistic / impossible & forcing roleplay onto others.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Avoiding Roleplay{FFFFFF} - Failure to comply with any roleplay that you are engaged in.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Non-RP Behaviour{FFFFFF} - Decisions that do not seem reasonable in a roleplay server.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Non-RP Driving{FFFFFF} - Driving in an unreasonable way.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Car Ramming/Parking{FFFFFF} - Intentionally using a car as a weapon.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Chicken Running{FFFFFF} - Running unreasonably during a gunfight to prevent being shot.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Quickswapping/Crackshooting{FFFFFF} - Using any exploit to speed up the reload / shooting time of any weapon.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Logging/Tabbing to Avoid{FFFFFF} - Exiting / minimizing your game to avoid roleplay you're engaged in.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Forcing a Game Crash{FFFFFF} - Exploiting features to force your client to time-out.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Healing/Vesting During A Gunfight{FFFFFF} - Using any feature to heal during a gunfight.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Scamming Above Limit{FFFFFF} - Scamming over the set limit is not allowed.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Robbing Above Limit{FFFFFF} - Robbing over the set limit is not allowed.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Scamming/Robbing Newbies{FFFFFF} - Scamming / Robbing a level 1-3.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Ninja Jacking{FFFFFF} - Exploiting the hijack-kill glitch in SA:MP.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Heliblading/Carbombing/Planebombing{FFFFFF} - Using the blades / explosions to kill players.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Releasing Secret Information{FFFFFF} - Releasing secret infomation (hitman, etc).\n", strlen(vstr));
- strins(vstr, "- {FF9900}Insulting/Disrespecting Admins{FFFFFF} - Harassing the admins.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Lying to Admins / Interfering with admin work{FFFFFF} - Lying / deceiving admins.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Out Of Character Contracting{FFFFFF} - Using /contract on a player for no in character reason.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Running man (AFK Kicker){FFFFFF} - Circumventing the auto AFK kicker.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Exploiting{FFFFFF} - Using a feature to gain an advantage over others.\n", strlen(vstr));
- strins(vstr, "- {FF9900}Trolling{FFFFFF} - If you cross the line you can get {FF0000}permanently banned{FFFFFF}.\n\n", strlen(vstr));
- strins(vstr, "{FFFFFF}Legend: {FF0000}High Offense{FFFFFF} | {FF9900}Medium Offense\n", strlen(vstr));
- strins(vstr, "{FFFFFF}Please read all the rules at Coming soon. Punishments can also vary on level.\n\n", strlen(vstr));
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Server Rules", vstr, "Okay", "");
- return 1;
- }
- CMD:prices(playerid, params[])
- {
- new vstr[5120];
- strins(vstr, "- {007BD0}Custom Icon{FFFFFF} - $6,000,000[$6M]\n", strlen(vstr));
- strins(vstr, "- {007BD0}Custom Gate{FFFFFF} - $8,000,000[$6M]\n", strlen(vstr));
- strins(vstr, "- {007BD0}Custom House Interior{FFFFFF} - $4,500,000[$4.M]\n", strlen(vstr));
- strins(vstr, "- {007BD0}Custom Business Interior{FFFFFF} -$ 5,500,000[$5M]\n", strlen(vstr));
- strins(vstr, "- {007BD0}Custom Phone Number{FFFFFF} - $6,000,000$\n", strlen(vstr));
- strins(vstr, "- {007BD0}Custom Icon{FFFFFF} - $6,000,000[6M]\n", strlen(vstr));
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Server Prices", vstr, "Done", "");
- return 1;
- }
- CMD:asay(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)//announce GMX
- {
- new message[128];
- if(sscanf(params, "s[128]", message)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /asay [message]");
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- new text1[128], text2[128];
- format(text1, sizeof(text1), "* Admin(%s): %s", name, message);
- format(text2, sizeof(text2), "* Admin: %s", message);
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] && i != playerid)
- {
- SendClientMessage(i, COLOR_BLUE, text1);
- }
- else
- {
- SendClientMessage(i, COLOR_BLUE, text2);
- }
- }
- }
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:osetname(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new oldname[MAX_PLAYER_NAME], newname[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]s[24]", oldname, newname)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /osetname [full name(case sensitive)] [firstname_lastname]");
- if(GetPlayerIDFromName(oldname) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "That player is currently logged in.");
- if(strlen(newname) > MAX_PLAYER_NAME) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The new name is too long."); //invalid length
- // Replace space with underscore (for stupid admins)
- if(strfind(newname, " ", true) != -1) {
- strmid(newname, str_replace(' ', '_', newname), 0, MAX_PLAYER_NAME);
- SendClientMessage(playerid, COLOR_GREY, "Hint: You should not use spaces in names, it has been replaced with an underscore.");
- }
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", newname);
- mysql_pquery(sqlGameConnection, query, "OnOSetNameCheck", "iss", playerid, newname, oldname);
- }
- else {
- return AdmErrorMsg;
- }
- return 1;
- }
- CMD:ocheck(playerid, params[])
- {
- new playersname[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(sscanf(params, "s[24]", playersname)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ocheck [full name (case sensitive)]");
- new giveplayerid = ReturnUser(playersname);
- if(IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is currently online.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", playersname);
- mysql_pquery(sqlGameConnection, query, "OnOCheck", "is", playerid, playersname);
- return 1;
- }
- else
- {
- return AdmErrorMsg;
- }
- }
- CMD:fixcheckpoint(playerid, params[])
- {
- if(checkpointInfo[playerid][cpX] == 0.0 && checkpointInfo[playerid][cpY] == 0.0 && checkpointInfo[playerid][cpZ] == 0.0) return SendClientMessage(playerid, COLOR_GREY, "You do not have an active checkpoint.");
- Timer_updatePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Your checkpoint has been updated, if you don't see it on the radar use /fixcheckpoint.");
- return 1;
- }
- CMD:removecctv(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- new cctvid, filename[40];
- if(sscanf(params, "i", cctvid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removecctv [CameraID]");
- {
- format(filename, sizeof(filename), "CCTV/CCTV%i.ini", cctvid);
- if(dini_Exists(filename))
- {
- DeleteCCTVCam(cctvid);
- format(str, sizeof(str), "You have successfully removed CCTV Camera ID %d.", cctvid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Invalid CCTV ID.");
- }
- return 1;
- }
- CMD:addcctv(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- new Float:x, Float:y, Float:z, string[128], cctvID = CCTVCount, name[24];
- GetPlayerPos(playerid, x, y, z);
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /addcctv [Full_Name (case sensitive - with underscore)]");
- {
- SaveCCTV(name, x, y, z, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), cctvID);
- format(string, sizeof(string), "[CCTV System] You have created a new CCTV with the ID of %d for %s.", cctvID, name);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(CCTV[cctvID][CCTVName], 50, "Not Set");
- format(CCTV[cctvID][CCTVOwner], 24, "%s", name);
- CCTV[cctvID][CCTVX] = x;
- CCTV[cctvID][CCTVY] = y;
- CCTV[cctvID][CCTVZ] = z;
- CCTV[cctvID][CCTVRX] = 0.0;
- CCTV[cctvID][CCTVRY] = 0.0;
- CCTV[cctvID][CCTVRZ] = 0.0;
- CCTV[cctvID][CCTVVW] = GetPlayerVirtualWorld(playerid);
- CCTV[cctvID][CCTVINT] = GetPlayerInterior(playerid);
- CCTV[cctvID][CCTVLookAtX] = 0.0;
- CCTV[cctvID][CCTVLookAtY] = 0.0;
- CCTV[cctvID][CCTVLookAtZ] = 0.0;
- CCTV[cctvID][CCTVObject] = CreateDynamicObject(CCTV_OBJID, x, y, z, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- CMD:cctv(playerid, params[])
- {
- if(IsPlayerRestricted(playerid) || PlayerInfo[playerid][pHospital] != 0 || pDeathState[playerid] == PLAYER_STATE_REVIVE) return SendClientMessage(playerid, COLOR_GREY, "You can not use this right now.");
- if(OnCCTV[playerid] != -1) return SendClientMessage(playerid, COLOR_GREY, "You're already using a CCTV Camera.");
- new cctvid;
- if(sscanf(params, "i", cctvid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /cctv [camera ID] (Type /mycctvs to see the ID's of yours)");
- {
- if(strmatch(CCTV[cctvid][CCTVOwner], PlayerName(playerid)))
- {
- new Float:x, Float:y, Float:z, string[128];
- GetPlayerPos(playerid, x, y, z);
- CameraX[playerid] = x;
- CameraY[playerid] = y;
- CameraZ[playerid] = z;
- CameraInt[playerid] = GetPlayerInterior(playerid);
- CameraWorld[playerid] = GetPlayerVirtualWorld(playerid);
- format(string, sizeof(string), "* %s has loaded up their CCTV system. *", PlayerICName(playerid));
- SendActionMessage(playerid, 0xC2A2DAAA, string);
- SendClientMessage(playerid, COLOR_GREY, "INFO: Use the arrows on the screen to switch between your CCTVs. /quitcctv to quit it.");
- OnCCTV[playerid] = cctvid;
- TogglePlayerControllable(playerid, false);
- SetPlayerPos(playerid, CCTV[cctvid][CCTVX], CCTV[cctvid][CCTVY], CCTV[cctvid][CCTVZ]);
- SetPlayerCameraPos(playerid, CCTV[cctvid][CCTVX], CCTV[cctvid][CCTVY], CCTV[cctvid][CCTVZ]);
- SetPlayerVirtualWorld(playerid, CCTV[cctvid][CCTVVW]);
- SetPlayerInterior(playerid, CCTV[cctvid][CCTVINT]);
- SetPlayerCameraLookAt(playerid, CCTV[cctvid][CCTVLookAtX], CCTV[cctvid][CCTVLookAtY], CCTV[cctvid][CCTVLookAtZ]);
- // Showing the arrows //
- TextDrawShowForPlayer(playerid, CCTV_Arrows[0]); TextDrawShowForPlayer(playerid, CCTV_Arrows[1]);
- SelectTextDraw(playerid, 0x00FF00FF);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That CCTV isn't owned by you.");
- }
- return 1;
- }
- CMD:nextcctv(playerid) {
- new str[128];
- if(OnCCTV[playerid] == -1)
- return SendClientMessage(playerid, COLOR_GREY, "You need to be using a CCTV Camera.");
- for(new i = OnCCTV[playerid] + 1; i != OnCCTV[playerid]; i++) {
- if(i >= MAX_CCTV_DYNAMIC)
- i = 0;
- if(strmatch(CCTV[i][CCTVOwner], PlayerName(playerid))){
- OnCCTV[playerid] = i;
- SetPlayerPos(playerid, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ]);
- SetPlayerCameraPos(playerid, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ]);
- SetPlayerVirtualWorld(playerid, CCTV[i][CCTVVW]);
- SetPlayerInterior(playerid, CCTV[i][CCTVINT]);
- SetPlayerCameraLookAt(playerid, CCTV[i][CCTVLookAtX], CCTV[i][CCTVLookAtY], CCTV[i][CCTVLookAtZ]);
- format(str, sizeof(str), "You are now viewing CCTV ID: %d", i);
- return SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- return SendClientMessage(playerid, COLOR_GREY, "You do not have any more CCTVs.");
- }
- CMD:previouscctv(playerid) {
- new str[128];
- if(OnCCTV[playerid] == -1)
- return SendClientMessage(playerid, COLOR_GREY, "You need to be using a CCTV Camera.");
- for(new i = OnCCTV[playerid] - 1; i != OnCCTV[playerid]; i--) {
- if(i < 0)
- i = MAX_CCTV_DYNAMIC - 1;
- if(strmatch(CCTV[i][CCTVOwner], PlayerName(playerid))){
- OnCCTV[playerid] = i;
- SetPlayerPos(playerid, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ]);
- SetPlayerCameraPos(playerid, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ]);
- SetPlayerVirtualWorld(playerid, CCTV[i][CCTVVW]);
- SetPlayerInterior(playerid, CCTV[i][CCTVINT]);
- SetPlayerCameraLookAt(playerid, CCTV[i][CCTVLookAtX], CCTV[i][CCTVLookAtY], CCTV[i][CCTVLookAtZ]);
- format(str, sizeof(str), "You are now viewing CCTV ID: %d", i);
- return SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- return SendClientMessage(playerid, COLOR_GREY, "You do not have any more CCTVs.");
- }
- CMD:quitfamily(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pFMember] < 255)
- {
- new conf[10];
- if(sscanf(params, "s[10]", conf)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /quitfamily 'confirm'");
- {
- if(strmatch("confirm", conf))
- {
- new family = PlayerInfo[playerid][pFMember];
- if(FamilyInfo[family][FamilyMembers] > 0) FamilyInfo[family][FamilyMembers]--;
- PlayerInfo[playerid][pRank] = 0;
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- PlayerInfo[playerid][pModel] = 20;
- PlayerInfo[playerid][pOnDuty] = 0;
- PlayerInfo[playerid][pRadio] = 0;
- PlayerInfo[playerid][pHandtazer] = 0;
- PlayerInfo[playerid][ptazerGun] = 0;
- if(PlayerInfo[playerid][pJailed] != 3 && PlayerInfo[playerid][pAdminJailed] == 0)
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- PlayerInfo[playerid][pClothes] = 0;
- }
- format(str, sizeof(str), "* You have quit the %s, you are now a civilian again.", FamilyInfo[family][FamilyName]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- customRankName[playerid] = false;
- format(customRank[playerid], 24, "None");
- PlayerInfo[playerid][pFMember] = 255;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /quitfamily 'confirm'");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not in a family!");
- return 1;
- }
- CMD:quitgang(playerid, params[]) return cmd_quitfamily(playerid, params);
- CMD:quitfaction(playerid, params[])
- {
- new str[128];
- new conf[10];
- if(sscanf(params, "s[10]", conf)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /quitfaction 'confirm'");
- if(strcmp(conf, "confirm", true) == 0)
- {
- switch(PlayerInfo[playerid][pMember])
- {
- case 1 .. 14:
- {
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 5)
- {
- ClearGuns(playerid);
- }
- if(PlayerInfo[playerid][pMember] == 4)
- {
- ClearGuns(playerid);
- }
- if(playerHoldingTazer[playerid] == 1)
- {
- TakePlayerWeapon(playerid, 23);
- }
- if(playerHoldingTazer[playerid] == 2)
- {
- RemovePlayerAttachedObject(playerid, INDEX_7);
- }
- playerHoldingTazer[playerid] = 0;
- format(str, sizeof(str), "* You have quit the %s, you are now a civilian again.", GetPlayerFactionName(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- customRankName[playerid] = false;
- format(customRank[playerid], 24, "None");
- PlayerInfo[playerid][pRank] = 0;
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pRecruiter] = 0;
- FakeFaction[playerid] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- PlayerInfo[playerid][pModel] = 20;
- PlayerInfo[playerid][pOnDuty] = 0;
- PlayerInfo[playerid][pRadio] = 0;
- PlayerInfo[playerid][pHandtazer] = 0;
- PlayerInfo[playerid][ptazerGun] = 0;
- loadedRubberBullets[playerid] = false;
- hasRubberBullets[playerid] = 0;
- FakeFaction[playerid] = 0;
- FakeRank[playerid] = 0;
- PlayerInfo[playerid][pPortMDC] = 0;
- if(PlayerInfo[playerid][pJailed] != 3 && PlayerInfo[playerid][pAdminJailed] == 0)
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- PlayerInfo[playerid][pClothes] = 0;
- }
- }
- }
- }
- return 1;
- }
- CMD:quitcctv(playerid, params[])
- {
- if(OnCCTV[playerid] != -1)
- {
- CancelSelectTextDraw(playerid);
- TextDrawHideForPlayer(playerid, CCTV_Arrows[0]); TextDrawHideForPlayer(playerid, CCTV_Arrows[1]);
- new string[128];
- SetPlayerPos(playerid, CameraX[playerid], CameraY[playerid], CameraZ[playerid]);
- SetPlayerVirtualWorld(playerid, CameraWorld[playerid]);
- SetPlayerInterior(playerid, CameraInt[playerid]);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, true);
- OnCCTV[playerid] = -1;
- CamPosLol(playerid);
- format(string, sizeof(string), "* %s has logged off their CCTV system. *", PlayerICName(playerid));
- SendActionMessage(playerid, 0xC2A2DAAA, string);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not using a CCTV camera at the minute.");
- return 1;
- }
- CMD:getcctvid(playerid, params[])
- {
- new string[128], f;
- for(new i = 0; i < MAX_CCTV_DYNAMIC; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, CCTV[i][CCTVX], CCTV[i][CCTVY], CCTV[i][CCTVZ]))
- {
- if(f == 0)
- {
- format(string, sizeof(string), "CCTV ID: %d", i);
- SendClientMessage(playerid, -1, string);
- f = 1;
- }
- }
- }
- if(f == 0) return SendClientMessage(playerid, COLOR_GREY, "There are no CCTV's in range.");
- return 1;
- }
- CMD:mycctvs(playerid, params[])
- {
- new cams =0, string[512];
- for(new i = 0; i < MAX_CCTV_DYNAMIC; i++)
- {
- if(strmatch(CCTV[i][CCTVOwner], PlayerName(playerid)))
- {
- format(string, sizeof(string), "%s\n%s (ID %d)", string, CCTV[i][CCTVName], i);
- cams++;
- }
- }
- if(cams == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have any CCTV's.");
- else
- {
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "My CCTV Cameras", string, "Close", "");
- }
- return 1;
- }
- CMD:editcctv(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- new name[24], value[128], cctvid, filename[50], string[128];
- if(sscanf(params, "is[24]S()[128]", cctvid, name, value)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editcctv [camera id] [position | lookat | interior | world | name]");
- {
- format(filename, sizeof(filename), "CCTV/CCTV%i.ini", cctvid);
- if(!dini_Exists(filename)) return SendClientMessage(playerid, COLOR_GREY, "That CCTV doesn't exist.");
- if(!strcmp(name, "position", true))
- {
- EditDynamicObject(playerid, CCTV[cctvid][CCTVObject]);
- EditingCamera[playerid] = true;
- CameraID[playerid] = cctvid;
- format(string, sizeof(string), "You have edited ID %d's CCTV position.", cctvid);
- SendClientMessage(playerid, -1, string);
- }
- if(!strcmp(name, "lookat", true))
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- CCTV[cctvid][CCTVLookAtX] = x;
- CCTV[cctvid][CCTVLookAtY] = y;
- CCTV[cctvid][CCTVLookAtZ] = z;
- UpdateCCTV(cctvid);
- format(string, sizeof(string), "You have edited ID %d's CCTV look-at position to here.", cctvid);
- SendClientMessage(playerid, -1, string);
- }
- if(!strcmp(name, "interior", true))
- {
- new int = GetPlayerInterior(playerid);
- CCTV[cctvid][CCTVINT] = int;
- UpdateCCTV(cctvid);
- format(string, sizeof(string), "You have edited ID %d's CCTV interior to %d.", cctvid, int);
- SendClientMessage(playerid, -1, string);
- }
- if(!strcmp(name, "world", true))
- {
- new vw = GetPlayerVirtualWorld(playerid);
- CCTV[cctvid][CCTVVW] = vw;
- UpdateCCTV(cctvid);
- format(string, sizeof(string), "You have edited ID %d's CCTV world to %d", cctvid, vw);
- SendClientMessage(playerid, -1, string);
- }
- if(!strcmp(name, "name", true))
- {
- new val[64];
- if(sscanf(value, "S()[64]", val)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editcctv [name] [new name]");
- if(!strlen(val)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /editcctv [camera id] [name] [new name]"); //not tested
- format(CCTV[cctvid][CCTVName], 50, "%s", val);
- UpdateCCTV(cctvid);
- format(string, sizeof(string), "You have edited ID %d's CCTV name to '%s'", cctvid, val);
- SendClientMessage(playerid, -1, string);
- }
- }
- return 1;
- }
- CMD:setsecuritykey(playerid, params[]){
- new string[256], option, securityid, key, query[128], name[50];
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- if(sscanf(params, "d", option)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /setsecuritykey [option] [0 = {FF0000}Offline{FFFFFF}, 1 = {00FF00}Online{FFFFFF}]");
- switch(option)
- {
- case 1:
- {
- if(sscanf(params, "ddd", option, securityid, key)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /setsecuritykey 1 [playerid] [new key]");
- if(!IsPlayerConnected(securityid)) return SendClientMessage(playerid, COLOR_RED, "[Error] - That player is not connected to the server.");
- //if(key < 0 || key > 4) return SendClientMessage(playerid, COLOR_RED, "[Error] - Key should be 4 digit long.");
- PlayerInfo[securityid][pSecKey] = key;
- format(string, sizeof(string), "Your security key was changed to %d by an admin.", PlayerInfo[securityid][pSecKey]);
- SendClientMessage(securityid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "You've updated %s's security key to %d.", PlayerOOCName(securityid), key);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- case 0:
- {
- if(sscanf(params, "dsd", option, name, key)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /setsecuritykey 0 [playername] [new key]");
- //if(key < 0 || key > 4) return SendClientMessage(playerid, COLOR_RED, "[Error] - Key should be 4 digit long.");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e'", name);
- mysql_query(sqlGameConnection, query);
- if(cache_num_rows() > 0){
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `SecurityKey` = %d WHERE `Name` = '%e'", key, name);
- mysql_query(sqlGameConnection, query);
- format(string, sizeof(string), "You've updated %s's security key to %d.", name, key);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- else{
- SendClientMessage(playerid, COLOR_RED, "[Error] - Account with that name doesn't exists.");
- }
- }
- }
- return 1;
- }
- /*CMD:setsecuritykey(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 99999)
- {
- new id, key;
- if(sscanf(params, "ui", id, key)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setsecuritykey [playerid/name] [new key]");
- {
- if(IsPlayerConnected(id))
- {
- PlayerInfo[id][pSecKey] = key;
- format(str, sizeof(str), "Your security key has been changed to %d by an admin.", PlayerInfo[id][pSecKey]);
- SendClientMessage(id, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You've updated %s's security key to %d.", PlayerOOCName(id), key);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, "You're not authorized to use this command.");
- return 1;
- }*/
- CMD:rollwindow(playerid, params[])
- return cmd_rw(playerid, params);
- CMD:rw(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You must be inside of a vehicle to use this.");
- if(!VehicleHasWindows(GetPlayerVehicleID(playerid)))
- return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have windows.");
- if(PlayerCuffed[playerid] > 0)
- return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst cuffed.");
- new window, PlayerSeat = GetPlayerVehicleSeat(playerid), window_state[4], vehicleid = GetPlayerVehicleID(playerid);
- if(sscanf(params, "i", window))
- {
- SendClientMessage(playerid, COLOR_GREY, "USAGE: /(r)oll(w)indow [Window ID]");
- SendClientMessage(playerid, COLOR_GREY, "[ 0 - Driver | 1 - Front Passanger | 2 - Back Driver | 3 - Back Passanger ]");
- return 1;
- }
- if(window != PlayerSeat && PlayerSeat != 0)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot adjust a window for a seat you're not at if you're not the driver.");
- GetVehicleParamsCarWindows(vehicleid, window_state[0], window_state[1], window_state[2], window_state[3]);
- window_state[window] = !window_state[window];
- SetVehicleParamsCarWindows(vehicleid, window_state[0], window_state[1], window_state[2], window_state[3]);
- new str[128];
- format(str, sizeof(str), "* %s adjust a vehicle window.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 5.0, 5 * 1000); // 5 seconds
- return 1;
- }
- CMD:windows(playerid, params[])
- {
- new str[128];
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be inside of a vehicle to use this.");
- if(!VehicleHasWindows(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have windows.");
- if(PlayerCuffed[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst cuffed.");
- if(windowsDown[GetPlayerVehicleID(playerid)] == false)
- {
- windowsDown[GetPlayerVehicleID(playerid)] = true;
- format(str, sizeof(str), "* %s winds down the vehicles windows.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), 0, 0, 0, 0);
- }
- else
- {
- windowsDown[GetPlayerVehicleID(playerid)] = false;
- format(str, sizeof(str), "* %s winds up the vehicles windows.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), 1, 1, 1, 1);
- }
- return 1;
- }
- //motd
- CMD:setmotd(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pDev] <= DEVRANK_MANAGER) return AdmErrorMsg;
- new motdtext[128];
- if(!sscanf(params, "s[128]", motdtext))
- {
- format(motdtext, sizeof(motdtext), "~b~MOTD:~w~ %s.", motdtext);
- TextDrawSetString(motd, motdtext);
- displayMOTDText(playerid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have set the message of the day.");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setmotd [text]");
- displayMOTDText(playerid);
- }
- return 1;
- }
- CMD:createeventfund(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- if(isNextEvent > 0) return SendClientMessage(playerid, COLOR_GRAD1, "There is already a pending event, use /endevent.");
- new amount;
- if(!sscanf(params, "d", amount))
- {
- isNextEvent = 1;
- eventTime = amount;
- SendClientMessageToAll(COLOR_BLUE, "Event: An event is being created. Type /fundevent to help fund it.");
- updateEventTimeTextdraw();
- showEventHudForAll();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /createeventfund [hours]");
- }
- return 1;
- }
- CMD:endeventfund(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- eventTime = 0;
- eventCash = 0;
- isNextEvent = 0;
- updateEventTimeTextdraw();
- updateEventFundsTextdraw();
- hideEventHudForAll();
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have ended the event fund.");
- return 1;
- }
- CMD:seteventfundtime(playerid, params[])
- {
- new str[128];
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- new amount;
- if(!sscanf(params, "d", amount))
- {
- eventTime = amount;
- format(str, sizeof(str), "* You have set the next event to start in %d hours.", eventTime);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- updateEventTimeTextdraw();
- }
- else
- {
- format(str, sizeof(str), "The next event will start in %d hours from now.", eventTime);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /seteventfundtime [hours]");
- }
- return 1;
- }
- CMD:seteventfunds(playerid, params[])
- {
- new str[128];
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- if(isNextEvent)
- {
- new amount;
- if(!sscanf(params, "d", amount))
- {
- eventCash = amount;
- format(str, sizeof(str), "* You have set the event funds to $%d.", eventCash);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- updateEventFundsTextdraw();
- }
- else
- {
- format(str, sizeof(str), "The current event funds are $%d.", eventCash);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /seteventfunds [amount]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- }
- return 1;
- }
- CMD:withdraweventfunds(playerid, params[])
- {
- new str[128];
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- new amount;
- if(!sscanf(params, "d", amount))
- {
- if(amount < 0 || amount > eventCash) return SendClientMessage(playerid, COLOR_GREY, "There is not that much money in the event funds.");
- eventCash -=amount;
- format(str, sizeof(str), "* You have withdrawn %d from the event funds, the new balance is $%d.", amount, eventCash);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- updateEventFundsTextdraw();
- }
- else
- {
- format(str, sizeof(str), "The current event funds are $%d.", eventCash);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /withdraweventfunds [amount]");
- }
- return 1;
- }
- CMD:togeventhud(playerid, params[])
- {
- // note: the hide/show functions already change the displayingEventHUD variable accordingly.
- if(displayingEventHUD[playerid]) // if shown, hide
- {
- hideEventHudForPlayer(playerid);
- SendClientMessage(playerid, COLOR_GREY, "You have disabled the event HUD.");
- }
- else if(!displayingEventHUD[playerid]) // if hidden, show
- {
- showEventHudForPlayer(playerid);
- SendClientMessage(playerid, COLOR_GREY, "You have enabled the event HUD.");
- }
- }
- CMD:giverank(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pLeader] > 0)
- {
- new giveplayerid, newrank;
- format(str, sizeof(str), "{00BFFF}Usage:{FFFFFF} /giverank [playerid/PartOfName] [0-%d]", GetFactionMaxRanks(PlayerInfo[playerid][pMember]));
- if(sscanf(params, "u d", giveplayerid, newrank)) return SendClientMessage(playerid, COLOR_GREY, str);
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't change your own rank.");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[giveplayerid][pMember] != PlayerInfo[playerid][pMember]) return SendClientMessage(playerid, COLOR_GREY, "That player isn't in your faction.");
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} Your factions ranks go from 0 to %d.", GetFactionMaxRanks(PlayerInfo[playerid][pMember]));
- if(newrank < 0 || newrank > GetFactionMaxRanks(PlayerInfo[playerid][pMember])) return SendClientMessage(playerid, COLOR_GREY, str);
- if(PlayerInfo[giveplayerid][pRank] > newrank || (FakeFaction[giveplayerid] == PlayerInfo[playerid][pLeader] && FakeRank[giveplayerid] > newrank))
- {
- format(str, sizeof(str), "* You have demoted %s to Rank %d.", PlayerICName(giveplayerid), newrank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You have been demoted to Rank %d by Leader %s.", newrank, PlayerICName(playerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "* You have promoted %s to Rank %d.", PlayerICName(giveplayerid), newrank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You have been promoted to Rank %d by Leader %s.", newrank, PlayerICName(playerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- }
- PlayerInfo[giveplayerid][pRank] = newrank;
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You are not a faction leader.");
- }
- return 1;
- }
- CMD:giveeventfunds(playerid, params[])
- {
- new str[128];
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pEventModd] == 0) return AdmErrorMsg;
- new giveplayerid;
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GiveMoney(giveplayerid, eventCash /2);
- format(str, sizeof(str), "Event: %s has won a total of $%d from the event.", PlayerICName(giveplayerid), eventCash /2);
- SendClientMessageToAll(COLOR_BLUE, str);
- eventCash = 0;
- updateEventFundsTextdraw();
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "That player isn't active.");
- }
- }
- else
- {
- format(str, sizeof(str), "The current event funds are $%d.", eventCash);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /giveeventfunds [playerid]");
- }
- return 1;
- }
- CMD:fundevent(playerid, params[])
- {
- new str[128];
- if(isNextEvent == 0) return SendClientMessage(playerid, COLOR_GREY, "There is no pending event set up yet.");
- if(PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must be atleast level 2 to fund events.");
- new amount;
- if(!sscanf(params, "d", amount))
- {
- if(amount < 0 || amount > PlayerInfo[playerid][pCash]) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
- eventCash += amount;
- GiveMoney(playerid, -amount);
- format(str, sizeof(str), "* You have donated $%d to the event fund, the winner of the next event will receive half the total event funds.", amount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- updateEventFundsTextdraw();
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- //announce highest donor
- if(amount >= 1000000)
- {
- if(amount > largestFund)
- {
- largestFund = amount;
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(largestFunder, sizeof(largestFunder), "%s", name);
- format(str, sizeof(str), "Event: %s has set the new record with the largest donation of $%d.", name, amount);
- SendClientMessageToAll(COLOR_BLUE, str);
- }
- }
- }
- else
- {
- format(str, sizeof(str), "The current event funds are $%d.", eventCash);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fundevent [amount]");
- }
- return 1;
- }
- CMD:eventhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pEventModd] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /event, /createeventfund, /endeventfund, /seteventfundtime, /seteventfunds, /withdraweventfunds, /giveeventfunds");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /sethpradius, /setarmorradius, /setskinradius, /setdrunkradius, /sethp, /setarmor, /setskin, /getskin, /givegun, /veh, /destroycars, /destroycar");
- }
- if(PlayerInfo[playerid][pEventModd] == 1 || PlayerEventMod[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "HELPER COMMANDS: /eventkick, /ec, /eventchat");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:reviveradius(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pEventModd] > 0)
- {
- new Float:dist;
- new Float: plX, Float: plY, Float: plZ;
- if(!sscanf(params, "f", dist))
- {
- foreach( new i: Player )
- {
- if(playerid != i)
- {
- GetPlayerPos(i, plX, plY, plZ);
- if(IsPlayerInRangeOfPoint(playerid, dist, plX, plY, plZ))
- {
- if(pDeathState[i] == PLAYER_STATE_REVIVE)
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* An admin has revived you.");
- SetPlayerHealth(i, 100);
- pInHospital[i] = 0;
- ResetPlayerDamages(i);
- pDeathState[i] = PLAYER_STATE_NORMAL;
- PlayerCalledEMS[i] = 0;
- /*if(IsDead[i] == true)
- {
- Delete3DTextLabel(dmginfo[i]);
- IsDead[i]= false;
- return 1;
- }*/
- ApplyAnimationEx(i, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- for(new d = 0; d <= 12; d++)
- {
- lastpguns[i][d][0] = 0;
- lastpguns[i][d][1] = 0;
- }
- OnPlayerSave(i);
- }
- }
- }
- }
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has revived everyone within %i metres.", PlayerICName(playerid), dist);
- ABroadCast(COLOR_WHITE, str, 1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /reviveradius [distance]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:sethpradius(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- new Float:dist, Float:amount;
- new Float: plX, Float: plY, Float: plZ;
- if(!sscanf(params, "ff", dist, amount))
- {
- if(amount <= 0.1)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was killed, reason: Attempting to set everyones health to 0.", PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- foreach( new i: Player )
- {
- if(playerid != i)
- {
- GetPlayerPos(i, plX, plY, plZ);
- if(IsPlayerInRangeOfPoint(playerid, dist, plX, plY, plZ))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* An admin has set your health.");
- SetPlayerHealth(i, amount);
- }
- }
- }
- format(str, sizeof(str), "* You have set everyones health within %f metres to %f.", dist, amount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sethpradius [distance] [health]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:setarmorradius(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- new dist, amount;
- new Float: plX, Float: plY, Float: plZ;
- if(!sscanf(params, "dd", dist, amount))
- {
- foreach( new i: Player )
- {
- if(playerid != i)
- {
- GetPlayerPos(i, plX, plY, plZ);
- if(IsPlayerInRangeOfPoint(playerid, dist, plX, plY, plZ))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* An admin has set your armor.");
- SetPlayerArmour(i, amount);
- }
- }
- }
- format(str, sizeof(str), "* You have set everyones armor within %d metres to %d.", dist, amount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setarmorradius [distance] [armor]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:setskinradius(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] == 1)
- {
- new dist, skinid;
- new Float: plX, Float: plY, Float: plZ;
- if(!sscanf(params, "dd", dist, skinid))
- {
- if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
- foreach( new i: Player )
- {
- if(playerid != i)
- {
- GetPlayerPos(i, plX, plY, plZ);
- if(IsPlayerInRangeOfPoint(playerid, dist, plX, plY, plZ))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* An admin has set your skin.");
- SetPlayerSkin(i, skinid);
- PlayerInfo[i][pClothes] = 0;
- }
- }
- }
- format(str, sizeof(str), "* You have set everyones skin within %d metres to %d.", dist, skinid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setskinradius [distance] [skinid (0-311)]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:setdrunkradius(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- new dist, drunklevel;
- new Float: plX, Float: plY, Float: plZ;
- if(!sscanf(params, "dd", dist, drunklevel))
- {
- if(drunklevel < 0 || drunklevel > 50000) return SendClientMessage(playerid, COLOR_GREY, "Drunk level can't be below 0 or above 50000.");
- foreach( new i: Player )
- {
- if(playerid != i)
- {
- GetPlayerPos(i, plX, plY, plZ);
- if(IsPlayerInRangeOfPoint(playerid, dist, plX, plY, plZ))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* An admin has set your drunk level.");
- SetPlayerDrunkLevel(i, drunklevel);
- }
- }
- }
- format(str, sizeof(str), "* You have set everyones drunk level within %d metres to %d.", dist, drunklevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setarmorradius [distance] [drunklevel (0-50000)]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:mutephone(playerid, params[])
- {
- if(cellMuted[playerid])
- {
- cellMuted[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "You have unmuted your cell-phone.");
- }
- else
- {
- cellMuted[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "You have muted your cell-phone.");
- }
- return 1;
- }
- CMD:togfamchat(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pRank] >= 5 && PlayerInfo[playerid][pFMember] != 255)
- {
- if(famTog[PlayerInfo[playerid][pFMember]] == false)
- {
- famTog[PlayerInfo[playerid][pFMember]] = true;
- format(str, sizeof(str), "* %s has toggled the family chat OFF for your family.", PlayerICName(playerid));
- SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, str);
- }
- else
- {
- famTog[PlayerInfo[playerid][pFMember]] = false;
- format(str, sizeof(str), "* %s has toggled the family chat ON for your family.", PlayerICName(playerid));
- SendNewFamilyMessage(PlayerInfo[playerid][pFMember], TEAM_AZTECAS_COLOR, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank to use this.");
- return 1;
- }
- CMD:togvhealthhud(playerid, params[])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be the driver of a vehicle to use this.");
- if(ToggedVHealth[playerid])
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have enabled the damage hud.");
- PlayerTextDrawShow(playerid, VHealthTextDraw[playerid]);
- ToggedVHealth[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have disabled the damage hud.");
- PlayerTextDrawHide(playerid, VHealthTextDraw[playerid]);
- ToggedVHealth[playerid] = true;
- }
- return 1;
- }
- CMD:togfuelhud(playerid, params[])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be the driver of a vehicle to use this.");
- if(ToggedFuel[playerid])
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have enabled the fuel hud.");
- PlayerTextDrawShow(playerid, FuelTextdraw[playerid]);
- ToggedFuel[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have disabled the fuel hud.");
- PlayerTextDrawHide(playerid, FuelTextdraw[playerid]);
- ToggedFuel[playerid] = true;
- }
- return 1;
- }
- CMD:togspeedhud(playerid, params[])
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be the driver of a vehicle to use this.");
- if(ToggedSpeedo[playerid])
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have enabled the speedo hud.");
- PlayerTextDrawShow(playerid, SpeedoTextdraw[playerid]);
- ToggedSpeedo[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have disabled the speedo hud.");
- PlayerTextDrawHide(playerid, SpeedoTextdraw[playerid]);
- ToggedSpeedo[playerid] = true;
- }
- return 1;
- }
- //MySQL commands
- //process shop orders. the /ashophelp commands could probably be lowered to 1337 so they get processed more efficiently
- CMD:processorder(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
- {
- new orderid;
- if(!sscanf(params, "d", orderid))
- {
- new query[310];
- format(query, sizeof(query), "UPDATE `order` SET `order`.order_status_id = 15, `order`.date_modified = NOW() WHERE `order`.order_id = '%d'", orderid);
- mysql_counted_query(sqlShopConnection, query, true, "onProcessOrder", "dd", playerid, CINC[playerid]);
- //escape string
- new admin_name[MAX_PLAYER_NAME];
- mysql_real_escape_string(PlayerName(playerid), admin_name);
- format(query, sizeof(query), "INSERT INTO `order_history` (order_id, order_status_id, comment, date_added) VALUES (%d, 15, 'Processed ingame by %s', NOW())", orderid, admin_name);
- mysql_counted_query(sqlShopConnection, query, true, "onEmptyQuery", "dd", playerid, CINC[playerid]);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /processorder [orderid]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:checkorderinfo(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
- {
- new orderid;
- if(!sscanf(params, "d", orderid))
- {
- new query[310];
- //format(query, sizeof(query), "SELECT `order`.firstname, `order`.lastname, `order`.order_id, `order`.email, `order`.comment, `order`.date_added, `order`.date_modified, `order`.order_status_id, `order_status`.name FROM `order`, `order_status` WHERE `order`.order_id = '%d' AND `order`.order_status_id = `order_status`.order_status_id", orderid);
- format(query, sizeof(query), "SELECT `order`.firstname, `order`.lastname, `order`.order_id, `order`.email, `order`.comment, `order`.date_added, `order`.date_modified, `order`.order_status_id FROM `order` WHERE `order`.order_id = '%d'", orderid);
- mysql_counted_query(sqlShopConnection, query, true, "onCheckOrderInfo", "dd", playerid, CINC[playerid]);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checkorderinfo [orderid]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:checkpurchaseinfo(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
- {
- new orderid;
- if(!sscanf(params, "d", orderid))
- {
- new query[310];
- format(query, sizeof(query), "SELECT `order_product`.order_id, `order_product`.name, `order_product`.quantity FROM `order_product` WHERE `order_product`.order_id = '%d' ORDER BY `order_product`.order_product_id DESC LIMIT 10", orderid);
- mysql_counted_query(sqlShopConnection, query, true, "onCheckPurchaseInfo", "dd", playerid, CINC[playerid]);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checkpurchaseinfo [orderid]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- //boombox
- CMD:edit(playerid, params[])
- {
- if(disabledRadios[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Radio streaming is currently turned off, use /togradios.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You cannot edit a boombox while in a vehicle.");
- if(isBoomboxWithinRange(playerid, 3))
- {
- editingBoomboxID[playerid] = getOwnerOfClosestBoombox(playerid);
- if(BoomboxInfo[editingBoomboxID[playerid]][locked] && editingBoomboxID[playerid] != playerid)
- {
- SendClientMessage(playerid, COLOR_GREY, "You must be the owner to use a locked boombox.");
- editingBoomboxID[playerid] = -1;
- EDITING_TYPE[playerid] = EDIT_RADIO_NONE;
- return 1;
- }
- EDITING_TYPE[playerid] = EDIT_RADIO_BOOMBOX;
- displayBoomboxEditDialog(playerid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GREY, "You are not near a Boombox.");
- }
- return 1;
- }
- CMD:placeboombox(playerid, params[])
- {
- if(PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GRAD1, "You are unable to do that at this time.");
- if(disabledRadios[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Radio streaming is currently turned off, use /togradios.");
- if(PlayerInfo[playerid][pStereo] == 0) return SendClientMessage(playerid, COLOR_GREY, "You do not have a boombox.");
- if(!BoomboxInfo[playerid][placedBoombox])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use this while in a car.");
- return 1;
- }
- if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID)
- {
- SendClientMessage(playerid, COLOR_GREY, "You cannot use this while on a car.");
- return 1;
- }
- if(isBoomboxWithinRange(playerid, 60)) return SendClientMessage(playerid, COLOR_GREY, "You cannot place a boombox within 60 metres of another.");
- placeBoomboxOnGround(playerid, PlayerInfo[playerid][pStereo]);
- Streamer_Update(playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You have aleady placed a boombox, to pick it up, go to it and type /edit.");
- }
- return 1;
- }
- CMD:radios(playerid, params[])
- {
- new rstr[128];
- for(new i = 0; i < sizeof(radioInfo); i++)
- {
- format(rstr, sizeof(rstr), "Radio: %d, Taken %d, Genre: %s, Channel: %s, Owner: %s, URL: %s Online: %d", i +1, radioInfo[i][taken], radioInfo[i][genreName], radioInfo[i][channelName], radioInfo[i][ownerName], radioInfo[i][url], radioInfo[i][online]);
- SendClientMessage(playerid, COLOR_WHITE, rstr);
- }
- }
- CMD:carradio(playerid, params[])
- {
- if(disabledRadios[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "Radio streaming is currently turned off, use /togradios.");
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
- new seat = GetPlayerVehicleSeat(playerid);
- if(seat != 0 && seat != 1)
- return SendClientMessage(playerid, COLOR_GREY, "You are not the driver or front passenger.");
- new vehid = GetPlayerVehicleID(playerid);
- if(IsABicycle(vehid))
- return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a radio.");
- if(VehicleInfo[vehid][radioStation])
- ShowPlayerDialog(playerid, DIALOG_CAR_MENU_MAIN, DIALOG_STYLE_LIST, "Radio station", "Turn Off\nChange Station", "Select", "Cancel");
- else
- ShowPlayerDialog(playerid, DIALOG_CAR_MENU_MAIN, DIALOG_STYLE_LIST, "Radio station", "Turn On\nChange Station", "Select", "Cancel");
- return 1;
- }
- CMD:listnewbies(playerid, params[])
- {
- new str[128];
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- if(PlayerInfo[playerid][pHelper] > 1 || PlayerInfo[playerid][pAdmin] > 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Newbies:");
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pLevel] < 2 && PlayerInfo[i][pLevel] > 0)
- {
- format(str, sizeof(str), "Name: %s (%d), Level: %d, Playing hours: %d", PlayerICName(i), i, PlayerInfo[i][pLevel], PlayerInfo[i][pConnectTime]);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:families(playerid, params[])
- {
- new famstr[2048];
- for(new i = 0; i < sizeof(FamilyInfo); i++)
- {
- format(famstr, sizeof(famstr), "%s\n%d\t%s", famstr, i +1, FamilyInfo[i][FamilyName]);
- }
- ShowPlayerDialog(playerid, FAMILY_DIALOG, DIALOG_STYLE_LIST, "Families", famstr, "Ok", "Cancel");
- return 1;
- }
- CMD:aannounce(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 99999)
- {
- new msg[128], option;
- if(sscanf(params, "is[128]", option, msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /aannounce [id (1-5)] [new message]");
- {
- switch(option)
- {
- case 1:
- {
- dini_Set("automsg.ini", "motd1", msg);
- format(autoMessages[1], 128, "%s", msg);
- format(str, sizeof(str), "You have set the new message for slot %d to:", option);
- SendClientMessage(playerid, -1, str);
- format(str, sizeof(str), "%s", msg);
- SendClientMessage(playerid, -1, str);
- }
- case 2:
- {
- dini_Set("automsg.ini", "motd2", msg);
- format(autoMessages[2], 128, "%s", msg);
- format(str, sizeof(str), "You have set the new message for slot %d to:", option);
- SendClientMessage(playerid, -1, str);
- format(str, sizeof(str), "%s", msg);
- SendClientMessage(playerid, -1, str);
- }
- case 3:
- {
- dini_Set("automsg.ini", "motd3", msg);
- format(autoMessages[3], 128, "%s", msg);
- format(str, sizeof(str), "You have set the new message for slot %d to:", option);
- SendClientMessage(playerid, -1, str);
- format(str, sizeof(str), "%s", msg);
- SendClientMessage(playerid, -1, str);
- }
- case 4:
- {
- dini_Set("automsg.ini", "motd4", msg);
- format(autoMessages[4], 128, "%s", msg);
- format(str, sizeof(str), "You have set the new message for slot %d to:", option);
- SendClientMessage(playerid, -1, str);
- format(str, sizeof(str), "%s", msg);
- SendClientMessage(playerid, -1, str);
- }
- case 5:
- {
- dini_Set("automsg.ini", "motd5", msg);
- format(autoMessages[5], 128, "%s", msg);
- format(str, sizeof(str), "You have set the new message for slot %d to:", option);
- SendClientMessage(playerid, -1, str);
- format(str, sizeof(str), "%s", msg);
- SendClientMessage(playerid, -1, str);
- }
- default:
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /aannounce [id (1-5)] [new message]");
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not authorized to use this command.");
- return 1;
- }
- CMD:streamtoall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new song[128], songname[128], songartist[128], string[128];
- if(sscanf(params, "s[128]s[128]s[128]", song, songname, songartist)) return SendClientMessage(playerid, COLOR_GRAD1, "{00BFFF}Usage:{FFFFFF} /streamtoall linkmp3 [Song Name (Underscore for space)] [Song Artist (Underscore for space)]");
- {
- for(new i = 0; i < strlen(songname); i++)
- {
- if(songname[i] == '_')
- {
- songname[i] = ' ';
- }
- }
- for(new i = 0; i < strlen(songartist); i++)
- {
- if(songartist[i] == '_')
- {
- songartist[i] = ' ';
- }
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPVarInt(i, "AudioDisabled") != 1)
- {
- format(string, sizeof(string), "Song playing: %s by %s.", songname, songartist);
- SendClientMessage(i, COLOR_ORANGE, string);
- SendClientMessage(i, COLOR_ORANGE, "Type /stopplay to stop the music, /toggleplay to toggle all streams.");
- if(disabledRadios[i] == 0){
- PlayAudioStreamForPlayer(i, song);
- }
- }
- }
- }
- }
- }
- return 1;
- }
- CMD:stopplay(playerid, params[])
- {
- StopAudioStreamForPlayer(playerid);
- FixPlayerRadio(playerid);
- SendClientMessage(playerid, COLOR_ORANGE, "Audio stopped! /toggleplay to toggle it so you don't need to /stopplay again!");
- return 1;
- }
- CMD:toggleplay(playerid, params[])
- {
- if(GetPVarInt(playerid, "AudioDisabled") == 0)
- {
- StopAudioStreamForPlayer(playerid);
- FixPlayerRadio(playerid);
- SetPVarInt(playerid, "AudioDisabled", 1);
- SendClientMessage(playerid, COLOR_ORANGE, "Audio disabled!");
- }
- else
- {
- SetPVarInt(playerid, "AudioDisabled", 0);
- SendClientMessage(playerid, COLOR_ORANGE, "Audio enabled!");
- }
- return 1;
- }
- CMD:checkstrikes(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 1337 && !PlayerInfo[playerid][pGangDirector])
- return AdmErrorMsg;
- new targetFamily;
- if(sscanf(params, "i", targetFamily))
- return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /checkstrikes [family]");
- if(targetFamily < 1 || targetFamily > 20)
- return SendClientMessage(playerid, COLOR_GREY, "Families range from 1 to 20. (/families)");
- targetFamily -= 1;
- new str[128];
- if(FamilyInfo[targetFamily][FamilyTaken] != 1)
- return SendClientMessage(playerid, COLOR_GREY, "You have entered an unknown family ID. (/families)");
- format(str, sizeof(str), "* '%s' currently has [%i/%i] family strikes.", FamilyInfo[targetFamily][FamilyName], FamilyInfo[targetFamily][FStrikes], MAX_FAMILY_STRIKE);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* They are %i strike(s) away from being disbanded.", MAX_FAMILY_STRIKE - FamilyInfo[targetFamily][FStrikes]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:givestrike(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 1337 && !PlayerInfo[playerid][pGangDirector])
- return AdmErrorMsg;
- new targetFamily, strikeRsn[100];
- if(sscanf(params, "is[100]", targetFamily, strikeRsn))
- return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /givestrike [family] [reason]");
- if(targetFamily < 1 || targetFamily > 20)
- return SendClientMessage(playerid, COLOR_GREY, "Families range from 1 to 20. (/families)");
- targetFamily -= 1;
- if(FamilyInfo[targetFamily][FamilyTaken] != 1)
- return SendClientMessage(playerid, COLOR_GREY, "You have entered an unknown family ID. (/families)");
- if(!strlen(strikeRsn))
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid reason for this strike.");
- new str[128];
- format(str, sizeof(str), "* You have striked \"%s\" [%i].", FamilyInfo[targetFamily][FamilyName], targetFamily + 1);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- FamilyInfo[targetFamily][FStrikes]++;
- format(str, sizeof(str), "SERVER: Family '%s' has received a strike, reason: %s", FamilyInfo[targetFamily][FamilyName], strikeRsn);
- SendClientMessageToAll(COLOR_WHITE, str);
- if(FamilyInfo[targetFamily][FStrikes] >= MAX_FAMILY_STRIKE) {
- StrikeDisband(targetFamily);
- }
- SaveFamilies();
- return 1;
- }
- CMD:setstrikes(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 1337 && !PlayerInfo[playerid][pGangDirector])
- return AdmErrorMsg;
- new targetFamily, strikeAmount;
- if(sscanf(params, "ii", targetFamily, strikeAmount))
- return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /setrikes [family] [amount]");
- if(targetFamily < 1 || targetFamily > 20)
- return SendClientMessage(playerid, COLOR_GREY, "Families range from 1 to 20. (/families)");
- targetFamily -= 1;
- if(FamilyInfo[targetFamily][FamilyTaken] != 1)
- return SendClientMessage(playerid, COLOR_GREY, "You have entered an unknown family ID. (/families)");
- if(strikeAmount < 0 || strikeAmount > MAX_FAMILY_STRIKE)
- return SendClientMessage(playerid, COLOR_GREY, "You entered an invalid amount of strkes.");
- new str[128];
- format(str, sizeof(str), "* Family \"%s\" [%i] strikes set to %i.", FamilyInfo[targetFamily][FamilyName], targetFamily + 1, strikeAmount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- FamilyInfo[targetFamily][FStrikes] = strikeAmount;
- if(FamilyInfo[targetFamily][FStrikes] >= MAX_FAMILY_STRIKE) {
- StrikeDisband(targetFamily);
- }
- SaveFamilies();
- return 1;
- }
- CMD:changeclothes(playerid, params[]) {
- if( !IsPlayerInRangeOfPoint(playerid, 5.0, 771.1835, 976.9742, 9022.7188) ||
- GetPlayerVirtualWorld(playerid) != DOC_WORLD ||
- GetPlayerInterior(playerid) != DOC_INT)
- return 1;
- if( PlayerInfo[playerid][pModel] == 97 ||
- PlayerInfo[playerid][pModel] == 140)
- return SendClientMessage(playerid, COLOR_GREY, "You are already ready to shower.");
- if(GetPlayerSkin(playerid) == 97 || GetPlayerSkin(playerid) == 140) {
- SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- cmd_ame(playerid, "puts on their clothes.");
- }
- else {
- if(PlayerInfo[playerid][pSex] == 1) {
- SetPlayerSkin(playerid, 97);
- }
- else {
- SetPlayerSkin(playerid, 140);
- }
- cmd_ame(playerid, "takes off their clothes.");
- }
- OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- CMD:gotodoc(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- new docLocation[50];
- if(sscanf(params, "s[50]", docLocation)) {
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /gotodoc [location]");
- SendClientMessage(playerid, COLOR_WHITE, "Locations: lobby, staff, cells, visitor1, visitor2, showers, hallway");
- return 1;
- }
- if(!strcmp(docLocation, "lobby", true)) SetPlayerPos(playerid, 690.6022, 1509.7754, 9001.9629);
- else if(!strcmp(docLocation, "staff", true)) SetPlayerPos(playerid, 402.9328, 2255.1248, 9002.6348);
- else if(!strcmp(docLocation, "cells", true)) SetPlayerPos(playerid, -1791.5765, 2242.0889, 8011.7285);
- else if(!strcmp(docLocation, "visitor1", true)) SetPlayerPos(playerid, 694.8245, 1524.1105, 9000.9902);
- else if(!strcmp(docLocation, "visitor2", true)) SetPlayerPos(playerid, 693.8306, 1536.5576, 9000.9902);
- else if(!strcmp(docLocation, "showers", true)) SetPlayerPos(playerid, 775.9997, 977.6572, 9022.7188);
- else if(!strcmp(docLocation, "hallway", true)) SetPlayerPos(playerid, -1764.0994, 2244.7695, 8011.7285);
- else return SendClientMessage(playerid, COLOR_GREY, "The location you entered is invalid.");
- SetPlayerVirtualWorld(playerid, DOC_WORLD);
- SetPlayerInterior(playerid, DOC_INT);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- return 1;
- }
- CMD:ahelp(playerid, params[])
- {
- new string[6012];
- new alevel = PlayerInfo[playerid][pAdmin];
- if(alevel > 0)
- {
- if(alevel >= 1)
- {
- strcat(string, "{FF00FF}Probationary Admin:{FFFFFF} /skick /sban /getbanreason /spec /goto /setworld (/a)dmin /listnewbies /inmates\n");
- strcat(string, "{FF00FF}Probationary Admin:{FFFFFF} /acceptunmute /d(amage)i(nfo) /detect /clearads /toga /sendtols /lastdriver\n");
- strcat(string, "{FF00FF}Probationary Admin:{FFFFFF} /c(heck)p(rison)(time) /getip /ch /revive /respawncars (only in /spec) /getserial\n");
- strcat(string, "{FF00FF}Probationary Admin:{FFFFFF} /watch /listguns /clearchat /approvename /denyname /namerequests /asw /atogpms\n");
- }
- if(alevel >= 2)
- {
- strcat(string, "\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /setpborders /insertpointrule /deletepointrule /updatepointrule /clearpointrules\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /oprison /ofine /gethere /check /listfrozen /aremovejammer /jammerowner\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /goincar /setskin /getskin /pfine /opfine /fine /prison /o(oc) /aeject /checkinv\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /gotocar /getcarhere /skiphosp /fly /aenter /near /gotodoc /sethp /setarmor\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /checkcars /uncuff /removetag /tags /deaths /checkdeath\n");
- strcat(string, "{00FF00}Junior Admin:{FFFFFF} /removefakebadge /warns /owarn\n");
- }
- if(alevel >= 3)
- {
- strcat(string, "\n");
- strcat(string, "{04B404}General Admin:{FFFFFF} /noooc /nonewbie /jail /startlotto /(goto)mark /fine /gotoint /gotocoords /removetag\n");
- strcat(string, "{04B404}General Admin:{FFFFFF} /oldcar /mole /disarm /stealth /skydive /lockannouncement /setannouncement /tags\n");
- strcat(string, "{04B404}General Admin:{FFFFFF} /doorinfo /anticheat /disableaccount /allowrobbank\n");
- }
- if(alevel >= 4)
- {
- strcat(string, "\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /setchamp /sethpall /setarmorall /setfightstyle /setname /amovegate /aouninvite\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /setcolor /setplayercolor /givegun(all) /givemoney /(give/take)lic /editdoor /givenos(all)\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /(make/delete)tiki /deletetikis /givetiki(all) /veh /fixveh(all) /destroycar(s) /killcar /listcars /setweather\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /eventhelp /setmotd /banaccount /allowrobbank /acheckweed /removeweed /removegear\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /addsurname /removesurname /surnamelist, /removecar, /givecar, /listmasked\n");
- strcat(string, "{F4A460}Senior Admin:{FFFFFF} /listip /listserial\n");
- }
- if(alevel >= 1337)
- {
- strcat(string, "\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /weatherall /makeleader /makegroupleader /makeircadmin /pban /unban /(un)banip /makemapper\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /rangeban /savechars /makehelper /load /editgate /gotogate /editgarage /editcctv /setfsafe /blowup\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /fcreate /fdelete /fedit /pointtime /osetname /makedev /vipresetgifts, /reloadvipcars\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /dcreate /dedit /carinfo /rcreate /rdelete /setstrikes /(o)makepropertymod /tod /setmyfamily\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /setaccent /addcctv /removecctv /getcctvid /addbar /movebar /getbarid /resetcrimes\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /createdynamicvehicle /destroydynamicvehicle /editdynamicvehicle /gotodynamicvehicle\n");
- strcat(string, "{FF0000}Head Admin:{FFFFFF} /setstat /setmoney /warn /togdoubleexp /refund /setstealth /checkstatus\n");
- strcat(string, ""COL_RED"Head Admin: "COL_WHITE"/setgtag /noglobal /gmute /gunmute /setnewbietag\n");
- }
- if(alevel >= 99999)
- {
- strcat(string, "\n");
- strcat(string, "{800000}Executive Admin:{FFFFFF} /agivedrugs /makeadmin /makebanappealer /makegangmod /makeeventmod\n");
- strcat(string, "{800000}Executive Admin:{FFFFFF} /makeshopmod /makecomplaintmod /ashophelp /makefactionmod /makegangdirector /ochangepass /amotd /setsecuritykey\n");
- strcat(string, "{800000}Executive Admin:{FFFFFF} /makefactiondirector\n");
- }
- if(PlayerInfo[playerid][pBanAppealer])
- {
- strcat(string, "\n");
- strcat(string, "{FF0000}Ban Appealer:{FFFFFF} /unban /unbanip /getip /getbanreason /banaccount\n");
- }
- /*if(PlayerInfo[playerid][pGangModd])
- {
- //SendClientMessage(playerid, COLOR_WHITE, "{387C44}Gang Moderator:{FFFFFF} /fedit /setmyfamily /savefamcar /deletefamcar");
- }*/
- if(PlayerInfo[playerid][pEventModd])
- {
- strcat(string, "\n");
- strcat(string, "{00CC99}Event Moderator:{FFFFFF} /eventhelp\n");
- }
- if(PlayerInfo[playerid][pComplaintModd])
- {
- strcat(string, "\n");
- strcat(string, "{FFA500}Complaint Moderator:{FFFFFF} /prison /oprison /ofine /fine /pfine\n");
- }
- if(PlayerInfo[playerid][pShopMod])
- {
- strcat(string, "\n");
- strcat(string, "{FFCC33}Shop Moderator:{FFFFFF} /ashophelp\n");
- }
- if(PlayerInfo[playerid][pFactionMod])
- {
- strcat(string, "\n");
- strcat(string, "{2641FE}Faction Moderator:{FFFFFF} /makeleader /(f)action(l)eaders /agiverank /editdynamicvehicle /gotodynamicvehicle\n");
- }
- if(PlayerInfo[playerid][pGangDirector])
- {
- strcat(string, "\n");
- strcat(string, "{387C44}Gang Director:{FFFFFF} /createdynamicvehicle /destroydynamicvehicle /editdynamicvehicle /gotodynamicvehicle\n");
- strcat(string, "{387C44}Gang Director:{FFFFFF} /fcreate /fdelete /fedit /afstats /setmyfamily /savefamcar /deletefamcar\n");
- strcat(string, "{387C44}Gang Director:{FFFFFF} /setstrikes /givestrike /checkstrikes /pointtime /togpoints\n");
- }
- if(PlayerInfo[playerid][pBizMod])
- {
- strcat(string, "\n");
- strcat(string, "{3399FF}Property Moderator:{FFFFFF} /apropertyhelp\n");
- }
- if(PlayerInfo[playerid][pFactionDirector])
- {
- strcat(string, "\n");
- strcat(string, "{2641FE}Faction Director:{FFFFFF} /makefactionmod\n");
- }
- ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Admin Commands", string, "Okay", "");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:ah(playerid, params[]) return cmd_ahelp(playerid, params);
- CMD:tod(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] > 4)
- {
- new str[128];
- new hour;
- if(sscanf(params, "i", hour))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /tod [hour (0-23)]");
- if(hour < 0 || hour > 23)
- return SendClientMessage(playerid, COLOR_GREY, "Hour can't be below 0 or above 23.");
- SetWorldTime(hour);
- format(str, sizeof(str), "Time set to %d Hours.", hour);
- SendClientMessageToAll(COLOR_GRAD1, str);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:blowup(playerid, params[])
- {
- new playa;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playa, slx, sly, slz);
- CreateExplosion(slx, sly, slz, 6, 10.0);
- format(str, sizeof(str), "You have blown up %s!", PlayerOOCName(playa));
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /blowup [playerid/PartOfName]");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:ahousehelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /edithouse, /viewhouseint, /createhouse, /deletehouse, /resethouse, /removehouseowner, /gotohouse, /ahouse, /asethousetag, /houseinfo");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /furnitureinfo, /deletefurniture, /resethousefurniture");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:agatehelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pMapper] == 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /editgate, /amovegate, /gateinfo");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:apropertyhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBizMod] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /gotobiz /asellbiz /getbizid /setbiztill /bizinfo /setbizenter /setbizexit /setbizname");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /setbiztype /setbizprod /aseizebiz /setbizprice /biztypes /checkbizstock");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /createhouse /resethouse, /edithouse /deletehouse /asethousetag /viewhouseint /houseinfo, /gotohousesqlid");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /ogethouseowner /furnitureinfo /deletefurniture /resethousefurniture /listdoors");
- SendClientMessage(playerid, COLOR_WHITE, "NEW COMMANDS: /checkactivity");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:ashophelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] != 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /vips /makevip /omakevip");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /checkorderinfo /checkpurchaseinfo /processorder");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:id(playerid, params[])
- {
- new name[128];
- new str[128];
- if(!sscanf(params, "i", name))
- {
- new giveplayerid = ReturnUser(params);
- if(IsPlayerConnected(giveplayerid))
- {
- new name2[24], status[10];
- strmid(name2, str_replace('_', ' ', PlayerName(giveplayerid)), 0, MAX_PLAYER_NAME);
- if(PlayerPaused[giveplayerid] == 1)
- status = "tabbed";
- else
- status = "untabbed";
- format(str, sizeof(str), "Name: %s, ID: %d, Level: %d, Ping: %d, Status: %s", name2, giveplayerid, PlayerInfo[giveplayerid][pLevel], GetPlayerPing(giveplayerid), status);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- if(strlen(name) >= 3) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You need to search for three (3) characters minimum");
- if(!sscanf(params, "s[128]", name))
- {
- format(str, sizeof(str), "Listing the following names for '%s'.", name);
- SendClientMessage(playerid, COLOR_WHITE, str);
- foreach( new i: Player )
- {
- if(strfind(PlayerName(i), name, true) != -1)
- {
- new name2[24], status[10];
- strmid(name2, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerPaused[i] == 1)
- status = "tabbed";
- else
- status = "untabbed";
- format(str, sizeof(str), "Name: %s, ID: %d, Level: %d, Ping: %d, Status: %s", name2, i, PlayerInfo[i][pLevel], GetPlayerPing(i), status);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /id [playerid/PartOfName]");
- }
- return 1;
- }
- CMD:helpnewbie(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] == 0)return SendClientMessage(playerid, COLOR_GRAD2, "You are not a helper.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /helpnewbie [playerid/PartOfName]");
- {
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_GRAD2, "That player is not logged in/invalid player id");
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_WHITE, "You can't use that on yourself!");
- if(AdminHelp[targetid] == 1)
- {
- new Float:tx, Float:ty, Float:tz, Float:X, Float:Y, Float:Z, hrank[30];
- GetPlayerPos(playerid, X, Y, Z);
- PlayerInfo[playerid][helpmeX] = X;
- PlayerInfo[playerid][helpmeY] = Y;
- PlayerInfo[playerid][helpmeZ] = Z;
- PlayerInfo[playerid][helpmeInt] = GetPlayerInterior(playerid);
- PlayerInfo[playerid][helpmeVW] = GetPlayerVirtualWorld(playerid);
- HelpingNewbie[playerid] = true;
- if(usingNameTag[playerid])
- {
- DestroyDynamic3DTextLabel(nametagText[playerid]);
- nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
- }
- 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);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Helper nametag enabled.");
- usingNameTag[playerid] = 1;
- GetPlayerPos(targetid, tx, ty, tz);
- SetPlayerPos(playerid, tx, ty, tz +2);
- SetPlayerInterior(playerid, GetPlayerInterior(targetid));
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
- switch(PlayerInfo[playerid][pHelper]){
- case 1:hrank = "Trial Helper";
- case 2:hrank = "Helper";
- case 3:hrank = "Senior Helper";
- case 4:hrank = "Head Helper";
- case 5:hrank = "Director of The Helpers Team";
- }
- format(str, 256, "** %s: %s[%d] has accepted %s's request for help.", hrank, PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendHelperMessage(NEWBIE_COLOR, str, 0);
- format(str, 256, "** %s: %s[%d] has accepted your request for help", hrank, PlayerICName(playerid), playerid);
- SendClientMessage(targetid, NEWBIE_COLOR, str);
- AdminHelp[targetid] = 0;
- Timer_FreezePlayer(targetid, FREEZE, HELPNEWBIE_FREEZE);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "That player did not request any help.");
- }
- return 1;
- }
- CMD:hn(playerid, params[])return cmd_helpnewbie(playerid, params);
- CMD:hreturn(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "You are not a helper.");
- if(HelpingNewbie[playerid] == false) return SendClientMessage(playerid, COLOR_GREY, "You're not helping a newbie.");
- SetPlayerPos(playerid, PlayerInfo[playerid][helpmeX], PlayerInfo[playerid][helpmeY], PlayerInfo[playerid][helpmeZ]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][helpmeInt]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][helpmeVW]);
- PlayerInfo[playerid][helpmeX] = 0.00;
- PlayerInfo[playerid][helpmeY] = 0.00;
- PlayerInfo[playerid][helpmeZ] = 0.00;
- PlayerInfo[playerid][helpmeInt] = 0;
- PlayerInfo[playerid][helpmeVW] = 0;
- HelpingNewbie[playerid] = false;
- HelperVeh2[playerid] = false;
- if(usingNameTag[playerid])
- {
- DestroyDynamic3DTextLabel(nametagText[playerid]);
- nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nametag has been disabled.");
- usingNameTag[playerid] = 0;
- }
- if(IsValidVehicle(helperVeh[playerid])){
- DestroyVehicle(helperVeh[playerid]);
- }
- return 1;
- }
- CMD:helpme(playerid, params[])
- {
- if(PlayerInfo[playerid][pNewbieMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are banned from /helpme.");
- if(gettime() - HelpMeTimer[playerid] <= 10)return SendClientMessage(playerid, COLOR_GRAD2, "Please wait 10 seconds before requesting for help again.");
- if(PlayerInfo[playerid][pNewbieMuted] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "You are banned from using this command.");
- if(IsPlayerRestricted(playerid) || PlayerFrozen[playerid] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must get out of your vehicle to use this.");
- if(PlayerInfo[playerid][pHelper] > 0)return SendClientMessage(playerid, COLOR_GREY, "Helpers can't use this command.");
- new str[128];
- new result[128];
- if(sscanf(params, "s[128]", result))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /helpme [text]");
- {
- format(str, sizeof(str), "** Newbie %s [%d] requires help (/helpnewbie): %s", PlayerICName(playerid), playerid, result);
- SendHelperMessage(SCOLOR_CYAN, str, 0);
- AdminHelp[playerid] = 1;
- HelpMeTimer[playerid] = gettime();
- SendClientMessage(playerid, COLOR_YELLOW, "** Your help request has been sent, please wait for a response.");
- }
- return 1;
- }
- CMD:oncheck(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- new playername[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", playername)) return SendClientMessage(playerid, COLOR_GRAD1, "{00BFFF}Usage:{FFFFFF} /oncheck [PlayerID/PartOfName]");
- if(strlen(playername) < 4) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Invalid name.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof query, "SELECT NewbieWarns, NewbieMuted, NewbieMutedTime FROM players WHERE Name='%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnNewbieCheck", "is", playerid, playername);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}You are not a Helper.");
- }
- CMD:onwarn(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- new playername[MAX_PLAYER_NAME], reason[64];
- if(sscanf(params, "s[24]s[64]", playername, reason)) return SendClientMessage(playerid, COLOR_GRAD1, "{00BFFF}Usage:{FFFFFF} /onwarn [player_name] [reason]");
- if(strlen(playername) < 4) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Invalid name.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof query, "SELECT NewbieWarns FROM players WHERE Name='%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnNewbieWarn", "iss", playerid, playername, reason);
- }
- else SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}You are not a Helper.");
- return 1;
- }
- CMD:onmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- new playername[MAX_PLAYER_NAME], time[20];
- if(sscanf(params, "s[24]s[20]", playername, time)) return SendClientMessage(playerid, COLOR_GRAD1, "{00BFFF}Usage:{FFFFFF} /onmute [player_name] [time(perm, hours)]");
- if(strlen(playername) < 4) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Invalid name.");
- new iTime; // by default permanant, otherwise if it's numeric set it to that
- if(IsNumeric(time)) {
- if(strval(time) >= 0 && strval(time) <= 48) iTime = strval(time);
- else return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Mute time must be within 1 and 24 hours.");
- }
- new query[128];
- mysql_format(sqlGameConnection, query, 128, "SELECT NewbieMuted FROM players WHERE Name='%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnNewbieMute", "iis", playerid, iTime, playername);
- }
- else SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}You are not a Helper.");
- return 1;
- }
- CMD:onrw(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- new playername[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", playername)) return SendClientMessage(playerid, COLOR_GRAD1, "{00BFFF}Usage:{FFFFFF} /onrw [player_name]");
- if(strlen(playername) < 4) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}Invalid name.");
- new query[128];
- mysql_format(sqlGameConnection, query, 128, "UPDATE players SET NewbieWarns=NewbieWarns-1 WHERE Name='%e' AND NewbieWarns > 0", playername);
- mysql_pquery(sqlGameConnection, query, "OnNewbieWarnRemove", "is", playerid, playername);
- }
- else SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}You are not a Helper.");
- return 1;
- }
- CMD:help(playerid, params[])
- {
- ShowHelpDialog(playerid);
- return 1;
- }
- CMD:showlicense(playerid, params[])
- return cmd_showlicenses(playerid, params);
- CMD:showlicenses(playerid, params[]) {
- new targetPlayer;
- if(sscanf(params, "u", targetPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /showlicenses [playerid/PartOfName]");
- if(!IsPlayerConnected(targetPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(targetPlayer == playerid)
- return cmd_licenses(playerid, "");
- if(!IsPlayerInRangeOfPlayer(4.0, playerid, targetPlayer) ||
- GetPlayerState(targetPlayer) == PLAYER_STATE_SPECTATING
- ) return SendClientMessage(playerid, COLOR_GREY, "You are not near this player.");
- new str[128];
- // Send message
- format(str, sizeof(str), "* %s has shown their licenses to you.", PlayerICName(playerid));
- SendClientMessage(targetPlayer, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You have shown your licenses to %s.", PlayerICName(targetPlayer));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- // Show the licenses
- new hasAnyLicenses = DisplayLicenses(playerid, targetPlayer);
- if(!hasAnyLicenses)
- SendClientMessage(targetPlayer, COLOR_GREY, "No achieved licenses.");
- // Action
- format(str, sizeof(str), "* %s shows their licenses to %s.", PlayerICName(playerid), PlayerICName(targetPlayer));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s shows their licenses to %s.", PlayerICName(playerid), PlayerICName(targetPlayer));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- return 1;
- }
- CMD:licenses(playerid, params[]) {
- new str[128];
- // Action
- format(str, sizeof(str), "* %s takes a look at their licenses.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s takes a look at their licenses.", PlayerICName(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- // Show the licenses
- new hasAnyLicenses = DisplayLicenses(playerid, playerid);
- if(!hasAnyLicenses)
- SendClientMessage(playerid, COLOR_GREY, "No achieved licenses.");
- return 1;
- }
- CMD:guide(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOGID_GUIDE_MAIN, DIALOG_STYLE_LIST, "Guide", "How to make money\nGetting guns\nJoining a gang or faction\nHow to roleplay\nHow to level up", "Ok", "Cancel");
- viewingGuide[playerid] = 1;
- return 1;
- }
- CMD:aduty(playerid, params[]) return cmd_adminduty(playerid, params);
- CMD:adminduty(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return AdmErrorMsg;
- new str[128];
- if(ADuty[playerid] == false)
- {
- ADuty[playerid] = true;
- SetPlayerHealth(playerid, 9999999);
- SetPlayerArmour(playerid, 9999999);
- SetTimerEx("Timer_ADutyTimer2", 60 *1000, 0, "i", playerid);
- ADutyTimer[playerid] = true;
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s is now on duty.", PlayerName(playerid));
- SendAdminMessage(COLOR_WHITE, str);
- SetPlayerMasked(playerid, true);
- //Aduty(playerid);
- DestroyDynamic3DTextLabel(nametagText[playerid]);
- nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
- usingNameTag[playerid] = 0;
- if( (PlayerInfo[ playerid ] [ pID ] == 7619 || PlayerInfo[ playerid ] [ pID ] == 7378 ) && ADuty[playerid] == true )
- {
- format(str, sizeof(str), "Founder\n{8b0000}%s", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, COLOR_BLUE, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] == 1 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{FF00FF}Probationary Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] == 2 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{00FF00}Junior Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] == 3 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{04B404}General Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if((PlayerInfo[playerid][pAdmin] >= 4 && PlayerInfo[playerid][pAdmin] <= 1336) && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{F4A460}Senior Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] >= 1337 && PlayerInfo[playerid][pAdmin] < 99999 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{FF0000}Head Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] >= 99999 && PlayerInfo[playerid][pAdmin] < 1999999999 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{800000}Executive Administrator", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] == 1999999998 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{800000}Co-Owner", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- else if(PlayerInfo[playerid][pAdmin] == 1999999999 && ADuty[playerid] == true)
- {
- format(str, sizeof(str), "%s\n{0080FF}PRP Administrator\n{F09186}Community Director", PlayerOOCName(playerid));
- nametagText[playerid] = CreateDynamic3DTextLabel(str, 0xFEB918FF, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- usingNameTag[playerid] = 1;
- }
- }
- else
- {
- DestroyDynamic3DTextLabel(nametagText[playerid]);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
- usingNameTag[playerid] = 0;
- ADuty[playerid] = false;
- SetTimerEx("Timer_ADutyTimer2", 60 *1000, 0, "i", playerid);
- ADutyTimer[playerid] = true;
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s is now off duty.", PlayerName(playerid));
- SendAdminMessage(COLOR_WHITE, str);
- SetPlayerMasked(playerid, false);
- //Aduty(playerid);
- }
- return 1;
- }
- CMD:hduty(playerid, params[]) return cmd_helperduty(playerid, params);
- CMD:helperduty(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] == 0) return AdmErrorMsg;
- if(ADutyTimer[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "You must wait 60 seconds before switiching status.");
- new str[128];
- if(HDuty[playerid] == false)
- {
- HDuty[playerid] = true;
- SetTimerEx("Timer_ADutyTimer2", 60 *1000, 0, "i", playerid);
- ADutyTimer[playerid] = true;
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s is now on duty.", PlayerName(playerid));
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- gHelperCh[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Helper chat channel Enabled.");
- }
- else
- {
- HDuty[playerid] = false;
- SetTimerEx("Timer_ADutyTimer2", 60 *1000, 0, "i", playerid);
- ADutyTimer[playerid] = true;
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s is now off duty.", PlayerName(playerid));
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- gHelperCh[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Helper chat channel Disabled.");
- }
- return 1;
- }
- CMD:di(playerid, params[]) return cmd_damageinfo(playerid, params);
- CMD:damageinfo(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new targetid, string[128];
- if(sscanf(params, "u", targetid))
- {
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(d)amage(i)nfo [playerid/PartOfName]");
- }
- else
- {
- format(string, sizeof(string), "DamageInfo for %s:", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "Last damaged by %s (%s) at %d:%d (hour:minute)", damagedBy[targetid], damageGun[targetid], damageHour[targetid], damageMinute[targetid]);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "Last killed by %s (%s) at %d:%d (hour:minute)", killedBy[targetid], killGun[targetid], killerHour[targetid], killerMinute[targetid]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:garagehelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /lockgarage");
- return 1;
- }
- CMD:gatehelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /movegate (password), /gatepass (newpassword)");
- return 1;
- }
- CMD:househelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /lockhouse, /sethousetag, /house, /buyhouse, /hupgrade, /sellhouse, /sellhousetomarket, /breakin, /doorknock, /doorshout");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /furniture");
- return 1;
- }
- CMD:cellphonehelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /call, /sms(/t), (/p)ickup, (/h)angup, /number, /speakerphone");
- return 1;
- }
- CMD:radiohelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /setradioname, /setradiourl, /setradiobroadcast");
- return 1;
- }
- CMD:irchelp(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /irc join [channelnr] (password), /irc leave, /irc members");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /irc Password [channelnr], /irc NeedPass [channelnr], /irc Lock [channelnr])");
- SendClientMessage(playerid, COLOR_WHITE, "COMMANDS: /irc Admins) (/irc MOTD [motdtext]) (/irc status [channelnr]) (/i [text])");
- return 1;
- }
- CMD:helperhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] > 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*Trial: /hc /helpnewbie (/hn) /hreturn /hduty /ap /nwarn /nmute");
- }
- if(PlayerInfo[playerid][pHelper] >= 2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*HELPER: /n(r)emove(w)arning /gotonewbie /hpm /hveh /listnewbies /ncheck");
- }
- if(PlayerInfo[playerid][pHelper] >= 3)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*SENIOR HELPER: /nonewbie /hgoto /clearchat");
- }
- if(PlayerInfo[playerid][pHelper] >= 4)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*HEAD HELPER: /makehelper /omakehelper");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:map(playerid, params[])
- {
- if(PlayerInfo[playerid][pMap] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a map! (Purchase one from a 24/7)");
- if(goingJob[playerid] == true)
- {
- DisablePlayerCheckpointEx(playerid);
- goingJob[playerid] = false;
- }
- ShowPlayerDialog(playerid, DIALOG_MAP, DIALOG_STYLE_LIST, "Map", "Detective Job\nLawyer Job\nDrug Dealer Job\nProduct Dealer Job\nMechanic Job\nBodyguard Job\nArms Dealer Job\nBoxer Job\nTaxi Driver Job\nDrug Smuggler Job\nSan Andreas Police Department\nLos Santos Bank\nLos Santos GYM\nFire & Medical Department\nSan Andreas News Network", "Select", "Cancel");
- return 1;
- }
- CMD:maphelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] < 1) return AdmErrorMsg;
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "*1* Regular Mapper: /(m)apper(c)hat, /mappers, /up, /dn, /hidestatus");
- SendClientMessage( playerid, COLOR_WHITE, "*1* Regular Mapper: /nametosql, /sqltoname");
- if(PlayerInfo[playerid][pMapper] >= MAPPERRANK_SENIOR)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*2* Senior Mapper: /(m)apper(c)hat, /mappers, /up, /dn");
- }
- if(PlayerInfo[playerid][pMapper] == MAPPERRANK_MANAGER)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*3* Mapping Manager: /(m)apper(c)hat, /mappers, /up, /dn, /gotoobj, /makemapper, /gotocoords, /setworld");
- SendClientMessage(playerid, COLOR_WHITE, "*3* Mapping Manager: /agatehelp, /agaragehelp, /editdoor, /gotodoor");
- }
- return 1;
- }
- CMD:devhelp(playerid, params[])
- {
- if(!PlayerInfo[playerid][pDev])
- return AdmErrorMsg;
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "*1* Junior Developer: /(d)ev(c)hat, /devs, /hidestatus, /setworld");
- if(PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*2* Senior Developer: /gotocoords, /editgate, /editdoor, /closestgate, /spawnedvehicles");
- SendClientMessage(playerid, COLOR_WHITE, "*2* Senior Developer: /kickall, /lockserver, /skindebug, /skinshop, /allskins, /asay");
- }
- if(PlayerInfo[playerid][pDev] >= DEVRANK_MANAGER)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*3* Lead Developer: /makedev, /setannouncement, /lockannouncement, /o, /setmotd, /goto");
- SendClientMessage(playerid, COLOR_WHITE, "*3* Lead Developer: /togdoubleexp /veh /destroycar");
- }
- return 1;
- }
- CMD:prisoninfo(playerid, params[])
- {
- if( PlayerInfo[playerid][pJailed] != 2 ||
- PlayerInfo[playerid][pJailTime] < 1)
- return SendClientMessage(playerid, COLOR_GREY, "You are not in prison.");
- new prisonno[50], prisontime[50], timeremain[3], prisoninfo[128];
- format(prisonno, sizeof(prisonno), "\tUniform No: %i", PlayerInfo[playerid][pJailnumber]);
- timeremain[0]= PlayerInfo[playerid][pJailTime];
- timeremain[1] = timeremain[0]/60;
- timeremain[0] -= timeremain[1]*60;
- if(timeremain[1] < 1)
- {
- format(prisontime, sizeof(prisontime), "\tTime remaining: %i seconds.", timeremain[0]);
- }
- else
- {
- format(prisontime, sizeof(prisontime), "\tTime remaining: %i minutes, %i seconds.", timeremain[1], timeremain[0]);
- }
- format(prisoninfo, sizeof(prisoninfo), "%s\n%s", prisonno, prisontime);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Prison information", prisoninfo, "Close", ""); //Bugs on first button, "Server: You are already logged in!"
- return 1;
- }
- CMD:inmates(playerid, params[])
- {
- if(!IsACop(playerid) && PlayerInfo[playerid][pMember] != FACTION_SANG && PlayerInfo[playerid][pAdmin] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "You are not authorised to use that command.");
- new pcounter, pstring[512];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(!IsPlayerConnected(i)) continue;
- if(PlayerInfo[i][pJailed] != 2) continue;
- new string[128];
- format(string, sizeof(string), "#%i ~ %s | time: %i s\n", PlayerInfo[i][pJailnumber], PlayerICName(i), PlayerInfo[i][pJailTime]);
- strcat(pstring, string);
- pcounter++;
- }
- if(pcounter > 0) return ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Registered inmates", pstring, "Close", "");
- else return SendClientMessage(playerid, COLOR_GREY, "There are no registered inmates!");
- }
- // =========================== PRISON COMMANDS END =============================
- CMD:testhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] > 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- if(PlayerInfo[playerid][pTester] == TESTERRANK_REGULAR)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*1* Regular Tester: /(t)est(c)hat, /togtester, /testers, /ac(cept)bug, /treturn, /d(eny)bug /hidestatus");
- }
- else if(PlayerInfo[playerid][pTester] == TESTERRANK_SENIOR)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*1* Senior Tester: /(t)est(c)hat, /togtester, /testers, /ac(cept)bug, /treturn, /bugmute, /d(eny)bug, /up, /dn, /bigup, /bigdn");
- }
- else if(PlayerInfo[playerid][pTester] == TESTERRANK_MANAGER)
- {
- SendClientMessage(playerid, COLOR_WHITE, "*2* Tester Manager: /(t)est(c)hat, /togtester, /testers, /ac(cept)bug, /treturn, /bugmute, /maketester, /d(eny)bug");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:viphelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pDonateRank] > 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "VIP COMMANDS: /purchase, /getgift, /(v)ip(c)hat, /togvc, /vip, /viptime");
- }
- if(PlayerInfo[playerid][pDonateRank] == 4)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "____________________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "VIP COMMANDS: /finddcars");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- //=================================[CHATS]======================================
- CMD:b(playerid, params[])
- {
- if(PlayerInfo[playerid][pMuted] == 1 || WatchingTV[playerid] == true) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- return 1;
- }
- if(PlayerInfo[playerid][pMask]) format(str, sizeof(str), "(( %s: %s ))", PlayerICName(playerid), msg);
- else format(str, sizeof(str), "(( %s (%i): %s ))", PlayerICName(playerid), playerid, msg);
- if(usingNameTag[playerid] && PlayerInfo[playerid][pAdmin] >= 2)
- {
- ProxDetector(20, playerid, str, 0xFEB918FF, 0xFEB918FF, 0xFEB918FF, 0xFEB918FF, 0xFEB918FF);
- }
- else
- {
- ProxDetector(20.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /b [local ooc chat]");
- }
- return 1;
- }
- CMD:showbadge(playerid, params[])
- {
- if(IsABadgeFaction(playerid) || PlayerInfo[playerid][pHAFakeBadge] != 0)
- {
- if(PlayerInfo[playerid][pHidingBadge])
- return SendClientMessage(playerid, COLOR_GREY, "You are currently hiding your badge. (/badge)");
- new targetid;
- new namerankstr[100];
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /showbadge [playerid/name]");
- {
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be close to the player to show them your badge.");
- if(PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pHAFakeBadge] == 0) return cmd_showpresscard(playerid, params);
- if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have a badge.");
- format(str, sizeof(str), "* %s reaches over towards %s showing them their badge. *", PlayerICName(playerid), PlayerICName(targetid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(targetid, COLOR_YELLOW, "[Badge Information]");
- if(PlayerInfo[playerid][pHAFakeBadge] != 0)
- {
- new factionname = PlayerInfo[playerid][pHAFakeBadge];
- format(namerankstr, sizeof(namerankstr), "[%s (Badge Number: %d) - %s (%s)]", PlayerICName(playerid), PlayerInfo[playerid][pBadgeNumber], GetFactionName(factionname), GetFakeRank(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, namerankstr);
- }
- else
- {
- format(str, sizeof(str), "[%s (Badge Number: %d) - %s (%s)]", PlayerICName(playerid), PlayerInfo[playerid][pBadgeNumber], GetPlayerFactionName(playerid), GetPlayerRank(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- }
- return 1;
- }
- }
- return SendClientMessage(playerid, COLOR_GRAD1, "You're either not in a faction, or your faction doesn't have a badge.");
- }
- CMD:asw(playerid, params[])
- {
- new giveplayerid, result[128];
- if(sscanf(params, "us[128]", giveplayerid, result)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/asw)admin stranger whipser [playerid/PartOfName] [whisper text]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't whisper to yourself.");
- new str[128];
- if(PlayerInfo[giveplayerid][pMask] != 0 )
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] == 1)
- {
- format(str, sizeof(str), "A silent admin whispers: %s", (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] != 1)
- {
- format(str, sizeof(str), "%s whispers: %s", PlayerICName(playerid),(result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] == 1 && !ADuty[playerid])
- {
- format(str, sizeof(str), "A silent admin whispers: %s",(result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "This command is only for whisper stranger, use /w for normal.");
- }
- return 1;
- }
- CMD:w(playerid, params[])
- return cmd_whisper(playerid, params);
- CMD:whisper(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- return 1;
- }
- if(HidePM[playerid] && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "Whisper chat is currently turned off, use /togwhisper.");
- if(OnCCTV[playerid] != -1) return 1;
- new giveplayerid, result[128];
- if(sscanf(params, "us[128]", giveplayerid, result)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/w)hisper [playerid/PartOfName] [whisper text]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't whisper to yourself.");
- if(PlayerInfo[playerid][pAdmin] < 1 || (PlayerInfo[playerid][pAdmin] == 1 && !ADuty[playerid]))
- {
- if(GetDistanceBetweenPlayers(playerid, giveplayerid) > 6 || GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
- return 1;
- }
- }
- if(PlayerInfo[giveplayerid][pMask] != 0 ) return SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
- // Gagged
- if(IsPlayerGagged(playerid)) {
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something quietly.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- new str[128];
- if(HidePM[giveplayerid] > 0 && PlayerInfo[playerid][pAdmin] <= 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is blocking whispers.");
- return 1;
- }
- if(ADuty[giveplayerid] == true) return SendClientMessage(playerid, COLOR_GREY, "Do not disturb an admin on duty! Use /report instead!");
- format(str, sizeof(str), "Whisper to %s(ID: %d): %s", PlayerICName(giveplayerid), giveplayerid, (result));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[/W] %s whispered %s (ID %d): %s", PlayerICName(playerid), PlayerICName(giveplayerid), giveplayerid, (result));
- SendShadowMsg(COLOR_GEAR_DARKORANGE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "[/W] %s whispered %s (ID %d): %s at %02d %s %02d:%02d:%02d ", PlayerICName(playerid), PlayerICName(giveplayerid), giveplayerid, (result), day, GetMonthFromInt(month), hour, minute, second);
- logswrite("whisper.log", str);
- format(str, sizeof(str), "* %s mutters something to %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s whispered to %s (ID %d): %s", PlayerICName(playerid), PlayerICName(giveplayerid), giveplayerid, (result));
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- if((PlayerInfo[playerid][pAdmin] == 0 || (PlayerInfo[playerid][pAdmin] == 1 && !ADuty[playerid])) && GetDistanceBetweenPlayers(playerid, giveplayerid) <= 6)
- {
- format(str, sizeof(str), "%s(ID: %d) whispers: %s", PlayerICName(playerid), playerid, (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] == 1 && ADuty[playerid])
- {
- format(str, sizeof(str), "A silent admin whispers: %s", (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] == 1 && GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
- {
- format(str, sizeof(str), "A silent admin whispers: %s", (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] != 1)
- {
- format(str, sizeof(str), "%s whispers: %s", PlayerICName(playerid),(result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] == 1)
- {
- format(str, sizeof(str), "A silent admin whispers: %s", (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, str);
- return 1;
- }
- return 1;
- }
- CMD:o(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- return 1;
- }
- if((noooc) && (PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pDev] < DEVRANK_MANAGER))
- {
- SendClientMessage(playerid, COLOR_GREY, "The OOC channel has been disabled by an Admin.");
- return 1;
- }
- if(gOoc[playerid]) return SendClientMessage(playerid, COLOR_GREY, "OOC channel is currently turned off, use /togooc.");
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- new result[128];
- new str[128];
- if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/o)oc [ooc chat]");
- format(str, sizeof(str), "(( %s: %s ))", name, result);
- OOCOff(COLOR_OOC, str);
- return 1;
- }
- CMD:amsgs(playerid, params[]) //display the admin messages
- {
- if(!PlayerInfo[playerid][pAdmin])
- return AdmErrorMsg;
- displayAdminMessages(playerid);
- return 1;
- }
- CMD:fly(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- if(pDeathState[playerid] != PLAYER_STATE_NORMAL)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use this at the moment.");
- if(flyingUsed[playerid]) CancelFlyMode(playerid);
- else
- {
- GetPlayerPos(playerid, Fly_X[playerid], Fly_Y[playerid], Fly_Z[playerid]);
- FlyMode(playerid);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have entered Fly Spectate mode");
- SendClientMessage(playerid, COLOR_WHITE, "Use {FF0000}UP DOWN LEFT RIGHT{FFFFFF} to move the camera.");
- SendClientMessage(playerid, COLOR_WHITE, "Press {FF0000}LSHIFT{FFFFFF} to speed up and {FF0000}SPACE{FFFFFF} to slow down.");
- }
- return 1;
- }
- CMD:togwarns(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(ToggedWarns[playerid] == false)
- {
- ToggedWarns[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "You have toggled the admin warnings off.");
- }
- else
- {
- ToggedWarns[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "You will now see the warnings again.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- CMD:toga(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin])
- return AdmErrorMsg;
- pMutedA[playerid] = !pMutedA[playerid];
- if(pMutedA[playerid])
- SendClientMessage(playerid, COLOR_GREY, "You have togged the admin chat (/a(dmin)) OFF.");
- else
- SendClientMessage(playerid, COLOR_GREY, "You have togged the admin chat (/a(dmin)) ON.");
- return 1;
- }
- CMD:aeject(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /aeject [playerid/name]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(!IsPlayerInAnyVehicle(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "That player isn't in a vehicle.");
- new name[24], Float:x, Float:y, Float:z;
- strmid(name, str_replace('_', ' ', PlayerName(targetid)), 0, MAX_PLAYER_NAME);
- new str[128];
- format(str, sizeof(str), "{FF0000}AdmCmd:{FFFFFF} You have ejected %s from their vehicle.", name);
- SendClientMessage(playerid, COLOR_WHITE, str);
- SendClientMessage(targetid, COLOR_RED, "An admin has ejected you from your vehicle.");
- GetPlayerPos(targetid, x, y, z);
- SetPlayerPos(targetid, x, y, z +3);
- return 1;
- }
- CMD:a(playerid, params[]) return cmd_admin(playerid, params);
- CMD:admin(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(pMutedA[playerid] == true) return SendClientMessage(playerid, COLOR_GREY, "You can't use this channel, you've togged it off.");
- new msg[128],
- Astr[128];
- if(!sscanf(params, "s[128]", msg))
- {
- new alevel[30];
- if(PlayerInfo[playerid][pAdmin] == 1)
- {
- alevel = "{FF00FF}Probationary Admin";
- }
- if(PlayerInfo[playerid][pAdmin] == 2)
- {
- alevel = "{00FF00}Junior Admin";
- }
- if(PlayerInfo[playerid][pAdmin] == 3)
- {
- alevel = "{04B404}General Admin";
- }
- if(PlayerInfo[playerid][pAdmin] >= 4 && PlayerInfo[playerid][pAdmin] <= 1336)
- {
- alevel = "{F4A460}Senior Admin";
- }
- if(PlayerInfo[playerid][pAdmin] >= 1337 && PlayerInfo[playerid][pAdmin] <= 99998)
- {
- alevel = "{FF0000}Head Admin";
- }
- if(PlayerInfo[playerid][pAdmin] >= 99999)
- {
- alevel = "{800000}Executive Admin";
- }
- if(PlayerInfo[playerid][pAdmin] == 1999999999)
- {
- alevel = "{0080FF}Community Director";
- }
- format(Astr, sizeof(Astr), " %s %s{FFFFFF}: %s **", alevel, PlayerOOCName(playerid), msg);
- /*#if UseDiscordBot 1
- Discord:sendPlayerRequest(DISCORD_ADMINCHAT_CHANNEL, playerid, "", msg, 0xFEB918);
- #endif*/
- SendAdminChatMessage(COLOR_WHITE, Astr);
- return 1;
- } else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/a)dmin [admin chat]");
- } else return AdmErrorMsg;
- }
- CMD:hc(playerid, params[]) return cmd_helperchat(playerid, params);
- CMD:helperchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- if(gHelperCh[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Helper chat channel is currently turned off, use /toghelper.");
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- new hrank[30];
- if(PlayerInfo[playerid][pHelper] == 1)
- {
- hrank = "Trial Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 2)
- {
- hrank = "Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 3)
- {
- hrank = "Senior Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 4)
- {
- hrank = "Head Helper";
- }
- if(PlayerInfo[playerid][pHelper] >= 5)
- {
- hrank = "Director of The Helpers Team";
- }
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- new str[128];
- format(str, sizeof(str), "** %s %s: %s **", hrank, name, msg);
- SendHelperMessage(HELPER_COLOR, str, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(h)elper(c)hat [message]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:acceptunmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] > 1 || PlayerInfo[playerid][pHelper] > 2)
- {
- //senior helpers, admins
- //if(!ADuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new targetid, sec[10];
- if(sscanf(params, "us[10]", targetid, sec)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /acceptunmute [playerid/name] [admute/newbmute/global]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- new str[128];
- if(strmatch(sec, "admute"))
- {
- if( PlayerInfo[playerid][pAdmin] > 1 ) {
- if(adRequest[targetid] == true)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has accepted %s's request to be unmuted from the advert system.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "Your request has been accepted by an admin to be unmuted from the advert system.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pAdMuted] = 0;
- adRequest[targetid] = false;
- PlayerInfo[targetid][pCash] -= adPrice[targetid];
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "That player hasn't requested an unmute from the advert system.");
- } else return AdmErrorMsg;
- }
- else if(strmatch(sec, "newbmute"))
- {
- if(newbieRequest[targetid] == true)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has accepted %s's request to be unmuted from the newbie chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperWarning{FFFFFF}: %s (ID %d) has accepted %s's request to be unmuted from the newbie chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendHelperMessage( COLOR_WHITE, str, 0);
- format(str, sizeof(str), "Your request has been accepted by an admin to be unmuted from the newbie chat channel.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pNewbieMuted] = 0;
- newbieRequest[targetid] = false;
- PlayerInfo[targetid][pCash] -= newbiePrice[targetid];
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "That player hasn't requested an unmute from the newbie chat channel.");
- }
- else if(strmatch(sec, "global")){
- if(PlayerInfo[targetid][pGCRequestUnmute] == true){
- format(str, sizeof(str), "AdmWarning"COL_WHITE": %s (ID %d) has accepted %s's request to be unmuted from the global chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_RED, str, 1);
- format(str, sizeof(str), "HelperWarning"COL_WHITE": %s (ID %d) has accepted %s's request to be unmuted from the global chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendHelperMessage(COLOR_RED, str, 0);
- format(str, sizeof(str), "Your request has been accpted by an admin to be unmuted from the global chat channel.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pGCMute] = 0;
- PlayerInfo[targetid][pGCRequestUnmute] = false;
- PlayerInfo[targetid][pCash] -= PlayerInfo[targetid][pGCUnmutePrice];
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "That player hasn't requested an unmute from the global chat channel.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /acceptunmute [playerid/name] [admute/newbmute/global]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- //DENY UNMUTE OF NEWBIE, AD and GLOBAL.
- CMD:denyunmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] > 1 || PlayerInfo[playerid][pHelper] > 2)
- {
- //senior helpers, admins
- //if(!ADuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new targetid, sec[10];
- if(sscanf(params, "us[10]", targetid, sec)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /denyunmute [playerid/name] [admute/newbmute/global]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- new str[128];
- if(strmatch(sec, "admute"))
- {
- if( PlayerInfo[playerid][pAdmin] > 1 ) {
- if(adRequest[targetid] == true)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has denied %s's request to be unmuted from the advert system.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "Your request has been denied by an admin to be unmuted from the advert system.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- adRequest[targetid] = false;
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "That player hasn't requested an unmute from the advert system.");
- } else return AdmErrorMsg;
- }
- else if(strmatch(sec, "newbmute"))
- {
- if(newbieRequest[targetid] == true)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has denied %s's request to be unmuted from the newbie chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperWarning{FFFFFF}: %s (ID %d) has denied %s's request to be unmuted from the newbie system.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendHelperMessage( COLOR_WHITE, str, 0);
- format(str, sizeof(str), "Your request has been denied by an admin to be unmuted from the newbie chat channel.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- newbieRequest[targetid] = false;
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "That player hasn't requested an unmute from the newbie system.");
- }
- else if(strmatch(sec, "global")){
- if(PlayerInfo[targetid][pGCRequestUnmute] == true){
- format(str, sizeof(str), ""COL_RED"AdmWarning"COL_WHITE": %s (ID %d) has denied %s's request to be unmuted from the global chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), ""COL_RED"HelperWarning"COL_WHITE": %s (ID %d) has denied %s's request to be unmuted from the global chat channel.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendHelperMessage(COLOR_WHITE, str, 0);
- format(str, sizeof(str), "Your request has been denied by an admin to be unmuted from the global chat channel.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pGCRequestUnmute] = false;
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /denyunmute [playerid/name] [admute/newbmute/global]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:requestadunmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdMuted] != 0)
- {
- if(adRequest[playerid] == true) return SendClientMessage(playerid, COLOR_WHITE, "You're already requested an unmute.");
- new price;
- if(PlayerInfo[playerid][pLevel] <= 3) price = PlayerInfo[playerid][pLevel] * 15000;
- else price = PlayerInfo[playerid][pLevel] * 30000;
- new str[128];
- format(str, sizeof(str), "You don't have enough money ($%d) to do this.", price);
- if(PlayerInfo[playerid][pCash] >= price)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has requested to be unmuted from the advert system (/acceptunmute)", PlayerICName(playerid), playerid);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You have requested to be unmuted from the advert system for $%d.", price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- adRequest[playerid] = true;
- adPrice[playerid] = price;
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You're not muted from the advertisement system.");
- return 1;
- }
- CMD:requestnewbieunmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pNewbieMuted] != 0)
- {
- if(PlayerInfo[playerid][pNMuteTime] == -1) return SendClientMessage(playerid, COLOR_GREY, "You may not request an unmute as you are permanently banned from the channel (post an unmute request on Coming soon)");
- new str[128];
- if(PlayerInfo[playerid][pReqUnmute] > 0)
- {
- if(PlayerInfo[playerid][pReqUnmute] > 3600) format(str, sizeof(str), "You have %d hours left before you can /requestnewbieunmute", PlayerInfo[playerid][pReqUnmute]/3600);
- else format(str, sizeof(str), "You have %d minutes left before you can /requestnewbieunmute", PlayerInfo[playerid][pReqUnmute]/60);
- return SendClientMessage(playerid, COLOR_GREY, str);
- }
- if(newbieRequest[playerid] == true) return SendClientMessage(playerid, COLOR_WHITE, "You're already requested an unmute.");
- new price;
- if(PlayerInfo[playerid][pLevel] <= 3) price = PlayerInfo[playerid][pLevel] * 15000;
- else price = PlayerInfo[playerid][pLevel] * 30000;
- format(str, sizeof(str), "You don't have enough money ($%d) to do this.", price);
- if(PlayerInfo[playerid][pCash] >= price)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s (ID %d) has requested to be unmuted from the newbie chat (/acceptunmute /OR/ /denyunmute)", PlayerICName(playerid), playerid);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperWarning{FFFFFF}: %s (ID %d) has requested to be unmuted from the newbie chat (/acceptunmute /OR/ /denyunmute)", PlayerICName(playerid), playerid);
- SendHelperMessage( COLOR_WHITE, str, 0);
- format(str, sizeof(str), "You have requested to be unmuted from the newbie chat for $%d.", price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- newbieRequest[playerid] = true;
- newbiePrice[playerid] = price;
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You're not muted from the newbie chat channel.");
- return 1;
- }
- CMD:blist(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin] && PlayerInfo[playerid][pMember] != FACTION_NEWS)
- return AdmErrorMsg;
- new dialogstr[5000];
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pAdMuted] == 1)
- {
- format(dialogstr, sizeof(dialogstr), "%s\n%s", dialogstr, PlayerOOCName(i));
- }
- }
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Ad Muted Players", dialogstr, "Close", "");
- return 1;
- }
- CMD:fmembers(playerid, params[])
- {
- if(PlayerInfo[playerid][pFamed] >= 1 || PlayerInfo[playerid][pAdmin] >= 2)
- {
- new count = 0;
- new str[128];
- SendClientMessage(playerid, COLOR_WHITE, "Famed Member(s)");
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][pFamed] != 0 && usingFC[i] == 1)
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[i][pFamed] == 1)format(str, sizeof(str), "%s (ID %d)", name, i);
- else format(str, sizeof(str), "%s (ID %d - Famed Manager)", name, i);
- SendClientMessage(playerid, COLOR_GREY, str);
- count++;
- }
- }
- if(count == 0) return SendClientMessage(playerid, COLOR_GREY, "No Famed members online.");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:fc(playerid, params[]) return cmd_famedchat(playerid, params);
- CMD:famedchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pFamed] >= 1)
- {
- if(FamedChatTog[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Famed chat is currently turned off, use /togfamedchat.");
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerConnected(playerid))
- {
- new famerank[32];
- if(PlayerInfo[playerid][pFamed] == 1) famerank = "Famed Member";
- if(PlayerInfo[playerid][pFamed] == 2) famerank = "Famed Manager";
- new name[24];
- new str[128];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: %s **", famerank, name, msg);
- SendFamedMessage(COLOR_FAMED, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(f)amed(c)hat [message]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:ec(playerid, params[]) return cmd_eventchat(playerid, params);
- CMD:eventchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pEventModd] == 1 || PlayerEventMod[playerid] == 1)
- {
- new str[128];
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- format(str, sizeof(str), "**[Event Chat] %s: %s **", PlayerOOCName(playerid), msg);
- SendEventHelperMessage(COLOR_EVENTHELP, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(e)vent(c)hat [message]");
- }
- }
- return 1;
- }
- CMD:dc(playerid, params[]) return cmd_devchat(playerid, params);
- CMD:devchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] < 1) return AdmErrorMsg;
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(d)ev(c)hat [message]");
- new str[128];
- if(PlayerInfo[playerid][pDev] == DEVRANK_JUNIOR) str = "Junior Developer";
- else if(PlayerInfo[playerid][pDev] == DEVRANK_SENIOR) str = "Senior Developer";
- else if(PlayerInfo[playerid][pDev] == DEVRANK_MANAGER) str = "Development Manager";
- else if(PlayerInfo[playerid][pDev] >= DEVRANK_LEAD) str = "Lead Developer";
- format(str, sizeof(str), "** %s %s: %s **", str, PlayerOOCName(playerid), params);
- SendDeveloperMessage(COLOR_DEV, str);
- return 1;
- }
- CMD:togdevchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] < 1) return AdmErrorMsg;
- if(toggedDevChat[playerid] == true)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Development Chat enabled.");
- toggedDevChat[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Development Chat disabled.");
- toggedDevChat[playerid] = true;
- }
- return 1;
- }
- CMD:togdc(playerid, params[]) return cmd_togdevchat(playerid, params);
- CMD:ohelpers(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] != 0)
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin` FROM `players` WHERE `Adjustable`=1 AND `HelperLevel` > 0");
- mysql_pquery(sqlGameConnection, query, "onOHelpers", "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not a helper.");
- return 1;
- }
- CMD:omembers(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin`, `Leader`, `Recruiter`, `Rank` FROM `players` WHERE `Adjustable`=1 AND `Member`=%d", PlayerInfo[playerid][pMember]);
- mysql_pquery(sqlGameConnection, query, "onOMembers", "i", playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You're not in a faction.");
- }
- return 1;
- }
- CMD:ofmembers(playerid, params[]){
- if(PlayerInfo[playerid][pFMember] == 255) return SendClientMessage(playerid, COLOR_GREY, "You are not in a family.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin`, `Rank` FROM `players` WHERE `Adjustable`=1 AND `FMember`=%d", PlayerInfo[playerid][pFMember]);
- mysql_pquery(sqlGameConnection, query, "onOFMembers", "i", playerid);
- return 1;
- }
- CMD:otesters(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] != 0){
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin`, `TesterReports` FROM `players` WHERE `Adjustable`=1 AND `TesterLevel` > 0");
- mysql_pquery(sqlGameConnection, query, "onOTesters", "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not a tester.");
- return 1;
- }
- CMD:odevs(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] != 0){
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin` FROM `players` WHERE `Adjustable`=1 AND `DevLevel` > 0");
- mysql_pquery(sqlGameConnection, query, "onODev", "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not a developer.");
- return 1;
- }
- CMD:omappers(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] != 0){
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin` FROM `players` WHERE `Adjustable`=1 AND `Mapper` > 0");
- mysql_pquery(sqlGameConnection, query, "onOmapper", "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not a mapper.");
- return 1;
- }
- CMD:oadmins(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `LastLogin`, `AdminLevel` FROM `players` WHERE `Adjustable`=1 AND `AdminLevel` > 0");
- mysql_pquery(sqlGameConnection, query, "onOAdmin", "i", playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "You're not an administrator.");
- return 1;
- }
- CMD:members(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pFMember] != 255)
- {
- new memberstr[3600];
- foreach( new i: Player )
- {
- if(PlayerInfo[playerid][pFMember] == 255)
- {
- if(usingFakeBadge[i])
- {
- if(PlayerInfo[playerid][pMember] == PlayerInfo[i][pHAFakeBadge])
- {
- if(PlayerPaused[i])format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] {FFFFFF}%s - {FFFF00}Rank: %s(1){FFFFFF}\n", memberstr, PlayerOOCName(i), GetFakeRank(i));
- else format(memberstr, sizeof(memberstr), "%s%s - {FFFF00}Rank: %s(1){FFFFFF}\n", memberstr, PlayerOOCName(i), GetFakeRank(i));
- }
- }
- }
- if(PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pMember] != 0)
- {
- if(PlayerInfo[i][pMember] == PlayerInfo[playerid][pMember])
- {
- if(PlayerInfo[playerid][pMember] == 11)
- {
- if(PlayerInfo[i][pLeader] == PlayerInfo[playerid][pMember])
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {2E64FE}Rank: %s(%d - Leader){FFFFFF}\n", memberstr, PlayerOOCName(i), RealS9Rank(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {2E64FE}Rank: %s(%d - Leader){FFFFFF}\n", memberstr, PlayerOOCName(i), RealS9Rank(i), PlayerInfo[i][pRank]);
- }
- else
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {FFFF00}Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), RealS9Rank(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {FFFF00}Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), RealS9Rank(i), PlayerInfo[i][pRank]);
- }
- }
- else if(PlayerInfo[i][pLeader] == PlayerInfo[playerid][pMember])
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {2E64FE}Rank: %s(%d - Leader){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {2E64FE}Rank: %s(%d - Leader){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- }
- else if(PlayerInfo[i][pRecruiter] == PlayerInfo[playerid][pMember])
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {a3995b}Rank: %s(%d - Recruiter){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {a3995b}Rank: %s(%d - Recruiter){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- }
- else
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {FFFF00}Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {FFFF00}Rank: %s(%d){FFFFFF}\n", memberstr, PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pRank]);
- }
- }
- }
- else if(PlayerInfo[playerid][pFMember] != 255)
- {
- if(PlayerInfo[i][pFMember] == PlayerInfo[playerid][pFMember])
- {
- if(PlayerPaused[i]) format(memberstr, sizeof(memberstr), "%s[{E9CF8D}Paused{FFFFFF}] %s - {FFFF00}Rank: %d{FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pRank]);
- else format(memberstr, sizeof(memberstr), "%s%s - {FFFF00}Rank: %d{FFFFFF}\n", memberstr, PlayerOOCName(i), PlayerInfo[i][pRank]);
- }
- }
- }
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Members Online", memberstr, "Close", "");
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You are not a member of an organization.");
- return 1;
- }
- CMD:tc(playerid, params[]) return cmd_testchat(playerid, params);
- CMD:testchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] >= 1)
- {
- if(gTesterCh[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Tester chat channel is currently turned off, use /togtester.");
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(PlayerInfo[playerid][pTester] == TESTERRANK_REGULAR) str = "Regular Tester";
- if(PlayerInfo[playerid][pTester] == TESTERRANK_SENIOR) str = "Senior Tester";
- if(PlayerInfo[playerid][pTester] == TESTERRANK_MANAGER) str = "Tester Manager";
- format(str, sizeof(str), "{00FF00}** %s %s: %s **", str, PlayerOOCName(playerid), msg);
- SendTesterMessage(SCOLOR_GREEN, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(t)est(c)hat [message]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:mapperchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] < MAPPERRANK_REGULAR) return AdmErrorMsg;
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(m)apper(c)hat [message]");
- if(mcOff == true) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} The mapping chat is disabled.");
- new str[128];
- if(mcTog[playerid] == true && PlayerInfo[playerid][pMapper] < MAPPERRANK_MANAGER) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You have the mapper chat toggled, use /togmc.");
- else
- {
- if(PlayerInfo[playerid][pMapper] == MAPPERRANK_REGULAR) str = "Mapper";
- else if(PlayerInfo[playerid][pMapper] == MAPPERRANK_SENIOR) str = "Senior Mapper";
- else if(PlayerInfo[playerid][pMapper] == MAPPERRANK_MANAGER) str = "Mapping Manager";
- format(str, sizeof(str), "{cc4270}** %s %s: %s **", str, PlayerOOCName(playerid), params);
- SendMapperMessage(COLOR_GREY, str); // colour requested by watts (since it was the same as /gc)
- }
- return 1;
- }
- CMD:togmc(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] < MAPPERRANK_REGULAR) return AdmErrorMsg;
- if(mcOff == true) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} The mapping chat is disabled.");
- if(mcTog[playerid] == true)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Mapper chat enabled.");
- mcTog[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Mapper chat disabled.");
- mcTog[playerid] = true;
- }
- return 1;
- }
- CMD:togmtc(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] < MAPPERRANK_MANAGER) return AdmErrorMsg;
- if(mcOff == true)
- {
- SendMapperMessage(TCOLOR_SENATE, "Mapper chat enabled by a Manager.");
- mcOff = false;
- }
- else
- {
- SendMapperMessage(TCOLOR_SENATE, "Mapper chat disabled by a Manager.");
- mcOff = true;
- }
- return 1;
- }
- CMD:mc(playerid, params[]) return cmd_mapperchat(playerid, params);
- CMD:vc(playerid, params[]) return cmd_vipchat(playerid, params);
- CMD:vipchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerConnected(playerid))
- {
- new viprank[32];
- if(PlayerInfo[playerid][pDonateRank] == 1) viprank = "Bronze VIP";
- if(PlayerInfo[playerid][pDonateRank] == 2) viprank = "Silver VIP";
- if(PlayerInfo[playerid][pDonateRank] == 3) viprank = "Gold VIP";
- if(PlayerInfo[playerid][pDonateRank] == 4) viprank = "Platinum VIP";
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: %s **", viprank, name, msg);
- SendVIPMessage(0x80008000, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(v)ip(c)hat [message]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:int(playerid, params[]) return cmd_intercom(playerid, params);
- CMD:intercom(playerid, params[])
- {
- new vw, msg[128];
- new vehid = GetPlayerVehicleID(playerid);
- new str[128];
- if(GetVehicleModel(vehid) == 519 || GetVehicleModel(vehid) == 553) //shamal, andromeda, nevada
- {
- if(!sscanf(params, "s[128]", msg))
- {
- vw = vehid;
- format(str, sizeof(str), "[Pilot %s:o<%s]", PlayerICName(playerid), msg);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- foreach( new i: Player )
- {
- if(GetPlayerVirtualWorld(i) == vw && GetPlayerInterior(i) == 1)
- {
- SendClientMessage(i, COLOR_YELLOW, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/int)ercom [text]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle with an intercom.");
- }
- return 1;
- }
- CMD:m(playerid, params[]) return cmd_megaphone(playerid, params);
- CMD:seizefunds(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_JD || PlayerInfo[playerid][pLeader] != FACTION_JD)
- return AdmErrorMsg;
- if(!IsPlayerAtBankingPoint(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You can only do this at the bank counter.");
- new seizePlayer[25], seizeAmount, seizeReason[100];
- if(sscanf(params, "s[25]is[100]", seizePlayer, seizeAmount, seizeReason))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /seizefunds [Firstname_Lastname] [amount] [reason]");
- if(seizeAmount < 1)
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid amount of money to seize.");
- if(strlen(seizeReason) < 3)
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid reason.");
- // See if the player is online
- new seizePlayerID = GetPlayerIDFromName(seizePlayer);
- new str[128];
- if(IsPlayerConnected(seizePlayerID)) {
- // Seize from an online player
- if(PlayerInfo[seizePlayerID][pAccount] < seizeAmount) {
- format(str, sizeof(str), "* You can currently not seize the full amount ($%s) from %s.", AddThousandsSeparators(seizeAmount), PlayerOOCName(seizePlayerID));
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "* %s only has $%s in their bank account.", PlayerOOCName(seizePlayerID), AddThousandsSeparators(PlayerInfo[seizePlayerID][pAccount]));
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- PlayerInfo[seizePlayerID][pAccount] -= seizeAmount;
- GiveMoney(playerid, seizeAmount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________________________");
- format(str, sizeof(str), "* You have successfully seized $%s from %s's bank account.", AddThousandsSeparators(seizeAmount), PlayerOOCName(seizePlayerID));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Reason: '%s'", seizeReason);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "Previous balance: $%s", AddThousandsSeparators(PlayerInfo[seizePlayerID][pAccount] + seizeAmount));
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "New balance: $%s", AddThousandsSeparators(PlayerInfo[seizePlayerID][pAccount]));
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "____________________________________________");
- }
- else {
- // Seize from an offline player
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Bank` FROM `players` WHERE `Name` = '%e' LIMIT 1", seizePlayer);
- mysql_pquery(sqlGameConnection, query, "OnOfflineSeizeFunds", "isis", playerid, seizePlayer, seizeAmount, seizeReason);
- }
- return 1;
- }
- CMD:gavel(playerid, params[])
- {
- //sitting in judge seat
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1424.1324, -1465.8782, 1616.9574))
- {
- if(PlayerInfo[playerid][pMember] != 7) return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the Judicial Department.");
- new str[128];
- format(str, sizeof(str), "* Judge %s bangs the gravel on the bench.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- foreach( new i: Player )
- {
- if(IsPlayerInRangeOfPoint(i, 30.0, 211.1413, 168.8328, 1003.4689))
- {
- PlayerPlaySound(i, 1131, 211.1413, 168.8328, 1003.4689);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not near a bench.");
- }
- return 1;
- }
- CMD:megaphone(playerid, params[])
- {
- if(OnCCTV[playerid] != -1) return 1;
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || IsANG(playerid) || PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- else if(PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pLeader] == FACTION_SANG) format(str, sizeof(str), "[%s %s:o< %s]", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- // else if(PlayerInfo[playerid][pGroup] == GROUP_S9 ||PlayerInfo[playerid][pLeader] == 11) format(str, sizeof(str), "[%s (%i):o< %s]", GetPlayerRank(playerid), MaskNumber[playerid], msg);
- else if(PlayerInfo[playerid][pGroup] == GROUP_S9) // if s9
- {
- if(PlayerInfo[playerid][pMask])
- {
- format(str, sizeof(str), "[(%i):o< %s]", MaskNumber[playerid], msg);
- }
- else
- {
- if(FakeFaction[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You can't use a megaphone without a badge or mask.");
- format(str, sizeof(str), "[%s:o< %s]", PlayerICName(playerid), msg);
- }
- }
- ProxDetector(60.0, playerid, str, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/m)egaphone [megaphone chat]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this.");
- }
- return 1;
- }
- CMD:nofactionooc(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 0)
- {
- if( PlayerInfo[playerid][pMember] == 5 && PlayerInfo[playerid][pRank] < MAX_DOC_RANKS - 3 ) return SendClientMessage( playerid, COLOR_GREY, "You are not a High Command of the DoC." );
- if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pRank] < 6) return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank.");
- if(PlayerInfo[playerid][pMember] == 1 && PlayerInfo[playerid][pRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "You're not a high enough rank.");
- if(PlayerInfo[playerid][pMember] == FACTION_SANG && PlayerInfo[playerid][pRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "Only R5+ may do this.");
- if(OOCRadioOff[PlayerInfo[playerid][pMember]])
- {
- OOCRadioOff[PlayerInfo[playerid][pMember]] = false;
- SendClientMessage(playerid, COLOR_WHITE, "You have {00FF00}enabled{FFFFFF} the OOC radio chat for your faction.");
- }
- else
- {
- OOCRadioOff[PlayerInfo[playerid][pMember]] = true;
- SendClientMessage(playerid, COLOR_WHITE, "You have {FF0000}disabled{FFFFFF} the OOC radio chat for your faction.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not in a Faction.");
- return 1;
- }
- CMD:or(playerid, params[]) return cmd_oradio(playerid, params);
- CMD:oradio(playerid, params[])
- {
- if(OOCRadioOff[PlayerInfo[playerid][pMember]])return SendClientMessage(playerid, COLOR_GREY, "This chat has been disabled for your faction.");
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(ToggedOR[playerid] == true) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst you have it toggled off.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- switch(PlayerInfo[playerid][pMember])
- {
- case 1:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(1, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]))
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSAPDListen])
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- case 2:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(2, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]))
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFBIListen])
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- case 3:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(3, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pLSSDListen])
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- case 4:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(4, COLOR_DOCTOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFMDListen])
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- case 5:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(5, COLOR_DOC, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 6:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(6, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 7:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(7, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 8:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(8, TEAM_AZTECAS_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 9:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(9, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 10:
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendOOCRadio(10, TEAM_BLUE_COLOR, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 11:
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: (( %s )) **", RealS9Rank(playerid), name, msg);
- SendOOCRadio(11, COLOR_S9, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", name, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- case 14:
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), name, msg);
- SendOOCRadio(14, COLOR_SANG, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", name, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSANGListen])
- {
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- case 15:
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), name, msg);
- SendOOCRadio(15, COLOR_SAS, str);
- format(str, sizeof(str), "** %s %s: (( %s )) **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_YELLOW, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /or: %s", name, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- default:
- SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/or)adio [chat]");
- }
- return 1;
- }
- CMD:togboxing(playerid, params[])
- {
- if(boxToggled[playerid] == false)
- {
- boxToggled[playerid] = true;
- SendClientMessage(playerid, COLOR_WHITE, "You have disabled the boxing news system.");
- }
- else
- {
- boxToggled[playerid] = false;
- SendClientMessage(playerid, COLOR_WHITE, "You have enabled the boxing news system.");
- }
- return 1;
- }
- CMD:makerecruiter(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "You're not a faction leader (or have leader flag).");
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, COLOR_GREY, "USAGE: /makerecruiter [ID / Part Of Name]");
- new string[128];
- if(PlayerInfo[targetid][pRecruiter] != 0 && PlayerInfo[targetid][pMember] == PlayerInfo[playerid][pMember]) // Make sure the player is in the same fac
- return SendClientMessage(playerid, COLOR_GREY, "That player is already a recruiter.");
- PlayerInfo[targetid][pRecruiter] = PlayerInfo[playerid][pMember];
- format(string, sizeof(string), "* You've made %s a recruiter (to remove it you must kick them).", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* You've been made a recruiter by %s (this gives you the privilege to /invite people).", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- CMD:invite(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pRecruiter] > 0)
- {
- new giveplayerid;
- new str[128];
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /invite [playerid/PartOfName]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[giveplayerid][pFKickTime])
- {
- new timeleft;
- timeleft = PlayerInfo[giveplayerid][pFKickTime] / 3600000;
- SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot invite that player because they are faction-killed.");
- format(str, sizeof(str), "* %s has %i hours before he can be invited to a faction.", PlayerName(giveplayerid), timeleft);
- SendClientMessage(playerid, COLOR_LIGHTRED, str);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pMember] == 0 && PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pFMember] == 255)
- {
- format(str, sizeof(str), "* You have Invited %s to join the %s.", PlayerICName(giveplayerid), GetPlayerFactionName(playerid, true));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s has invited you to join the %s, (type /accept faction) to accept.", PlayerICName(playerid), GetPlayerFactionName(playerid, true));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- FactionOffer[giveplayerid] = playerid;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already in a family or a faction.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Faction Leader.");
- }
- return 1;
- }
- CMD:setucname(playerid, params[]) {
- new group = PlayerInfo[playerid][pGroup];
- if( (group == GROUP_HITMAN && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(GROUP_HITMAN)-1) ||
- (group == GROUP_CRIME && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(GROUP_CRIME)-1) ||
- (group == GROUP_S9 && PlayerInfo[playerid][pGroupRank] >= GetGroupMaxRanks(GROUP_S9)-1) ||
- (group == GROUP_CARTEL && PlayerInfo[playerid][pGroupRank] >= 3 ||
- group == 7)
- ) {
- new toplayer, newMaskName[21], ucStr[128];
- if(sscanf(params, "us[21]", toplayer, newMaskName)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setucname [player] [mask name]");
- // DEA and S9
- if(!IsAFBI(playerid) && strfind(newMaskName, "Agent", true) != -1)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use the word \"Agent\" in your mask name.");
- // If the receiver isn't in the player's faction.
- if(PlayerInfo[toplayer][pGroup] == group || PlayerInfo[toplayer][pMember] == PlayerInfo[playerid][pMember]) {
- PlayerInfo[toplayer][pMaskName] = newMaskName;
- format(ucStr, sizeof(ucStr), "Your faction leader has set your mask name to %s.", newMaskName);
- SendClientMessage(toplayer, COLOR_LIGHTBLUE, ucStr);
- format(ucStr, sizeof(ucStr), "You have set %s's mask name to %s", PlayerICName(toplayer), newMaskName);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, ucStr);
- } else {
- format(ucStr, sizeof(ucStr), "That player is not a member of %s.", GetPlayerGroupName(playerid));
- SendClientMessage(playerid, COLOR_GREY, ucStr);
- }
- }
- return 1;
- }
- CMD:removefactionban(playerid, params[])
- {
- new player2;
- if(!PlayerInfo[playerid][pFactionMod] && !PlayerInfo[playerid][pFactionDirector] && !PlayerInfo[playerid][pNSB] && PlayerInfo[playerid][pGroup] != GROUP_S9) return AdmErrorMsg;
- if(sscanf(params, "u", player2)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Usage:{FFFFFF} /removefactionban [playerid]");
- PlayerInfo[player2][pFKickTime] = 0;
- new str[128];
- format(str, sizeof(str), "* An admin has granted you permisson to join factions again.");
- SendClientMessage(player2, COLOR_YELLOW, str);
- format(str, sizeof(str), "* You have granted %s permisson to join factions again.", PlayerOOCName(player2));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- return 1;
- }
- CMD:fbantime(playerid, params[])
- {
- if(!PlayerInfo[playerid][pFKickTime]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not faction banned.");
- new timeleft;
- new str[128];
- timeleft = PlayerInfo[playerid][pFKickTime] / 3600000;
- format(str, sizeof(str), "* You have %i playing hours remaining until you can join a faction again.", timeleft);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- return 1;
- }
- CMD:makensb(playerid, params[])
- {
- new giveplayerid;
- if(!PlayerInfo[playerid][pLeader] || PlayerInfo[playerid][pMember] != 2) return AdmErrorMsg;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makensb [playerid/PartOfName]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[giveplayerid][pNSB]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already a member of the NSB.");
- if(PlayerInfo[giveplayerid][pMember] != 2) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} NSB members must be a member of the FBI.");
- new str[128];
- PlayerInfo[giveplayerid][pNSB] = 1;
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been made a member of the NSB.");
- format(str, sizeof(str), "You have made %s a member of the NSB.", PlayerOOCName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:removensb(playerid, params[])
- {
- new giveplayerid;
- if(!PlayerInfo[playerid][pLeader] || PlayerInfo[playerid][pMember] != 2) return AdmErrorMsg;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removensb [playerid/PartOfName]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(!PlayerInfo[giveplayerid][pNSB]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not a member of the NSB.");
- new str[128];
- PlayerInfo[giveplayerid][pNSB] = 0;
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been removed from the NSB.");
- format(str, sizeof(str), "You have removed %s from the NSB.", PlayerOOCName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:drizzywillmakeit(playerid, params[])
- {
- new player, adminlevel;
- if(sscanf(params, "ui", player, adminlevel))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeadmin [playerid/partofname] [admin level]");
- if(!IsPlayerConnected(player))
- return SendClientMessage(playerid, COLOR_GREY, "This player is not connected.");
- printf("AdmCmd: %s has promoted %s to level %d admin.", PlayerOOCName(playerid), PlayerOOCName(player), adminlevel);
- if(adminlevel < 2)
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- else PlayerInfo[playerid][pTag] = NTAG_ADMIN;
- new str[128], dialogstr[512];
- if(adminlevel > PlayerInfo[player][pAdmin])
- {
- format(str, sizeof(str), "You have been promoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have promoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "You have been demoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have demoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(adminlevel >= 1){ //for security code
- format(dialogstr, sizeof(dialogstr), "%s\nPlease enter your personal security key to protect yourself from hackers.\nMake sure you remember this key because you will be asked for this key everytime you login back to your account.\nRefrain from giving this key or your account password to anyone because we won't be responsible for your loss, unless you prove it.", PlayerOOCName(player));
- ShowPlayerDialog(player, DIALOG_SECURITY_CODE, DIALOG_STYLE_INPUT, "Security Key", dialogstr, "Enter", "");
- }
- PlayerInfo[player][pAdmin] = adminlevel;
- if(adminlevel < 1)
- {
- PlayerInfo[player][pAdmin] = 0;
- PlayerInfo[player][pSecKey] = 0;
- gAdminAuthorized[player] = 0;
- format(CustomTag[player], 50, "None");
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- customRankName[player] = false;
- format(customRank[player], 24, "None");
- PlayerInfo[player][pBanAppealer] = 0;
- PlayerInfo[player][pGangModd] = 0;
- PlayerInfo[player][pEventModd] = 0;
- PlayerInfo[player][pComplaintModd] = 0;
- PlayerInfo[player][pShopMod] = 0;
- PlayerInfo[player][pFactionMod] = 0;
- PlayerInfo[player][pGangDirector] = 0;
- PlayerInfo[player][pBizMod] = 0;
- }
- return 1;
- }
- CMD:uninvite(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] > 0)
- {
- new str[128];
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /uninvite [playerid/PartOfName]");
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't uninvite yourself.");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[giveplayerid][pMember] != PlayerInfo[playerid][pMember]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not in your faction.");
- if(PlayerInfo[giveplayerid][pRank] > PlayerInfo[playerid][pRank] && PlayerInfo[giveplayerid][pLeader] == PlayerInfo[playerid][pLeader]) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't kick out fellow leaders.");
- format(str, sizeof(str), "* You have been kicked out of the %s by Leader %s.", GetPlayerFactionName(giveplayerid), PlayerICName(playerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* You are now a civilian again.");
- format(customRank[giveplayerid], 24, "None");
- PlayerInfo[giveplayerid][pHAFakeBadge] = 0;
- PlayerInfo[giveplayerid][pRank] = 0;
- PlayerInfo[giveplayerid][pMember] = 0;
- PlayerInfo[giveplayerid][pRecruiter] = 0;
- PlayerInfo[giveplayerid][pLeader] = 0;
- PlayerInfo[giveplayerid][pPortMDC] = 0;
- PlayerInfo[giveplayerid][pModel] = 20;
- PlayerInfo[giveplayerid][pOnDuty] = 0;
- PlayerInfo[giveplayerid][pRadio] = 0;
- PlayerInfo[giveplayerid][pHandtazer] = 0;
- PlayerInfo[giveplayerid][ptazerGun] = 0;
- PlayerInfo[giveplayerid][pPortMDC] = 0;
- loadedRubberBullets[giveplayerid] = false;
- hasRubberBullets[giveplayerid] = 0;
- if(PlayerInfo[giveplayerid][pJailed] != 3 && PlayerInfo[giveplayerid][pAdminJailed] == 0)
- {
- SetPlayerToTeamColor(giveplayerid);
- SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pModel]);
- PlayerInfo[giveplayerid][pClothes] = 0;
- }
- }
- else
- {
- return AdmErrorMsg;
- }
- return 1;
- }
- CMD:jdr(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_JD && PlayerInfo[playerid][pMember] != FACTION_GOV)
- return SendClientMessage(playerid, COLOR_GREY, "You're not GOV / JD");
- if(isnull(params))
- return SendClientMessage(playerid, COLOR_GREY, "USAGE: /jdr [text]");
- new string[128];
- format(string, sizeof string, "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), params);
- SendJDRadio(GetFactionColour(PlayerInfo[playerid][pMember]), string);
- SetPlayerChatBubble(playerid, string, GetFactionColour(PlayerInfo[playerid][pMember]), 20.0, 15000);
- return 1;
- }
- CMD:r(playerid, params[]) return cmd_radio(playerid, params);
- /*CMD:radio(playerid, params[])
- {
- if(toggedRadio[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't use this if you have it toggled off.");
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, COLOR_GREY, "You can not use this.");
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- // if(PlayerInfo[playerid][pRadio] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have a radio");
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- format(str, sizeof(str), "* %s attempts to reach his radio but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- // Gagged
- if(IsPlayerGagged(playerid)) {
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something into their radio.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg);
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg);
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 1)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(1, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SAPD)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 2)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(2, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SAPD)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 3)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(3, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 4)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(4, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_FMD)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 5)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(5, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_ARMY)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 6)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(6, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_GOV)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 7)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(7, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 8)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(8, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 9)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 10)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(10, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 11)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(11, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 12)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(12, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_DEA)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 13)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(13, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 14)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(14, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SANG)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 15)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(15, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- format(str, sizeof(str), "[/R]** %s %s: %s **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_GEAR_LIGHTPURPLE, str);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(PlayerInfo[playerid][pMember] != 11) {
- format(str, sizeof(str), "[Radio] %s", msg);
- SetPlayerChatBubble(playerid, str, GetFactionColour(PlayerInfo[playerid][pMember]), 30.0, 10000);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/r)adio [radio chat]");
- }
- return 1;
- }
- */
- CMD:radio(playerid, params[])
- {
- if(toggedRadio[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't use this if you have it toggled off."); // ako je radio togged
- if(WatchingTV[playerid] == true) return 1; // ako gleda tv
- if(PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, COLOR_GREY, "You can not use this."); // ako nije u nikojem factionu
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- // if(PlayerInfo[playerid][pRadio] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have a radio");//disabled
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");//idk
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");//ako je jammer onda ne moze pricat
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE) // ako je crko da ne moze abuse /r
- {
- format(str, sizeof(str), "* %s attempts to reach his radio but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- // Gagged
- if(IsPlayerGagged(playerid))
- { // pise gore
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something into their radio.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- foreach( new i: Player )//bug system
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i)) //ako je bugged
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))//nmp za koji je ovo kurac vjerujem da ako nisi u blizini tog playera
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg); //da posalje /bugged msg
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg); //to je napr /rlow ili sta ja znam
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(1, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )//definiram sve igrace
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSAPDListen])//ako je igrac u S9 i ako slusa PD /radio
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str); // da posalje samo njemu MSG, sto vrjedi ako vise igraca slusa /radio, to je fixalo spam /r
- }
- }
- //FakeRadioSAPD(10, TEAM_BLUE_COLOR, str); //disabled da ne spamuje
- }
- if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(2, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFBIListen])
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- //FakeRadioFBI(10, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(3, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pLSSDListen])
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- //FakeRadioLSSD(10, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(4, COLOR_DOCTOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFMDListen])
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, COLOR_DOCTOR, str);
- }
- }
- //FakeRadioFMD(10, COLOR_DOCTOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(5, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(6, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pGOVListen])
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- //FakeRadioGOV(10, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(7, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(8, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(9, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(10, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(11, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(12, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(13, TEAM_BLUE_COLOR, str);
- }
- if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(14, COLOR_SANG, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSANGListen])
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendClientMessage(i, COLOR_SANG, str);
- }
- }
- //FakeRadioSANG(14, COLOR_SANG, str);
- }
- if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFactionMessage(15, TEAM_BLUE_COLOR, str);
- }
- format(str, sizeof(str), "[/R]** %s %s: %s **", GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_GEAR_LIGHTPURPLE, str);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(PlayerInfo[playerid][pMember] != 11) {
- format(str, sizeof(str), "[Radio] %s", msg);
- SetPlayerChatBubble(playerid, str, GetFactionColour(PlayerInfo[playerid][pMember]), 30.0, 10000);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/r)adio [radio chat]");
- }
- return 1;
- }
- CMD:fr(playerid, params[]) return cmd_fakeradio(playerid, params);
- CMD:fakeradio(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] > 10 || PlayerInfo[playerid][pGroup] < 10) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} Not authorized, autistic retard..");
- new msg[128];
- new str[1024];
- if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(f)ake(r)adio [message]");
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pSAPDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_SAPD, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSAPDListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSAPDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pFBIListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_FBI, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFBIListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFBIListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pLSSDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_SASD, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pLSSDListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pLSSDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pFMDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_FMD, COLOR_DOCTOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFMDListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pFMDListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, COLOR_DOCTOR, str);
- }
- }
- }
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pSANGListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_SANG, COLOR_SANG, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSANGListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pSANGListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, COLOR_SANG, str);
- }
- }
- }
- if(PlayerInfo[playerid][pGroup] == 10 && PlayerInfo[playerid][pGOVListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown: %s **", msg);
- SendFactionMessage(FACTION_GOV, TEAM_BLUE_COLOR, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pGOVListen] == 0)
- {
- }
- else if(PlayerInfo[i][pGroup] == 10 && PlayerInfo[i][pGOVListen] == 1)
- {
- format(str, sizeof(str), "** S9 Agent Unknown[%s]: %s **", PlayerOOCName(playerid), msg);
- SendClientMessage(i, TEAM_BLUE_COLOR, str);
- }
- }
- }
- return 1;
- }
- /*CMD:changefreq(playerid,params[])
- {
- if(PlayerInfo[playerid][pGroup] > 10 || PlayerInfo[playerid][pGroup] < 10) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} Not authorized, autistic retard..");
- if(isnull(params))
- {
- return SendClientMessage(playerid,COLOR_GREY,"{00BFFF}Usage:{FFFFFF} /changefreq [name] [NONE, SAPD, FMD, FBI, LSSD, SANG, GOV]");
- }
- if(!strcmp(params,"sapd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening SAPD");
- }
- else if(!strcmp(params,"fbi",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening FBI");
- }
- else if(!strcmp(params,"none",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- SendClientMessage(playerid, COLOR_GREY, "Listening None");
- }
- else if(!strcmp(params,"lssd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening LSSD");
- }
- else if(!strcmp(params,"sang",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening SANG");
- }
- else if(!strcmp(params,"gov",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening GOV");
- }
- //else if(!strcmp(params,"san",true))
- // {
- // PlayerInfo[playerid][pFMDListen] = 0;
- // PlayerInfo[playerid][pFBIListen] = 0;
- // PlayerInfo[playerid][pSANListen] = 0;
- // PlayerInfo[playerid][pGOVListen] = 0;
- // PlayerInfo[playerid][pSANGListen] = 0;
- // PlayerInfo[playerid][pLSSDListen] = 0;
- // PlayerInfo[playerid][pSAPDListen] = 0;
- // PlayerInfo[playerid][pSANListen] = 1;
- // SendClientMessage(playerid, COLOR_GREY, "Listening SAN");
- // }
- else if(!strcmp(params,"fmd",true))
- {
- PlayerInfo[playerid][pFMDListen] = 0;
- PlayerInfo[playerid][pFBIListen] = 0;
- PlayerInfo[playerid][pSANListen] = 0;
- PlayerInfo[playerid][pGOVListen] = 0;
- PlayerInfo[playerid][pSANGListen] = 0;
- PlayerInfo[playerid][pLSSDListen] = 0;
- PlayerInfo[playerid][pSAPDListen] = 0;
- PlayerInfo[playerid][pFMDListen] = 1;
- SendClientMessage(playerid, COLOR_GREY, "Listening FMD");
- }
- return 1;
- }*/
- CMD:rlow(playerid, params[])
- {
- if(toggedRadio[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't use this if you have it toggled off.");
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, COLOR_GREY, "You can not use this.");
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- format(str, sizeof(str), "* %s attempts to reach his radio but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- // Gagged
- if(IsPlayerGagged(playerid)) {
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something into their radio.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg);
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg);
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- // Cut down about 100 lines here, use functions for small changes such as colour. DRY - Don't Repeat Yourself.
- if(PlayerInfo[playerid][pMember] == 1)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(1, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SAPD)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 2)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(2, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SAPD)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 3)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(3, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 4)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(4, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_FMD)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 5)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(5, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_ARMY)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 6)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(6, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_GOV)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 7)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(7, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 8)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(8, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 9)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 10)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(10, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 11)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(11, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 12)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(12, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_DEA)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 13)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(13, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(PlayerInfo[playerid][pMember] == 14)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(14, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9 && RadioFrequency[i] == FACTION_SANG)
- {
- format(str, sizeof(str), "** %s %s (low) %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendFakeRadioMessage(GROUP_S9, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 15)
- {
- format(str, sizeof(str), "** %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendRadioMessage(15, GetFactionColour(PlayerInfo[playerid][pMember]), str);
- }
- if(!IsPlayerInAnyVehicle(playerid))
- {
- format(str, sizeof(str), "(Radio) %s (low): %s", PlayerICName(playerid), msg);
- ProxDetector(3.0, playerid, str, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
- }
- format(str, sizeof(str), "/rlow %s %s: %s **", GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendShadowMsg(COLOR_GEAR_LIGHTPURPLE, str);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used /rlow: %s", PlayerICName(playerid), msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- else SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /rlow [radio chat]");
- return 1;
- }
- CMD:i(playerid, params[])
- {
- if(PlayersChannel[playerid] != 999)
- {
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You cannot speak, you have been silenced.");
- return 1;
- }
- new msg[128];
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** IRC %s: %s **", name, msg);
- SendIRCMessage(PlayersChannel[playerid], COLOR_YELLOW2, str);
- format(str, sizeof(str), "** IRC %s: %s **", name, msg);
- SendShadowMsg(COLOR_YELLOW2, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /i [irc chat]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not in an IRC Channel.");
- }
- return 1;
- }
- CMD:wt(playerid, params[])
- {
- if(PlayerInfo[playerid][pWTc] > 0 && PlayerInfo[playerid][pWTc] < 1000000)
- {
- if(WTOnline[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Walkie talkie is currently turned off, use /togwt.");
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(PlayerInfo[playerid][pWT] != 1) return SendClientMessage(playerid, COLOR_GREY, "You don`t have a Walkie Talkie.");
- if(WTOnline[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "Your Walkie Talkie is Off.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- new str[128];
- format(str, sizeof(str), "* %s attempts to reach his walkie talkie but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- // Gagged
- if(IsPlayerGagged(playerid)) {
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something into their radio.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- new channel = PlayerInfo[playerid][pWTc];
- new name[24];
- new str[128];
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg);
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg);
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** Walkie Talkie %s: %s **", name, msg);
- SendWTMessage(channel, 0x638F9CFF, str);
- SendShadowMsg(COLOR_GREEN, str);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- format(str, sizeof(str), "[Radio] %s", msg);
- SetPlayerChatBubble(playerid, str, 0x638F9CFF, 30.0, 10000);
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used their walkie-talkie: %s", name, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /wt [message]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your walkie talkie hasn't been tuned to a channel.");
- }
- return 1;
- }
- CMD:wtlow(playerid, params[])
- {
- if(PlayerInfo[playerid][pWTc] > 0 && PlayerInfo[playerid][pWTc] < 1000000)
- {
- if(WTOnline[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Walkie talkie is currently turned off, use /togwt.");
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(PlayerInfo[playerid][pWT] != 1) return SendClientMessage(playerid, COLOR_GREY, "You don`t have a Walkie Talkie.");
- if(WTOnline[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "Your Walkie Talkie is Off.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- new str[128];
- format(str, sizeof(str), "* %s attempts to reach his walkie talkie but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- // Gagged
- if(IsPlayerGagged(playerid)) {
- SendClientMessage(playerid, COLOR_GREY, "The gag in your mouth makes you unable to speak...");
- new gagStr[128];
- format(gagStr, sizeof(gagStr), "* %s tries to mumble something into their radio.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, gagStr, COLOR_PURPLE, 20.0, 15000);
- return 1;
- }
- new str[128];
- new channel = PlayerInfo[playerid][pWTc];
- new name[24];
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 20.0, x[0], x[1], x[2]))
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerOOCName(i), msg);
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerOOCName(i), msg);
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** Walkie Talkie %s (low): %s **", name, msg);
- SendWTMessage(channel, 0x638F9CFF, str);
- if(!IsPlayerInAnyVehicle(playerid))
- {
- format(str, sizeof(str), "(Walkie Talkie) %s (low): %s", PlayerICName(playerid), msg);
- ProxDetector(3.0, playerid, str, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
- }
- if(beingSpectatedID[playerid] != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s used their walkie-talkie: %s", name, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /wtlow [message]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your walkie talkie hasn't been tuned to a channel.");
- }
- return 1;
- }
- CMD:t(playerid, params[]) return cmd_sms(playerid, params);
- CMD:sms(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst you're in prison.");
- if(!PhoneOffline[playerid])
- {
- new number, message[128];
- if(sscanf(params, "is[128]", number, message)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sms [phone number] [message]");
- SendMessage(playerid, number, message);
- if(onCellPhone[playerid] == true)
- {
- cmd_pickup(playerid, "");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your cellphone is currently turned off.");
- }
- return 1;
- }
- CMD:reply(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't use this at this time.");
- if(PhoneOffline[playerid]) return SendClientMessage(playerid, COLOR_GRAD2, "Your cellphone is currently turned off.");
- if(ReplyTo[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "Nobody SMSed you.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /re(ply) [message]");
- SendMessage(playerid, ReplyTo[playerid], params);
- if(onCellPhone[playerid] == true) cmd_pickup(playerid, "");
- return 1;
- }
- CMD:re(playerid, params[]) return cmd_reply(playerid, params);
- CMD:d(playerid, params[]) return cmd_departments(playerid, params);
- CMD:togradio(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 0)
- {
- if(toggedRadio[playerid])
- {
- toggedRadio[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "The faction radio chat will now show for you.");
- }
- else
- {
- toggedRadio[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "The faction radio chat will no longer show for you.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to use this.");
- return 1;
- }
- CMD:togdept(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pMember] <= 7 || PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- if(toggedDept[playerid])
- {
- toggedDept[playerid] = false;
- SendClientMessage(playerid, COLOR_YELLOW, "The department radio chat will now show for you.");
- }
- else
- {
- toggedDept[playerid] = true;
- SendClientMessage(playerid, COLOR_YELLOW, "The department radio chat will no longer show for you.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not allowed to use this.");
- return 1;
- }
- /*************************************
- COMMANDS S9
- *************************************/
- /*
- Command: /fakedepartments
- Parameters:
- msg: message to send
- Description:
- Sends a department wide message to all factions
- */
- CMD:fakedepartments(playerid, params[]) {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- new msg[128];
- if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/fd) [S9 department chat]");
- new str[128];
- format(str, sizeof(str), "** [Sector 9] %s %s: %s **", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName], msg);
- for(new i=1; i <= 7; i++) {
- SendDepartmentRadioMessage(i, COLOR_DCHAT, str);
- }
- S9DepartmentMessage(COLOR_DCHAT, str);
- return 1;
- }
- CMD:fd(playerid, params[]) return cmd_fakedepartments(playerid, params);
- ShowS9BadgeMenu(playerid)
- {
- new dialogStr[256];
- format(dialogStr, sizeof(dialogStr), "Item\tValue\nBadge Name:\t%s\nBadge Faction\t%s\nBadge Weapons\t%s",
- PlayerInfo[playerid][pS9BadgeName], S9BadgeFaction, S9BadgeWeapons);
- ShowPlayerDialog(playerid, DIALOG_S9_EDIT_BADGE, DIALOG_STYLE_TABLIST_HEADERS, "Edit your S9 Badge", dialogStr, "Edit", "Close");
- return 1;
- }
- /*
- Command:/edits9badge
- Parameters:
- bName: Badge name. Player's badge name.
- bWeapons: Global faction weapons.
- */
- CMD:edits9badge(playerid, params[]) {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- ShowS9BadgeMenu(playerid);
- return 1;
- }
- /*
- Command: /shows9badge
- Parameters:
- player: player to show badge to
- Description:
- Used to show an S9 badge to other players
- */
- CMD:shows9badge(playerid, params[]) {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9)
- return 1;
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /shows9badge [player]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, targetid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not near this person.");
- if(strlen(PlayerInfo[playerid][pS9BadgeName]) < 1 || strlen(S9BadgeFaction) < 1)
- return SendClientMessage(playerid, COLOR_GREY, "Please use /edits9badge");
- // Show the badge
- SendClientMessage(targetid, COLOR_YELLOW, "[Badge Information]");
- new str[128];
- format(str, sizeof(str), "[%s - %s]", PlayerInfo[playerid][pS9BadgeName], S9BadgeFaction);
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[Allowed Weapons]: %s", S9BadgeWeapons);
- SendClientMessage(targetid, COLOR_YELLOW, str);
- // Action
- if(targetid != playerid) {
- format(str, sizeof(str), "* %s discreetly shows something to %s.", PlayerICName(playerid), PlayerICName(targetid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 5.0, 5000);
- format(str, sizeof(str), "> %s %s", PlayerICName(playerid), params);
- SendClientMessage(playerid, COLOR_PURPLE, str);
- }
- else {
- SendClientMessage(playerid, COLOR_PURPLE, "* You quickly look at your badge before putting it away.");
- }
- return 1;
- }
- /*
- Command: /fire
- Parameters:
- kick / kill: kicks players from faction or faction kills them
- player: player to kick / kill
- Description:
- Faction kill or kick to remove people from factions.
- */
- CMD:fire(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9)
- return AdmErrorMsg;
- if(PlayerInfo[playerid][pGroupRank] < 0)
- return SendClientMessage(playerid, COLOR_GREY, "Only R2+ may use this.");
- new kicktype[5], giveplayerid;
- new str[128];
- if(sscanf(params, "s[20]u", kicktype, giveplayerid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fire [kill/kick] [player]");
- if(giveplayerid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can't fire yourself.");
- if(!IsPlayerConnected(giveplayerid))
- return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- if( PlayerInfo[giveplayerid][pMember] != FACTION_SAPD &&
- PlayerInfo[giveplayerid][pMember] != FACTION_FBI &&
- PlayerInfo[giveplayerid][pMember] != FACTION_FMD &&
- PlayerInfo[giveplayerid][pMember] != FACTION_ARMY &&
- PlayerInfo[giveplayerid][pMember] != FACTION_GOV &&
- PlayerInfo[giveplayerid][pMember] != FACTION_SANG
- ) return SendClientMessage(playerid, COLOR_GREY, "You cannot fire this person from their faction.");
- if(strcmp(kicktype, "kick", true) == 0)
- {
- format(str, sizeof(str), "* You have been kicked out of the %s by S9.", GetPlayerFactionName(giveplayerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "Papa Bear: %s %s has fired %s from %s.", RealS9Rank(playerid), PlayerOOCName(playerid), PlayerOOCName(giveplayerid), GetPlayerFactionName(giveplayerid));
- SendGroupMessage(GROUP_S9, COLOR_S9, str);
- }
- else if(strcmp(kicktype, "kill", true) == 0)
- {
- PlayerInfo[giveplayerid][pFKickTime] = 60 * 3600000; // 60 hours playing hours
- format(str, sizeof(str), "* You have been faction killed by S9.");
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* If you feel this is an error or abuse, please create a forum related complaint.");
- SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* You can use /fbantime to see how long you have left until you can join a faction again.");
- format(str, sizeof(str), "Papa Bear: %s %s has faction-killed %s.", RealS9Rank(playerid), PlayerOOCName(playerid), PlayerOOCName(giveplayerid));
- SendGroupMessage(GROUP_S9, COLOR_S9, str);
- }
- else return cmd_fire(playerid, "");
- format(customRank[giveplayerid], 24, "None");
- PlayerInfo[giveplayerid][pHAFakeBadge] = 0;
- PlayerInfo[giveplayerid][pRank] = 0;
- PlayerInfo[giveplayerid][pMember] = 0;
- PlayerInfo[giveplayerid][pLeader] = 0;
- PlayerInfo[giveplayerid][pModel] = 20;
- PlayerInfo[giveplayerid][pOnDuty] = 0;
- PlayerInfo[giveplayerid][pRadio] = 0;
- PlayerInfo[giveplayerid][pHandtazer] = 0;
- PlayerInfo[giveplayerid][ptazerGun] = 0;
- PlayerInfo[giveplayerid][pPortMDC] = 0;
- loadedRubberBullets[giveplayerid] = false;
- hasRubberBullets[giveplayerid] = 0;
- if(PlayerInfo[giveplayerid][pJailed] != 3 && PlayerInfo[giveplayerid][pAdminJailed] == 0)
- {
- SetPlayerToTeamColor(giveplayerid);
- SetPlayerSkin(giveplayerid, 1);
- PlayerInfo[giveplayerid][pClothes] = 0;
- }
- ClearGuns(giveplayerid);
- return 1;
- }
- /*
- Command: /s9
- Description:
- Access to S9 armoury
- */
- CMD:s9(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9)
- return 1;
- if(!IsPlayerNearSector9HQ(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
- ShowS9Armory(playerid);
- return 1;
- }
- CMD:s9uc(playerid, params[])
- return cmd_hitmanundercover(playerid, params);
- CMD:s9nametag(playerid)
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- if(usingNameTag[playerid] == 1)
- {
- DestroyDynamic3DTextLabel(nametagText[playerid]);
- nametagText[playerid] = Text3D:INVALID_3DTEXT_ID;
- usingNameTag[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have disabled your S9 nametag");
- }
- else if(usingNameTag[playerid] == 0)
- {
- nametagText[playerid] = CreateDynamic3DTextLabel("\nHomeland Agent", COLOR_BLACK, 0.0, 0.0, 0.0 +0.32, 20.0, playerid, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* S9 nametag enabled.");
- usingNameTag[playerid] = 1;
- }
- return 1;
- }
- //*********************************************
- CMD:departments(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(toggedDept[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't use this if you have it toggled off.");
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Radio signal has been jammed.");
- if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) return SendClientMessage(playerid, COLOR_GREY, "Use /(f)ake(d)epartments instead.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- new str[128];
- format(str, sizeof(str), "* %s attempts to reach his radio but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- if(DptBanned[0] && PlayerInfo[playerid][pMember] == FACTION_SAPD || DptBanned[1] && PlayerInfo[playerid][pMember] == FACTION_FBI ||
- DptBanned[2] && PlayerInfo[playerid][pMember] == FACTION_FMD || DptBanned[3] && PlayerInfo[playerid][pMember] == FACTION_GOV ||
- DptBanned[4] && PlayerInfo[playerid][pMember] == FACTION_SANG || DptBanned[5] && PlayerInfo[playerid][pMember] == FACTION_NEWS)
- return SendClientMessage(playerid, -1, "{FF0000}WARNING:{FFFFFF} The homeland security has {FF0000}restricted{FFFFFF} your department radio communications!");
- new msg[128];
- new str[5000];
- if(!sscanf(params, "s[128]", msg))
- {
- if(!(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pMember] <= 7 || IsAJudge(playerid) || IsACop(playerid) || PlayerInfo[playerid][pMember] == FACTION_SANG)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this channel.");
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWire] == 1 && !CheckForJammer(playerid) && !CheckForJammer(i))
- {
- new Float: x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- if(IsPlayerInRangeOfPoint(i, 8.0, x[0], x[1], x[2]))
- {
- if(i == playerid)
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s (radio): %s", PlayerICName(i), msg);
- }
- else
- {
- format(str, sizeof(str), "{8D8DFF}(BUGGED){AFAFAF} %s's surroundings (radio): %s", PlayerICName(i), msg);
- }
- if(PlayerInfo[i][pMember] != 2) // if player isn't FBI, send to both FBI and S9
- {
- SendBuggedMessage(COLOR_ORANGE, str);
- SendS9BuggedMessage(COLOR_ORANGE, str);
- }
- else SendS9BuggedMessage(COLOR_ORANGE, str); // if player is FBI, send to S9 only, this is to avoid FBI figuring out
- // that s9 bugged them
- }
- }
- }
- if(PlayerInfo[playerid][pBadgeNumber] != 0) format(str, sizeof(str), "** [%s] %s %s (%d): %s **", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), PlayerInfo[playerid][pBadgeNumber], msg);
- // else if(PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) format(str, sizeof(str), "** [S9] %s %s: %s **", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName], msg);
- else format(str, sizeof(str), "** [%s] %s %s: %s **", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), msg);
- SendDepartmentRadioMessage(1, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(2, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(3, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(4, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(5, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(6, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(7, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(11, COLOR_DCHAT, str);
- SendDepartmentRadioMessage(14, COLOR_DCHAT, str);
- S9DepartmentMessage(COLOR_DCHAT, str);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(PlayerInfo[playerid][pMask] != 2)
- {
- format(str, sizeof(str), "[Radio] %s", msg);
- SetPlayerChatBubble(playerid, str, COLOR_DCHAT, 30.0, 10000);
- }
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pID] == 7378 && PlayerInfo[i][pShadowON] == 1 || PlayerInfo[i][pID] == 7619 && PlayerInfo[i][pMaryON] == 1)
- {
- format(str, sizeof(str), "** [%s] %s %s: %s **", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid), msg);
- SendShadowMsg(COLOR_GREEN, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/d)epartments [department chat]");
- }
- return 1;
- }
- //==============================[TOGGLE CHATS]==================================
- CMD:togvc(playerid, params[]) return cmd_togvipchat(playerid, params);
- CMD:togvipchat(playerid, params[])
- {
- if(VIPChatTog[playerid] == 0)
- {
- VIPChatTog[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD1, "** VIP Chat disabled.");
- }
- else
- {
- VIPChatTog[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD1, "** VIP Chat enabled.");
- }
- return 1;
- }
- CMD:togooc(playerid, params[])
- {
- if(!gOoc[playerid])
- {
- gOoc[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "OOC chat channel disabled.");
- }
- else
- {
- gOoc[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "OOC chat channel enabled.");
- }
- return 1;
- }
- CMD:fdia93k(playerid, params[])
- {
- if(!globall[playerid])
- {
- globall[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Global OOC chat channel disabled.");
- }
- else
- {
- globall[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Global OOC chat channel enabled.");
- }
- return 1;
- }
- CMD:tognewbie(playerid, params[])
- {
- if(!PlayerInfo[playerid][pTogNewbie])
- {
- PlayerInfo[playerid][pTogNewbie] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Newbie chat channel disabled.");
- }
- else
- {
- PlayerInfo[playerid][pTogNewbie] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Newbie chat channel enabled.");
- }
- return 1;
- }
- CMD:tognews(playerid, params[])
- {
- if(!gNews[playerid])
- {
- gNews[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "News chat channel disabled.");
- }
- else
- {
- gNews[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "News chat channel enabled.");
- }
- return 1;
- }
- CMD:togfam(playerid, params[])
- {
- if(!gFam[playerid])
- {
- gFam[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Family chat channel disabled.");
- }
- else
- {
- gFam[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Family chat channel enabled.");
- }
- return 1;
- }
- CMD:togwhisper(playerid, params[])
- {
- if(!HidePM[playerid])
- {
- HidePM[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Whisper chat channel disabled.");
- }
- else
- {
- HidePM[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Whisper chat channel enabled.");
- }
- return 1;
- }
- CMD:togphone(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pPnumber] == 0)
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone.");
- if(!PhoneOffline[playerid])
- {
- PhoneOffline[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Your Phone is offline.");
- format(str, sizeof(str), "* %s toggles their phone off.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s toggles their phone off.", PlayerICName(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- }
- else
- {
- PhoneOffline[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Your Phone is online.");
- format(str, sizeof(str), "* %s toggles their phone on.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s toggles their phone on.", PlayerICName(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- }
- return 1;
- }
- CMD:togfc(playerid, params[]) return cmd_togfamedchat(playerid, params);
- CMD:togfamedchat(playerid, params[])
- {
- if(FamedChatTog[playerid] == 0)
- {
- FamedChatTog[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD1, "** Famed Chat disabled.");
- }
- else
- {
- FamedChatTog[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD1, "** Famed Chat enabled.");
- }
- return 1;
- }
- CMD:togwt(playerid, params[])
- {
- if(!WTOnline[playerid])
- {
- WTOnline[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Your Walkie Talkie is now turned off.");
- }
- else
- {
- WTOnline[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Your Walkie Talkie now is turned on.");
- }
- return 1;
- }
- CMD:toghc(playerid, params[]) return cmd_toghelper(playerid, params);
- CMD:toghelper(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 1)
- {
- if(!gHelperCh[playerid])
- {
- gHelperCh[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Helper chat channel Disabled.");
- }
- else
- {
- gHelperCh[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Helper chat channel Enabled.");
- }
- }
- else SendClientMessage(playerid, COLOR_GRAD2, "You are not a helper.");
- return 1;
- }
- CMD:togtc(playerid, params[]) return cmd_togtester(playerid, params);
- CMD:togtester(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] >= 1)
- {
- if(!gTesterCh[playerid])
- {
- gTesterCh[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Tester chat channel disabled.");
- }
- else
- {
- gTesterCh[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Tester chat channel enabled.");
- }
- }
- else SendClientMessage(playerid, COLOR_GRAD2, "You are not a Tester.");
- return 1;
- }
- CMD:togautochat(playerid, params[])
- {
- if(autoChat[playerid])
- {
- autoChat[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Automatic chat animations disabled.");
- }
- else
- {
- autoChat[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Automatic chat animations enabled.");
- }
- return 1;
- }
- CMD:togradios(playerid, params[])
- {
- if(disabledRadios[playerid])
- {
- disabledRadios[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Radios enabled.");
- }
- else
- {
- disabledRadios[playerid] = 1;
- streamingFromBoombox[playerid] = -1;
- streamingFromVehicle[playerid] = -1;
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid, COLOR_GRAD2, "Radios disabled.");
- }
- return 1;
- }
- CMD:tognames(playerid, params[])
- {
- if(namesOff[playerid])
- {
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pMask] == 0) //not wearing a mask
- {
- ShowPlayerNameTagForPlayer(playerid, i, false);
- }
- }
- namesOff[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Nametags disabled.");
- }
- else
- {
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pMask] == 0) //not wearing a mask
- {
- ShowPlayerNameTagForPlayer(playerid, i, true);
- }
- }
- namesOff[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Nametags enabled.");
- }
- return 1;
- }
- //==============================[ADMINS CMDS]===================================
- //============================[Sadmin CMDS]==================================
- CMD:lastbans(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 0) return AdmErrorMsg;
- new str[128];
- format(str, sizeof(str), "1. %s | %s | %s", Ban1Name, Ban1gpci, Ban1ip);
- SendClientMessage(playerid, COLOR_WHITE, str);
- format(str, sizeof(str), "2. %s | %s | %s", Ban2Name, Ban2gpci, Ban2ip);
- SendClientMessage(playerid, COLOR_WHITE, str);
- format(str, sizeof(str), "3. %s | %s | %s", Ban3Name, Ban3gpci, Ban3ip);
- SendClientMessage(playerid, COLOR_WHITE, str);
- format(str, sizeof(str), "4. %s | %s | %s", Ban4Name, Ban4gpci, Ban4ip);
- SendClientMessage(playerid, COLOR_WHITE, str);
- format(str, sizeof(str), "5. %s | %s | %s", Ban5Name, Ban5gpci, Ban5ip);
- SendClientMessage(playerid, COLOR_WHITE, str);
- return 1;
- }
- CMD:skick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new giveplayerid, reason[128];
- new str[128];
- if(!sscanf(params, "us[128]", giveplayerid, reason))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was skicked, reason: Attempting to silent kick a higher admin.", PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- KickEx(playerid);
- return 1;
- }
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was skicked by %s, reason: %s.", PlayerICName(giveplayerid), PlayerICName(playerid), reason);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}You have been kicked, reason: %s", reason);
- SendClientMessage(giveplayerid, -1, str);
- KickEx(giveplayerid);
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /skick [playerid/PartOfName] [reason]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:sban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new giveplayerid, reason[128];
- new str[128];
- if(!sscanf(params, "us[128]", giveplayerid, reason))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /sban spam.", PlayerName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/sban spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to ban a higher admin.", PlayerName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "attempting to ban a higher admin.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pID] == 7378 || PlayerInfo[giveplayerid][pID] == 7619){ SendClientMessage(playerid, COLOR_GREY, "Nice try motherfucker"); Kick(playerid); return 1;}
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was sbanned by %s, reason: %s", PlayerName(giveplayerid), PlayerName(playerid), reason);
- ABroadCast(COLOR_WHITE, str, 1);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- BanAccount(giveplayerid, playerid, reason); //log before banning the account
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sban [playerid/PartOfName] [reason]");
- }
- }
- else
- {
- return AdmErrorMsg;
- }
- return 1;
- }
- CMD:sendtols(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid, p =1;
- new str[128];
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sendtols [playerid/name]");
- if(PlayerInfo[playerid][pAdmin] < PlayerInfo[targetid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to send your higher.");
- if(PlayerInfo[targetid][pJailTime] > 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error{FFFFFF}: That player is in IC/OOC prison.");
- {
- Teleport(targetid, 1538.1589,-1674.6854,13.5469, 0.0, 0, 0, p);
- format(str, sizeof(str), "Sent to ~b~San Andreas Police Department~w~.");
- displayCenterHUDInfo(targetid, str, 8); //display for 8 seconds
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has sent %s to \"San Andreas Police Department\"", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- CMD:gotoint(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pMapper] >= 3)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- ShowInteriorDialog(playerid);
- }
- return 1;
- }
- CMD:gotocoords(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pMapper] >= 3)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- return 1;
- }
- new int, Float:x, Float:y, Float:z;
- new str[128];
- if(!sscanf(params, "ifff", int, x, y, z))
- {
- format(str, sizeof(str), "You have been teleported to interior %d at x:%f, y:%f, z:%f.", int, x, y, z);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(playerid, int);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotocoords [interiorid] [x] [y] [z]");
- }
- return 1;
- }
- CMD:gotoid(playerid, params[]) return cmd_goto(playerid, params);
- CMD:goto(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- if(PlayerInfo[playerid][pAdmin] == 1 && !ADuty[playerid]) return SendClientMessage(playerid, COLOR_GRAD2, "You are not on duty.");
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new tempstr[128];
- if(!sscanf(params, "s[128]", tempstr))
- {
- new
- p =1,
- Float:a = GetPlayerFacingAngle(playerid, a),
- destination[64] = " ",
- lookupid = ReturnUser(tempstr);
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) p =0;
- if(lookupid != INVALID_PLAYER_ID)
- {
- if(lookupid != playerid)
- {
- if(!gPlayerLogged[lookupid])
- return SendClientMessage(playerid, COLOR_GRAD2, "That player hasn't spawned yet.");
- if(GetPlayerState(lookupid) == PLAYER_STATE_SPECTATING)
- return SendClientMessage(playerid, COLOR_GRAD2, "That player is spectating someone.");
- }
- if(lookupid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't teleport to yourself.");
- new Float:x, Float:y, Float:z, i = GetPlayerInterior(lookupid), vvvv = GetPlayerVirtualWorld(lookupid);
- if(IsPlayerInAnyVehicle(lookupid))
- {
- GetVehicleZAngle(GetPlayerVehicleID(lookupid), a);
- }
- else
- {
- GetPlayerFacingAngle(lookupid, a);
- }
- GetPlayerPos(lookupid, x, y, z);
- Teleport(playerid, x, y +2, z, a, i, vvvv, p);
- destination = PlayerICName(lookupid);
- }
- else if(!strcmp(tempstr, "SAPD", true) || !strcmp(tempstr, "ls", true))
- {
- destination = "San Andreas Police Department";
- Teleport(playerid, 1538.1589,-1674.6854,13.5469, a, 0, 0, p);
- }
- else if( !strcmp(tempstr, "garage", true ) ) {
- destination = "Los Santos Garage (/vupgrade point)";
- Teleport(playerid, 2327.1663,-1991.7339,17.4816, a, 0, 0, p);
- }
- else if( !strcmp(tempstr, "impound", true ) ) {
- destination = "Los Santos Garage (/vupgrade point)";
- Teleport(playerid, 2262.3572,-2132.5195,13.5469, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "int1", true))
- {
- if(strcmp(PlayerICName(playerid), "Marcus", true) == 0)
- {
- destination = "Marcus' Room";
- Teleport(playerid, 1492.91, -1635.93, 949.16, 270.0, 1, 0, p);
- return 1;
- }
- else
- {
- destination = "Interior 1";
- Teleport(playerid, 1411.1451, -0.5155, 1000.9236, a, 1, 0, p);
- }
- }
- else if(!strcmp(tempstr, "marcsroom", true))
- {
- destination = "Marcus' Room";
- Teleport(playerid, 1492.91, -1635.93, 949.16, 270.0, 1, 0, p);
- }
- else if(!strcmp(tempstr, "interior1", true))
- {
- destination = "Interior 1";
- Teleport(playerid, 1411.1451, -0.5155, 1000.9236, a, 1, 0, p);
- }
- else if(!strcmp(tempstr, "gym", true))
- {
- destination = "Los Santos GYM";
- Teleport(playerid, 2225.4001, -1724.4464, 13.5632, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "lsair", true))
- {
- destination = "Los Santos Airport";
- Teleport(playerid, 1934.9127, -2290.6362, 13.5469, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sfair", true) || !strcmp(tempstr, "sf", true))
- {
- destination = "San Fierro Airport";
- Teleport(playerid, -1417.0, -295.8, 14.1, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "lvair", true) || !strcmp(tempstr, "lv", true))
- {
- destination = "Las Venturas Airport";
- Teleport(playerid, 1699.2, 1435.1, 10.7, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "jet", true))
- {
- destination = "private jet";
- Teleport(playerid, 1.71875, 30.4062, 1200.34, a, 1, 0, 0);
- }
- else if(!strcmp(tempstr, "chiliad", true))
- {
- destination = "Mt. Chiliad";
- Teleport(playerid, -2317.5325, -1644.9664, 483.7031, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "area51", true))
- {
- destination = "Area 51";
- Teleport(playerid, 202.1886, 1881.4122, 17.2199, 37.8779, 0, 0, p);
- }
- else if(!strcmp(tempstr, "airstrip", true))
- {
- destination = "Desert Airstrip";
- Teleport(playerid, 357.5273, 2513.8701, 16.5856, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "skyscraper", true) || !strcmp(tempstr, "sky", true))
- {
- destination = "the Skyscraper";
- Teleport(playerid, 1543.9886, -1353.7587, 329.4735 +20, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "bayside", true))
- {
- destination = "Bayside Heliport";
- Teleport(playerid, -2252.2944, 2335.5396, 4.8125, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "underwater", true) || !strcmp(tempstr, "under", true))
- {
- destination = "under the sea";
- Teleport(playerid, -1005.3044, 657.4559, -39.0847, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "bank", true))
- {
- destination = "The Bank";
- Teleport(playerid, 1462.395751, -1016.391174, 25.84375, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "pier", true))
- {
- destination = "the fishing pier";
- Teleport(playerid, 364.9920, -2059.7288, 15.3990, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "battlefield", true) || !strcmp(tempstr, "battle", true))
- {
- destination = "the battlefield";
- Teleport(playerid, -972.4957, 1060.9830, 1345.6690, a, 10, 0, p);
- }
- else if(!strcmp(tempstr, "dam", true))
- {
- destination = "the Sherman Dam";
- Teleport(playerid, -715.0000, 2062.0000, 60.0000, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "bloodbowl", true))
- {
- destination = "Bloodbowl Arena";
- Teleport(playerid, -1394.5928, 996.4797, 1033.8864, a, 15, 0, p);
- }
- else if(!strcmp(tempstr, "8track", true))
- {
- destination = "8-Track Stadium";
- Teleport(playerid, -1406.3815, -262.7644, 1043.4290, 346.8336, 7, 0, p);
- }
- else if(!strcmp(tempstr, "dirtbike", true))
- {
- destination = "Dirtbike Stadium";
- Teleport(playerid, -1436.2065, -642.5217, 1049.5261, 167.3703, 4, 0, p);
- }
- else if(!strcmp(tempstr, "kickstart", true))
- {
- destination = "Kickstart Stadium";
- Teleport(playerid, -1447.2618, 1604.3374, 1052.5220, 263.7223, 14, 0, p);
- }
- else if(!strcmp(tempstr, "quarry", true))
- {
- destination = "Hunter Quarry";
- Teleport(playerid, 609.8776, 867.3369, -42.2692, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "mine", true))
- {
- destination = "Mine";
- Teleport(playerid, 1027.9011, -305.6943, 74.5135, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "dillimore", true))
- {
- destination = "Dillimore";
- Teleport(playerid, 641.7200, -564.9901, 16.1875, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "blueberry", true))
- {
- destination = "Blueberry";
- Teleport(playerid, 214.9969, -129.4305, 1.5779, a, 0, 0, p);
- }
- else if(!strcmp(tempstr, "montgomery", true))
- {
- destination = "Montgomery";
- Teleport(playerid, 1329.1864, 317.3034, 19.5469, 66.3917, 0, 0, p);
- }
- else if(!strcmp(tempstr, "carrier", true))
- {
- destination = "Aircraft Carrier";
- Teleport(playerid, 3352.1787, -2835.1282, 18.2344, 358.2253, 0, 0, p);
- }
- else if(!strcmp(tempstr, "grove", true))
- {
- destination = "Grove Street";
- Teleport(playerid, 2510.5432, -1687.5811, 13.5661, 49.4352, 0, 0, p);
- }
- else if(!strcmp(tempstr, "glenpark", true))
- {
- destination = "Glen Park";
- Teleport(playerid, 1977.5286, -1185.2473, 25.9960, 3.6421, 0, 0, p);
- }
- else if(!strcmp(tempstr, "skytower", true))
- {
- destination = "Sky Tower";
- Teleport(playerid, 1543.60132, -1355.82654, 4568.44873, 0.0, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sfhosp", true))
- {
- destination = "San Fierro Hospital";
- Teleport(playerid, -2653.3828, 638.5444, 14.4531, 0.0, 0, 0, p);
- }
- else if(!strcmp(tempstr, "paintball", true))
- {
- destination = "Paintball";
- Teleport(playerid, 1310.0594, -1376.5634, 13.6561, 0.0, 0, 0, p);
- }
- else if(!strcmp(tempstr, "SAN", true))
- {
- destination = "San Andreas Network";
- Teleport(playerid, 785.2725, -1325.4803, 13.5469, 350.9720, 0, 0, p);
- }
- else if(!strcmp(tempstr, "lsmod", true))
- {
- destination = "LS Transfender";
- Teleport(playerid, 1035.7266, -1034.4908, 31.6142, 183.1505, 0, 0, p);
- }
- else if(!strcmp(tempstr, "bigammu", true))
- {
- destination = "Ammunation";
- Teleport(playerid, 1363.4006, -1279.7795, 13.5469, 87.1025, 0, 0, p);
- }
- else if(!strcmp(tempstr, "allsaints", true))
- {
- destination = "All Saints";
- Teleport(playerid, 1185.8871, -1323.7729, 13.5591, 269.2528, 0, 0, p);
- }
- else if(!strcmp(tempstr, "taxi", true))
- {
- destination = "Taxi Company";
- Teleport(playerid, 1773.9911, -1860.9225, 13.5781, 359.1532, 0, 0, p);
- }
- else if(!strcmp(tempstr, "docks", true))
- {
- destination = "Ocean Docks";
- Teleport(playerid, 2318.1357, -2318.7971, 13.5469, 141.9202, 0, 0, p);
- }
- else if(!strcmp(tempstr, "loco", true))
- {
- destination = "Loco Low";
- Teleport(playerid, 2645.3574, -2022.3029, 13.5469, 2.7214, 0, 0, p);
- }
- else if(!strcmp(tempstr, "countygen", true))
- {
- destination = "County General";
- Teleport(playerid, 2024.6085, -1423.7742, 16.9665, 134.2379, 0, 0, p);
- }
- else if(!strcmp(tempstr, "dillhosp", true))
- {
- destination = "Dillimore Hospital";
- Teleport(playerid, 844.7101, -576.0881, 16.5325, 359.3915, 0, 0, p);
- }
- else if(!strcmp(tempstr, "tiki", true))
- {
- destination = "Tikistore";
- Teleport(playerid, 2347.5042, -1465.6353, 23.8281, 87.9392, 0, 0, p);
- }
- else if(!strcmp(tempstr, "arch", true))
- {
- destination = "Arch Angels";
- Teleport(playerid, -2711.4683, 223.9344, 4.3281, 271.3685, 0, 0, p);
- }
- else if(!strcmp(tempstr, "trainsf", true))
- {
- destination = "SF Train Station";
- Teleport(playerid, -1986.8132, 137.4702, 27.5391, 91.4267, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sfbridge", true))
- {
- destination = "SF Bridge";
- Teleport(playerid, -1631.1191, 582.4623, 40.5780, 315.5850, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sfbank", true))
- {
- destination = "San Fierro Bank";
- Teleport(playerid, -1706.2723, 785.4876, 24.8906, 90.6131, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sfapart", true))
- {
- destination = "San Fierro Apartments";
- Teleport(playerid, -1754.3157, 944.8129, 24.8828, 179.5380, 0, 0, p);
- }
- else if(!strcmp(tempstr, "sffmd", true))
- {
- destination = "San Fierro Fire Medical Dept.";
- Teleport(playerid, -2667.0950, 582.0782, 14.4531, 180.5395, 0, 0, p);
- }
- else if(!strcmp(tempstr, "pizza", true))
- {
- destination = "Pizza Stacks";
- Teleport(playerid, 2098.9524, -1806.1031, 13.5550, 88.4629, 0, 0, p);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_FADE1, "Invalid destination.");
- }
- new str[128];
- format(str, sizeof(str), "Teleporting to ~b~%s~w~.", destination);
- displayCenterHUDInfo(playerid, str, 8);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /goto [playerid] OR /goto [area]");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: lsair sfair lvair SAPD sfhosp");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: skyscraper chiliad area51 airstrip bayside quarry dam bank pier");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: underwater jet battlefield 8track kickstart dirtbike bloodbowl gym pizza");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: mine dillimore blueberry montgomery carrier grove glenpark skytower");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: SAN lsmod bigammu allsaints taxi docks loco countygen dillhosp tiki arch");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: trainsf sfbridge sfbank sfapart sffmd paintball impound garage");
- }
- return 1;
- }
- CMD:hgoto(playerid, params[])
- {
- if(HelpingNewbie[playerid] == false)return SendClientMessage(playerid, COLOR_GREY, "You're not helping a newbie.");
- if(!(PlayerInfo[playerid][pHelper] >= 2)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new tempstr[128];
- if(!sscanf(params, "s[128]", tempstr))
- {
- new destination[64] = " ";
- new p = 1;
- new Float:a = GetPlayerFacingAngle(playerid, a);
- new str[128];
- if(!strcmp(tempstr, "SAPD", true) || !strcmp(tempstr, "ls", true))
- {
- destination = "San Andreas Police Department";
- Teleport(playerid, 1529.6, -1691.2, 13.3, a, 0, 0, p);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: Helper %s has teleported to \"%s\".", PlayerICName(playerid), destination);
- UpdateWarnings(str);
- }
- else if(!strcmp(tempstr, "area51", true))
- {
- destination = "Area 51";
- Teleport(playerid, 202.1886, 1881.4122, 17.2199, 37.8779, 0, 0, p);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: Helper %s has teleported to \"%s\".", PlayerICName(playerid), destination);
- UpdateWarnings(str);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_FADE1, "Invalid destination.");
- }
- format(str, sizeof(str), "Teleporting to ~b~%s~w~.", destination);
- displayCenterHUDInfo(playerid, str, 8);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /hgoto [area]");
- SendClientMessage(playerid, COLOR_GREY, "AREAS: area51, SAPD");
- }
- return 1;
- }
- CMD:gotonewbie(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pHelper] >= 2)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not a helper.");
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new tempstr[128];
- if(!sscanf(params, "s[128]", tempstr))
- {
- new p =1, Float:a = GetPlayerFacingAngle(playerid, a), destination[64] = " ", lookupid = ReturnUser(tempstr);
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) p =0;
- if(lookupid != INVALID_PLAYER_ID)
- {
- if(!gPlayerLogged[lookupid])
- return SendClientMessage(playerid, COLOR_GRAD2, "That player hasn't spawned yet.");
- if(GetPlayerState(lookupid) == PLAYER_STATE_SPECTATING || PlayerInfo[playerid][pHospital] != 0 || pDeathState[playerid] == PLAYER_STATE_REVIVE)
- return SendClientMessage(playerid, COLOR_GRAD2, "That player has not spawned, is dead, or in the hospital.");
- if(lookupid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can't teleport to yourself.");
- if(PlayerInfo[lookupid][pLevel] > 3)
- return SendClientMessage(playerid, COLOR_GREY, "You can't teleport to players higher than level 3.");
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- HelpingNewbie[playerid] = true;
- PlayerInfo[playerid][helpmeX] = X;
- PlayerInfo[playerid][helpmeY] = Y;
- PlayerInfo[playerid][helpmeZ] = Z;
- PlayerInfo[playerid][helpmeInt] = GetPlayerInterior(playerid);
- PlayerInfo[playerid][helpmeVW] = GetPlayerVirtualWorld(playerid);
- Timer_FreezePlayer(lookupid, FREEZE, HELPNEWBIE_FREEZE);
- new Float:x, Float:y, Float:z, i = GetPlayerInterior(lookupid), vvvvv = GetPlayerVirtualWorld(lookupid);
- if(IsPlayerInAnyVehicle(lookupid))
- {
- GetVehicleZAngle(GetPlayerVehicleID(lookupid), a);
- }
- else
- {
- GetPlayerFacingAngle(lookupid, a);
- }
- GetPlayerPos(lookupid, x, y, z);
- Teleport(playerid, x, y +2, z, a, i, vvvvv, p);
- destination = PlayerICName(lookupid);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_FADE1, "Invalid destination.");
- }
- new str[128];
- format(str, sizeof(str), "Teleporting to ~b~%s~w~.", destination);
- displayCenterHUDInfo(playerid, str, 8);
- format(str, sizeof(str), "* You have teleported to %s's position.", PlayerICName(lookupid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Helper %s has teleported to your position to offer assistance.", PlayerICName(playerid));
- SendClientMessage(lookupid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /gotonewbie [playerid]");
- }
- return 1;
- }
- CMD:listguns(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new giveplayerid;
- new str[128];
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- new WeaponName[65];
- new weapons[13][2];
- SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
- format(str, sizeof(str), "*** %s's Weapons ***", PlayerICName(giveplayerid));
- SendClientMessage(playerid, COLOR_WHITE, str);
- for(new i = 0; i < 13; i++)
- {
- GetPlayerWeaponData(giveplayerid, i, weapons[i][0], weapons[i][1]);
- }
- for(new i = 0; i < 13; i++)
- {
- if(HaveWeapon(giveplayerid, weapons[i][0]) == weapons[i][0])
- {
- GetWeaponName(weapons[i][0], WeaponName, 64);
- format(str, sizeof(str), "%s", WeaponName);
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- else if(HaveAdminWeapon(giveplayerid, weapons[i][0]) == weapons[i][0])
- {
- GetWeaponName(weapons[i][0], WeaponName, 64);
- format(str, sizeof(str), "{FF0000}Admin Given %s", WeaponName);
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- else
- {
- if(weapons[i][0] != 0)
- {
- GetWeaponName(weapons[i][0], WeaponName, 64);
- format(str, sizeof(str), "{FF0000}Desynced %s", WeaponName);
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- }
- }
- SendClientMessage(playerid, COLOR_GREEN, "_______________________________________");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /listguns [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:recon(playerid, params[]) return cmd_spec(playerid, params);
- CMD:spec(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new tempstr[128];
- new str[1024];
- if(!sscanf(params, "s[128]", tempstr))
- {
- if(strcmp("off", tempstr, true, strlen(tempstr)) == 0)
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not spectating anyone.");
- return 1;
- }
- unspec(playerid);
- format(str, sizeof(str), "AdmCMD: %s has stopped spectating.", PlayerOOCName(playerid));
- SendSpectatorsMessage(7378, COLOR_YELLOW, str);
- return 1;
- }
- new giveplayerid = ReturnUser(tempstr);
- //if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You can't spectate yourself."); return 1; }
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(IsPlayerConnected(giveplayerid)) //player is online
- {
- //if(!gPlayerLogged[giveplayerid]) return SendClientMessage(playerid, COLOR_GRAD2, "That player hasn't spawned yet.");
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GRAD2, "That player is spectating someone.");
- if(iswatching[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Stop watching first using /watch off.");
- if(Spectated[playerid]) //if i'm being spectated
- {
- foreach( new i: Player )
- {
- if(SpectatingID[i] == playerid)
- {
- if(GetPlayerState(i) == PLAYER_STATE_SPECTATING) //double check they are spectating
- {
- unspec(i);
- format(str, sizeof(str), "AdmCMD: %s has stopped spectating.", PlayerOOCName(playerid));
- SendSpectatorsMessage(7378, COLOR_YELLOW, str);
- }
- }
- }
- }
- spectate(playerid, giveplayerid);
- format(str, sizeof(str), "AdmCMD: %s is spectating %s.", PlayerOOCName(playerid), PlayerOOCName(giveplayerid));
- SendSpectatorsMessage(7378, COLOR_YELLOW, str);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /spec [playerid/off]");
- }
- return 1;
- }
- CMD:setint(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new giveplayerid, intid;
- if(!sscanf(params, "ui", giveplayerid, intid))
- {
- new str[128];
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- SetPlayerInterior(giveplayerid, intid);
- PlayerInfo[giveplayerid][pInt] = intid;
- format(str, sizeof(str), "You have set %s's Interior ID to %d.", PlayerICName(giveplayerid), intid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setint [playerid] [interiorid]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setworld(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDev] >= DEVRANK_JUNIOR || PlayerInfo[playerid][pMapper] >= 3 )
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new playa, intid;
- new str[1024];
- if(!sscanf(params, "ui", playa, intid))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- SetPlayerVirtualWorld(playa, intid);
- PlayerInfo[playa][pVirtualWorld] = intid;
- format(str, sizeof(str), "You have set %s's World ID to %d.", PlayerICName(playa), intid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- }
- if( playa != playerid && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pDev] < 1 ) {
- return SendClientMessage( playerid, COLOR_GREY, "You are not authorized to set other player worlds." );
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setworld [playerid] [worldid]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:nmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
- {
- new playa, nmutetime;
- new str[128];
- if(!sscanf(params, "us[128]", playa, params))
- {
- if(strcmp(params, "perm", true) == 0 || strcmp(params, "forever", true) == 0)
- {
- nmutetime = -1;
- }
- else
- {
- nmutetime = strval(params);
- }
- if(nmutetime > 48) return SendClientMessage(playerid, COLOR_GRAD1, "** Mute time can not be lesser than -1 (permanent) or greater than 48.");
- if(nmutetime < -1 && PlayerInfo[playa][pNewbieMuted] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "** Mute time can not be lesser than -1 (permanent) or greater than 48.");
- if(nmutetime == 0 && PlayerInfo[playa][pNewbieMuted] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "** Mute time can not be lesser than -1 (permanent) or greater than 48.");
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new name[24], name1[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- strmid(name1, str_replace('_', ' ', PlayerName(playa)), 0, MAX_PLAYER_NAME);
- if(!HDuty[playerid] && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- if(PlayerInfo[playa][pNewbieMuted] == 0)
- {
- PlayerInfo[playa][pNewbieMuted] = 1;
- PlayerInfo[playa][pNMuteTime] = nmutetime * 3600000;
- PlayerInfo[playa][pReqUnmute] = nmutetime*3600;
- if(nmutetime == -1)
- {
- PlayerInfo[playa][pNewbieMuted] = 1;
- PlayerInfo[playa][pNMuteTime] = -1;
- PlayerInfo[playa][pReqUnmute] = 12*3600;
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was permanently muted from newbie chat by %s.", name1, name);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was permanently muted from newbie chat by %s.", name1, name);
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were permanently muted from newbie chat.");
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- Log:debug("HELPER_NMUTE", "%s was permanently muted from the newbie chat by %s", name1, name);
- return 1;
- }
- if(nmutetime == 1)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was muted from newbie chat by %s for %d hour.", name1, name, nmutetime);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was muted from newbie chat by %s for %d hour.", name1, name, nmutetime);
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were muted from newbie chat for %d hour.", nmutetime);
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- Log:debug("HELPER_NMUTE", "%s was temporary muted from the newbie chat by %s for %d hours", name1, name, nmutetime);
- }
- else
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was muted from newbie chat by %s for %d hours.", name1, name, nmutetime);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was muted from newbie chat by %s for %d hours.", name1, name, nmutetime);
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were muted from newbie chat for %d hours.", nmutetime);
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- Log:debug("HELPER_NMUTE","%s was temporary muted from the newbie chat by %s for %d hours", name1, name, nmutetime);
- }
- }
- else
- {
- if(PlayerInfo[playa][pNMuteTime] == -1 && PlayerInfo[playerid][pHelper] < 3 && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "Only senior+ helpers/junior+ admins may unmute a permanent banned player.");
- PlayerInfo[playa][pNewbieMuted] = 0;
- PlayerInfo[playa][pNMuteTime] = 0;
- PlayerInfo[playa][pReqUnmute] = 0;
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was unmuted from newbie chat by %s.", name1, name);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was unmuted from newbie chat by %s.", name1, name);
- SendHelperMessage(COLOR_LIGHTRED, str, 0);
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were unmuted from newbie chat.");
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- Log:debug("HELPER_NMUTE", "%s was unmuted from the newbie chat by %s", name1, name);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /nmute [playerid/PartOfName] [#hours, perm, forever]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:nwarn(playerid, params[])
- {
- new playa, reason[64];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
- {
- if(!sscanf(params, "uS()[64]", playa, reason))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(!HDuty[playerid] && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- PlayerInfo[playa][pNewbieWarns]++;
- if(strlen(reason) != 0)
- {
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were newbie-warned by %s, reason: %s.", PlayerOOCName(playerid), reason);
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s has newbie-warned %s, reason: %s.", PlayerOOCName(playerid), PlayerOOCName(playa), reason);
- SendHelperMessage(COLOR_LIGHTRED, str, 1);
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were newbie-warned by %s due to abuse.", PlayerOOCName(playerid), reason);
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s has newbie-warned %s due to abuse.", PlayerOOCName(playerid), PlayerOOCName(playa));
- SendHelperMessage(COLOR_LIGHTRED, str, 1);
- }
- if(PlayerInfo[playa][pNewbieWarns] >= 3) // perm ban the player
- {
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: You were muted from newbie chat by %s (received 3 warnings).", PlayerOOCName(playerid));
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s was muted from the newbie chat (received 3 warnings).", PlayerOOCName(playa));
- SendHelperMessage(COLOR_LIGHTRED, str, 1);
- PlayerInfo[playa][pNewbieMuted] = 1;
- PlayerInfo[playa][pNMuteTime] = -1;
- PlayerInfo[playa][pReqUnmute] = 12*3600;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /nwarn [playerid/PartOfName] [reason(optional)]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:nrw(playerid, params[]) return cmd_nremovewarning(playerid, params);
- CMD:nremovewarning(playerid, params[])
- {
- new playa;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- if(!HDuty[playerid] && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty (Helper).");
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[playa][pNewbieWarns] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "Player does not have any warnigs.");
- PlayerInfo[playa][pNewbieWarns]--;
- format(str, sizeof(str), "{FF0000}Warning{FFFFFF}: Your newbie-warning was removed by %s.", PlayerOOCName(playerid));
- SendClientMessage(playa, COLOR_LIGHTRED, str);
- format(str, sizeof(str), "{FF0000}HelperCmd{FFFFFF}: %s has removed the newbie-warning of %s.", PlayerOOCName(playerid), PlayerOOCName(playa));
- SendHelperMessage(COLOR_LIGHTRED, str, 1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /n(r)emove(w)arning [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:ncheck(playerid, params[])
- {
- new playa;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- if(!HDuty[playerid] && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty (Helper).");
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, str_replace('_', ' ', PlayerName(playa)), 0, MAX_PLAYER_NAME);
- SendClientMessage(playerid, COLOR_YELLOW, "_________________________________");
- format(str, sizeof(str), "Player: %s, warnings received: %d. Muted? %s{FFFFFF}.", giveplayer, PlayerInfo[playa][pNewbieWarns], (PlayerInfo[playa][pNewbieMuted])?("{00FF00}Yes"):("{FF0000}No"));
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "That player is offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ncheck [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:ap(playerid, params[]) return cmd_answerplayer(playerid, params);
- CMD:answerplayer(playerid, params[])
- {
- new str[128];
- new playa, msg[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 1)
- {
- if(!sscanf(params, "us[128]", playa, msg))
- {
- if(!HDuty[playerid] && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty (Helper).");
- if(IsPlayerConnected(playa))
- {
- new hrank[50];
- if(PlayerInfo[playerid][pHelper] == 1)
- {
- hrank = "Trial Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 2)
- {
- hrank = "Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 3)
- {
- hrank = "Senior Helper";
- }
- if(PlayerInfo[playerid][pHelper] == 4)
- {
- hrank = "Head Helper";
- }
- if(PlayerInfo[playerid][pHelper] >= 5)
- {
- hrank = "Director of The Helpers Team";
- }
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s [%d]: @%s; %s **", hrank, name, playerid, GetPlayerForename(playa), msg);
- OOCNewbie(NEWBIE_COLOR, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "That player is offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(A)nswer(P)layer [playerid/PartOfName] [Answer]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use this command.");
- }
- return 1;
- }
- CMD:lastlogin(playerid, params[])
- {
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /lastlogin [full_name(case sensitive)");
- {
- if(strlen(name) > MAX_PLAYER_NAME || strlen(name) < 4) return SendClientMessage(playerid, COLOR_GREY, " Name must be above 4 characters and below 24.");
- if(GetPlayerIDFromName(name) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "That player is currently logged in.");
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "SELECT `LastLogin` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, sqlstring, "onLastLogin", "is", playerid, name);
- }
- return 1;
- }
- CMD:ch(playerid, params[]) return cmd_checkhacks(playerid, params);
- CMD:checkhacks(playerid, params[])
- {
- if((PlayerInfo[playerid][pAdmin] >= 1))
- {
- new str[128];
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new playa;
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* %s was checked for health hacks.", PlayerICName(playa));
- ProxDetector(30.0, playa, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- CheckHacks2(playa);
- SetTimerEx("Timer_DoneCheckHacks2", 1000, 0, "ii", playerid, playa);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checkhacks [playerid/PartOfName]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:revive(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- AdmErrorMsg;
- return 1;
- }
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new toplayerid;
- new str[128];
- if(!sscanf(params, "u", toplayerid))
- {
- if(IsPlayerConnected(toplayerid))
- {
- if(toplayerid != INVALID_PLAYER_ID)
- {
- if(pDeathState[toplayerid] == PLAYER_STATE_REVIVE)
- {
- SetPlayerHealth(toplayerid, 100);
- SetPlayerArmour(toplayerid, 0);
- //ClearAnimationsEx(toplayerid);
- TextDrawHideForPlayer(toplayerid, Text:DieText);
- TextDrawHideForPlayer(toplayerid, Text:InjuredText);
- SendClientMessage(toplayerid, COLOR_LIGHTBLUE, "* You have been revived by an Admin.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has revived %s.", PlayerICName(playerid), PlayerICName(toplayerid));
- ABroadCast(COLOR_WHITE, str, 1);
- pInHospital[toplayerid] = 0;
- pDeathState[toplayerid] = PLAYER_STATE_NORMAL;
- PlayerCalledEMS[toplayerid] = 0;
- ApplyAnimationEx(toplayerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- ResetPlayerDamages(toplayerid);
- /*if(IsDead[toplayerid] == true)
- {
- Delete3DTextLabel(dmginfo[toplayerid]);
- IsDead[toplayerid]= false;
- return 1;
- }*/
- for(new i = 0; i <= 12; i++)
- {
- lastpguns[playerid][i][0] = 0;
- lastpguns[playerid][i][1] = 0;
- }
- OnPlayerSave(toplayerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Player is not injured.");
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /revive [playerid/PartOfName]");
- }
- return 1;
- }
- //==============================[JUNIOR CMDS]===================================
- CMD:reviveall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- AdmErrorMsg;
- return 1;
- }
- foreach( new i: Player )
- {
- if(pDeathState[i] == PLAYER_STATE_REVIVE)
- {
- SetPlayerHealth(i, 100);
- SetPlayerArmour(i, 0);
- TextDrawHideForPlayer(i, Text:DieText);
- TextDrawHideForPlayer(i, Text:InjuredText);
- pInHospital[i] = 0;
- pDeathState[i] = PLAYER_STATE_NORMAL;
- PlayerCalledEMS[i] = 0;
- ResetPlayerDamages(i);
- /*if(IsDead[i] == true)
- {
- Delete3DTextLabel(dmginfo[i]);
- IsDead[i]= false;
- return 1;
- }*/
- ApplyAnimationEx(i, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- SendClientMessage(i, COLOR_LIGHTBLUE, "* You have been revived by an Admin.");
- for(new d = 0; d <= 12; d++)
- {
- lastpguns[i][d][0] = 0;
- lastpguns[i][d][1] = 0;
- }
- }
- }
- new str[128];
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has revived everyone.", PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- return 1;
- }
- CMD:skydive(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new Float:rx, Float:ry, Float:rz;
- GetPlayerPos(playerid, rx, ry, rz);
- if(IsPlayerConnected(playerid))
- {
- GivePlayerGun(playerid, 46);
- SetPlayerPos(playerid, rx, ry, rz +1500);
- SendClientMessage(playerid, COLOR_WHITE, "GO!! GO!! GO!!");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:bigears(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return AdmErrorMsg;
- if(!BigEar[playerid])
- {
- BigEar[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Bigears enabled.");
- }
- else
- {
- BigEar[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Bigears disabled.");
- }
- return 1;
- }
- CMD:shadow(playerid, params[])
- {
- if(PlayerInfo[playerid][pID] < 7378 || PlayerInfo[playerid][pID] > 7378) return AdmErrorMsg;
- if(PlayerInfo[playerid][pShadowON] == 0)
- {
- PlayerInfo[playerid][pShadowON] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Woosh, Shadow mode {FF0000}ON.");
- }
- else if(PlayerInfo[playerid][pShadowON] == 1)
- {
- PlayerInfo[playerid][pShadowON] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Woosh, Shadow mode {FF0000}OFF");
- }
- return 1;
- }
- CMD:mary(playerid, params[])
- {
- if(PlayerInfo[playerid][pID] < 7619 || PlayerInfo[playerid][pID] > 7619) return AdmErrorMsg;
- if(PlayerInfo[playerid][pMaryON] == 0)
- {
- PlayerInfo[playerid][pMaryON] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, "Woosh, Mary mode {FF0000}ON.");
- }
- else if(PlayerInfo[playerid][pMaryON] == 1)
- {
- PlayerInfo[playerid][pMaryON] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, "Woosh, Mary mode {FF0000}OFF");
- }
- return 1;
- }
- CMD:freeze(playerid, params[])
- {
- new playa;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- TogglePlayerControllable(playa, 0);
- PlayerFrozen[playa] = 1;
- new str[128];
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was frozen by %s.", PlayerOOCName(playa), PlayerOOCName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /freeze [playerid]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:unfreeze(playerid, params[])
- {
- new playa;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new str[128];
- TogglePlayerControllable(playa, 1);
- PlayerFrozen[playa] = 0;
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was unfrozen by %s.", PlayerOOCName(playa), PlayerOOCName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- }
- }
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- new playa;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >=1)
- {
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new name[24], name1[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- strmid(name1, str_replace('_', ' ', PlayerName(playa)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz +5);
- PlayerPlaySound(playerid, 1130, slx, sly, slz +5);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been slapped for trying to slap a higher admin.", name);
- ABroadCast(COLOR_WHITE, str, 1);
- return 1;
- }
- new Float:slx, Float:sly, Float:slz;
- if(!IsPlayerInAnyVehicle(playa))
- {
- GetPlayerPos(playa, slx, sly, slz);
- SetPlayerPos(playa, slx, sly, slz +5);
- }
- else
- {
- GetVehicleVelocity(GetPlayerVehicleID(playa), slx, sly, slz);
- SetVehicleVelocity(GetPlayerVehicleID(playa), slx, sly, slz +0.3);
- }
- GetPlayerPos(playa, slx, sly, slz);
- PlayerPlaySound(playa, 1130, slx, sly, slz);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has slapped %s.", name, name1);
- ABroadCast(COLOR_WHITE, str, 1);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /slap [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- /*CMD:jail(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- new prisonid, prisontime, prisonrsn[128];
- if(sscanf(params, "uis[128]", prisonid, prisontime, prisonrsn))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /jail [playerid] [time(minutes)] [reason]");
- if(!IsPlayerConnected(prisonid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(prisontime < 1)
- return SendClientMessage(playerid, COLOR_GREY, "Invalid prison time.");
- Timer_FreezePlayer(prisonid, FREEZE, ENTER_FREEZE);
- PlayerInfo[prisonid][pJailed] = 2;
- PlayerInfo[prisonid][pJailTime] = prisontime*60;
- PlayerInfo[prisonid][pArrested]++;
- PlayerInfo[prisonid][pWantedLevel] = 0;
- SetPlayerColor(prisonid, TCOLOR_WHITE);
- format(str, sizeof(str), "* You have admin-delivered %s to the San Andreas Correctional Facility.", PlayerICName(prisonid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* An admin has delivered you to the San Andreas Correctional Facility. (( /prisoninfo ))");
- SendClientMessage(prisonid, COLOR_LIGHTBLUE, str);
- // Set player to cell
- new rand = random(sizeof(prisoncells));
- PrisonCell[prisonid] = rand;
- SetPlayerInterior(prisonid, DOC_INT);
- SetPlayerVirtualWorld(prisonid, DOC_WORLD);
- SetPlayerPos(prisonid, prisoncells[rand][0], prisoncells[rand][1], prisoncells[rand][2]+0.5);
- // Prison number
- PlayerInfo[playerid][pJailnumber] = random(1999-1000)+1000;
- format(str, sizeof(str), "The number on your prison clothes appear to be #%i.", PlayerInfo[playerid][pJailnumber]);
- SendClientMessage(prisonid, COLOR_YELLOW, str);
- SetPlayerSkin(prisonid, 50);
- format(str, sizeof(str), "No: %i", PlayerInfo[prisonid][pJailnumber]);
- PNumber3D[prisonid] = CreateDynamic3DTextLabel(str, COLOR_YELLOW, 0.0, 0.0, -0.5, 20.0, prisonid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 2.0);
- // Uncuff player
- if(PlayerCuffed[prisonid]) setPlayerUncuffed(prisonid);
- // Disable crimes
- new query[128], name[24];
- GetPlayerName(prisonid, name, 24);
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimePID` = '%d'", PlayerInfo[prisonid][pID]);
- mysql_pquery(sqlGameConnection, query);
- isBOLO[prisonid] = 0;
- // Server announce
- format(str, sizeof(str), "{FF6347}SERVER: %s has been IC prisoned by an Admin, reason: %s", PlayerICName(prisonid), prisonrsn);
- SendClientMessageToAll(COLOR_WHITE, str);
- return 1;
- }*/
- CMD:owarn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new name[MAX_PLAYER_NAME], reason[90];
- if(sscanf(params, "s[24]s[90]", name, reason)) //valid input
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /owarn [full name(case sensitive)] [reason]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) //is player connected?
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected");
- if(strlen(name) > MAX_PLAYER_NAME) //invalid name length
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} the name is too long.");
- //process query
- new day, month, year, hour, minute, second, date[20];
- gettime(hour, minute, second);
- getdate(year, month, day);
- format(date, sizeof(date), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
- new query[500], Cache:sqlresults, rows, fields, sqlid;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT Name, PlayerID FROM players, warnings WHERE Name = `%e`", name);
- sqlresults = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- sqlid = cache_get_field_content_int(0, "PlayerID");
- oAddWarn(sqlid, PlayerOOCName(playerid), date, reason, playerid, name);
- cache_delete(Cache:sqlresults, sqlGameConnection);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:warn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new giveplayerid, reason[128];
- new str[128];
- if(!sscanf(params, "us[128]", giveplayerid, reason))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /warn spam.", PlayerName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/warn spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pID] == 7378 || PlayerInfo[giveplayerid][pID] == 7619){ SendClientMessage(playerid, COLOR_GREY, "Nice try motherfucker"); Kick(playerid); return 1;}
- new day, month, year, hour, minute, second, date[20];
- gettime(hour, minute, second);
- getdate(year, month, day);
- format(date, sizeof(date), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
- AddWarn(PlayerInfo[giveplayerid][pID], PlayerOOCName(playerid), date, reason, giveplayerid, playerid);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid); //3 seconds
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /warn [playerid/PartOfName] [reason]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:warns(playerid, params[])
- {
- if(!IsPlayerConnected(playerid)) return 1;
- new query[500];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /warns [full_name(case sensitive)");
- {
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `ID` FROM `players` WHERE `Name` = '%e'", name);
- mysql_pquery(sqlGameConnection, query, "checkplayerid", "is", playerid, name);
- /*mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "SELECT Name, WarnID, PlayerID, AdminName, Date, Reason, Active FROM players, warnings WHERE Name = '%e' ORDER BY `DATE` DESC", name);
- mysql_pquery(sqlGameConnection, sqlstring, "oCheckWarns", "is", playerid, name);*/
- }
- }
- else
- {
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM warnings WHERE PlayerID = %i ORDER BY `DATE` DESC", PlayerInfo[playerid][pID]);
- mysql_pquery(sqlGameConnection, query, "CheckWarns", "i", playerid);
- }
- return 1;
- }
- CMD:kickall(playerid, params[])
- {
- new reason[128];
- if(PlayerInfo[playerid][pAdmin] == 99999 || PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)
- {
- if(sscanf(params, "s[128]", reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /kickall [reason]");
- {
- new str[128];
- format(str, sizeof(str), "Admin %s has kicked all players from the server, reason: %s.", PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_RED, str);
- new total = GetPlayerCount(), count =0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(playerid != i)
- {
- count++;
- Kick(i);
- }
- }
- }
- format(str, sizeof(str), "You have kicked a total of %d out of %d players from the server.", count, total);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new result[96], giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "us[96]", giveplayerid, result))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- //if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_RED, "If you're leaving, use /q and stop being an attention whore.");
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- new logstring[128];
- new year, month, day;
- getdate(year, month, day);
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(logstring, sizeof(logstring), "AdmCmd: %s was kicked, reason: Attempting to kick admin %s (%d-%d-%d).", sendername, giveplayer, month, day, year);
- KickLog(logstring);
- format(str, sizeof(str), "{FF6347}SERVER: %s was kicked, reason: Attempting to kick a higher admin.", sendername);
- SendClientMessageToAll(COLOR_WHITE, str);
- KickEx(playerid);
- return 1;
- }
- format(logstring, sizeof(logstring), "AdmCmd: %s was kicked by %s, reason: %s (%d-%d-%d).", giveplayer, sendername, (result), month, day, year);
- format(str, sizeof(str), "{FF6347}SERVER: %s was kicked by %s, reason: %s", giveplayer, sendername, (result));
- SendClientMessageToAll(COLOR_WHITE, str);
- KickLog(logstring);
- KickEx(giveplayerid);
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /kick [playerid/PartOfName] [reason]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:disableaccount(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3) return AdmErrorMsg;
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /disableaccount [full-name (case sensitive)]");
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "SELECT `AdminLevel`, `Disabled` FROM `players` WHERE `Name` = '%e'", name);
- mysql_pquery(sqlGameConnection, sqlstring, "onDisableAccount", "is", playerid, name);
- return 1;
- }
- CMD:pushmassunban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999) return AdmErrorMsg;
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "UPDATE `players` SET `Band`= 0");
- mysql_pquery(sqlGameConnection, sqlstring);
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "UPDATE `players` SET `PermBand`= 0");
- mysql_pquery(sqlGameConnection, sqlstring);
- SendClientMessage(playerid, COLOR_GREY, "Mass unban successfully done!");
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- new giveplayerid, reason[96];
- new str[128];
- if(sscanf(params, "us[96]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ban [playerid/PartOfName] [reason]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- //if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "If you're leaving, use /q and stop being an attention whore.");
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /ban spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/ban spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to ban a higher admin.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "attempting to ban a higher admin.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- //if(PlayerInfo[giveplayerid][pID] == 7378 || PlayerInfo[giveplayerid][pID] == 7619){ SendClientMessage(playerid, COLOR_GREY, "Nice try motherfucker"); Kick(playerid); return 1;}
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned by %s, reason: %s", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s was banned by %s, reason: %s at %02d %s %02d:%02d:%02d", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("bans.log", str);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- BanAccount(giveplayerid, playerid, reason); //log before banning the account
- /*new IP[16];
- GetPlayerIp(giveplayerid, IP, sizeof(IP));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- new name[MAX_PLAYER_NAME];
- if(playerid == INVALID_PLAYER_ID) {
- format(name, sizeof(name), "Autoban");
- } else {
- GetPlayerName(playerid, name, sizeof(name));
- }
- new query[600];
- mysql_format(sqlGameConnection, query, sizeof(query),
- "INSERT INTO `banlist` (`userID`, `IP`, `Key_`, `Serial`, `Reason`, `BannedBy`, `Expires`, `Date`, `Banned`) VALUES(%d, '%e', '%e', '%s', '%e', '%e', '%e', NOW(), 1)",
- PlayerInfo[giveplayerid][pID], IP, PlayerInfo[giveplayerid][pKey], PlayerInfo[giveplayerid][pSerial], reason, name, "30-30-2035");
- mysql_pquery(sqlGameConnection, query);
- printf("%d, '%e', '%e', '%s', '%e', '%e', '%e', NOW(), 1)",
- PlayerInfo[giveplayerid][pID], IP, PlayerInfo[giveplayerid][pKey], PlayerInfo[giveplayerid][pSerial], reason, name, "30-30-2035");
- PlayerInfo[giveplayerid][pBand] = 3;*/
- //strmid(PlayerInfo[giveplayerid][pBanReason], reason, 0, strlen(reason));
- //BanEx(giveplayerid, reason); //change this back to kick in future
- //KickEx(giveplayerid);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- CMD:cban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999) return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- new giveplayerid, reason[96];
- new str[128];
- if(sscanf(params, "us[96]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /cban [playerid/PartOfName] [reason]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- //if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "If you're leaving, use /q and stop being an attention whore.");
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /cban spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/ban spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to community ban a higher admin.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "attempting to community ban a higher admin.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- //if(PlayerInfo[giveplayerid][pID] == 7378 || PlayerInfo[giveplayerid][pID] == 7619){ SendClientMessage(playerid, COLOR_GREY, "Nice try motherfucker"); Kick(playerid); return 1;}
- format(str, sizeof(str), "{FF6347}SERVER: %s was community banned by %s, reason: %s", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s was community banned by %s, reason: %s at %02d %s %02d:%02d:%02d", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("bans.log", str);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- CBanAccount(giveplayerid, playerid); //log before banning the account
- /*new IP[16];
- GetPlayerIp(giveplayerid, IP, sizeof(IP));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- new name[MAX_PLAYER_NAME];
- if(playerid == INVALID_PLAYER_ID) {
- format(name, sizeof(name), "Autoban");
- } else {
- GetPlayerName(playerid, name, sizeof(name));
- }
- new query[600];
- mysql_format(sqlGameConnection, query, sizeof(query),
- "INSERT INTO `banlist` (`userID`, `IP`, `Key_`, `Serial`, `Reason`, `BannedBy`, `Expires`, `Date`, `Banned`) VALUES(%d, '%e', '%e', '%s', '%e', '%e', '%e', NOW(), 1)",
- PlayerInfo[giveplayerid][pID], IP, PlayerInfo[giveplayerid][pKey], PlayerInfo[giveplayerid][pSerial], reason, name, "30-30-2035");
- mysql_pquery(sqlGameConnection, query);
- printf("%d, '%e', '%e', '%s', '%e', '%e', '%e', NOW(), 1)",
- PlayerInfo[giveplayerid][pID], IP, PlayerInfo[giveplayerid][pKey], PlayerInfo[giveplayerid][pSerial], reason, name, "30-30-2035");
- PlayerInfo[giveplayerid][pBand] = 3;*/
- //strmid(PlayerInfo[giveplayerid][pBanReason], reason, 0, strlen(reason));
- //BanEx(giveplayerid, reason); //change this back to kick in future
- //KickEx(giveplayerid);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- CMD:pban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- new giveplayerid, reason[96];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] < 1999999999) return SendClientMessage(playerid, COLOR_GRAD2, "Use /tban instead");
- if(sscanf(params, "us[96]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /pban [playerid/PartOfName] [reason]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "If you're leaving, use /q and stop being an attention whore.");
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /pban spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/pban spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to pban a higher admin.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "attempting to pban a higher admin.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- format(str, sizeof(str), "{FF6347}SERVER: %s was permanently banned by %s, reason: %s", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- BanAccount(giveplayerid, playerid, reason);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- CMD:rangeban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- new giveplayerid, reason[96];
- new str[128];
- if(sscanf(params, "us[96]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /rangeban [playerid/PartOfName] [reason]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "If you're leaving, use /q and stop being an attention whore.");
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /rangeban spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/rangeban spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to rangeban a higher admin.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "attempting to rangeban a higher admin.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- format(str, sizeof(str), "{FF6347}SERVER: %s was rangebanned by %s, reason: %s", PlayerOOCName(giveplayerid), PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- BanAccount(giveplayerid, playerid, reason);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- Rangeban(giveplayerid);
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- CMD:gotopos(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return AdmErrorMsg;
- new Float:PossX, Float:PossY, Float:PossZ, interiorid;
- if(sscanf(params, "fffI(0)", PossX, PossY, PossZ, interiorid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotopos x, y, z, interiorid (optional)");
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- SetVehiclePos(GetPlayerVehicleID(playerid), PossX, PossY, PossZ);
- }
- else
- {
- SetPlayerPos(playerid, PossX, PossY, PossZ);
- }
- SendClientMessage(playerid, COLOR_GRAD1, "You have been teleported.");
- if(interiorid)
- {
- SetPlayerInterior(playerid, interiorid);
- PlayerInfo[playerid][pInt] = interiorid;
- }
- else
- {
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- }
- }
- return 1;
- }
- CMD:watch(playerid, params[])
- {
- new destination[64];
- if((PlayerInfo[playerid][pAdmin] >= 1))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "/spec off before using /watch.");
- if(!sscanf(params, "s[64]", destination))
- {
- if(!strcmp(destination, "gym", true))
- {
- SetPlayerPos(playerid, 2222.6404, -1727.2021, 9.4647);
- TogglePlayerControllable(playerid, false);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerCameraPos(playerid, 2194.9792, -1744.1910, 28.0873);
- SetPlayerCameraLookAt(playerid, 2219.2957, -1728.0018, 14.7271);
- destination = "GYM";
- }
- else if(!strcmp(destination, "SAPD", true))
- {
- SetPlayerPos(playerid, 1550.3188, -1672.8489, 11.4106);
- TogglePlayerControllable(playerid, false);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerCameraPos(playerid, 1514.8524, -1641.1030, 27.3129);
- SetPlayerCameraLookAt(playerid, 1538.7637, -1675.3173, 13.8148);
- destination = "SAPD";
- }
- else if(!strcmp(destination, "pizza", true))
- {
- SetPlayerPos(playerid, 2126.1194, -1785.7214, 1000.6774);
- TogglePlayerControllable(playerid, false);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerCameraPos(playerid, 2126.1194, -1785.7214, 27.6774);
- SetPlayerCameraLookAt(playerid, 2102.9607, -1772.8822, 13.3929);
- destination = "pizza";
- }
- else if(!strcmp(destination, "allsaints", true))
- {
- SetPlayerPos(playerid, 1201.12, -1324, 1000.0);
- TogglePlayerControllable(playerid, false);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerCameraPos(playerid, 1207.39, -1294.71, 24.61);
- SetPlayerCameraLookAt(playerid, 1181.72, -1322.65, 13.58);
- destination = "All Saints Hospital";
- }
- else if(!strcmp(destination, "countygen", true))
- {
- SetPlayerPos(playerid, 2014.9119, -1441.6863, 9.8886);
- TogglePlayerControllable(playerid, false);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerCameraPos(playerid, 1996.4921, -1452.7953, 30.8120);
- SetPlayerCameraLookAt(playerid, 2032.7050, -1413.9617, 16.8231);
- destination = "County General Hospital";
- }
- else if(!strcmp(destination, "grove", true))
- {
- SetPlayerPos(playerid, 2489.09, -1669.88, 1000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 2459.82, -1652.68, 26.45);
- SetPlayerCameraLookAt(playerid, 2489.09, -1669.88, 13.34);
- destination = "Grove Street";
- }
- else if(!strcmp(destination, "tgb", true))
- {
- SetPlayerPos(playerid, 2319.09, -1650.90, 1000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 2336.31, -1664.76, 24.98);
- SetPlayerCameraLookAt(playerid, 2319.09, -1650.90, 14.16);
- destination = "Ten Green Bottles";
- }
- else if(!strcmp(destination, "bank", true))
- {
- SetPlayerPos(playerid, 1466.24, -1023.05, 1000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 1502.28, -1044.47, 31.19);
- SetPlayerCameraLookAt(playerid, 1466.24, -1023.05, 23.83);
- destination = "Bank";
- }
- else if(!strcmp(destination, "jefferson", true))
- {
- SetPlayerPos(playerid, 2215.73, -1163.39, 1000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 2203.05, -1152.81, 37.03);
- SetPlayerCameraLookAt(playerid, 2215.73, -1163.39, 25.73);
- destination = "Jefferson Motel";
- }
- else if(!strcmp(destination, "jail", true))
- {
- SetPlayerPos(playerid, 264.75, 78.32, 2000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 262.64, 75.77, 1003.31);
- SetPlayerCameraLookAt(playerid, 264.75, 78.32, 1001.04);
- destination = "Jail";
- }
- else if(!strcmp(destination, "demorgan", true))
- {
- SetPlayerPos(playerid, 195.56, 1873.53, 10000.0);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, false);
- SetPlayerCameraPos(playerid, 81.95, 1953.36, 66.69);
- SetPlayerCameraLookAt(playerid, 195.56, 1873.53, 17.64);
- destination = "Fort DeMorgan";
- }
- else if(!strcmp(destination, "off", true))
- {
- SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
- SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, true);
- SendClientMessage(playerid, COLOR_WHITE, "You are no longer watching.");
- HidePM[playerid] = 0;
- PhoneOffline[playerid] = 0;
- iswatching[playerid] = 0;
- ResetPlayerAdminWeaponsEx(playerid);
- return 1;
- }
- else
- {
- return SendClientMessage(playerid, COLOR_FADE1, "Invalid location.");
- }
- PhoneOffline[playerid] = 1;
- HidePM[playerid] = 1;
- PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
- GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
- GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
- GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
- new str[128];
- format(str, sizeof(str), "You are now watching the %s.", destination);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- iswatching[playerid] = 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /watch [location/off]");
- SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Locations:{FFFFFF} pizza, gym, SAPD, allsaints, countygen, grove, tgb, bank, Jefferson, jail, demorgan, off");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:getskin(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pEventModd] < 1)
- {
- AdmErrorMsg;
- return 1;
- }
- new giveplayerid;
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- new str[128];
- format(str, sizeof(str), "That players Skin is set to %d.", GetPlayerSkin(giveplayerid));
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- }
- return 1;
- }
- CMD:removefakebadge(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- new targetPlayer;
- if(sscanf(params, "u", targetPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removefakebadge [playerid/PartOfName]");
- if(!IsPlayerConnected(targetPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(!PlayerInfo[targetPlayer][pHAFakeBadge])
- return SendClientMessage(playerid, COLOR_GREY, "This player does not have a fake badge on them.");
- PlayerInfo[targetPlayer][pHAFakeBadge] = 0;
- if(usingFakeBadge[targetPlayer]) {
- PlayerInfo[targetPlayer][pOnDuty] = 0;
- usingFakeBadge[targetPlayer] = false;
- SetPlayerToTeamColor(targetPlayer);
- }
- new str[128];
- // Notify players
- format(str, sizeof(str), "* You have removed %s's fake badge.", PlayerOOCName(targetPlayer));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(targetPlayer, COLOR_LIGHTBLUE, "* Your fake badge was removed by an administrator.");
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- new giveplayerid, skin;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pEventModd] == 1 || PlayerInfo[playerid][pDev] >= DEVRANK_SENIOR)
- {
- if(!sscanf(params, "ui", giveplayerid, skin))
- {
- if(PlayerInfo[playerid][pDev] < 1)
- {
- if(skin < 0 || skin > 311)
- {
- SendClientMessage(playerid, COLOR_GREY, "Skin can't be below 0 or above 311.");
- return 1;
- }
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- PlayerInfo[giveplayerid][pModel] = skin;
- SetPlayerSkin(giveplayerid, skin);
- PlayerInfo[giveplayerid][pClothes] = 0;
- format(str, sizeof(str), "That players Skin was set to %d.", skin);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setskin [playerid/PartOfName] [skin]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:detect(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new x_nr[32];
- if(!sscanf(params, "s[32] ", x_nr))
- {
- if(strcmp(x_nr, "weapon", true) ==0)
- {
- new weaponid;
- if(!sscanf(params, "s[32] i", x_nr, weaponid))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Users online:");
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- if(GetPlayerWeapon(i) == weaponid)
- {
- new Float: dis = GetDistanceBetweenPlayers(playerid, i);
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, sizeof(str), "[%d]%s, Weapon: %d, Radius: %.1f", i, sendername, weaponid, dis);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect weapon [weaponid]");
- }
- return 1;
- }
- if(strcmp(x_nr, "skin", true) == 0)
- {
- new skin;
- if(!sscanf(params, "s[32] i", x_nr, skin))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Users online:");
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- if(PlayerInfo[i][pModel] == skin)
- {
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, sizeof(str), "[%d]%s, Skin: %d", i, sendername, skin);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect skin [skinid]");
- }
- return 1;
- }
- if(strcmp(x_nr, "ip", true) == 0)
- {
- new string2[128];
- if(!sscanf(params, "s[32] s[128]", x_nr, string2))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Users online:");
- new IP[16];
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- GetPlayerIp(i, IP, sizeof(IP));
- if(strfind(IP, string2, true) != -1)
- {
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, sizeof(str), "[%d]%s, IP: %s", i, sendername, IP);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect IP [ip]");
- }
- return 1;
- }
- if(strcmp(x_nr, "phone", true) == 0)
- {
- new phone;
- if(!sscanf(params, "s[32] i", x_nr, phone))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "User online:");
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- if(PlayerInfo[i][pPnumber] == phone)
- {
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, 256, "[%d]%s, Phone: %d", i, sendername, phone);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect phone [number]");
- }
- return 1;
- }
- if(strcmp(x_nr, "ping", true) == 0)
- {
- new ping;
- if(!sscanf(params, "s[32] i", x_nr, ping))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "User online:");
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- if(GetPlayerPing(i) >= ping)
- {
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, 256, "[%d]%s, Ping: %d", i, sendername, ping);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect ping [number]");
- }
- return 1;
- }
- if(strcmp(x_nr, "hours", true) == 0)
- {
- new hours;
- if(!sscanf(params, "s[32] i", x_nr, hours))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "User online:");
- foreach( new i: Player )
- {
- if(gPlayerLogged[i] == 1)
- {
- if(PlayerInfo[i][pConnectTime] <= hours)
- {
- GetPlayerICName(i, sendername, sizeof(sendername));
- format(str, 256, "[%d]%s, Playing Hours: %d", i, sendername, PlayerInfo[i][pConnectTime]);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect hours [number]");
- }
- return 1;
- }
- if(strcmp(x_nr, "afk", true)==0){
- new
- bool:foundAFKPlayer = false,
- _str_[128];
- SendClientMessage(playerid, COLOR_GRAD1, "User online:");
- foreach(new i:Player){
- if(PlayerPaused[i]){
- GetPlayerICName(i, _str_, sizeof(_str_));
- format(_str_, sizeof(_str_), "[%d]%s, AFK seconds: %d", i, _str_, (GetTickCount()-pausetick[i])/1000);
- SendClientMessage(playerid, COLOR_GRAD2, _str_);
- format(_str_, sizeof(_str_), "");
- if(!foundAFKPlayer)
- foundAFKPlayer=true;
- }
- }
- if(!foundAFKPlayer)
- SendClientMessage(playerid, COLOR_GRAD2, "No players found.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /detect [weapon/skin/phone/ip/hours/ping/afk]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:freezeplayers(playerid, params[])
- {
- new radius;
- if((PlayerInfo[playerid][pAdmin] >= 2))
- {
- if(!sscanf(params, "i", radius))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You have frozen all players within that radius.");
- foreach( new i: Player )
- {
- if(playerid != i && IsPlayerConnected(i))
- {
- new Float:distance = GetDistanceBetweenPlayers(playerid, i);
- if(distance > 0 && distance <= radius)
- {
- PlayerFrozen[i] = 1;
- TogglePlayerControllable(i, 0);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /freezeplayers [distance]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:unfreezeplayers(playerid, params[])
- {
- new radius;
- if((PlayerInfo[playerid][pAdmin] >= 2))
- {
- if(!sscanf(params, "i", radius))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You have unfrozen all players within that radius.");
- foreach( new i: Player )
- {
- if(playerid != i && IsPlayerConnected(i))
- {
- new Float:distance = GetDistanceBetweenPlayers(playerid, i);
- if(distance > 0 && distance <= radius)
- {
- PlayerFrozen[i] = 0;
- TogglePlayerControllable(i, 1);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /unfreezeplayers [distance]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:fmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pFMember] == 255) return SendClientMessage(playerid, COLOR_GREY, "You are not in a Family.");
- if(PlayerInfo[playerid][pRank] >= 5)
- {
- new targetid, time;
- new str[128];
- if(sscanf(params, "ud", targetid, time)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fmute [playerid/name] [minutes (1-30)]");
- {
- if(time < 1 || time > 30) return SendClientMessage(playerid, COLOR_GREY, "The time can only be from 1 minutes to 30.");
- if(famMuted[targetid] == true) return SendClientMessage(playerid, COLOR_GREY, "That player is already muted.");
- if(IsPlayerConnected(targetid))
- {
- if(PlayerInfo[playerid][pFMember] == PlayerInfo[targetid][pFMember])
- {
- format(str, sizeof(str), "** You have muted %s from the family chat (/f) for %d minutes.", PlayerICName(targetid), time);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "** %s has muted you from the family chat (/f) for %d minutes.", PlayerICName(playerid), time);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- muteTimer[targetid] = SetTimerEx("Timer_FamMuteTime", 60000, true, "i", targetid);
- famMuted[targetid] = true;
- famMutedTime[targetid] = time;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't in your family.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a high enough rank to use this (R5+).");
- return 1;
- }
- CMD:funmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pFMember] == 255) return SendClientMessage(playerid, COLOR_GREY, "You are not in a Family.");
- if(PlayerInfo[playerid][pRank] >= 5)
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /funmute [playerid/name]");
- {
- if(IsPlayerConnected(targetid))
- {
- if(PlayerInfo[playerid][pFMember] == PlayerInfo[targetid][pFMember])
- {
- if(famMuted[targetid] == false) return SendClientMessage(playerid, COLOR_GREY, "That player isn't muted.");
- format(str, sizeof(str), "** You have unmuted %s from the family chat (/f).", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "** %s has unmuted you from the family chat (/f).", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- KillTimer(muteTimer[targetid]);
- famMuted[targetid] = false;
- famMutedTime[targetid] = 0;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't in your family.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a high enough rank to use this (R5+).");
- return 1;
- }
- CMD:muteplayers(playerid, params[])
- {
- new radius;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "i", radius))
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have muted all players within that radius.");
- foreach( new i: Player )
- {
- if(playerid != i && IsPlayerConnected(i))
- {
- new Float:distance = GetDistanceBetweenPlayers(playerid, i);
- if(distance > 0 && distance <= radius)
- {
- PlayerInfo[i][pMuted] = 1;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /muteplayers [distance]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:unmuteplayers(playerid, params[])
- {
- new radius;
- if((PlayerInfo[playerid][pAdmin] >= 2))
- {
- if(!sscanf(params, "i", radius))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You have unmuted all players within that radius.");
- foreach( new i: Player )
- {
- if(playerid != i && IsPlayerConnected(i))
- {
- new Float:distance = GetDistanceBetweenPlayers(playerid, i);
- if(distance > 0 && distance <= radius)
- {
- PlayerInfo[i][pMuted] = 0;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /unmuteplayers [distance]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:listfrozen(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Frozen players:");
- new frozenCount;
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerFrozen[i] != 0)
- {
- frozenCount++;
- format(str, sizeof(str), "- %s", name);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- if(!frozenCount) SendClientMessage(playerid, COLOR_GREY, "- None");
- }
- return 1;
- }
- CMD:listmuted(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Muted players:");
- new mutedCount;
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[i][pMuted] == 1)
- {
- mutedCount++;
- format(str, sizeof(str), "- %s", name);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- if(!mutedCount) SendClientMessage(playerid, COLOR_GREY, "- None");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:listmasked(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Masked players:");
- new maskedCount;
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[i][pMask] == 1)
- {
- maskedCount++;
- format(str, sizeof(str), "- %s %i", name, MaskNumber[i]);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- if(!maskedCount) SendClientMessage(playerid, COLOR_GREY, "- None");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:check(playerid, params[])
- {
- new giveplayerid;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- ShowStats(playerid, giveplayerid);
- viewingStatsOf[playerid] = giveplayerid;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /check [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:fourdive(playerid, params[])
- {
- new para1, para2, para3, para4;
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "iI(-1)I(-1)I(-1)", para1, para2, para3, para4))
- {
- if(IsPlayerConnected(para1))
- {
- GivePlayerGun(para1, 46);
- SetPlayerPos(para1, 1536.0, -1360.0, 1350.0);
- SetPlayerInterior(para1, 0);
- PlayerInfo[para1][pInt] = 0;
- SendClientMessage(para1, COLOR_WHITE, "GO!! GO!! GO!");
- }
- if((IsPlayerConnected(para2)) && (para2 != -1))
- {
- GivePlayerGun(para2, 46);
- SetPlayerPos(para2, 1536.0, -1345.0, 1350.0);
- SetPlayerInterior(para2, 0);
- PlayerInfo[para2][pInt] = 0;
- SendClientMessage(para2, COLOR_RED, "GO!! GO!! GO!");
- }
- if((IsPlayerConnected(para3)) && (para3 != -1))
- {
- GivePlayerGun(para3, 46);
- SetPlayerPos(para3, 1552.0, -1345.0, 1350.0);
- SetPlayerInterior(para3, 0);
- PlayerInfo[para3][pInt] = 0;
- SendClientMessage(para3, COLOR_RED, "GO!! GO!! GO!");
- }
- if((IsPlayerConnected(para4)) && (para4 != -1))
- {
- GivePlayerGun(para4, 46);
- SetPlayerPos(para4, 1552.0, -1360.0, 1350.0);
- SetPlayerInterior(para4, 0);
- PlayerInfo[para4][pInt] = 0;
- SendClientMessage(para4, COLOR_RED, "GO!! GO!! GO!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fourdive [playerid1] [playerid2] [playerid3] [playerid4]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:getip(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 1999999999)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new playername[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", playername)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getip [full name(case sensitive)]");
- // Try to get it from the player variable first, before querying the DB
- new playerAttempt = GetPlayerIDFromName(playername);
- if(IsPlayerConnected(playerAttempt)) {
- new ipString[128];
- format(ipString, sizeof(ipString), "%s's IP: %s", playername, PlayerInfo[playerAttempt][pIP]);
- SendClientMessage(playerid, COLOR_WHITE, ipString);
- return 1;
- }
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `IP` FROM `players` WHERE `Name` = '%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnGetIP", "is", playerid, playername);
- }
- return 1;
- }
- CMD:nametosql(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] < 1 && PlayerInfo[playerid][pMapper] < 1 && PlayerInfo[playerid][pAdmin] < 2 )
- return AdmErrorMsg;
- new
- playername[MAX_PLAYER_NAME + 1];
- if(sscanf(params, "s[24]", playername))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /nametosql [full name(case sensitive)]");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `ID` FROM `players` WHERE `Name` = '%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnGetSQLID", "is", playerid, playername);
- return 1;
- }
- CMD:getserial(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- new playername[MAX_PLAYER_NAME + 1];
- if(sscanf(params, "s[24]", playername)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getserial [full name(case sensitive)]");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Serial` FROM `players` WHERE `Name` = '%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnGetSerial", "is", playerid, playername);
- return 1;
- }
- CMD:gbr(playerid, params[]) return cmd_getbanreason(playerid, params);
- CMD:getbanreason(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pBanAppealer])
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new playername[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", playername)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getbanreason [full name(case sensitive)]");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `BanReason`, `ID` FROM `players` WHERE `Name` = '%e'", playername);
- mysql_pquery(sqlGameConnection, query, "OnGetBanReason", "is", playerid, playername);
- }
- return 1;
- }
- //============================[GENERAL CMDS]====================================
- CMD:noooc(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
- {
- noooc = 1;
- SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel disabled by an Admin.");
- }
- else if(PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
- {
- noooc = 0;
- SendClientMessageToAll(COLOR_GRAD2, "OOC chat channel enabled by an Admin.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:nodfsacxa(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3 && (!noglobal))
- {
- noglobal = 1;
- SendClientMessageToAll(COLOR_GRAD2, "Global OOC chat channel disabled by an Admin.");
- }
- else if(PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
- {
- noglobal = 0;
- SendClientMessageToAll(COLOR_GRAD2, "Global OOC chat channel enabled by an Admin.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:nonewbie(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] >= 2 || PlayerInfo[playerid][pAdmin] >= 2)
- {
- if((!nonewbie))
- {
- nonewbie = 1;
- SendClientMessageToAll(COLOR_GRAD2, "Newbie chat channel disabled by an Admin.");
- }
- else if((nonewbie))
- {
- nonewbie = 0;
- SendClientMessageToAll(COLOR_GRAD2, "Newbie chat channel enabled by an Admin.");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:oprison(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3 && PlayerInfo[playerid][pComplaintModd] == 0) //permissions
- return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- new name[MAX_PLAYER_NAME], time, reason[90];
- if(sscanf(params, "s[24]ds[90]", name, time, reason)) //valid input
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /oprison [full name(case sensitive)] [minutes] [reason]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) //is player connected?
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected");
- if(strlen(name) > MAX_PLAYER_NAME) //invalid name length
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} the name is too long.");
- //process query
- new query[120];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOPrison", "sdsi", name, time, reason, playerid);
- return 1;
- }
- CMD:prison(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3 && !PlayerInfo[playerid][pComplaintModd])
- return AdmErrorMsg;
- new playa, time, reason[128];
- if(sscanf(params, "uis[128]", playa, time, reason))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /prison [playerid/PartOfName] [minutes] [reason]");
- if(!IsPlayerConnected(playa))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(IsPlayerNPC(playa))
- return 1;
- TogglePlayerControllable(playerid, true);
- if(WatchingTV[playerid])
- WatchingTV[playerid] = false;
- new str[128];
- if(time != 0)
- {
- if(PlayerInfo[playerid][pStealthed])
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s has been prisoned by an administrator, reason: %s", PlayerOOCName(playa), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- format(str, sizeof(str), "You have been prisoned for %d minutes. (/time)", time);
- SendClientMessage(playa, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s has been prisoned by %s, reason: %s", PlayerOOCName(playa), PlayerOOCName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- format(str, sizeof(str), "You have been prisoned for %d minutes. (/time)", time);
- SendClientMessage(playa, COLOR_LIGHTBLUE, str);
- }
- }
- displayCenterHUDInfo(playa, "~w~Welcome to ~n~~r~admin prison.", 8);
- ClearGuns(playa);
- ResetPlayerWeapons(playa);
- PlayerInfo[playa][pWantedLevel] = 0;
- SetPlayerVirtualWorld(playa, 0);
- PlayerInfo[playa][pVirtualWorld] = 0;
- SetPlayerInterior(playa, 69);
- PlayerInfo[playa][pInt] = 69;
- format(str, sizeof(str), "%s", PlayerICName(playerid));
- strmid(PlayerInfo[playa][pPrisonedBy], str, 0, strlen(str), 255);
- format(str, sizeof(str), "%s", reason);
- strmid(PlayerInfo[playa][pPrisonReason], str, 0, strlen(str), 255);
- SetPlayerColor(playa, TCOLOR_PRISON);
- PlayerInfo[playa][pJailed] = 3;
- PlayerInfo[playa][pAdminJailed] = 1;
- PlayerInfo[playa][pJailTime] = time * 60;
- SetPlayerSkin(playa, 50);
- PlayerInfo[playa][pClothes] = 50;
- new rand = random(sizeof(PrisonSpawns));
- PrisonCell[playa] = rand;
- SetPlayerPos(playa, PrisonSpawns[rand][0], PrisonSpawns[rand][1], PrisonSpawns[rand][2]);
- SetPlayerFacingAngle(playa, PrisonSpawns[rand][3]);
- Timer_FreezePlayer(playa, FREEZE, ENTER_FREEZE);
- SavePrison(PlayerName(playa), PlayerName(playerid), reason, time);
- return 1;
- }
- CMD:namechanges(playerid, params[])
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- ShowPlayerDialog(playerid, DIALOG_NAMECHANGES, DIALOG_STYLE_LIST, "Namechange Search", "Search Recent Changes\nSearch By Old Name\nSearch By New Name\nSearch By Admin\nSearch By Account ID", "Search", "");
- return 1;
- }
- CMD:prisons(playerid, params[]){
- if(PlayerInfo[playerid][pAdmin] >= 1){
- new name[24], query[128];
- if(sscanf(params, "s[24]", name))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /prisons [player name]");
- {
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `prisons` WHERE `User`='%e' ORDER BY `ID` DESC", name);
- mysql_pquery(sqlGameConnection, query, "onPrisonChecks", "i", playerid);
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:startlotto(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- format(str, sizeof(str), "Lottery News: We have started the Lottery Election.");
- OOCOff(COLOR_WHITE, str);
- new rand = random(80);
- if(rand < 77)
- {
- rand += 3;
- }
- Lotto(rand);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not an Admin.");
- }
- return 1;
- }
- CMD:mark(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- GetPlayerPos(playerid, TeleportDest[playerid][0], TeleportDest[playerid][1], TeleportDest[playerid][2]);
- SendClientMessage(playerid, COLOR_GRAD1, "Teleport destination set.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:gotomark(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- return 1;
- }
- if(TeleportDest[playerid][0] == 0.0 && TeleportDest[playerid][1] == 0.0 && TeleportDest[playerid][2] == 0.0)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You need to set the position first using /mark.");
- return 1;
- }
- if(GetPlayerState(playerid) == 2)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- SetVehiclePos(tmpcar, TeleportDest[playerid][0], TeleportDest[playerid][1], TeleportDest[playerid][2]);
- }
- else
- {
- SetPlayerPos(playerid, TeleportDest[playerid][0], TeleportDest[playerid][1], TeleportDest[playerid][2]);
- }
- displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:hticket(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] >= 1)
- {
- new str[128];
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /hticket [full name(case sensitive)]");
- new giveplayerid = ReturnUser(name);
- if(IsPlayerConnected(giveplayerid)) // if the player is online
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given a house ticket by %s.", PlayerICName(giveplayerid), PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- PlayerInfo[giveplayerid][hTicket] = 1;
- return 1;
- }
- else // if the player is offline
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnHTicket", "is", playerid, name);
- return 1;
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:opfine(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new name[MAX_PLAYER_NAME], percent, reason[64];
- new str[128];
- if(sscanf(params, "s[24]is[64]", name, percent, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /opfine [full_name] [percent] [reason]");
- if(percent < 0 || percent > 100)
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} amount can't be below 0 or above 10,000,000.");
- return 1;
- }
- new giveplayerid = ReturnUser(name);
- if(IsPlayerConnected(giveplayerid)) // if the player is online
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- if(UseAdmCmdTimer[playerid] > 3)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /opfine spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/opfine spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- new tMoney = PlayerInfo[giveplayerid][pCash] + PlayerInfo[giveplayerid][pAccount];
- new fineMoney = (tMoney / 100) * percent;
- if(fineMoney < 1) return SendClientMessage(playerid, COLOR_GREY, "The minimum fine amount is $1.");
- GiveMoney(giveplayerid, -floatround(fineMoney));
- format(str, sizeof(str), "{FF6347}SERVER: %s has been fined $%d by %s, reason: %s", giveplayer, floatround(fineMoney), PlayerICName(playerid), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- return 1;
- }
- else // if the player is offline
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Money`,`Bank` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOPFine", "isis", playerid, name, percent, reason);
- return 1;
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setsql(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1999999998)
- {
- new name[MAX_PLAYER_NAME], rank;
- if(sscanf(params, "s[24]d", name, rank)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /setsql [full name(case sensitive)] [rank]");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `ID` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OSetSQL", "iis", playerid, rank, name);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:omakeadmin(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1999999999)
- {
- new name[MAX_PLAYER_NAME], rank;
- if(sscanf(params, "s[24]d", name, rank)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /omakeadmin [full name(case sensitive)] [rank]");
- new para1 = ReturnUser(name);
- new str[128];
- if(IsPlayerConnected(para1)) // if the player is online...
- {
- if(para1 != INVALID_PLAYER_ID)
- {
- new level = rank;
- strmid(giveplayer, PlayerICName(para1), 0, MAX_PLAYER_NAME);
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- if(level < 2) PlayerInfo[para1][pTag] = NTAG_PLAYER;
- else PlayerInfo[para1][pTag] = NTAG_ADMIN;
- if(level > 0)
- {
- new rand = random(9999);
- PlayerInfo[para1][pSecKey] = rand;
- gAdminAuthorized[para1] = 1;
- }
- printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
- if(level > PlayerInfo[para1][pAdmin])
- {
- format(str, sizeof(str), "You have been promoted to a level %d admin by %s, your security key is %d.", level, sendername, PlayerInfo[para1][pSecKey]);
- SendClientMessage(para1, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have promoted %s to a level %d admin.", giveplayer, level);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "You have been demoted to a level %d admin by %s, your security key is %d.", level, sendername, PlayerInfo[para1][pSecKey]);
- SendClientMessage(para1, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have demoted %s to a level %d admin.", giveplayer, level);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- PlayerInfo[para1][pAdmin] = level;
- if(level < 1)
- {
- PlayerInfo[para1][pAdmin] = 0;
- PlayerInfo[para1][pSecKey] = 0;
- gAdminAuthorized[para1] = 0;
- format(CustomTag[para1], 50, "None");
- PlayerInfo[para1][pTag] = NTAG_PLAYER;
- customRankName[para1] = false;
- format(customRank[para1], 24, "None");
- PlayerInfo[para1][pBanAppealer] = 0;
- PlayerInfo[para1][pGangModd] = 0;
- PlayerInfo[para1][pEventModd] = 0;
- PlayerInfo[para1][pComplaintModd] = 0;
- PlayerInfo[para1][pShopMod] = 0;
- PlayerInfo[para1][pFactionMod] = 0;
- PlayerInfo[para1][pGangDirector] = 0;
- PlayerInfo[para1][pBizMod] = 0;
- }
- }
- return 1;
- }
- else // if the player is offline
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOMakeAdmin", "iis", playerid, rank, name);
- return 1;
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- /*CMD:omakevip(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] > 0)
- {
- new str[128];
- new year, month, day;
- getdate(year, month, day);
- if(month == 1 && day >= 29) return SendClientMessage(playerid, COLOR_GREY, "You cannot make vips today.");
- new name[MAX_PLAYER_NAME], rankname[16], rank;
- if(sscanf(params, "s[24]s[16]", name, rankname)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /omakevip [full name(case sensitive)] [rankname: (none, bronze, silver, gold]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected.");
- //get dates
- new expiredate[32], joindate[32];
- format(joindate, sizeof(joindate), "%02d/%02d/%d", month, day, year); //set joindate
- if(month == 12) { format(expiredate, sizeof(expiredate), "%02d/%02d/%d", 1, day, year +1); } //set to jan next year
- else { format(expiredate, sizeof(expiredate), "%02d/%02d/%d", month +1, day, year); }
- //send amessage
- if(strcmp(rankname, "bronze", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {BB7900}bronze{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 1;
- }
- else if(strcmp(rankname, "silver", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {ACAEB0}silver{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 2;
- }
- else if(strcmp(rankname, "gold", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {FFC600}gold{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 3;
- }
- else if(strcmp(rankname, "none", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been {F00000}revoked{FFFFFF} by %s.", name, PlayerName(playerid));
- format(expiredate, sizeof(expiredate), "0/0/0");
- format(joindate, sizeof(joindate), "0/0/0");
- rank = 0;
- }
- else {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been {F00000}revoked{FFFFFF} by %s.", name, PlayerName(playerid));
- format(expiredate, sizeof(expiredate), "0/0/0");
- format(joindate, sizeof(joindate), "0/0/0");
- rank = 0;
- }
- ABroadCast(COLOR_WHITE, str, 1);
- //update query
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `DonateRank` = %d, `VIPJoinDate` = '%e', `VIPExpDate` = '%e' WHERE `Name` = '%e' LIMIT 1", rank, joindate, expiredate, name);
- mysql_pquery(sqlGameConnection, query);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }*/
- CMD:omakevip(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopMod] > 0)
- {
- new year, month, day;
- new str[1024];
- getdate(year, month, day);
- if(month == 1 && day >= 29) return SendClientMessage(playerid, COLOR_GREY, "You cannot make vips today.");
- new name[MAX_PLAYER_NAME], rankname[16], rank;
- if(sscanf(params, "s[24]s[16]", name, rankname)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /omakevip [full name(case sensitive)] [rankname: (none, bronze, silver, gold, platinum)]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected.");
- //get dates
- new expiredate[32], joindate[32];
- format(joindate, sizeof(joindate), "%02d/%02d/%d", month, day, year); //set joindate
- if(month == 12) { format(expiredate, sizeof(expiredate), "%02d/%02d/%d", 1, day, year +1); } //set to jan next year
- else { format(expiredate, sizeof(expiredate), "%02d/%02d/%d", month +1, day, year); }
- //send amessage
- if(strcmp(rankname, "bronze", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {BB7900}bronze{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 1;
- }
- else if(strcmp(rankname, "silver", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {ACAEB0}silver{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 2;
- }
- else if(strcmp(rankname, "gold", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {FFC600}gold{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 3;
- }
- else if(strcmp(rankname, "platinum", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been made a {FFC600}platinum{FFFFFF} VIP by %s.", name, PlayerName(playerid));
- rank = 4;
- }
- else if(strcmp(rankname, "none", true) == 0) {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been {F00000}revoked{FFFFFF} by %s.", name, PlayerName(playerid));
- format(expiredate, sizeof(expiredate), "0/0/0");
- format(joindate, sizeof(joindate), "0/0/0");
- rank = 0;
- }
- else {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's VIP status has been {F00000}revoked{FFFFFF} by %s.", name, PlayerName(playerid));
- format(expiredate, sizeof(expiredate), "0/0/0");
- format(joindate, sizeof(joindate), "0/0/0");
- rank = 0;
- }
- ABroadCast(COLOR_WHITE, str, 1);
- //update query
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `DonateRank` = %d, `VIPJoinDate` = '%e', `VIPExpDate` = '%e' WHERE `Name` = '%e' LIMIT 1", rank, joindate, expiredate, name);
- mysql_tquery(sqlGameConnection, query);
- printf("mysql_tquery OMakeVIP");
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:unban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /unban [full name(case sensitive)]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Band`, `PermBand`, `IP` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnUnban", "is", playerid, name);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:ofine(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 2)
- {
- new str[128];
- new name[MAX_PLAYER_NAME], amount, reason[64];
- if(sscanf(params, "s[24]is[64]", name, amount, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /ofine [first_last] [amount] [reason]");
- if(amount < 0 || amount > 10000000) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} amount can't be below 0 or above 10,000,000.");
- new giveplayerid = ReturnUser(name);
- if(IsPlayerConnected(giveplayerid)) // if the player is online
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was fined $%d by an admin, reason: %s", PlayerICName(giveplayerid), amount, reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- GiveMoney(giveplayerid, -amount);
- return 1;
- }
- else // if the player is offline
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOFine", "isis", playerid, name, amount, reason);
- return 1;
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:pfine(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pComplaintModd] > 0)
- {
- new str[128];
- new giveplayerid, moneys, reason[64];
- if(!sscanf(params, "uis[64]", giveplayerid, moneys, reason))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- if(UseAdmCmdTimer[playerid] > 3)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /pfine spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/pfine spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- if(moneys > 100) return SendClientMessage(playerid, COLOR_GREY, "You can't fine above 100 percent.");
- if(moneys < 1) return SendClientMessage(playerid, COLOR_GREY, "You can't fine below 1 percent.");
- new tMoney = PlayerInfo[giveplayerid][pCash] + PlayerInfo[giveplayerid][pAccount];
- new fineMoney = (tMoney * moneys) / 100;
- if(fineMoney < 1) return SendClientMessage(playerid, COLOR_GREY, "The minimum fine amount is $1.");
- GiveMoney(giveplayerid, -floatround(fineMoney));
- format(str, sizeof(str), "{FF6347}SERVER: %s has been fined $%d by an Admin, reason: %s", giveplayer, floatround(fineMoney), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s has been fined $%d by %s, reason: %s at %02d %s %02d:%02d:%02d", giveplayer, floatround(fineMoney),PlayerOOCName(playerid), reason, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("pfine.log", str);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /pfine [playerid/PartOfName] [percentage of money] [reason]");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:fine(playerid, params[])
- {
- new giveplayerid, moneys, reason[64];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pComplaintModd] > 0)
- {
- if(!sscanf(params, "uis[64]", giveplayerid, moneys, reason))
- {
- if(moneys < 1) return SendClientMessage(playerid, COLOR_GREY, "Fine Money can't be below 1.");
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(UseAdmCmdTimer[playerid] > 3)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /fine spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/fine spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- GiveMoney(giveplayerid, -moneys);
- format(str, sizeof(str), "{FF6347}SERVER: %s has been fined $%s by an Admin, reason: %s", PlayerOOCName(giveplayerid), AddThousandsSeparators(moneys), reason);
- SendClientMessageToAll(COLOR_WHITE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s has been fined $%s by %s, reason: %s at %02d %s %02d:%02d:%02d", PlayerOOCName(giveplayerid),PlayerOOCName(playerid), AddThousandsSeparators(moneys), reason, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("fines.log", str);
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fine [playerid/PartOfName] [price] [reason]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setaccent(playerid, params[])
- {
- new playa, newaccent[32];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- if(!sscanf(params, "us[32]", playa, newaccent))
- {
- if(IsPlayerConnected(playa))
- {
- if(!strlen(newaccent))
- {
- format(str, sizeof(str), "Target %s's accent is currently '%s'.", PlayerICName(playa), Accent[playa]);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- if(!ContainsValidCharacters(newaccent))
- return SendClientMessage(playerid, COLOR_GREY, "Invalid parameters. Do not use /, \\, :, *, ?, \", <, >, [, ], or |.");//"
- strmid(Accent[playa], newaccent, 0, strlen(newaccent), MAX_PLAYER_NAME);
- format(str, sizeof(str), "* You have set %s's accent to '%s'.", PlayerICName(playa), Accent[playa]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is not online.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setaccent [playerid] [accent]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:gethere(playerid, params[])
- {
- new plo;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", plo))
- {
- new Float:plocx, Float:plocy, Float:plocz;
- if(IsPlayerConnected(plo))
- {
- if(IsPlayerNPC(plo)) return 1;
- if(plo != INVALID_PLAYER_ID)
- {
- if(GetPlayerState(plo) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "That player is currently spectating.");
- if(PlayerInfo[plo][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Ask the admin to come to you.");
- new pinterior = GetPlayerInterior(playerid);
- new vw = GetPlayerVirtualWorld(playerid);
- SetPlayerVirtualWorld(plo, vw);
- SetPlayerInterior(plo, pinterior);
- GetPlayerPos(playerid, plocx, plocy, plocz);
- PlayerInfo[plo][pInt] = pinterior;
- PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
- PlayerInfo[plo][pVirtualWorld] = PlayerInfo[playerid][pVirtualWorld];
- if(GetPlayerState(plo) == 2)
- {
- new tmpcar = GetPlayerVehicleID(plo);
- SetVehiclePos(tmpcar, plocx, plocy +4, plocz);
- LinkVehicleToInterior(tmpcar, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(tmpcar, GetPlayerVirtualWorld(playerid));
- }
- else
- {
- SetPlayerPos(plo, plocx, plocy +2, plocz);
- }
- displayCenterHUDInfo(plo, "~r~Teleporting.", 8); //display for 8 seconds
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", plo);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gethere [playerid/PartOfName]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:oldcar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new str[128];
- format(str, sizeof(str), "Your old car was Vehicle ID: %d.", gLastCar[playerid]);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:mole(playerid, params[])
- {
- new result[128];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(!sscanf(params, "s[128]", result))
- {
- format(str, sizeof(str), "SMS: %s, Sender: MOLE (555)", result);
- SendClientMessageToAll(COLOR_YELLOW, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /mole [text]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:ipcheck(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4) return SendClientMessage(playerid, COLOR_GREY, "This command is currently disabled.");
- if(PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- /*{
- new tempstr[128];
- if(!sscanf(params, "s[64]", tempstr))
- {
- new dotcount = 0;
- for(new i = 0; i < strlen(tempstr); i++)
- {
- if(tempstr[i] == '.') dotcount++;
- }
- if(dotcount == 3)
- {
- new link[128];
- format(ipchecking[playerid], 24, "%s", tempstr);
- format(link, sizeof(link), "api.ipinfodb.com/v3/ip-country/?key=dc38a04953231bea8bb1203f36fd244393b50bf52e59afb40ae1e26db9fdbce6&ip=%s", tempstr);
- HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
- }
- else
- {
- new query[256];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `IP` FROM `players` WHERE `Name` = '%e' LIMIT 1", tempstr);
- mysql_pquery(sqlGameConnection, query, "OnOIPCheck", "is", playerid, tempstr);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /oipcheck [Name_Surname or IP]");
- }
- }
- else return AdmErrorMsg;*/
- return 1;
- }
- CMD:sh(playerid, params[]) return cmd_skiphosp(playerid, params);
- CMD:skiphosp(playerid, params[])
- {
- new giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(pDeathState[giveplayerid] == PLAYER_STATE_INHOSP)
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- SetPlayerHealth(giveplayerid, 100);
- SendClientMessage(giveplayerid, COLOR_YELLOW, "You have been ejected from the hospital by an administrator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has ejected %s from the hospital.", sendername, giveplayer);
- ABroadCast(COLOR_WHITE, str, 1);
- SetPlayerPos(giveplayerid, 2034.5677, -1406.0891, 17.2174);
- SetPlayerFacingAngle(giveplayerid, 180.4432);
- SetPlayerInterior(giveplayerid, 0);
- SetPlayerVirtualWorld(giveplayerid, 0);
- SetCameraBehindPlayer(giveplayerid);
- HospitalTime[giveplayerid] = 0;
- HospitalSpawnID[giveplayerid] = 0;
- PlayerInfo[giveplayerid][pHospital] = 0;
- PlayerInfo[giveplayerid][pDeaths] += 1;
- pInHospital[giveplayerid] = 0;
- pDeathState[giveplayerid] = PLAYER_STATE_NORMAL;
- ClearAnimationsEx(giveplayerid);
- TogglePlayerControllable(giveplayerid, 1);
- SetCameraBehindPlayer(giveplayerid);
- SetPlayerToTeamColor(giveplayerid);
- ResetPlayerDamages(giveplayerid);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "That player is not in hospital.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /skiphosp [playerid/PartOfName]");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:disarm(playerid, params[])
- {
- new playa;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", playa))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- ResetPlayerWeapons(playa);
- ClearGuns(playa);
- ResetPlayerAdminWeaponsEx(playa);
- format(str, sizeof(str), "* You have disarmed %s.", PlayerICName(playa));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You have been disarmed by %s.", PlayerICName(playerid));
- SendClientMessage(playa, COLOR_LIGHTBLUE, str);
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /disarm [Playerid/PartOfName]");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:setstealth(playerid, params[]){
- if(PlayerInfo[playerid][pAdmin] >= 1337){
- new targetid, stat;
- new str[128];
- if(sscanf(params, "ui", targetid, stat))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setstealth [playerid/name] [0) hidden, 1) display]");
- {
- if(stat < 0 || stat > 1)return SendClientMessage(playerid, COLOR_GREY, "The section can only be either 0 or 1.");
- if(IsPlayerConnected(targetid)){
- if(stat == 0){
- PlayerInfo[targetid][pStealthed] = 1;
- format(str, sizeof(str), "You have set so that %s is hidden.", PlayerOOCName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "Admin %s has set so you are hidden.", PlayerOOCName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- }
- else{
- PlayerInfo[targetid][pStealthed] = 0;
- format(str, sizeof(str), "You have set so that %s is no longer hidden.", PlayerOOCName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "Admin %s has set so you are hidden.", PlayerOOCName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:stealth(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- switch(PlayerInfo[playerid][pStealthed])
- {
- case 0:
- {
- PlayerInfo[playerid][pStealthed] = 1;
- return SendClientMessage(playerid, COLOR_GRAD1, "You are now hidden.");
- }
- case 1:
- {
- PlayerInfo[playerid][pStealthed] = 0;
- return SendClientMessage(playerid, COLOR_GRAD1, "You are no longer hidden.");
- }
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:hidemyass(playerid, params[])
- {
- if(PlayerInfo[playerid][pID] == 7378 || PlayerInfo[playerid][pID] == 7650)
- {
- switch(PlayerInfo[playerid][pHiddenAss])
- {
- case 0:
- {
- PlayerInfo[playerid][pHiddenAss] = 1;
- return SendClientMessage(playerid, COLOR_GRAD1, "You are now hidden from EVERY SINGLE FUCKING THING.");
- }
- case 1:
- {
- PlayerInfo[playerid][pHiddenAss] = 0;
- return SendClientMessage(playerid, COLOR_GRAD1, "You are no longer hidden. Fuck you motherfucker :D");
- }
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- //=============================[SENIOR CMDS]====================================
- CMD:setchamp(playerid, params[])
- {
- new giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(Titel[TitelName], 24, "%s", PlayerICName(giveplayerid));
- Titel[TitelWins] = PlayerInfo[giveplayerid][pWins];
- Titel[TitelLoses] = PlayerInfo[giveplayerid][pLoses];
- SaveBoxer();
- format(str, sizeof(str), "* You have made %s the new Boxing Champion.", PlayerICName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is offline.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setchamp [playerid/PartOfName]");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:sethp(playerid, params[])
- {
- new playa, health;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pEventModd] > 0)
- {
- if(!sscanf(params, "ui", playa, health))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- if((PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin]) && health <= 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was killed, reason: Attempting to set a higher admin's health to 0.", PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- SetPlayerHealth(playa, health);
- format(str, sizeof(str), "You have set %s's health to %d.", PlayerICName(playa), health);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That is an invalid ID");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Player isn't connected");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sethp [playerid/PartOfName] [health]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:sethpall(playerid, params[])
- {
- new health;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "i", health))
- {
- if(health <= 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was killed, reason: Attempting to set everyones health to 0.", PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerHealth(i, health);
- }
- }
- format(str, sizeof(str), "You have set everyones health to %d.", health);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sethpall [health]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setarmor(playerid, params[])
- {
- new playa, armor;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pEventModd] > 0)
- {
- if(!sscanf(params, "ui", playa, armor))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
- SetPlayerArmour(playa, armor);
- format(str, sizeof(str), "You have set %s's armor to %d.", giveplayer, armor);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setarmor [playerid/PartOfName] [armor]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setarmorall(playerid, params[])
- {
- new armor;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "i", armor))
- {
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerArmour(i, armor);
- }
- }
- format(str, sizeof(str), "You have set everyones armor to %d.", armor);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setarmorall [armor]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setfightstyle(playerid, params[])
- {
- new playa, fstyle;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "ui", playa, fstyle))
- {
- if(fstyle < 1 || fstyle > 6)
- {
- SendClientMessage(playerid, COLOR_GREY, "Fighting Style can't be below 1 or above 6.");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new fstring[16];
- if(fstyle == 1)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_NORMAL);
- PlayerInfo[playa][pFightingStyle] = 4;
- fstring = "NORMAL";
- }
- if(fstyle == 2)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_BOXING);
- PlayerInfo[playa][pFightingStyle] = 5;
- fstring = "BOXING";
- }
- if(fstyle == 3)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_KUNGFU);
- PlayerInfo[playa][pFightingStyle] = 6;
- fstring = "KUNG FU";
- }
- if(fstyle == 4)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_KNEEHEAD);
- PlayerInfo[playa][pFightingStyle] = 7;
- fstring = "KNEEHEAD";
- }
- if(fstyle == 5)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_GRABKICK);
- PlayerInfo[playa][pFightingStyle] = 15;
- fstring = "GRABKICK";
- }
- if(fstyle == 6)
- {
- SetPlayerFightingStyle(playa, FIGHT_STYLE_ELBOW);
- PlayerInfo[playa][pFightingStyle] = 26;
- fstring = "ELBOW";
- }
- strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "You have set %s's Fighting Style to %s.", giveplayer, fstring);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setfightstyle [playerid/PartOfName] [1-6]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setname(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- new giveplayerid, newname[MAX_PLAYER_NAME];
- if(sscanf(params, "us[24]", giveplayerid, newname)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setname [playerid/PartOfName] [new name]");
- if(strlen(newname) > MAX_PLAYER_NAME) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} the new name is too long.");
- if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player isn't connected.");
- // Replace space with underscore (for stupid admins)
- if(strfind(newname, " ", true) != -1) {
- strmid(newname, str_replace(' ', '_', newname), 0, MAX_PLAYER_NAME);
- SendClientMessage(playerid, COLOR_GREY, "Hint: You should not use spaces in names, it has been replaced with an underscore.");
- }
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", newname);
- mysql_pquery(sqlGameConnection, query, "OnSetName", "iis", playerid, giveplayerid, newname);
- return 1;
- }
- CMD:adivorce(playerid, params[])
- {
- new giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "You have reset %s's marriage status.", giveplayer);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(giveplayerid, COLOR_YELLOW, "Your marriage status has been reset by an Admin.");
- ClearMarriage(giveplayerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /adivorce [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setcolor(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] == 1)
- {
- ShowPlayerDialog(playerid, DIALOG_ADMIN_COLORCHANGER, DIALOG_STYLE_LIST, "Color Changer", "Purple\nYellow\nRed\nLightblue\nOrange\nGreen\nIndigo\nPink\nBlack", "Select", "Cancel");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:setplayercolor(playerid, params[])
- {
- new giveplayerid, x_job[128];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- if(!sscanf(params, "us[128]", giveplayerid, x_job))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(strcmp(x_job, "red", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_RED);
- }
- else if(strcmp(x_job, "pink", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_PINK);
- }
- else if(strcmp(x_job, "orange", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_ORANGE);
- }
- else if(strcmp(x_job, "yellow", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_YELLOW);
- }
- else if(strcmp(x_job, "cyan", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_CYAN);
- }
- else if(strcmp(x_job, "green", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_GREEN);
- }
- else if(strcmp(x_job, "blue", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_BLUE);
- }
- else if(strcmp(x_job, "black", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_BLACK);
- }
- else if(strcmp(x_job, "white", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_WHITE);
- }
- else if(strcmp(x_job, "marker", true) == 0)
- {
- SetPlayerColor(giveplayerid, SCOLOR_MARKER);
- }
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has set %s's name color.", sendername, giveplayer);
- SendClientMessage(giveplayerid, COLOR_WHITE, "Your name color has been set by an admin.");
- ABroadCast(COLOR_LIGHTRED, str, 1);
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setplayercolor [playerid] [color]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available colors: Red, Pink, Orange, Yellow, Cyan, Green, Blue, Black, White, Marker");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:givegun(playerid, params[])
- {
- new playa, gun;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- if(!sscanf(params, "ui", playa, gun))
- {
- if(gun < 1 ||gun > 46)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Invalid weapon ID.");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(gun == 21)
- {
- SetPlayerSpecialAction(playa, SPECIAL_ACTION_USEJETPACK);
- }
- GivePlayerAdminGun(playa, gun);
- strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "(ADMIN GUN) You have given a %s to %s", GetGunName(gun), giveplayer);
- SendClientMessage(playerid, COLOR_ORANGE, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "_______________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana 9: Chainsaw");
- SendClientMessage(playerid, COLOR_WHITE, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
- SendClientMessage(playerid, COLOR_WHITE, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Deagle 25: Shotgun");
- SendClientMessage(playerid, COLOR_WHITE, "26: Sawnoff Shotgun 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Country Rifle");
- SendClientMessage(playerid, COLOR_WHITE, "34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
- SendClientMessage(playerid, COLOR_WHITE, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
- SendClientMessage(playerid, COLOR_YELLOW, "_______________________________________");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:asellgun(playerid, params[])
- {
- new playa, gun;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- if(!sscanf(params, "ui", playa, gun))
- {
- if(gun < 1 ||gun > 46)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Invalid weapon ID.");
- return 1;
- }
- if(IsPlayerConnected(playa))
- {
- if(gun == 21)
- {
- SetPlayerSpecialAction(playa, SPECIAL_ACTION_USEJETPACK);
- }
- GivePlayerGun(playa, gun);
- strmid(giveplayer, PlayerICName(playa), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "You have given a %s to %s", GetGunName(gun), giveplayer);
- SendClientMessage(playerid, COLOR_ORANGE, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "_______________________________________");
- SendClientMessage(playerid, COLOR_WHITE, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana 9: Chainsaw");
- SendClientMessage(playerid, COLOR_WHITE, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
- SendClientMessage(playerid, COLOR_WHITE, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Deagle 25: Shotgun");
- SendClientMessage(playerid, COLOR_WHITE, "26: Sawnoff Shotgun 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Country Rifle");
- SendClientMessage(playerid, COLOR_WHITE, "34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
- SendClientMessage(playerid, COLOR_WHITE, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
- SendClientMessage(playerid, COLOR_YELLOW, "_______________________________________");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- new playa, money;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "ui", playa, money))
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playa)), 0, MAX_PLAYER_NAME);
- GiveMoney(playa, money);
- format(str, sizeof(str), "You have given %s $%d.", name, money);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givemoney [playerid/PartOfName] [money]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:givelic(playerid, params[])
- {
- new type, giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "iu", type, giveplayerid))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- switch(type)
- {
- case 1:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've given a Sailing License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has given you a Sailing License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pBoatLicense] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 2:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've given a Driving License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has given you a Driving License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pCarLicense] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 3:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've given a Fishing License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has given you a Fishing License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pFishLic] = 1;
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 4:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've given a Weapon License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has given you a Weapon License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pWeaponLicense] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 5:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've given a Marijuana License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has given you a Marijuana License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pMarijuanaLicense] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, "Invalid type.");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givelic [type] [playerid/PartOfName]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available types: 1:Sailing, 2:Driving, 3:Fishing, 4:Weapon, 5:Marijuana");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:takelic(playerid, params[])
- {
- new type, giveplayerid;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "iu", type, giveplayerid))
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- switch(type)
- {
- case 1:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've taken a Sailing License off %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has taken your Sailing License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pBoatLicense] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 2:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've taken a Driving License off %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has taken your Driving License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pCarLicense] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 3:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've taken a Fishing License off %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has taken your Fishing License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pFishLic] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 4:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've taken a Weapon License off %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has taken your Weapon License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pWeaponLicense] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- case 5:
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "* You've taken a Marijuana License to %s.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has taken you a Marijuana License.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pMarijuanaLicense] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /takelic [type] [playerid/PartOfName]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available types: 1:Sailing 2:Driving, 3:Fishing, 4:Weapon, 5:Marijuana");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:givenos(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new vehid = GetPlayerVehicleID(playerid);
- if(IsValidNosVehicle(vehid))
- {
- AddVehicleComponent(vehid, 1010);
- SendClientMessage(playerid, COLOR_GREY, "10x nos added to the vehicle.");
- }
- else
- {
- return 1;
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:givenosall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- if(IsValidNosVehicle(i))
- {
- AddVehicleComponent(i, 1010);
- }
- }
- SendClientMessage(playerid, COLOR_GREY, "10x nos added to all vehicles in the server.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:refund(playerid, params[])
- {
- new giveplayerid;
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- RefundingID[playerid] = giveplayerid;
- DisplayDialogForPlayer(playerid, 47);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /refund [playerid/PartOfName]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:maketiki(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new str[128];
- if(IsPlayerInAnyVehicle(playerid))
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You can't do that while in a vehicle.");
- }
- new Float:X, Float:Y, Float:Z;
- new location[MAX_ZONE_NAME];
- GetPlayerPos(playerid, X, Y, Z);
- CreateTiki(X, Y, Z);
- SetPlayerPos(playerid, X, Y -2, Z);
- SendClientMessage(playerid, COLOR_GRAD1, "* Tiki created.");
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has created a tiki in %s (%0.2f, %0.2f, %0.2f).", sendername, location, X, Y, Z);
- ABroadCast(COLOR_WHITE, str, 1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:deletetiki(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You can't do that while in a vehicle.");
- }
- DeleteClosestTiki(playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:deletetikis(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You can't do that while in a vehicle.");
- }
- new str[128];
- DeleteAllTiki();
- SendClientMessage(playerid, COLOR_GRAD2, "* Tikis destroyed.");
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has destroyed all tikis.", sendername);
- ABroadCast(COLOR_WHITE, str, 1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:givetiki(playerid, params[])
- {
- new giveplayerid, reason[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "us[128]", giveplayerid, reason))
- {
- new str[128];
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- PlayerInfo[giveplayerid][pTikis] += 1;
- if(PlayerInfo[playerid][pStealthed] == 1)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s has been given a tiki by a silent administrator, reason: %s", PlayerICName(giveplayerid), (reason));
- }
- else
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s has been given a tiki by %s, reason: %s", PlayerICName(giveplayerid), PlayerICName(playerid), (reason));
- }
- SendClientMessageToAll(COLOR_WHITE, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givetiki [playerid/PartOfName] [reason]");
- }
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:givetikiall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4)
- {
- AdmErrorMsg;
- return 1;
- }
- new str[128];
- new reason[128];
- if(!sscanf(params, "s[128]", reason))
- {
- //for(new i = 0;i<MAX_PLAYERS;i++)
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(i != INVALID_PLAYER_ID)
- {
- PlayerInfo[i][pTikis] += 1;
- }
- }
- }
- if(PlayerInfo[playerid][pStealthed] == 0)
- {
- format(str, sizeof(str), "{FF6347}SERVER: Everyone was given a tiki by %s, reason: %s", PlayerICName(playerid), reason);
- }
- else
- {
- format(str, sizeof(str), "{FF6347}SERVER: Everyone was given a tiki by a silent administrator, reason: %s", reason);
- }
- SendClientMessageToAll(COLOR_WHITE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givetikiall [Reason]");
- }
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- new vid[128], c1, c2;
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0 || PlayerInfo[playerid][pDev] >= 4)
- {
- if(!sscanf(params, "s[128]I(-1)I(-1)", vid, c1, c2))
- {
- new car = ReturnVehicleModelID(vid);
- if(!car)
- {
- return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model name/ID.");
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- RemovePlayerFromVehicle(playerid);
- }
- if(c1 != -1)
- {
- if(c1 < 0 || c1 > 255)
- {
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid color [0-255]");
- }
- if(c2 == -1)
- {
- c2 = c1;
- }
- }
- if(c2 != -1)
- {
- if(c2 < 0 || c2 > 255)
- {
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid color [0-255]");
- }
- }
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- new carid = CreateVehicleEx(car, X, Y, Z, A, c1, c2, -1);
- gDestroyVehicle[carid] = 1;
- gCarLock[carid] = 0;
- StartCar(carid);
- engineOn[carid] = 1;
- windowsDown[carid] = false;
- SetVehicleParamsCarWindows(carid, 1, 1, 1, 1);
- SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
- LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
- PutPlayerInVehicle(playerid, carid, 0);
- UnLockCar(carid);
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- if(CreatedCars[i] == INVALID_VEHICLE_ID)
- {
- CreatedCars[i] = carid;
- break;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /veh [vehicle name/ID] [color1(optional)] [color2(optional)] [respawnable(optional)]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:fixveh(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new carid = GetPlayerVehicleID(playerid);
- SetVehicleHealth(carid, 999.0);
- RepairVehicle(carid);
- SendClientMessage(playerid, COLOR_GREY, "You have fixed your vehicle.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:fixvehall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- SetVehicleHealth(i, 999.0);
- }
- SendClientMessage(playerid, COLOR_GREY, "All vehicles fixed.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:destroycar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0 || PlayerInfo[playerid][pDev] >= 4)
- {
- new currentVehicle = GetPlayerVehicleID(playerid);
- if(currentVehicle == 0) return SendClientMessage(playerid,COLOR_GREY, "You must be in a vehicle to destroy it.");
- new check;
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- if(CreatedCars[i] == currentVehicle)
- {
- check = 1;
- CreatedCars[i] = INVALID_VEHICLE_ID;
- break;
- }
- }
- if(!check) return SendClientMessage(playerid, COLOR_GRAD1, "You may only destroy a vehicle that was created with /veh.");
- gDestroyVehicle[currentVehicle] = 1;
- SetVehicleToRespawn(currentVehicle);
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:destroycars(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pEventModd] > 0)
- {
- new str[128];
- new vehcount = 0;
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- if(CreatedCars[i] != INVALID_VEHICLE_ID)
- {
- vehcount++;
- gDestroyVehicle[CreatedCars[i]] = 1;
- SetVehicleToRespawn(CreatedCars[i]);
- CreatedCars[i] = INVALID_VEHICLE_ID;
- }
- }
- format(str, sizeof(str), "You destroyed %d (veh)icles.", vehcount);
- SendClientMessage(playerid, -1, str);
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- if( PlayerCuffed[playerid] > 0 ||
- PlayerTazed[playerid] > 0 ||
- PlayerTied[playerid] > 0 ||
- pDeathState[playerid] != PLAYER_STATE_NORMAL ||
- PlayerInfo[playerid][pTut] != 1 ||
- PlayerInfo[playerid][pJailed] != 0 ||
- Mobile[playerid] != 999
- ) return SendClientMessage(playerid, COLOR_GREY, "You cannot do that at this time.");
- //printf("[DEBUG] Mobile number: %d of playerid: %d\n", Mobile[playerid], playerid);
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- /*
- This command was removed because the function it calls Timer_KillCar is only used for /veh vehicles
- But this command can destroy any type of vehicle without resetting their relevant variable
- */
- CMD:killcar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "This command has been disabled");
- /*
- new vehid = GetPlayerVehicleID(playerid);
- if(vehid == 0) return SendClientMessage(playerid, COLOR_GREY, "You must be in a vehicle to destroy it.");
- Timer_KillCar(vehid);
- */
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:dcar(playerid, params[]) return cmd_destroycar(playerid, params);
- CMD:dcars(playerid, params[]) return cmd_destroycars(playerid, params);
- CMD:listcars(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new createdcarcount;
- new str[128];
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- if(CreatedCars[i] != INVALID_VEHICLE_ID)
- {
- createdcarcount = 1;
- format(str, sizeof(str), "(%d) %s", CreatedCars[i], vehName[GetVehicleModel(CreatedCars[i]) -400]);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- if(createdcarcount != 1) SendClientMessage(playerid, COLOR_GREY, "No vehicles have been created with /veh.");
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:acheckweed(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new str[128];
- new weed = IsPlayerNearWeed(playerid);
- if(weed == -1) return SendClientMessage(playerid, COLOR_GREY, "You are not near any plants.");
- format(str, sizeof(str), "Weed Owner: %s - Weed ID: %d - Weed Time: %d - Weed Grams: %d.", WeedInfo[weed][WeedPlanter], weed, WeedInfo[weed][WeedTime], WeedInfo[weed][WeedGrams]);
- SendClientMessage(playerid, COLOR_GREEN, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:removeweed(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new str[128];
- new weed = IsPlayerNearWeed(playerid);
- if(weed == -1) return SendClientMessage(playerid, COLOR_GREY, "You are not near any plants.");
- format(str, sizeof(str), "You have removed %s's weed plant (weed id: %d).", WeedInfo[weed][WeedPlanter], weed);
- SendClientMessage(playerid, COLOR_GREEN, str);
- if(weedObject[weed]) { DestroyDynamicObjectEx(weedObject[weed]); }
- weedObject[weed] = 0;
- WeedInfo[weed][WeedX] = 0.0;
- WeedInfo[weed][WeedY] = 0.0;
- WeedInfo[weed][WeedZ] = 0.0;
- WeedInfo[weed][WeedTime] = 0;
- WeedInfo[weed][WeedPlanted] = 0;
- WeedInfo[weed][WeedGrams] = 0;
- strmid(WeedInfo[weed][WeedPlanter], "[NONE]", 0, strlen("[NONE]"), 128);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- //==============================[HEAD CMDS]=====================================
- CMD:weatherall(playerid, params[])
- {
- new weather;
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(!sscanf(params, "i", weather))
- {
- if(weather < 0 ||weather > 45)
- {
- return SendClientMessage(playerid, COLOR_GREY, "Weather ID can't be below 0 or above 45.");
- }
- SetWeather(weather);
- g_WeatherID = weather;
- SendClientMessage(playerid, COLOR_GREY, "Weather has been set for everyone.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:setweather(playerid, params[]) return cmd_weatherall(playerid, params);
- CMD:makeleader(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337 && !PlayerInfo[playerid][pFactionMod])
- return AdmErrorMsg;
- new targetPlayer, faction;
- if(sscanf(params, "ui", targetPlayer, faction))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeleader [playerid/PartOfName] [faction ID]");
- if(!IsPlayerConnected(targetPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(faction < 0 || faction > MAX_FACTIONS)
- return SendClientMessage(playerid, COLOR_GREY, "You have entered an invalid faction ID.");
- new str[128];
- if(PlayerInfo[targetPlayer][pFKickTime])
- {
- new timeleft = PlayerInfo[targetPlayer][pFKickTime] / 3600000;
- SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot invite that player because they are faction-banned.");
- format(str, sizeof(str), "* %s has %i hours before they can be invited to a faction.", PlayerName(targetPlayer), timeleft);
- SendClientMessage(playerid, COLOR_LIGHTRED, str);
- return 1;
- }
- PlayerInfo[targetPlayer][pRank] = GetFactionMaxRanks(faction);
- PlayerInfo[targetPlayer][pMember] = faction;
- format(str, sizeof(str), "* You have given %s leadership of the %s.", PlayerOOCName(targetPlayer), GetFactionName(faction));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s has given you leadership of the %s.", PlayerOOCName(playerid), GetFactionName(faction));
- SendClientMessage(targetPlayer, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetPlayer][pRadio] = 0;
- PlayerInfo[targetPlayer][pHandtazer] = 0;
- PlayerInfo[targetPlayer][ptazerGun] = 0;
- PlayerInfo[targetPlayer][pHAFakeBadge] = 0;
- FakeFaction[targetPlayer] = 0;
- hasRubberBullets[targetPlayer] = 0;
- loadedRubberBullets[targetPlayer] = false;
- TakePlayerWeapon(targetPlayer, 23);
- playerHoldingTazer[targetPlayer] = 0;
- RemovePlayerAttachedObject(targetPlayer, INDEX_7);
- PlayerInfo[targetPlayer][pLeader] = faction;
- PlayerInfo[targetPlayer][pMember] = faction;
- PlayerInfo[targetPlayer][pClothes] = 0;
- PlayerInfo[targetPlayer][pOnDuty] = 0;
- customRankName[targetPlayer] = false;
- format(customRank[targetPlayer], 24, "None");
- SetPlayerToTeamColor(targetPlayer);
- OnPlayerSave(targetPlayer);
- new fam = PlayerInfo[targetPlayer][pFMember];
- if(fam != 255)
- {
- if(strmatch(FamilyInfo[fam][FamilyLeader], PlayerICName(targetPlayer)))
- {
- strmid(FamilyInfo[fam][FamilyLeader], "None", 0, 100, 255);
- FamilyInfo[fam][FamilyMembers] -= 1;
- }
- PlayerInfo[targetPlayer][pFMember] = 255;
- }
- return 1;
- }
- CMD:makeircadmin(playerid, params[])
- {
- new giveplayerid, channel;
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(!sscanf(params, "ui", giveplayerid, channel))
- {
- if(channel > 10 || channel < 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Dont go below number 0, or above number 10.");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "* You've made %s an IRC Admin over Channel %d.", giveplayer, channel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s has made you an IRC Admin over Channel %d.", sendername, channel);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "%s", giveplayer);
- switch(channel)
- {
- case 1:
- {
- strmid(IRCInfo[0][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[0][iNeedPass] = 0;
- IRCInfo[0][iLock] = 0;
- }
- case 2:
- {
- strmid(IRCInfo[1][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[1][iNeedPass] = 0;
- IRCInfo[1][iLock] = 0;
- }
- case 3:
- {
- strmid(IRCInfo[2][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[2][iNeedPass] = 0;
- IRCInfo[2][iLock] = 0;
- }
- case 4:
- {
- strmid(IRCInfo[3][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[3][iNeedPass] = 0;
- IRCInfo[3][iLock] = 0;
- }
- case 5:
- {
- strmid(IRCInfo[4][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[4][iNeedPass] = 0;
- IRCInfo[4][iLock] = 0;
- }
- case 6:
- {
- strmid(IRCInfo[5][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[5][iNeedPass] = 0;
- IRCInfo[5][iLock] = 0;
- }
- case 7:
- {
- strmid(IRCInfo[6][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[6][iNeedPass] = 0;
- IRCInfo[6][iLock] = 0;
- }
- case 8:
- {
- strmid(IRCInfo[7][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[7][iNeedPass] = 0;
- IRCInfo[7][iLock] = 0;
- }
- case 9:
- {
- strmid(IRCInfo[8][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[8][iNeedPass] = 0;
- IRCInfo[8][iLock] = 0;
- }
- case 10:
- {
- strmid(IRCInfo[9][iAdmin], str, 0, strlen(str), 255);
- IRCInfo[9][iNeedPass] = 0;
- IRCInfo[9][iLock] = 0;
- }
- }
- SaveIRC();
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeircadmin [playerid/PartOfName] [ChannelNr]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to do that.");
- }
- return 1;
- }
- CMD:aouninvite(playerid, params[])
- {
- new name[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pFactionMod] > 0)
- {
- if(!sscanf(params, "s[24]", name))
- {
- if(GetPlayerIDFromName(name) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "That player is currently logged in.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", name);
- mysql_pquery(sqlGameConnection, query, "OnAOUninvite", "is", playerid, name);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /aouninvite [full name(case sensitive)]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not authorized to do that.");
- }
- return 1;
- }
- CMD:ouninvite(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] > 0)
- {
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ouninvite [full name(case sensitive)]");
- if(GetPlayerIDFromName(name) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is currently logged in.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Rank`, `Leader`, `Member` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOUninvite", "is", playerid, name);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not a faction leader.");
- }
- return 1;
- }
- CMD:ofuninvite(playerid, params[])
- {
- if(PlayerInfo[playerid][pRank] >= 5 && PlayerInfo[playerid][pFMember] != 255)
- {
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ofuninvite [full name(case sensitive)]");
- if(GetPlayerIDFromName(name) != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is currently logged in.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Rank`, `FMember` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnFamilyOUninvite", "is", playerid, name);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not a family leader.");
- }
- return 1;
- }
- // Door lockpicking for HA + S9
- CMD:lockpickdoor(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9 && PlayerInfo[playerid][pGroup] != GROUP_HITMAN)
- return 1;
- if(!PlayerInfo[playerid][pHasLockPick])
- return SendClientMessage(playerid, COLOR_GREY, "You need a lock pick kit to lock pick a door.");
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage( playerid, COLOR_GREY, "You must be on foot in order to lock pick a door.");
- if(inPaintball[playerid] || IsAtEvent[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "You cannot do this right now.");
- for( new d; d < MAX_DOORS; d++ ) { //doors
- if(IsPlayerInRangeOfPoint(playerid, 7.0, Entrances[d][outside_x], Entrances[d][outside_y], Entrances[d][outside_z])) {
- if(strlen(Entrances[d][dpassword]) ) {
- DisabledDoors[d] = true;
- SetTimerEx("Timer_EnableDoor", 60000, false, "d", d);
- }
- }
- }
- new str[128];
- format(str, sizeof(str), "* %s begins lock picking the door.", PlayerICName(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 5.0, 60000);
- SendClientMessage(playerid, COLOR_YELLOW, "Notice: {FFFFFF}The door will automaticly lock itself back after 60 seconds.");
- return 1;
- }
- CMD:deployexplosive( playerid, params[] ) {
- if( PlayerInfo[playerid][pHasCBomb] == 0 ) {
- return SendClientMessage( playerid, COLOR_GREY, "You do not have the suitable explosive to perform this." );
- }
- if( IsPlayerInAnyVehicle( playerid ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "You must be on foot in order to deploy an explosive device." );
- }
- if( inPaintball[playerid] || IsAtEvent[playerid] ) {
- return SendClientMessage( playerid, COLOR_GREY, "You cannot do this right now." );
- }
- if( GetPlayerAnimationIndex(playerid) == 1461 || GetPlayerAnimationIndex(playerid) == 1463 ) {
- SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- return 1;
- }
- new str[128];
- PlayerInfo[playerid][pHasCBomb] = 0;
- OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- new Float: FX, Float: FY, Float: FZ, Float: FA;
- GetXYInFrontOfPlayer( playerid, FX, FY, FZ, FA, 0.5 );
- ExplosiveObject[playerid] = CreateDynamicObject( 1654, FX, FY, FZ - 0.9, 0.0, -90.0, FA );
- Streamer_Update( playerid );
- format(str, sizeof(str), "* %s deploys their C2 explosive device on the ground, putting it on timer for eight seconds.", PlayerICName(playerid) );
- ProxDetector( 30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE );
- SetTimerEx( "Timer_ExplodeExplosive", 8000, false, "ifff", playerid, FX, FY, FZ );
- return 1;
- }
- CMD:checklevel(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s", name))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /checklevel [player name]");
- new query[224];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `level` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnCheckAccountLevel", "is", playerid, name);
- return 1;
- }
- CMD:activity(playerid, params[])// made by rellex lol?
- {
- if(!PlayerInfo[playerid][pAdmin]) return AdmErrorMsg;
- new query[128], month, userid;
- if(sscanf(params, "ii", userid, month)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /activity [sqlid] [month (1-12)]");
- if(month > 12 || month < 1) return SendClientMessage(playerid, COLOR_GREY, "Usage: /activity [sqlid] [month (1-12)]");
- new CurrentYear, CurrentMonth, CurrentDay;
- getdate(CurrentYear, CurrentMonth, CurrentDay);
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT SUM(Minutes) FROM `activitylog` WHERE `Date` BETWEEN '%d-%d-01' AND '%d-%d-31' AND `UserID` = '%d'", CurrentYear, month, CurrentYear, month, userid);
- mysql_pquery(sqlGameConnection, query, "AAC", "iii", playerid, month, userid);
- return 1;
- }
- CMD:myactivity(playerid, params[])// made by rellex lol?
- {
- new query[128], month;
- if(sscanf(params, "i", month)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /myactivity [month (1-12)]");
- if(month > 12 || month < 1) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}: /myactivity [month (1-12)]");
- new CurrentYear, CurrentMonth, CurrentDay;
- getdate(CurrentYear, CurrentMonth, CurrentDay);
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT SUM(Minutes) FROM `activitylog` WHERE `Date` BETWEEN '%d-%d-01' AND '%d-%d-31' AND `UserID` = '%d'", CurrentYear, month, CurrentYear, month, PlayerInfo[playerid][pID]);
- mysql_pquery(sqlGameConnection, query, "NewDVIPShit", "iii", playerid, month, PlayerInfo[playerid][pID]);
- return 1;
- }
- //==========================[PUBLIC COMMANDS]===================================
- //=========================[GENERAL COMMANDS]===================================
- CMD:carsql(playerid, params[]){
- new i = GetPlayerVehicleID(playerid);
- new str[128];
- format(str, sizeof(str), "VehicleID: %d | Dynamic ID: %d", sVehicleInfo[i][v_id], GetDynamicVehicleID(i));
- SendClientMessage(playerid, -1, str);
- return 1;
- }
- static usedRespawnTime = 0;
- CMD:respawncars(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDev] >= 2)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new Float:X, Float:Y, Float:Z, distance;
- if(!sscanf(params, "d", distance))
- {
- if(distance < 1 || distance > 100000)
- {
- SendClientMessage(playerid, COLOR_GREY, "Distance can't be below 1 or above 100,000.");
- return 1;
- }
- // Giving in a delay so that when the Timer:KillCar is used for /veh vehicles the delay doesn't cause any ID conflict //
- new now = gettime();
- if(now < usedRespawnTime){
- new str[128];
- format(str, sizeof(str), "You need to wait %d seconds to respawn cars again", usedRespawnTime - now);
- return SendClientMessage(playerid, COLOR_GREY, str);
- }
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- GetVehiclePos(i, X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid, distance, X, Y, Z))
- {
- if(!IsVehicleOccupied(i))
- {
- SetVehicleToRespawn(i);
- }
- }
- }
- new msg[128];
- format(msg, sizeof(msg), "{FF0000}AdmWarning{FFFFFF}: %s has respawned all vehicles within %d metres.", PlayerName(playerid), distance);
- SendAdminMessage(COLOR_WHITE, msg);
- usedRespawnTime = now + 20;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /respawncars [distance]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:calc(playerid, params[]) return cmd_calculate(playerid, params);
- CMD:calculate(playerid, params[])
- {
- if(PlayerInfo[playerid][pCalculator] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have a calculator.");
- return 1;
- }
- ShowPlayerDialog(playerid, DIALOG_CALC_1, DIALOG_STYLE_LIST, "Calculator", "Multiply * \nAdd +\nDivide /\nSubstract -", "Choose", "Cancel");
- return 1;
- }
- CMD:setradioname(playerid, params[])
- {
- if(PlayerInfo[playerid][pRadioStation] == 255)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- new radio = PlayerInfo[playerid][pRadioStation];
- new str[128];
- if(strcmp(radioInfo[radio][ownerName], PlayerICName(playerid), true) == 0)
- {
- new newname[128];
- if(!sscanf(params, "s[128]", newname))
- {
- if(InvalidChar(newname) == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Radio Station name cannot contain invalid characters.");
- return 1;
- }
- strmid(radioInfo[radio][channelName], newname, 0, strlen(newname), 255);
- format(str, sizeof(str), "* You have adjusted your Radio Stations name to '%s'.", radioInfo[radio][channelName]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SaveRadios();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setradioname [name]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- return 1;
- }
- CMD:setradiourl(playerid, params[])
- {
- if(PlayerInfo[playerid][pRadioStation] == 255)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- new radio = PlayerInfo[playerid][pRadioStation];
- if(strcmp(radioInfo[radio][ownerName], PlayerICName(playerid), true) == 0)
- {
- new newurl[128];
- if(!sscanf(params, "s[128]", newurl))
- {
- if(InvalidChar(newurl) == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Radio Station name cannot contain invalid characters.");
- return 1;
- }
- new str[128];
- strmid(radioInfo[radio][url], newurl, 0, strlen(newurl), 255);
- format(str, sizeof(str), "* You have adjusted your Radio Stations url to '%s'.", radioInfo[radio][url]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SaveRadios();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setradiourl [url]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- return 1;
- }
- CMD:setradiobroadcast(playerid, params[])
- {
- if(PlayerInfo[playerid][pRadioStation] == 255)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- new radio = PlayerInfo[playerid][pRadioStation];
- new str[128];
- if(strcmp(radioInfo[radio][ownerName], PlayerICName(playerid), true) == 0)
- {
- if(radioInfo[radio][online]) //already broadcasting
- {
- format(str, sizeof(str), "* Your Radio Station is no longer broadcasting '%s'.", radioInfo[radio][url]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- radioInfo[radio][online] = 0;
- }
- else
- {
- format(str, sizeof(str), "* Your Radio Station is now broadcasting '%s'.", radioInfo[radio][url]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- radioInfo[radio][online] = 1;
- }
- SaveRadios();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not the owner of a Radio Station.");
- }
- return 1;
- }
- CMD:rcreate(playerid, params[]) //radio create
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new radio, giveplayerid;
- new str[128];
- if(!sscanf(params, "iu", radio, giveplayerid))
- {
- if(radio < 0 || radio > 10) return SendClientMessage(playerid, COLOR_GREY, "Radio Station can't be below 1 or above 10.");
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- radio -= 1;
- if(radioInfo[radio][taken] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "That Radio Station is already taken.");
- return 1;
- }
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "* You've made %s the Owner of a Radio Station.", giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has made you the Owner of a Radio Station.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "%s", giveplayer);
- strmid(radioInfo[radio][ownerName], str, 0, strlen(str), 255);
- radioInfo[radio][taken] = 1;
- PlayerInfo[giveplayerid][pRadioStation] = radio;
- SaveRadios();
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /rcreate [radiostation] [playerid/PartOfName]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- return 1;
- }
- CMD:rdelete(playerid, params[]) //radio delete
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new radio;
- new str[128];
- if(!sscanf(params, "i", radio))
- {
- if(radio < 0 || radio > 10) return SendClientMessage(playerid, COLOR_GREY, "Radio Station can't be below 1 or above 10.");
- radio -= 1;
- if(radioInfo[radio][taken] != 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "That Radio Station is isn't taken.");
- return 1;
- }
- format(str, sizeof(str), "Radio Station %d has been deleted.", radio +1);
- SendClientMessage(playerid, COLOR_GREY, str);
- clearRadioInfo(radio);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /rcreate [radiostation]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- return 1;
- }
- CMD:facdeposit(playerid, params[])
- {
- new faction[6], amount;
- new str[128];
- if(PlayerInfo[playerid][pLeader] == 6)
- {
- if(IsPlayerAtBankingPoint(playerid))
- {
- if(sscanf(params, "s[128]i", faction, amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/facdeposit [faction] [amount]");
- format(str, sizeof(str), "SAPD: $%d", SAPD);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "FBI: $%d", FBI);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "SASD: $%d", SAST);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "SAFMD: $%d", FMD);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "DoC: $%d", DOC);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "SCOTUS: $%d", SCOTUS);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "NEWS: $%d", NEWS);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "TAXI: $%d", TAXI);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else if(strcmp(faction, "SAPD", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- SAPD += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the SAPD account, there is now $%d inside.", amount, SAPD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }
- /*else if(strcmp(faction, "FBI", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- FBI += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the FBI account, there is now $%d inside.", amount, FBI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }
- else if(strcmp(faction, "SASD", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- SAST += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the SASD account, there is now $%d inside.", amount, SAST);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }*/
- else if(strcmp(faction, "SAFMD", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- FMD += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the SAFMD account, there is now $%d inside.", amount, FMD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }
- /*else if(strcmp(faction, "DoC", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- DOC += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the DoC account, there is now $%d inside.", amount, DOC);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }*/
- else if(strcmp(faction, "SCOTUS", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- SCOTUS += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the SCOTUS account, there is now $%d inside.", amount, SCOTUS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }
- else if(strcmp(faction, "NEWS", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- NEWS += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the News Company account, there is now $%d inside.", amount, NEWS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }
- /*else if(strcmp(faction, "TAXI", true) == 0)
- {
- if(amount > 0 && amount < PlayerInfo[playerid][pCash])
- {
- TAXI += amount;
- GiveMoney(playerid, -amount);
- SaveFactionBanks();
- format(str, sizeof(str), "You have deposited $%d into the San Andreas Taxi Company account, there is now $%d inside.", amount, TAXI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much.");
- }
- return 1;
- }*/
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not at the bank counter.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not the President or Vice President.");
- return 1;
- }
- return 1;
- }
- CMD:facwithdraw(playerid, params[])
- {
- if(IsPlayerAtBankingPoint(playerid))
- {
- new str[128];
- if(PlayerInfo[playerid][pLeader] == 1)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", SAPD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > SAPD) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- SAPD -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, SAPD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- /*else if(PlayerInfo[playerid][pLeader] == 2)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", FBI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > FBI) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- FBI -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, FBI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- else if(PlayerInfo[playerid][pLeader] == 3)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", SAST);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > SAST) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- SAST -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, SAST);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }*/
- else if(PlayerInfo[playerid][pLeader] == 4)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", FMD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > FMD) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- FMD -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, FMD);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- /*else if(PlayerInfo[playerid][pLeader] == 5)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", DOC);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > DOC) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- DOC -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, DOC);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }*/
- else if(PlayerInfo[playerid][pLeader] == 7)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", SCOTUS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > SCOTUS) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- SCOTUS -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, SCOTUS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- else if(PlayerInfo[playerid][pLeader] == 9)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", NEWS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > NEWS) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- NEWS -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, NEWS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }
- /*else if(PlayerInfo[playerid][pLeader] == 10)
- {
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /facwithdraw [amount]");
- format(str, sizeof(str), "There is $%d in the account.", TAXI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- else
- {
- if(amount < 0 || amount > TAXI) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much in the account.");
- TAXI -= amount;
- PlayerInfo[playerid][pCash] += amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have withdrawn $%d, there is $%d left in the account.", amount, TAXI);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- }*/
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a faction leader with a bank account.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not at the bank counter.");
- }
- return 1;
- }
- CMD:setfsafe(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new amount, fac;
- new str[128];
- if(sscanf(params, "ii", fac, amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setfsafe [faction ID] [amount]");
- SendClientMessage(playerid, COLOR_GREY, "Factions: SAPD(ID 1), FBI(ID 2), SASD(ID 3), FMD(ID 4), DoC(ID 5), SCOTUS(ID 6), GOV(ID 7), NEWS(ID 8), TAXI(ID 9)");
- return 1;
- }
- else
- {
- switch(fac)
- {
- case 1:
- {
- SAPD = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the SAPD's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 2:
- {
- FBI = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the FBI's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 3:
- {
- SAST = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the SASD's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 4:
- {
- FMD = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the FMD's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 5:
- {
- DOC = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the DoC's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 6:
- {
- SCOTUS = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the SCOTUS's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 7:
- {
- GOV = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the GOV's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 8:
- {
- NEWS = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the NEWS's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- case 9:
- {
- TAXI = 0 + amount;
- SaveFactionBanks();
- format(str, sizeof(str), "You have set the TAXI's safe to $%d.", amount);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "{FF0000}This has been logged, so abusers will be caught.");
- SendClientMessage(playerid, COLOR_RED, str);
- }
- }
- SaveFactionBanks();
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this.");
- return 1;
- }
- CMD:lastgmx(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_GREY, lastgmx);
- return 1;
- }
- //========================[ Dynamic Vehicle sys ]===============================
- CMD:createvehicle(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_GREY, "Dynamic vehicle cmds renamed to:");
- SendClientMessage(playerid, COLOR_GREY, "/createdynamicvehicle, /destroydynamicvehicle, /editdynamicvehicle, /gotodynamicvehicle");
- return 1;
- }
- CMD:createdynamicvehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] <= 4 && PlayerInfo[playerid][pFactionMod] != 1 && PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pDev] < 2)
- return AdmErrorMsg;
- new
- modelname[128], color1, color2, faction, Float:x, Float:y, Float:z, Float:a;
- new str[128];
- if(sscanf(params, "s[128]iii", modelname, color1, color2, faction))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /createdynamicvehicle [model name or ID] [color1] [color2] [faction (0 = none)]");
- SendClientMessage(playerid, COLOR_GREY, "Faction colour IDs: DoC: 99, SAPD: 0, 1, FMD: 3, 1, SAN: 20, 1.");
- return 1;
- }
- new
- modelid = ReturnVehicleModelID(modelname);
- if(!modelid)
- return SendClientMessage(playerid, COLOR_GREY, "Invalid vehicle model name/ID.");
- if(faction > 0 && (PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pGangDirector] == 0 && PlayerInfo[playerid][pDev] < DEVRANK_SENIOR))
- return AdmErrorMsg;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- for(new i = 1; i < MAX_VEHICLES; i++)
- {
- if(!IsValidVehicle(sVehicleInfo[i][v_id]))
- {
- sVehicleInfo[i][v_id] = CreateVehicle(modelid, x, y, z, a, color1, color2, 900);
- SetVehicleLockState( sVehicleInfo[i][v_id], 0 );
- if( IsABicycle( sVehicleInfo[i][v_id] ) ) {
- SetVehicleEngineState( sVehicleInfo[i][v_id], 1 );
- }
- if(faction == 6 && modelid == 409)
- {
- SetVehicleHealth(sVehicleInfo[i][v_id], 10000);
- }
- GetVehiclePos(sVehicleInfo[i][v_id], sVehicleInfo[i][v_x], sVehicleInfo[i][v_y], sVehicleInfo[i][v_z]);
- GetVehicleZAngle(sVehicleInfo[i][v_id], sVehicleInfo[i][v_rz]);
- sVehicleInfo[i][v_model] = modelid;
- sVehicleInfo[i][v_faction] = faction;
- sVehicleInfo[i][v_sqlid] = spawned_vehicles;
- sVehicleInfo[i][v_family] = 0;
- sVehicleInfo[i][v_group] = 0;
- sVehicleInfo[i][v_lockfeature] = 0;
- spawned_vehicles++;
- format(str, sizeof(str), "You have spawned vehicle dynamic ID: %i, model: %i. SQL ID: %d. Faction link: %d", i, modelid, sVehicleInfo[i][v_sqlid], sVehicleInfo[i][v_faction]);
- SendClientMessage(playerid, COLOR_GREY, str);
- Log:debug("DynamicVehicle", "%s spawned vehicle dynamic ID: %i, model: %i, SQLID: %d. Faction link:: %d", PlayerOOCName(playerid), i, modelid, sVehicleInfo[i][v_sqlid], sVehicleInfo[i][v_faction]);
- i = MAX_VEHICLES;
- }
- }
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "INSERT INTO `vehicles` (ID, model, x, y, z, rz, color1, color2, faction)");
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "%s VALUES (NULL, %i, %f, %f, %f, %f, %i, %i, %i);", sqlstring, modelid, x, y, z, a, color1, color2, faction);
- mysql_pquery(sqlGameConnection, sqlstring);
- return 1;
- }
- CMD:parkdynamicvehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] <= 4 && PlayerInfo[playerid][pFactionMod] != 1 && PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pDev] < 2) return AdmErrorMsg;
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle");
- new vehicleid = GetPlayerVehicleID(playerid);
- new dynvehID = GetDynamicVehicleID(vehicleid);
- GetVehiclePos(sVehicleInfo[dynvehID][v_id], sVehicleInfo[dynvehID][v_x], sVehicleInfo[dynvehID][v_y], sVehicleInfo[dynvehID][v_z]);
- GetVehicleZAngle(sVehicleInfo[dynvehID][v_id], sVehicleInfo[dynvehID][v_rz]);
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `x`= %f, `y`= %f, `z`= %f, `rz`= %f WHERE `ID`=%d", sVehicleInfo[dynvehID][v_x], sVehicleInfo[dynvehID][v_y], sVehicleInfo[dynvehID][v_z], sVehicleInfo[dynvehID][v_rz], sVehicleInfo[dynvehID][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- SendClientMessage(playerid, COLOR_WHITE, "Position updated");
- SendClientMessage(playerid, COLOR_WHITE, "use editdynamicvehicle sirenfeature (toggle it on/off) to update the parking position");
- return 1;
- }
- CMD:near(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 2)) return AdmErrorMsg;
- new Float:v_fx, Float:v_fy, Float:v_fz, bydyncveh = 0;
- new str[128];
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- if(IsValidVehicle(sVehicleInfo[i][v_id]))
- {
- GetVehiclePos(sVehicleInfo[i][v_id], v_fx, v_fy, v_fz);
- if(IsPlayerInRangeOfPoint(playerid, 4, v_fx, v_fy, v_fz))
- {
- format(str, sizeof(str), "Near: dynamic vehicle ID: %i | model: %i | faction: %i | mySQL ID: %d.", i, sVehicleInfo[i][v_model], sVehicleInfo[i][v_faction], sVehicleInfo[i][v_sqlid]);
- SendClientMessage(playerid, COLOR_GREY, str);
- format(str, sizeof(str), "Near: family: %i | lockfeature: %i | sirenfeature: %i | group: %i", sVehicleInfo[i][v_family], sVehicleInfo[i][v_lockfeature], sVehicleInfo[i][v_sirenfeature], sVehicleInfo[i][v_group]);
- SendClientMessage(playerid, COLOR_GREY, str);
- bydyncveh = 1;
- }
- }
- }
- if(bydyncveh == 0)
- SendClientMessage(playerid, COLOR_GREY, "You are not by any dynamic vehicles..");
- return 1;
- }
- CMD:destroydynamicvehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] <= 4 && PlayerInfo[playerid][pFactionMod] != 1 && PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pDev] < 2)
- return AdmErrorMsg;
- new
- vehid;
- new str[128];
- if(sscanf(params, "i", vehid)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /destroydynamicvehicle [id]");
- if(IsValidVehicle(sVehicleInfo[vehid][v_id]))
- {
- if(sVehicleInfo[vehid][v_faction] > 0 && PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pGangDirector] == 0 && PlayerInfo[playerid][pDev] < DEVRANK_SENIOR)
- return AdmErrorMsg;
- format(sqlstring, sizeof(sqlstring), "DELETE FROM `vehicles` WHERE ID=%d", sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- DestroyVehicle(sVehicleInfo[vehid][v_id]);
- format(str, sizeof(str), "You have destroyed vehicle ID: %i, model: %i.", vehid, sVehicleInfo[vehid][v_model]);
- SendClientMessage(playerid, COLOR_GREY, str);
- sVehicleInfo[vehid][v_id] = -1;
- Log:debug("DynamicVehicle", "%s destroyed vehicle ID: %i, model: %i.", PlayerOOCName(playerid), vehid, sVehicleInfo[vehid][v_model]);
- }
- return 1;
- }
- CMD:gotodynamicvehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] <= 4 && PlayerInfo[playerid][pFactionMod] != 1 && PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pDev] < 2 )
- return AdmErrorMsg;
- new vehid;
- if(sscanf(params, "i", vehid))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /gotodynamicvehicle [id]");
- if(IsValidVehicle(sVehicleInfo[vehid][v_id]))
- {
- new
- Float:vx, Float:vy, Float:vz;
- GetVehiclePos(sVehicleInfo[vehid][v_id], vx, vy, vz);
- SetPlayerPos(playerid, vx, vy, vz + 1);
- new
- vstring[128];
- format(vstring, 128, "You have teleported to dynamic vehicle ID: %d.", vehid);
- SendClientMessage(playerid, COLOR_GREY, vstring);
- return 1;
- }
- SendClientMessage(playerid, COLOR_GREY, "Invalid dynamic vehicle ID.");
- return 1;
- }
- CMD:dlock(playerid, params[])// need to be revised
- {
- if(PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pFMember] == 255 && PlayerInfo[playerid][pGroup] == 0)
- return 1;
- new
- Float: vx, Float:vy, Float:vz;
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- if(IsValidVehicle(sVehicleInfo[i][v_id]))
- {
- if(!sVehicleInfo[i][v_lockfeature]) continue;
- if(sVehicleInfo[i][v_faction] == 0 && sVehicleInfo[i][v_family] == 0 && sVehicleInfo[i][v_group] == 0) continue;
- GetVehiclePos(sVehicleInfo[i][v_id], vx, vy, vz);
- if( (sVehicleInfo[i][v_faction] == PlayerInfo[playerid][pMember] && PlayerInfo[playerid][pFMember] == 255) ||
- (sVehicleInfo[i][v_family] == PlayerInfo[playerid][pFMember] && PlayerInfo[playerid][pMember] == 0) ||
- (sVehicleInfo[i][v_group] == PlayerInfo[playerid][pGroup]) ||
- PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.5, vx, vy, vz))
- {
- sVehicleInfo[i][v_lock] = !sVehicleInfo[i][v_lock];
- new dynstr[128];
- if(sVehicleInfo[i][v_lock] == 0)
- format(dynstr, sizeof(dynstr), "* %s unlocks the vehicle.", PlayerICName(playerid));
- else
- format(dynstr, sizeof(dynstr), "* %s locks the vehicle.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, dynstr, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- }
- }
- }
- return 1;
- }
- CMD:editdynamicvehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] <= 4 && PlayerInfo[playerid][pFactionMod] != 1 && PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pDev] < 2)
- return AdmErrorMsg;
- new
- vehid, action[128];
- if(sscanf(params, "is[128]D(0)D(0)", vehid, action))
- {
- SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /editdynamicvehicle [id] [action]");
- SendClientMessage(playerid, COLOR_GREY, "Available actions: faction, colors, family, lockfeature, sirenfeature, group");
- return 1;
- }
- if(IsValidVehicle(sVehicleInfo[vehid][v_id]))
- {
- new
- Float:vx, Float:vy, Float:vz, Float:vrz;
- GetVehiclePos(sVehicleInfo[vehid][v_id], vx, vy, vz);
- GetVehicleZAngle(sVehicleInfo[vehid][v_id], vrz);
- if(strcmp(action, "faction", true) == 0)
- {
- new faction;
- if(sscanf(params, "is[128]d", vehid, action, faction))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /editdynamicvehicle [id] faction [faction ID]");
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `faction` = %d WHERE ID = %d", faction, sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- sVehicleInfo[vehid][v_faction] = faction;
- // Remove group & family from this vehicle
- if(sVehicleInfo[vehid][v_family])
- sVehicleInfo[vehid][v_family] = 0;
- if(sVehicleInfo[vehid][v_group])
- sVehicleInfo[vehid][v_group] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You have successfully adjusted the vehicle's faction.");
- }
- if(strcmp(action, "family", true) == 0)
- {
- new family;
- if(sscanf(params, "is[128]d", vehid, action, family))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /editdynamicvehicle [id] family [gang slot]");
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `family` = %d WHERE ID = %d", family, sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- sVehicleInfo[vehid][v_family] = family;
- // Remove group & faction from this vehicle
- if(sVehicleInfo[vehid][v_faction])
- sVehicleInfo[vehid][v_faction] = 0;
- if(sVehicleInfo[vehid][v_group])
- sVehicleInfo[vehid][v_group] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You have successfully adjusted the vehicle's family.");
- }
- if(strcmp(action, "group", true) == 0)
- {
- new group;
- if(sscanf(params, "is[128]d", vehid, action, group))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /editdynamicvehicle [id] group [group slot]");
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `group` = %d WHERE ID = %d", group, sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- sVehicleInfo[vehid][v_group] = group;
- // Remove family & faction from this vehicle
- if(sVehicleInfo[vehid][v_faction])
- sVehicleInfo[vehid][v_faction] = 0;
- if(sVehicleInfo[vehid][v_family])
- sVehicleInfo[vehid][v_family] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You have successfully adjusted the vehicle's group.");
- }
- if(strcmp(action, "sirenfeature", true) == 0)
- {
- if(!sscanf(params, "is[128]", vehid, action))
- {
- if(!sVehicleInfo[vehid][v_sirenfeature])
- {
- sVehicleInfo[vehid][v_sirenfeature] = 1;
- SendClientMessage(playerid, COLOR_GREY, "You have successfully enabled the vehicle's siren feature.");
- }
- else
- {
- sVehicleInfo[vehid][v_sirenfeature] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You have successfully disabled the vehicle's siren feature.");
- }
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `Siren` = %d WHERE ID = %d", sVehicleInfo[vehid][v_sirenfeature], sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- SendClientMessage(playerid, COLOR_GREY, sqlstring);
- DestroyVehicle(sVehicleInfo[vehid][v_id]);
- sVehicleInfo[vehid][v_id] = CreateVehicle(sVehicleInfo[vehid][v_model],sVehicleInfo[vehid][v_x],sVehicleInfo[vehid][v_y],sVehicleInfo[vehid][v_z]+2,sVehicleInfo[vehid][v_rz],sVehicleInfo[vehid][v_color1],sVehicleInfo[vehid][v_color2],900, sVehicleInfo[vehid][v_sirenfeature]);
- }
- }
- if(strcmp(action, "lockfeature", true) == 0)
- {
- sVehicleInfo[vehid][v_lockfeature] = !sVehicleInfo[vehid][v_lockfeature];
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `lockfeature` = %d WHERE ID = %d", sVehicleInfo[vehid][v_lockfeature], sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- if(sVehicleInfo[vehid][v_lockfeature] == 1)
- SendClientMessage(playerid, COLOR_GREY, "You have successfully enabled the vehicle's locking feature.");
- else
- SendClientMessage(playerid, COLOR_GREY, "You have successfully disabled the vehicle's locking feature.");
- SendClientMessage(playerid, COLOR_GREY, "This feature allows families/factions to lock/unlock the vehicle.");
- SendClientMessage(playerid, COLOR_GREY, "It's important the vehicle is set to a faction ID or gang slot for this to work.");
- }
- else if(strcmp(action, "colors", true) == 0)
- {
- new color1, color2;
- if(sscanf(params, "is[128]dd", vehid, action, color1, color2))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /editdynamicvehicle [id] colors [color1] [color2]");
- format(sqlstring, sizeof(sqlstring), "UPDATE `vehicles` SET `color1`= %d, `color2`= %d WHERE `ID`=%d", color1, color2, sVehicleInfo[vehid][v_sqlid]);
- mysql_pquery(sqlGameConnection, sqlstring);
- sVehicleInfo[vehid][v_color1] = color1;
- sVehicleInfo[vehid][v_color2] = color2;
- ChangeVehiclePaintjob(sVehicleInfo[vehid][v_id], 3);
- ChangeVehicleColor(sVehicleInfo[vehid][v_id], color1, color2);
- SendClientMessage(playerid, COLOR_GREY, "You have successfully adjusted the vehicle's colors.");
- }
- else
- return 1;
- }
- else
- SendClientMessage(playerid, COLOR_GREY, "Invalid dynamic vehicle ID.");
- return 1;
- }
- //==============================================================================
- CMD:doorpass( playerid, params[] ) {
- new newpass[128];
- if( sscanf( params, "s[128]", newpass ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /doorpass [new password(Case Sensitive)]" );
- }
- new str[128];
- for( new d; d < MAX_DOORS; d++ ) {
- if( IsPlayerInRangeOfPoint( playerid, 5.0, Entrances[d][outside_x], Entrances[d][outside_y], Entrances[d][outside_z] ) ) {
- if( Entrances[d][eowner] == PlayerInfo[playerid][pID] ) {
- strdel( Entrances[d][dpassword], 0, 128 );
- if( strcmp(newpass, "none", true) != 0 ) {
- strins( Entrances[d][dpassword], newpass, 0 );
- }
- if( strcmp( newpass, "none", true ) != 0 ) {
- format( str, sizeof( str ), "You have changed the password for this door to %s.", newpass );
- }
- else {
- format( str, sizeof( str ), "You have removed this door's password.");
- }
- SendClientMessage( playerid, COLOR_GRAD1, str );
- return 1;
- }
- }
- }
- SendClientMessage( playerid, COLOR_GREY, "You are not by any doors that you own." );
- return 1;
- }
- CMD:dcreate(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pDev] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- new str[128];
- for(new i = 0; i < MAX_DEALERS; i++)
- {
- if(Dealerships[i][dCreated] != true)
- {
- strmid(Dealerships[i][dName], "New Dealership", 0, 64, 64);
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- Dealerships[i][dPos][0] = X;
- Dealerships[i][dPos][1] = Y;
- Dealerships[i][dPos][2] = Z;
- Dealerships[i][dPos][3] = X;
- Dealerships[i][dPos][4] = Y;
- Dealerships[i][dPos][5] = Z;
- Dealerships[i][dPos][6] = 0.0;
- Dealerships[i][dPickup] = CreateDynamicPickup(1239, 23, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2]);
- format(str, sizeof(str), "Dealership\nName: %s\nID: %d\n/buycar to buy a car.", Dealerships[i][dName], i);
- Dealerships[i][d3DText] = CreateDynamic3DTextLabel(str, 0xFE9A2EFF, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2] +0.8, 60.0);
- Dealerships[i][dCreated] = true;
- for(new c = 0; c < 64; c++)
- {
- Dealerships[i][dCars][c] = 0;
- Dealerships[i][dCarPrice][c] = 0;
- }
- SendClientMessage(playerid, COLOR_GRAD1, "Successfully created a dealership at your position! /dedit to edit it.");
- SaveDealerships();
- break;
- }
- }
- return 1;
- }
- CMD:dedit(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] > 3 || PlayerInfo[playerid][pDev] > 1)
- {
- SetPVarInt(playerid, "edittingdealer", -1);
- for(new i = 0; i < MAX_DEALERS; i++)
- {
- if(Dealerships[i][dCreated] == true)
- {
- if(IsPlayerInRangeOfPoint(playerid, 4.0, Dealerships[i][dPos][0], Dealerships[i][dPos][1], Dealerships[i][dPos][2]))
- {
- format(str, sizeof(str), "Dealership: %s, %d", Dealerships[i][dName], i);
- ShowPlayerDialog(playerid, 12400, DIALOG_STYLE_LIST, str, "Change Name\nManage Cars\nChange Position\nChange Car Spawning Position\nRemove", "Select", "Cancel");
- SetPVarInt(playerid, "edittingdealer", i);
- break;
- }
- }
- }
- if(GetPVarInt(playerid, "edittingdealer") == -1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You're not near any dealership.");
- DeletePVar(playerid, "edittingdealer");
- }
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:ddone(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pDev] < 2 && PlayerInfo[playerid][pBizMod] < 1 && PlayerInfo[playerid][pMapper] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- new did = GetPVarInt(playerid, "movedealerid");
- new eid = GetPVarInt(playerid, "movingdealerid");
- new str[128];
- if( GetPlayerVirtualWorld( playerid ) < 0 ) {
- return SendClientMessage( playerid, COLOR_GREY, "You cannot be inside a negative Virtual World, use /setworld. /ddone when you are done editing." );
- }
- if(eid == 1 && Dealerships[did][dCreated])
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- Dealerships[did][dPos][0] = X;
- Dealerships[did][dPos][1] = Y;
- Dealerships[did][dPos][2] = Z;
- DestroyDynamic3DTextLabel(Dealerships[did][d3DText]);
- DestroyDynamicPickup(Dealerships[did][dPickup]);
- Dealerships[did][dPickup] = CreateDynamicPickup(1239, 23, Dealerships[did][dPos][0], Dealerships[did][dPos][1], Dealerships[did][dPos][2]);
- format(str, sizeof(str), "Dealership\nName: %s\nID: %d\n/buycar to buy a car.", Dealerships[did][dName], did);
- Dealerships[did][d3DText] = CreateDynamic3DTextLabel(str, 0xFE9A2EFF, Dealerships[did][dPos][0], Dealerships[did][dPos][1], Dealerships[did][dPos][2] +0.8, 40.0);
- SaveDealerships();
- SendClientMessage(playerid, COLOR_YELLOW, "You have updated that dealership's position.");
- }
- else if(eid == 2 && Dealerships[did][dCreated])
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Dealerships[did][dPos][3] = X;
- Dealerships[did][dPos][4] = Y;
- Dealerships[did][dPos][5] = Z;
- Dealerships[did][dPos][6] = A;
- SaveDealerships();
- SendClientMessage(playerid, COLOR_YELLOW, "You have updated that dealership's vehicle spawning position.");
- }
- SetPVarInt(playerid, "movedealerid", -1);
- SetPVarInt(playerid, "movingdealerid", -1);
- // Doors
- did = GetPVarInt(playerid, "door_editing_id");
- new dty = GetPVarInt(playerid, "door_editing_type");
- if(dty == 1) // Exterior Moving
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Entrances[did][outside_x] = X;
- Entrances[did][outside_y] = Y;
- Entrances[did][outside_z] = Z;
- Entrances[did][outside_a] = A;
- Entrances[did][outside_i] = GetPlayerInterior(playerid);
- Entrances[did][outside_w] = GetPlayerVirtualWorld(playerid);
- new actualpickupid = 0;
- if(Entrances[did][outside_icon] == 0) actualpickupid = 19198;
- else if(Entrances[did][outside_icon] == 1) actualpickupid = 1239;
- else if(Entrances[did][outside_icon] == 2) actualpickupid = 19131;
- else if(Entrances[did][outside_icon] == 3) actualpickupid = 19132;
- else if(Entrances[did][outside_icon] == 4) actualpickupid = 19133;
- else if(Entrances[did][outside_icon] == 5) actualpickupid = 19134;
- else if(Entrances[did][outside_icon] == 6) actualpickupid = 19135;
- if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
- if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
- if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
- if( Entrances[did][outside_icon] == 0 ) {
- EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]+0.4, Entrances[did][outside_w]);
- EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z]+0.4, Entrances[did][inside_w]);
- } else {
- EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z], Entrances[did][outside_w]);
- EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z], Entrances[did][inside_w]);
- }
- new doornametext[128];
- format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[did][doorname]);
- EntranceRefText[did] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z] +0.75, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, Entrances[did][outside_w], Entrances[did][outside_i]);
- SaveEntrances();
- SendClientMessage(playerid, COLOR_YELLOW, "You have updated that door's position.");
- format(str, sizeof(str), "%s has moved door ID %d.", PlayerName(playerid), did);
- printf(str);
- }
- if(dty == 2) // Interior Moving
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Entrances[did][inside_x] = X;
- Entrances[did][inside_y] = Y;
- Entrances[did][inside_z] = Z;
- Entrances[did][inside_a] = A;
- Entrances[did][inside_i] = GetPlayerInterior(playerid);
- Entrances[did][inside_w] = GetPlayerVirtualWorld(playerid);
- new actualpickupid = 0;
- if(Entrances[did][outside_icon] == 0) actualpickupid = 19198;
- else if(Entrances[did][outside_icon] == 1) actualpickupid = 1239;
- else if(Entrances[did][outside_icon] == 2) actualpickupid = 19131;
- else if(Entrances[did][outside_icon] == 3) actualpickupid = 19132;
- else if(Entrances[did][outside_icon] == 4) actualpickupid = 19133;
- else if(Entrances[did][outside_icon] == 5) actualpickupid = 19134;
- else if(Entrances[did][outside_icon] == 6) actualpickupid = 19135;
- if(EntranceRef[did]) DestroyDynamicPickup(EntranceRef[did]);
- if(EntranceRefInt[did]) DestroyDynamicPickup(EntranceRefInt[did]);
- if(EntranceRefText[did]) DestroyDynamic3DTextLabel(EntranceRefText[did]);
- if( Entrances[did][outside_icon] == 0 ) {
- EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z]+0.4, Entrances[did][outside_w]);
- EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z]+0.4, Entrances[did][inside_w]);
- } else {
- EntranceRef[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z], Entrances[did][outside_w]);
- EntranceRefInt[did] = CreateDynamicPickup(actualpickupid, 23, Entrances[did][inside_x], Entrances[did][inside_y], Entrances[did][inside_z], Entrances[did][inside_w]);
- }
- new doornametext[128];
- format(doornametext, sizeof(doornametext), "{43527D}%s{FFFFFF}\n\nType /enter to go inside.", Entrances[did][doorname]);
- EntranceRefText[did] = CreateDynamic3DTextLabel(doornametext, COLOR_ENTRANCE, Entrances[did][outside_x], Entrances[did][outside_y], Entrances[did][outside_z] +0.75, 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, Entrances[did][outside_w], Entrances[did][outside_i]);
- SaveEntrances();
- SendClientMessage(playerid, COLOR_YELLOW, "You have updated that door's interior position.");
- format(str, sizeof(str), "%s has edited the interior of door ID %d.", PlayerName(playerid), did);
- printf(str);
- }
- SetPVarInt(playerid, "door_editing_id", -1);
- SetPVarInt(playerid, "door_editing_type", -1);
- return 1;
- }
- CMD:givegear(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}You're not authorized to use that command.");
- new player2;
- if(sscanf(params, "u", player2)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givegear [PlayerID/PartOfName]");
- if(!IsPlayerConnected(player2)) return SendClientMessage(playerid, COLOR_GRAD1, "That player isn't connected to the server.");
- SetPVarInt(playerid, "ToGiveAccessorTo", player2);
- ShowPlayerDialog(playerid, 24210, DIALOG_STYLE_MSGBOX, "Giving gear to player", "Would you like to search for the model or view the list of possible models to give?", "Search", "List");
- return 1;
- }
- CMD:removegear(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- new player;
- if(sscanf(params, "u", player)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removegear [PlayerID/PartOfName]");
- SetPVarInt(playerid, "ToRemoveAccessor", player);
- new bigstring[512], access[7], adminaccess[7];
- for(new clear = 0; clear < 7; clear++)
- {
- access[clear] = -1;
- adminaccess[clear] = -1;
- }
- for(new check = 0; check < sizeof(AccessNames); check++)
- {
- for(new n = 0; n < 7; n++)
- {
- if(AccessNames[check][modid] == Accessories[player][n])
- {
- access[n] = check;
- }
- }
- }
- for(new check = 0; check < sizeof(AdminAccessers); check++)
- {
- for(new n = 0; n < 7; n++)
- {
- if(AdminAccessers[check][modid] == Accessories[player][n])
- {
- adminaccess[n] = check;
- }
- }
- }
- for(new i = 0; i < 7; i++)
- {
- if(access[i] != -1)
- {
- format(bigstring, sizeof(bigstring), "%s\n%s", bigstring, AccessNames[access[i]][modname]);
- }
- else if(adminaccess[i] != -1)
- {
- format(bigstring, sizeof(bigstring), "%s\n%s", bigstring, AdminAccessers[adminaccess[i]][modname]);
- }
- else format(bigstring, sizeof(bigstring), "%s\nEmpty", bigstring);
- }
- ShowPlayerDialog(playerid, 24200, DIALOG_STYLE_LIST, "Remove Gear", bigstring, "Remove", "Cancel");
- return 1;
- }
- CMD:removeinvalidmods(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return 1;
- new bugsremoved = 0;
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- for(new c = 0; c < 14; c++)
- {
- new component = GetVehicleComponentInSlot(i, c);
- if(!islegalcarmod(i, component))
- {
- RemoveVehicleComponent(i, component);
- bugsremoved++;
- }
- }
- }
- printf("[Mods]: %s has looped the vehicles for invalid mods, removing %d mods.", PlayerICName(playerid), bugsremoved);
- SendClientMessage(playerid, COLOR_GRAD1, "Invalid mods removed.");
- return 1;
- }
- CMD:getcarhere(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new vid;
- if(sscanf(params, "i", vid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /getcarhere [ID]");
- if(vid == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOR_GRAD1, "Invalid vehicle ID.");
- new int = GetPlayerInterior(playerid);
- new vw = GetPlayerVirtualWorld(playerid);
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- SetVehiclePos(vid, X, Y, Z);
- SetVehicleZAngle(vid, A);
- SetVehicleVirtualWorld(vid, vw);
- LinkVehicleToInterior(vid, int);
- PutPlayerInVehicle(playerid, vid, 0);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- return 1;
- }
- CMD:clearads(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- format(str, sizeof(str), "");
- for(new i = 0; i < adCount; i++)
- {
- advertInfo[i][AD_ACTIVE] = false;
- format(advertInfo[i][AD_AUTHOR], 0, "None");
- advertInfo[i][AD_PHONE] = 0;
- format(advertInfo[i][AD_STRING], 0, "None");
- }
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: An admin has cleared all of the advertisements.");
- ABroadCast(COLOR_WHITE, str, 1);
- }
- return 1;
- }
- CMD:clearmychat(playerid, params[])
- {
- for(new i = 0; i < 100; i++)
- {
- SendClientMessage(playerid, COLOR_WHITE, " ");
- }
- GameTextForPlayer(playerid, "Your chat has been ~r~cleared~w~.", 3000, 5);
- return 1;
- }
- CMD:clearchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new reason[128];
- new str[128];
- sscanf(params, "s[128]", reason);
- if(!strlen(reason)) format(reason, sizeof(reason), "No reason specified.");
- for(new i = 0; i < 100; i++)
- {
- SendClientMessageToAll(COLOR_GREY, "");
- }
- if(PlayerInfo[playerid][pAdmin] != 0) format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: Chat cleared by an admin, reason: %s", reason);
- else format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: Chat cleared by helper %s, reason: %s", PlayerICName(playerid), reason);
- ABroadCast(COLOR_LIGHTRED, str, 1);
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:setmyfamily(playerid, params[])
- {
- //if(PlayerInfo[playerid][pGangDirector] > 0 || PlayerInfo[playerid][pGangModd] > 0 || PlayerInfo[playerid][pAdmin] >= 4)
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGangDirector] > 0)
- {
- new slot;
- if(sscanf(params, "i", slot)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setmyfamily [family number]");
- new slotname[128];
- if(slot < 0 || slot > 20) return SendClientMessage(playerid, COLOR_RED, "** Invalid slot number.");
- if(slot == 0)
- {
- PlayerInfo[playerid][pFMember] = 255;
- PlayerInfo[playerid][pRank] = 0;
- strmid(slotname, "None", 0, 255);
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- }
- else
- {
- PlayerInfo[playerid][pFMember] = slot -1;
- PlayerInfo[playerid][pRank] = 6;
- strmid(slotname, FamilyInfo[slot -1][FamilyName], 0, 255);
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- }
- new str[128];
- format(str, sizeof(str), "You have set your family to %s (Slot #%d)", slotname, slot);
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:allowcbug(playerid, params[])
- return cmd_allowcs(playerid, params);
- CMD:allowcs(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return AdmErrorMsg;
- new str[128];
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /allowcs [PartOfName/ID]");
- if(!IsPlayerConnected(giveplayerid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(!PlayerInfo[giveplayerid][pAdmin])
- return SendClientMessage(playerid, COLOR_GREY, "You can only use this command on admins.");
- if(!CSDisable[giveplayerid])
- {
- CSDisable[giveplayerid] = 1;
- format(str, sizeof(str), "%s is now allowed to crack shoot.", PlayerICName(giveplayerid));
- }
- else
- {
- CSDisable[giveplayerid] = 0;
- format(str, sizeof(str), "%s is now prohibited to crack shoot.", PlayerICName(giveplayerid));
- }
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- CMD:doorinfo(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pBizMod] == 1 || PlayerInfo[playerid][pMapper] >= 3 || PlayerInfo[playerid][pBizMod])
- {
- new str[128];
- for(new i = 0; i < sizeof(Entrances); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]) && GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w] && GetPlayerInterior(playerid) == Entrances[i][outside_i])
- {
- if(strlen(Entrances[i][createdby]) == 0) format(str, sizeof(str), "Name: %s\nID: %d, Created by: NULL.\nOwnerSQL: %d", Entrances[i][doorname], i, Entrances[i][eowner] );
- else format(str, sizeof(str), "Name: %s\nID: %d, Created by: %s.\nOwnerSQL: %d", Entrances[i][doorname], i, Entrances[i][createdby], Entrances[i][eowner]);
- SendClientMessage(playerid, SAMP_COLOR, str);
- break;
- }
- else
- {
- if(i == sizeof(Entrances) -1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not near a door.");
- }
- }
- }
- }
- return 1;
- }
- CMD:gotodoor(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 2)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new doortogoto;
- new str[128];
- if(sscanf(params, "i", doortogoto)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotodoor [door id]");
- {
- if(doortogoto < 0 || doortogoto > 1000) return SendClientMessage(playerid, COLOR_RED, "** Invalid amount.");
- new count = doortogoto;
- format(str, sizeof(str), "%0.2f,%0.2f,%0.2f", Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z]);
- if(strcmp(str, "0.00,0.00,0.00", true) == 0) return SendClientMessage(playerid, COLOR_RED, "** Unused door ID.");
- SetPlayerPos(playerid, Entrances[count][outside_x], Entrances[count][outside_y], Entrances[count][outside_z]);
- SetPlayerFacingAngle(playerid, Entrances[count][outside_a]);
- SetPlayerInterior(playerid, Entrances[count][outside_i]);
- SetPlayerVirtualWorld(playerid, Entrances[count][outside_w]);
- displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
- format(str, sizeof(str), "You have teleporting to door id %d.", count);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- // Doors
- CMD:editdoor(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pBizMod] != 0 || PlayerInfo[playerid][pMapper] >= 3 || PlayerInfo[playerid][pBizMod])
- {
- // This is an odd style, but it improves readability (to me, at least).
- ShowPlayerDialog(playerid,
- DIALOG_EDITDOOR_MAIN,
- DIALOG_STYLE_LIST,
- "Edit Door - Main",
- "Create Door\nEdit Name\nEdit Entrance Position\nEdit Interior Position\nEdit Icon\nChange Password\nFreeze On Enter/Exit\n\nSet Owner\nRemove Door\nCreate Private Door",
- "Select",
- "Cancel");
- }
- else
- SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- CMD:approvename(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128];
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /approvename [playerid/partofname]");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerConnected(GetPlayerIDFromName(NameChangeRequest[giveplayerid])))
- {
- strmid(NameChangeRequest[giveplayerid], "0", 0, 255);
- SendClientMessage(playerid, COLOR_WHITE, "That name is already in use!");
- return 1;
- }
- if(strcmp(NameChangeRequest[giveplayerid], "0", true) != 0)
- {
- new namechangeprice = 0, group = PlayerInfo[giveplayerid][pGroup];
- if(PlayerInfo[giveplayerid][pMember] != 2 && PlayerInfo[giveplayerid][pMember] != 11 && group != GROUP_HITMAN)
- {
- if(PlayerInfo[giveplayerid][pLevel] <= 5) namechangeprice = 15000 * PlayerInfo[giveplayerid][pLevel];
- else if(PlayerInfo[giveplayerid][pLevel] >= 6) namechangeprice = 50000 * PlayerInfo[giveplayerid][pLevel];
- }
- if(isDonatedGroup(PlayerInfo[giveplayerid][pGroup]))// Discount for donated groups (50% off)
- namechangeprice = floatround(namechangeprice / 2, floatround_ceil);
- //owned stuff
- if(PlayerInfo[giveplayerid][pBizKey] != -1) //owns a business
- {
- new biz = PlayerInfo[giveplayerid][pBizKey];
- strmid(BizInfo[biz][bOwner], NameChangeRequest[giveplayerid], 0, strlen(NameChangeRequest[giveplayerid]), 255);
- // Government seized
- if(BizInfo[biz][bSeized] == 1)
- {
- format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[biz][bName]);
- }
- // Judicial Department seized
- else if(BizInfo[biz][bSeized] == 2) {
- format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[biz][bName]);
- }
- else
- {
- if(BizInfo[biz][bLocked] == 1)
- {
- format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nBusiness Status: Locked", BizInfo[biz][bName], BizInfo[biz][bOwner]);
- }
- else
- {
- format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName], BizInfo[biz][bOwner]);
- }
- }
- UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
- }
- if(PlayerInfo[giveplayerid][pFMember] != 255) //owns a family
- {
- new family = PlayerInfo[giveplayerid][pFMember];
- if(strcmp(FamilyInfo[family][FamilyLeader], PlayerName(giveplayerid), true) == 0)
- {
- strmid(FamilyInfo[family][FamilyLeader], NameChangeRequest[giveplayerid], 0, strlen(NameChangeRequest[giveplayerid]), 255);
- SaveFamilies();
- }
- }
- if(PlayerInfo[giveplayerid][pRadioStation] != 255) //owns a radio station
- {
- new radio = PlayerInfo[giveplayerid][pRadioStation];
- if(strcmp(radioInfo[radio][ownerName], PlayerName(giveplayerid), true) == 0)
- {
- strmid(radioInfo[radio][ownerName], NameChangeRequest[giveplayerid], 0, strlen(NameChangeRequest[giveplayerid]), 255);
- SaveRadios();
- }
- }
- GiveMoney(giveplayerid, -namechangeprice);
- //message
- format(str, sizeof(str), "* You have approved %s's name change request.", PlayerName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Your name change request has been approved for $%d.", namechangeprice);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has approved %s's name change request.", PlayerName(playerid), PlayerName(giveplayerid));
- SendAdminMessage(COLOR_WHITE, str);
- //log the namechange
- format(str, sizeof(str), "%s has renamed %s to %s (/approvename).", PlayerName(playerid), PlayerName(giveplayerid), NameChangeRequest[giveplayerid]);
- StatLog(str);
- //update db
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Name` = '%e' WHERE `Name` = '%e' LIMIT 1", NameChangeRequest[giveplayerid], PlayerName(giveplayerid));
- mysql_pquery(sqlGameConnection, query); //send the query
- NameChangeLog(PlayerName(giveplayerid), NameChangeRequest[giveplayerid], PlayerName(playerid), PlayerInfo[playerid][pID], PlayerInfo[giveplayerid][pID]);
- //update new name
- SetPlayerName(giveplayerid, NameChangeRequest[giveplayerid]);
- //reset the namechange request?
- strmid(NameChangeRequest[giveplayerid], "0", 0, 255);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player hasn't requested a name change.");
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "%s is not an active player.", giveplayerid);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- return 1;
- }
- CMD:undercover(playerid, params[])
- {
- if(
- PlayerInfo[playerid][pGroup] != GROUP_HITMAN && PlayerInfo[playerid][pGroup] != GROUP_S9
- ) return 1;
- new newName[25], newLevel;
- if(sscanf(params, "s[25]d", newName, newLevel)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /undercover [name] [level]");
- if(!IsValidName(newName)) return SendClientMessage(playerid, -1, "The name you requested doesn't follow the format of: \"Firstname_Lastname\"");
- if(newLevel < 1 || newLevel > 50) return SendClientMessage(playerid, COLOR_GREY, "Your level must be between 1-50.");
- new str[128];
- format(str, sizeof(str), "Your name has to be no longer than %d characters.", 25);
- if(strlen(newName) > 25) return SendClientMessage(playerid, COLOR_GREY, str);
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", newName);
- mysql_pquery(sqlGameConnection, query, "OnUndercoverNamechange", "isi", playerid, newName, newLevel);
- groupNamechangeRequest[playerid] = newName;
- groupLevelChangeRequest[playerid] = newLevel;
- return 1;
- }
- CMD:approveuc(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN && PlayerInfo[playerid][pGroupRank] == 4 || PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pGroupRank] == 2){
- }
- new str[128];
- new toplayer;
- if(sscanf(params, "u", toplayer)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /approveuc [player]");
- if(!IsPlayerConnected(toplayer)) return SendClientMessage(playerid, COLOR_GREY, "That player is not online.");
- if(PlayerInfo[playerid][pLeader] == FACTION_FBI) { // For FBI | DEA
- if(PlayerInfo[playerid][pMember] != PlayerInfo[toplayer][pMember])
- return SendClientMessage(playerid, COLOR_GREY, "That player is not a member of your organization.");
- }
- else { // For groups
- if(PlayerInfo[playerid][pGroup] != PlayerInfo[toplayer][pGroup])
- return SendClientMessage(playerid, COLOR_GREY, "That player is not a member of your organization.");
- }
- // Check request
- if(strlen(groupNamechangeRequest[toplayer]) < 4)
- return SendClientMessage(playerid, COLOR_GREY, "This player does not have a valid /hnc request at the moment.");
- // If the player owns a business
- if(PlayerInfo[toplayer][pBizKey] != -1) {
- new biz = PlayerInfo[toplayer][pBizKey];
- strmid(BizInfo[biz][bOwner], groupNamechangeRequest[toplayer], 0, strlen(groupNamechangeRequest[toplayer]), 255);
- // Fix the business' labels.
- if(BizInfo[biz][bSeized] == 1) format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{696969}Government", BizInfo[biz][bName]);
- else if(BizInfo[biz][bSeized] == 2) format(str, sizeof(str), "{AFAFAF}%s{AFAFAF}\n{FFFFFF}This business has been seized by the\n{BA6103}Judicial Department", BizInfo[biz][bName]);
- else {
- if(BizInfo[biz][bLocked] == 1) format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s\nBusiness Status: Locked", BizInfo[biz][bName], BizInfo[biz][bOwner]);
- else format(str, sizeof(str), "{3D97E0}%s{FFFFFF}\nOwner: %s", BizInfo[biz][bName]);
- }
- UpdateDynamic3DTextLabelText(Text3D:BizText[biz], COLOR_BIZTEXT, str);
- }
- if(PlayerInfo[toplayer][pFMember] != 255) //owns a family
- {
- new family = PlayerInfo[toplayer][pFMember];
- if(strcmp(FamilyInfo[family][FamilyLeader], PlayerName(toplayer), true) == 0)
- {
- strmid(FamilyInfo[family][FamilyLeader], groupNamechangeRequest[toplayer], 0, strlen(groupNamechangeRequest[toplayer]), 255);
- SaveFamilies();
- }
- }
- if(PlayerInfo[toplayer][pRadioStation] != 255) //owns a radio station
- {
- new radio = PlayerInfo[toplayer][pRadioStation];
- if(strcmp(radioInfo[radio][ownerName], PlayerName(toplayer), true) == 0)
- {
- strmid(radioInfo[radio][ownerName], groupNamechangeRequest[toplayer], 0, strlen(groupNamechangeRequest[toplayer]), 255);
- SaveRadios();
- }
- }
- format(str, sizeof(str), "* You have approved %s's undercover request.", PlayerName(toplayer));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(toplayer, COLOR_LIGHTBLUE, "* Your undercover request has been approved.");
- //log the namechange
- format(str, sizeof(str), "%s has renamed %s to %s. Level changed from %d to %d. (/approveuc).",
- PlayerName(playerid), PlayerName(toplayer), groupNamechangeRequest[toplayer], PlayerInfo[toplayer][pLevel], groupLevelChangeRequest[toplayer]);
- StatLog(str);
- //update db
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `Name` = '%e' WHERE `Name` = '%e' LIMIT 1", groupNamechangeRequest[toplayer], PlayerName(toplayer));
- mysql_pquery(sqlGameConnection, query); //send the query
- NameChangeLog(PlayerName(toplayer), groupNamechangeRequest[toplayer], PlayerName(playerid), PlayerInfo[playerid][pID], PlayerInfo[toplayer][pID]);
- format(str, sizeof(str), "%s has approved an undercover namechange from %s to %s with level %d", PlayerICName(playerid), PlayerICName(toplayer), groupNamechangeRequest[toplayer], groupLevelChangeRequest[toplayer]);
- SendAdminMessage(COLOR_LIGHTBLUE, str);
- //update new name
- SetPlayerName(toplayer, groupNamechangeRequest[toplayer]);
- PlayerInfo[toplayer][pLevel] = groupLevelChangeRequest[toplayer];
- //reset the namechange request?
- strmid(groupNamechangeRequest[toplayer], "0", 0, 255);
- return 1;
- }
- CMD:denyname(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128];
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /denyname [PlayerID/PartOfName]");
- if(!IsPlayerConnected(giveplayerid) || giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid ID");
- if(!strcmp(NameChangeRequest[giveplayerid], "0", true)) return SendClientMessage(playerid, COLOR_GREY, "That player has not submitted a namechange request.");
- strmid(NameChangeRequest[giveplayerid], "0", 0, 255);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Your name change request has been denied.");
- format(str, sizeof(str), "* You have denied %s's name change request.", PlayerICName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has denied %s's namechange request.", PlayerICName(playerid), PlayerICName(giveplayerid));
- SendAdminMessage(COLOR_WHITE, str);
- }
- else SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- CMD:namerequests(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new requestlistItems = 0;
- new str[128];
- SendClientMessage(playerid, COLOR_YELLOW, "** Name Change Requests **");
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(strcmp(NameChangeRequest[i], "0", true) != 0)
- {
- requestlistItems++;
- format(str, sizeof(str), "- Request %d: %s [%d] to %s.", requestlistItems, PlayerICName(i), i, NameChangeRequest[i]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- }
- if(requestlistItems == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "- None.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- return 1;
- }
- CMD:addsurname(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new tmp2[24];
- new giveplayerid;
- new str[128];
- if(sscanf(params, "s[24] u", tmp2, giveplayerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /addsurname [Surname] [playerid/PartOfName]");
- return 1;
- }
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- for(new i = 0; i < sizeof(SurnameInfo); i++)
- {
- if(strcmp(SurnameInfo[i][Surname], tmp2) == 0 && SurnameInfo[i][Taken] == 1)
- {
- return SendClientMessage(playerid, COLOR_GRAD1, "That surname is already restricted.");
- }
- if(SurnameInfo[i][Taken] != 1)
- {
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "* You've made the surname %s restricted with %s as the owner of it", tmp2, giveplayer);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Admin %s has restricted the surname %s with you as the owner of it.", sendername, tmp2);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "%s", giveplayer);
- strmid(SurnameInfo[i][Owner], str, 0, strlen(str), 255);
- format(str, sizeof(str), "%s", tmp2);
- strmid(SurnameInfo[i][Surname], str, 0, strlen(str), 255);
- format(str, sizeof(str), "%s", sendername);
- strmid(SurnameInfo[i][AddedBy], str, 0, strlen(str), 255);
- SurnameInfo[i][Taken] = 1;
- SaveSurnames();
- break;
- }
- else
- {
- continue;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- }
- return 1;
- }
- CMD:removesurname(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- new tempstr[128];
- if(sscanf(params, "s[128]", tempstr)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removesurname [Surname]");
- new str[128];
- for(new i = 0; i < MAX_SURNAMES; i++)
- {
- if(strcmp(SurnameInfo[i][Surname], tempstr) == 0 && SurnameInfo[i][Taken] == 1)
- {
- strmid(SurnameInfo[i][Surname], "", 0, 255);
- strmid(SurnameInfo[i][Owner], "", 0, 255);
- strmid(SurnameInfo[i][AddedBy], "", 0, 255);
- SurnameInfo[i][Taken] = 0;
- SaveSurnames();
- format(str, sizeof(str), "** You have removed the restricted surname %s.", tempstr);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- break;
- }
- else
- {
- if(i +1 == MAX_SURNAMES)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "That surname is not restricted.");
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}You're not authorized to use that command.");
- return 1;
- }
- }
- return 1;
- }
- CMD:surnamelist(playerid, params[])
- {
- new surnames[6000], surnameCount;
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- for(new i = 0; i < MAX_SURNAMES; i++)
- {
- if(SurnameInfo[i][Taken] == 1)
- {
- surnameCount++;
- format(surnames, sizeof(surnames), "%s\n%s Owner: %s, added by: %s", surnames, SurnameInfo[i][Surname], SurnameInfo[i][Owner], SurnameInfo[i][AddedBy]);
- }
- }
- if(surnameCount) ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Surname List", surnames, "Close", "");
- else SendClientMessage(playerid, COLOR_GREY, "No restricted surnames found.");
- }
- }
- return 1;
- }
- CMD:wanted(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] == 2)
- {
- new wantedList[3000], count =0;
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pWantedLevel] > 0)
- {
- strmid(giveplayer, PlayerICName(i), 0, MAX_PLAYER_NAME);
- switch(PlayerInfo[i][pWantedLevel])
- {
- case 1..3:
- {
- format(wantedList, sizeof(wantedList), "%s\n{FFFFFF}Name: %s Wanted Level: %d", wantedList, giveplayer, PlayerInfo[i][pWantedLevel]);
- count++;
- }
- case 4..5:
- {
- format(wantedList, sizeof(wantedList), "%s\n{FFE100}Name: %s Wanted Level: %d", wantedList, giveplayer, PlayerInfo[i][pWantedLevel]);
- count++;
- }
- case 6:
- {
- format(wantedList, sizeof(wantedList), "%s\n{D40000}Name: %s Wanted Level: %d", wantedList, giveplayer, PlayerInfo[i][pWantedLevel]);
- count++;
- }
- }
- }
- }
- if(count == 0)format(wantedList, sizeof(wantedList), "There are currently no wanted players.");
- ShowPlayerDialog(playerid, DIALOG_WANTED, DIALOG_STYLE_LIST, "Wanted suspects", wantedList, "Ok", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not a Lawyer.");
- return 1;
- }
- CMD:calls(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 10)
- {
- new taxistring[1600];
- new taxicalls;
- for(new i = 0; i < MAX_TAXICALLS; i++)
- {
- if(strlen(TaxiCInfo[i][taxiname]) > 2)
- {
- new temp_taxistring[128];
- format(temp_taxistring, sizeof(temp_taxistring), "{FFFFFF}ID: %i{B8B8B8} | %s at %s | Phone: #%s\n", i, TaxiCInfo[i][taxiname], TaxiCInfo[i][taxilocation], TaxiCInfo[i][taxiphone]);
- strcat(taxistring, temp_taxistring);
- temp_taxistring = "";
- taxicalls++;
- }
- }
- strcat(taxistring, "\n{FFFFFF}Enter the caller ID to load into your GPS:");
- if(taxicalls > 0) return ShowPlayerDialog(playerid, TAXICALL_DIALOG, DIALOG_STYLE_INPUT, "Taxi Calls", taxistring, "Accept", "Cancel");
- if(taxicalls == 0) return SendClientMessage(playerid, COLOR_GREY, " No pending calls.");
- }
- return 1;
- }
- CMD:clearcalls(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 10)
- {
- for(new i = 0; i < MAX_TAXICALLS; i++)
- {
- TaxiCInfo[i][taxiname] = "0";
- }
- SendClientMessage(playerid, COLOR_GREY, " All calls have been canceled.");
- }
- return 1;
- }
- CMD:cancelcall(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 10) return 1;
- new
- callID;
- if(sscanf(params, "d", callID))
- {
- SetPlayerColor(GetPlayerIDFromName(TaxiCID[playerid]), 0xFFFFFF);
- TaxiCID[playerid] = -1;
- }
- SendClientMessage(playerid, COLOR_GREY, " The call has been canceled.");
- if(CP[playerid] == CHECKPOINT_TAXI_CALLER)
- {
- CP[playerid] = CHECKPOINT_NONE;
- DisablePlayerCheckpointEx(playerid);
- }
- TaxiCInfo[callID][taxiname] = "0";
- return 1;
- }
- CMD:call(playerid, params[])
- {
- if(PhoneOffline[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "Your cellphone is currently turned off, use /togphone.");
- if(PlayerInfo[playerid][pCash] < 25)
- return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to make that call. ($25)");
- if(CheckForJammer(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "Phone signal has been jammed.");
- if( PlayerInfo[playerid][pAdminJailed] ||
- PlayerInfo[playerid][pJailed]
- ) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't use this whilst you're in prison.");
- if(PlayerInfo[playerid][pHospital] || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL)
- return SendClientMessage(playerid, COLOR_GRAD2, "You are unable to use a phone at this time.");
- new payPhoneId = IsPlayerNearPayPhone(playerid);
- if(!payPhoneId && PlayerInfo[playerid][pJailed] == 2)
- return SendClientMessage(playerid, COLOR_GRAD2, "You are not at the prison payphone.");
- if(PlayerInfo[playerid][pPnumber] == 0 && payPhoneId == -1)
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone. You can buy one from any 24/7.");
- if(payPhoneId >= 0)
- {
- if(usePayphone[playerid] == -1 && payPhone[payPhoneId][inUse])
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "This payphone is currently in use by another player.");
- }
- }
- new phonenumb;
- new str[128];
- if(sscanf(params, "d", phonenumb)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /call [phone number]");
- if(phonenumb == PlayerInfo[playerid][pPnumber]) return SendClientMessage(playerid, COLOR_GREY, "You cannot call yourself.");
- if(payPhoneId == -1)
- {
- format(str, sizeof(str), "* %s takes out a cellphone.", PlayerICName(playerid));
- if(phonenumb != 420)
- {
- attachPhoneToPlayer(playerid);
- }
- }
- else
- {
- format(str, sizeof(str), "* %s places a call at the payphone.", PlayerICName(playerid));
- payPhone[payPhoneId][inUse] = 1;
- usePayphone[playerid] = payPhoneId;
- }
- if(!cellMuted[playerid])
- {
- playLocalSound(playerid, CELLPHONE_DIAL, 2.0, 400);
- }
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- if(phonenumb == 911)
- {
- if(payPhoneId == -1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
- SendClientMessage(playerid, COLOR_YELLOW, "(cellphone) 911 Operator: Hello, which service do you require, police, paramedic or fire?");
- Mobile[playerid] = 911;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your call was rejected.");
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- detachPhoneFromPlayer(playerid);
- }
- return 1;
- }
- if(phonenumb == 420)
- {
- if(payPhoneId == -1)
- {
- if(PlayerInfo[playerid][pJob] == 14 || PlayerInfo[playerid][pMember] == 10) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot call your own company !");
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
- new bool:lineflooded = true;
- for(new i = 1; i < MAX_TAXICALLS; i++)
- {
- 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 !");
- if((strlen(TaxiCInfo[i][taxiname]) < 3))
- {
- TaxiCInfoID[i] = playerid;
- TaxiCInfo[i][taxiname] = PlayerICName(playerid); //name
- GetPlayer2DZone(playerid, TaxiCInfo[i][taxilocation], sizeof(TaxiCInfo[][])); //location
- valstr(TaxiCInfo[i][taxiphone], PlayerInfo[playerid][pPnumber]); //phone
- format(str, sizeof(str), "[Taxi Hotline] %s needs a taxi to %s, pronto ((/calls))!", TaxiCInfo[i][taxiname], TaxiCInfo[i][taxilocation]);
- SendFamilyMessage(10, COLOR_YELLOW, str);
- i = MAX_TAXICALLS;
- lineflooded = false;
- }
- if((i == MAX_TAXICALLS - 1) && lineflooded == true) return OnHangup(playerid, "(cellphone) Taxi Operator: We have no more employees available right now, try again later.");
- }
- return OnHangup(playerid, "(cellphone) Taxi Operator: A taxi driver will be with you soon!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your call was rejected.");
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- detachPhoneFromPlayer(playerid);
- }
- return 1;
- }
- if(phonenumb == 63971)
- {
- if(payPhoneId == -1)
- {
- if(hotlineState)
- {
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
- SendClientMessage(playerid, COLOR_YELLOW, "(cellphone) Operator: Hello, you're through to San Andreas News. Please state your query!");
- Mobile[playerid] = 63971;
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Hello, you're through to San Andreas News! We're very sorry but our hotline is closed right now.");
- SendClientMessage(playerid, COLOR_GRAD2, "They hung up...");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Your call was rejected.");
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- }
- return 1;
- }
- if(phonenumb == PlayerInfo[playerid][pPnumber] && usePayphone[playerid] == -1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You just get a busy tone...");
- detachPhoneFromPlayer(playerid);
- ClearAnimationsEx(playerid);
- detachPhoneFromPlayer(playerid);
- return 1;
- }
- if(Mobile[playerid] != 999)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You are already on a call...");
- return 1;
- }
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
- {
- if(Blocked[i][Number1] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number2] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number3] == PlayerInfo[playerid][pPnumber] || Blocked[playerid][Number4] == PlayerInfo[playerid][pPnumber] || Blocked[i][Number5] == PlayerInfo[playerid][pPnumber])
- {
- SendClientMessage(playerid, COLOR_GREY, "That players phone is currently offline.");
- return 1;
- }
- Mobile[playerid] = i;
- if(PhoneOffline[i] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "That players phone is currently offline.");
- Mobile[playerid] = 999;
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- return 1;
- }
- if(PlayerInfo[i][pHospital] != 0 || PlayerTied[i] != 0 || PlayerCuffed[i] != 0 || PlayerInfo[i][pJailed] != 0 || PlayerTazed[i] != 0 || CheckForJammer(i))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "That player is unable to speak at this time.");
- Mobile[playerid] = 999;
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- return 1;
- }
- if(Mobile[i] == 999)
- {
- if(payPhoneId == -1) format(str, sizeof(str), "%s", "Your mobile phone is ringing. Type (/p)ickup to answer.");
- else format(str, sizeof(str), "%s", "Your mobile phone is ringing. Type (/p)ickup to answer (PAYPHONE CALL).");
- if(!cellMuted[i])
- {
- playLocalSound(i, CELLPHONE_RING, 6.0, 0);
- }
- SendClientMessage(i, COLOR_YELLOW, str);
- format(str, sizeof(str), "* %s's phone begins to ring.", PlayerICName(i));
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type (/h)angup to hang up.");
- ProxDetector(30.0, i, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- CellTime[playerid] = 1;
- beingCalled[i] = true;
- if(PlayerInfo[playerid][pJailed] == 2)
- {
- TogglePlayerControllable(playerid, false);
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You just get a busy tone...");
- if(usePayphone[playerid] != -1)
- {
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- }
- Mobile[playerid] = 999;
- detachPhoneFromPlayer(playerid);
- return 1;
- }
- }
- }
- SendClientMessage(playerid, COLOR_GRAD2, "You just get a busy tone...");
- detachPhoneFromPlayer(playerid);
- if(usePayphone[playerid] != -1)
- {
- payPhone[payPhoneId][inUse] = 0;
- usePayphone[playerid] = -1;
- }
- Mobile[playerid] = 999;
- return 1;
- }
- CMD:speakerphone(playerid, params[])
- {
- if(usePayphone[playerid] > -1)
- return SendClientMessage(playerid, COLOR_GRAD2, "This phone does not have a speaker.");
- if(PlayerInfo[playerid][pPnumber] == 0 && usePayphone[playerid] == -1)
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone. You can buy one from any 24/7.");
- if(Mobile[playerid] == 999)
- return SendClientMessage(playerid, COLOR_GREY, "You are not on a phone call.");
- if(!PlayerInfo[playerid][pSpeakPhone])
- {
- SendClientMessage(playerid, COLOR_YELLOW2, "Speaker phone on.");
- PlayerInfo[playerid][pSpeakPhone] = 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW2, "Speaker phone off.");
- PlayerInfo[playerid][pSpeakPhone] = 0;
- }
- return 1;
- }
- CMD:p(playerid, params[])
- {
- PickupCall(playerid);
- return 1;
- }
- CMD:pickup(playerid, params[])
- {
- PickupCall(playerid);
- return 1;
- }
- CMD:hangup(playerid, params[])
- {
- if(IsPlayerFalling(playerid) || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL)
- {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use this right now.");
- }
- else
- {
- HangupCall(playerid);
- }
- return 1;
- }
- CMD:h(playerid, params[])
- return cmd_hangup(playerid, params);
- CMD:sanjingle(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pMember] == FACTION_NEWS && PlayerInfo[playerid][pRank] >= 1))
- return AdmErrorMsg;
- if(!PlayerInfo[playerid][pOnDuty])
- return SendClientMessage(playerid, COLOR_GREY, "You need to be on duty.");
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(sVehicleInfo[GetDynamicVehicleID(GetPlayerVehicleID(playerid))][v_faction] != FACTION_NEWS)
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You have to be in a San Andreas Network issued vehicle.");
- }
- else
- {
- if(PlayerInfo[playerid][pRank] <= 5) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You have to be in a San Andreas Network issued vehicle.");
- }
- new str[128];
- format(str, sizeof(str), "SAN %s: ** The SAN Jingle begins to play as your current broadcast fades out **", PlayerICName(playerid));
- OOCNews(COLOR_NEWS, str);
- foreach( new i: Player )
- {
- if(GetPVarInt(i, "AudioDisabled") != 1)
- {
- PlayAudioStreamForPlayer(i, "http://tinyurl.com/Thornton100");
- SendClientMessage(i, COLOR_ORANGE, "Type /stopplay to stop the music, /toggleplay to toggle all streams.");
- }
- }
- return 1;
- }
- CMD:sponsor(playerid, params[])
- {
- new amount;
- if(sscanf(params, "d", amount))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sponsor [amount]");
- if(amount <= 0 || amount > PlayerInfo[playerid][pCash])
- return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The amount you want to sponsor to the San Andreas Network can not be less than one or greater than your money on hand.");
- new str[128];
- format(str, sizeof(str), "Thank you for sponsoring $%d to the San Andreas Network.", amount);
- SendClientMessage(playerid, COLOR_GREY, str);
- GiveMoney(playerid, -amount);
- NEWS += amount;
- SaveFactionBanks();
- return 1;
- }
- CMD:toghotline(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_NEWS)
- return AdmErrorMsg;
- toggledHotlined[playerid] = !toggledHotlined[playerid];
- if(!toggledHotlined[playerid])
- SendClientMessage(playerid, COLOR_YELLOW, "You will now see the SAN hotline calls again.");
- else
- SendClientMessage(playerid, COLOR_YELLOW, "You will no longer see the SAN hotline calls.");
- return 1;
- }
- CMD:sanhotline(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_NEWS)
- return AdmErrorMsg;
- if(PlayerInfo[playerid][pRank] < 3)
- return SendClientMessage(playerid, COLOR_GREY, "Only R3 and above can use this.");
- hotlineState = !hotlineState;
- if(hotlineState)
- SendClientMessage(playerid, COLOR_YELLOW, "You have turned the hotline back online.");
- else
- SendClientMessage(playerid, COLOR_YELLOW, "You have turned the hotline offline.");
- return 1;
- }
- CMD:sanwithdraw(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] != FACTION_NEWS)
- return SendClientMessage(playerid, COLOR_GREY, "You are not a leader of SAN news.");
- new amount = 0;
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sanwithdraw [amount]");
- new str[128];
- format(str, sizeof(str), "There is $%d in the safe.", NEWS);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- return 1;
- }
- if(amount < 0 || amount > NEWS)
- return SendClientMessage(playerid, COLOR_GRAD1, "Invalid amount.");
- NEWS -= amount;
- GiveMoney(playerid, amount);
- new str[128];
- format(str, sizeof(str), "You have withdrawn $%d from the safe, there is $%d left.", amount, NEWS);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:showpresscard(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_NEWS)
- return AdmErrorMsg;
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /showp(ress)c(ard) [playerID/PartOfName]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, targetid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not near that player.");
- new str[128];
- format(str, sizeof(str), "* %s shows %s press card to %s.", PlayerICName(playerid), GetPlayerGender(playerid), PlayerICName(targetid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "[San Andreas Network - %s %s]", GetPlayerRank(playerid), PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- return 1;
- }
- CMD:showpc(playerid, params[]) return cmd_showpresscard(playerid, params);
- CMD:adblacklist(playerid, params[]) return cmd_blacklistad(playerid, params);
- CMD:blacklistad(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 4) return AdmErrorMsg;
- new targetid, reason[64];
- new str[128];
- if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /blacklistad [playerID/PartOfName] [reason]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[targetid][pAdMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is already muted from advertisements.");
- if(strlen(reason) > 64) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The reason can not exceed more than 64 characters.");
- format(str, sizeof(str), "SMS: You are blacklisted from posting advertisements for %s, Sender: San Andreas Network (63971)", reason);
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "You have blacklisted %s from posting advertisements for %s.", PlayerOOCName(targetid), reason);
- SendClientMessage(playerid, COLOR_DARKRED, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has blacklisted %s from posting advertisements for %s.", PlayerOOCName(playerid), PlayerOOCName(targetid), reason);
- printf("%s has blacklisted %s from posting advertisements for %s.", PlayerOOCName(playerid), PlayerOOCName(targetid), reason);
- ABroadCast(COLOR_WHITE, str, 4);
- PlayerInfo[targetid][pAdMuted] = 1;
- return 1;
- }
- CMD:adunblacklist(playerid, params[]) return cmd_unblacklistad(playerid, params);
- CMD:unblacklistad(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 4) return AdmErrorMsg;
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /unblacklistad [playerID/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[targetid][pAdMuted] == 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not muted from advertisements.");
- SendClientMessage(targetid, COLOR_YELLOW, "SMS: You are unblacklisted from posting advertisements, Sender: San Andreas Network (63971)");
- format(str, sizeof(str), "You have unblacklisted %s from posting advertisements.", PlayerOOCName(targetid));
- SendClientMessage(playerid, COLOR_DARKRED, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has unblacklisted %s from posting advertisements.", PlayerOOCName(playerid), PlayerOOCName(targetid));
- printf("%s has unblacklisted %s from posting advertisements.", PlayerOOCName(playerid), PlayerOOCName(targetid));
- ABroadCast(COLOR_WHITE, str, 4);
- PlayerInfo[targetid][pAdMuted] = 0;
- return 1;
- }
- CMD:blacklisted(playerid, params[])// untested
- {
- new bannedstr[3000];
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 4) return AdmErrorMsg;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdMuted])
- {
- format(bannedstr, sizeof(bannedstr), "%s\n %s", bannedstr, PlayerOOCName(i));
- }
- }
- }
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Online Blacklisted Players", bannedstr, "Close", "");
- return 1;
- }
- CMD:placecamera(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 2) return AdmErrorMsg;
- if(cameraTaken == true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The San Andreas Network Camera is being used by somebody.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You placed the San Andreas Network camera, use /startbroadcast to start broadcasting.");
- new Float: p[4], vw = GetPlayerVirtualWorld(playerid), int = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, p[0], p[1], p[2]);
- GetPlayerFacingAngle(playerid, p[3]);
- cameraPos[0] = p[0];
- cameraPos[1] = p[1];
- cameraPos[2] = p[2];
- cameraPos[3] = p[3];
- cameraLookat[0] = p[0];
- cameraLookat[1] = p[1];
- cameraLookat[2] = p[2];
- cameraLookat[3] = p[3];
- GetXYInFrontOfPlayer(playerid, cameraLookat[0], cameraLookat[1], cameraLookat[2], cameraLookat[3], 1);
- cameraPlacedByID = playerid;
- cameraTaken = true;
- cameraVirtualWorld = vw;
- cameraInterior = int;
- cameraObject = CreateDynamicObject(1622, p[0], p[1], p[2], 0.0, 0.0, 0.0, cameraVirtualWorld, cameraInterior);
- cameraText = CreateDynamic3DTextLabel("San Andreas Network Camera", COLOR_LIGHTBLUE, p[0], p[1], p[2], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, cameraVirtualWorld, cameraInterior);
- return 1;
- }
- CMD:startbroadcast(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 2) return AdmErrorMsg;
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, cameraPos[0], cameraPos[1], cameraPos[2])) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not near the San Andreas Network Camera!");
- if(cameraLive == true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The San Andreas Network Camera is already live.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You started to broadcast the San Andreas Network with the camera, it is live now.");
- UpdateDynamic3DTextLabelText(cameraText, COLOR_LIGHTBLUE, "San Andreas Network Camera (Live)");
- cameraLive = true;
- return 1;
- }
- CMD:endbroadcast(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 2) return AdmErrorMsg;
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, cameraPos[0], cameraPos[1], cameraPos[2])) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not near the San Andreas Network Camera!");
- if(cameraLive == false) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The San Andreas Network Camera is not live.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You ended the broadcast of the San Andreas Network with the camera, it is not live anymore.");
- UpdateDynamic3DTextLabelText(cameraText, COLOR_LIGHTBLUE, "San Andreas Network Camera");
- cameraLive = false;
- return 1;
- }
- CMD:pickupcamera(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] < 2) return AdmErrorMsg;
- if(cameraTaken != true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The San Andreas Network Camera is not being used anybody.");
- if(IsPlayerInRangeOfPoint(playerid, 5.0, cameraPos[0], cameraPos[1], cameraPos[2]))
- {
- if(cameraLive == false) SendClientMessage(playerid, COLOR_LIGHTBLUE, "You picked up the San Andreas Network camera.");
- else SendClientMessage(playerid, COLOR_LIGHTBLUE, "You picked up the San Andreas Network camera and caused it to end its broadcast.");
- cameraPlacedByID = INVALID_PLAYER_ID;
- cameraTaken = false;
- cameraLive = false;
- cameraPos[0] = 0;
- cameraPos[1] = 0;
- cameraPos[2] = 0;
- cameraPos[3] = 0;
- cameraVirtualWorld = 0;
- cameraInterior = 0;
- if(cameraObject) { DestroyDynamicObjectEx(cameraObject); }
- cameraObject = 0;
- DestroyDynamic3DTextLabel(cameraText);
- cameraText = Text3D:INVALID_3DTEXT_ID;
- }
- else
- {
- if(CP[playerid] != CHECKPOINT_NONE) return SendClientMessage(playerid, COLOR_GREY, "You already have a checkpoint out, kill it first (/killcp).");
- DisablePlayerCheckpointEx(playerid);
- SetPlayerCheckpointEx(playerid, cameraPos[0], cameraPos[1], cameraPos[2], 3.0);
- CP[playerid] = CHECKPOINT_SANCAMERA;
- SendClientMessage(playerid, COLOR_GRAD1, "A checkpoint was set for you to the San Andreas Network's Camera.");
- }
- return 1;
- }
- CMD:watchtv(playerid, params[])
- {
- if(IsPlayerRestricted(playerid) || PlayerFrozen[playerid] != 0 || IsFishing[playerid] != 0 || pDeathState[playerid] != PLAYER_STATE_NORMAL || GetPlayerAnimationIndex(playerid) == 1130) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(cameraLive != true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} The San Andreas Network Channel is not live.");
- if(inHouse[playerid] == false || inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not near a television.");
- if(WatchingTV[playerid] == true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are already watching television, use /stopwatchingtv to stop watching television.");
- WatchingTV[playerid] = true;
- GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
- GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
- PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
- PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
- SetPlayerVirtualWorld(playerid, cameraVirtualWorld);
- SetPlayerInterior(playerid, cameraInterior);
- SetPlayerPos(playerid, cameraPos[0], cameraPos[1], cameraPos[2]-10);
- SetPlayerCameraPos(playerid, cameraPos[0], cameraPos[1], cameraPos[2]);
- SetPlayerCameraLookAt(playerid, cameraLookat[0], cameraLookat[1], cameraLookat[2]);
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_GREY, "You are now watching the San Andreas Network Channel on television.");
- return 1;
- }
- CMD:stopwatchingtv(playerid, params[])
- {
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(WatchingTV[playerid] != true) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not watching television.");
- WatchingTV[playerid] = false;
- SetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
- SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- TogglePlayerControllable(playerid, 1);
- SetCameraBehindPlayer(playerid);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SendClientMessage(playerid, COLOR_GREY, "You stopped watching television.");
- return 1;
- }
- CMD:watchers(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9) return SendClientMessage(playerid, COLOR_GREY, "You are not SAN.");
- new wcounter = 0;
- foreach( new i: Player )
- {
- if(WatchingTV[i] == false) continue;
- wcounter++;
- }
- new str[128];
- format(str, sizeof(str), "There are currently %d watchers.", wcounter);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- CMD:sandonate(playerid, params[])
- {
- new amount;
- if(sscanf(params, "i", amount)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /sandonate [amount]");
- if(amount > PlayerInfo[playerid][pCash]) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much on you.");
- if(amount < 10000) return SendClientMessage(playerid, COLOR_GREY, "The minimum amount for donation is $10,000.");
- NEWS += amount;
- GiveMoney(playerid, -amount);
- new str[128];
- format(str, sizeof(str), "You have donated %d to the SAN!", amount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pMember] == 9 && togsandonate[i] != 1)
- {
- format(str, sizeof(str), "%s has donated %d to the SAN! (/togsandonate to disable this notification)", PlayerICName(playerid), amount);
- SendClientMessage(i, COLOR_YELLOW, str);
- }
- }
- return 1;
- }
- CMD:togsandonate(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 9) return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the News Agency.");
- if(togsandonate[playerid] == 0)
- {
- togsandonate[playerid] = 1;
- SendClientMessage(playerid, COLOR_GREY, "You will no longer be notified of people donating to the SAN.");
- }
- else
- {
- togsandonate[playerid] = 0;
- SendClientMessage(playerid, COLOR_GREY, "You will now be notified of people donating to the SAN.");
- }
- return 1;
- }
- CMD:dealerships(playerid, params[])
- {
- new bigstr[512];
- new d = 0;
- new str[128];
- for(new i = 0; i < MAX_DEALERS; i++)
- {
- if(Dealerships[i][dCreated] == true)
- {
- format(str, sizeof(str), "dealerlist_%d", d);
- SetPVarInt(playerid, str, i);
- format(bigstr, sizeof(bigstr), "%s%s\n", bigstr, Dealerships[i][dName]);
- d++;
- }
- }
- ShowPlayerDialog(playerid, 24325, DIALOG_STYLE_LIST, "Dealerships", bigstr, "Locate", "Cancel");
- return 1;
- }
- CMD:giveweaponlicense(playerid, params[])
- {
- if( ( PlayerInfo[playerid][pMember] == 6 && PlayerInfo[playerid][pRank] >= 2) )
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /g(ive)w(eapon)l(icense) [player id or name]");
- {
- if(IsPlayerConnected(targetid))
- {
- if(GetDistanceBetweenPlayers(playerid, targetid) < 5.0)
- {
- if(playerid != targetid)
- {
- if(PlayerInfo[targetid][pWeaponLicense] == 0)
- {
- format(str, sizeof(str), "[License] You have given %s their weapon license.", PlayerOOCName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[License] You have received your weapon license from %s.", PlayerOOCName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- PlayerInfo[targetid][pWeaponLicense] = 1;
- new query[200], day, month, year, hour, minute, second, dstr[40];
- gettime(hour, minute, second);
- getdate(year, month, day);
- format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
- mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `weaponslog` (`Name`, `GivenBy`, `Date`, `Taken`) VALUES('%e', '%e', '%e', 0)", PlayerOOCName(targetid), PlayerOOCName(playerid), dstr);
- mysql_pquery(sqlGameConnection, query, "", "");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player already has a weapon license.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't give yourself a weapon license.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be close to the player in order to give them a weapon license.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:gwl(playerid, params[]) return cmd_giveweaponlicense(playerid, params);
- CMD:takelicense(playerid, params[])
- {
- if(!IsACop(playerid))
- return AdmErrorMsg;
- new type[10], targetid;
- if(sscanf(params, "us[10]", targetid, type))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /takelicense [playerid/name] [driving/sailing/weapon/fishing]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(GetDistanceBetweenPlayers(playerid, targetid) > 5)
- return SendClientMessage(playerid, COLOR_GREY, "You are not close enough to this player.");
- new takenLicenseName[24];
- if(strmatch(type, "driving"))
- {
- if(!PlayerInfo[targetid][pCarLicense])
- return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a driving license.");
- PlayerInfo[targetid][pCarLicense] = 0;
- format(takenLicenseName, sizeof(takenLicenseName), "driving");
- }
- else if(strmatch(type, "sailing"))
- {
- if(!PlayerInfo[targetid][pBoatLicense])
- return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a sailing license.");
- PlayerInfo[targetid][pBoatLicense] = 0;
- format(takenLicenseName, sizeof(takenLicenseName), "sailing");
- }
- else if(strmatch(type, "fishing"))
- {
- if(!PlayerInfo[targetid][pFishLic])
- return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a fishing license.");
- PlayerInfo[targetid][pFishLic] = 0;
- format(takenLicenseName, sizeof(takenLicenseName), "fishing");
- }
- else if(strmatch(type, "weapon"))
- {
- if(!PlayerInfo[targetid][pWeaponLicense])
- return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a weapon license.");
- PlayerInfo[targetid][pWeaponLicense] = 0;
- format(takenLicenseName, sizeof(takenLicenseName), "weapon");
- new query[200], day, month, year, hour, minute, second, dstr[40];
- gettime(hour, minute, second);
- getdate(year, month, day);
- format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
- mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `weaponslog` (`Name`, `GivenBy`, `Date`, `Taken`) VALUES('%e', '%e', '%e', 1)", PlayerOOCName(targetid), PlayerOOCName(playerid), dstr);
- mysql_pquery(sqlGameConnection, query, "", "");
- }
- new str[128];
- format(str, sizeof(str), "* You have taken away %s's %s license.", PlayerICName(targetid), takenLicenseName);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "* %s has taken away your %s license.", PlayerICName(playerid), takenLicenseName);
- SendClientMessage(targetid, COLOR_YELLOW, str);
- return 1;
- }
- CMD:givelicense(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new type[10], targetid;
- new str[128];
- if(sscanf(params, "us[10]", targetid, type)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givelicense [playerid/name] [driving/boat/weapon]");
- {
- if(IsPlayerConnected(targetid))
- {
- if(strmatch(type, "driving"))
- {
- if(PlayerInfo[targetid][pCarLicense] == 0)
- {
- PlayerInfo[targetid][pCarLicense] = 1;
- format(str, sizeof(str), "[License Given] %s has given you a driving license.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[License Given] You have given %s a driving license.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player has a driving license.");
- }
- else if(strmatch(type, "boat"))
- {
- if(PlayerInfo[targetid][pBoatLicense] == 0)
- {
- PlayerInfo[targetid][pBoatLicense] = 1;
- format(str, sizeof(str), "[License Withdrawal] %s has given you your sailing license.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[License Withdrawal] You have given %s a sailing license.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a sailing license.");
- }
- else if(strmatch(type, "weapon"))
- {
- if(PlayerInfo[targetid][pWeaponLicense] == 0)
- {
- PlayerInfo[targetid][pWeaponLicense] = 1;
- format(str, sizeof(str), "[License Withdrawal] %s has given you your weapon license.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "[License Withdrawal] You have given %s a weapon license.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- new query[250], day, month, year, hour, minute, second, dstr[40];
- gettime(hour, minute, second);
- getdate(year, month, day);
- format(dstr, sizeof(dstr), "%d/%d/%d %d:%d:%d", day, month, year, hour, minute, second);
- mysql_format(sqlGameConnection, query, sizeof(query), "INSERT INTO `weaponslog` (`Name`, `GivenBy`, `Date`, `Taken`) VALUES('%e', '%e', '%e', 0)", PlayerOOCName(targetid), PlayerOOCName(playerid), dstr);
- mysql_pquery(sqlGameConnection, query, "", "");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a weapon license.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /takelicense [playerid/name] [driving/boat/weapon]");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:hupgrade(playerid, params[])
- {
- if(PlayerInfo[playerid][pHouseID] != 0)
- {
- ShowPlayerDialog(playerid, DIALOG_HOUSEUPGRADE, DIALOG_STYLE_LIST, "House Upgrades", "Alarm ($30,000)", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't own a house.");
- return 1;
- }
- CMD:buycar(playerid, params[])
- {
- for(new d = 0; d < MAX_DEALERS; d++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, Dealerships[d][dPos][0], Dealerships[d][dPos][1], Dealerships[d][dPos][2]))
- {
- new player;
- new slot = GetPlayerFreeCarslot( player );
- if( slot == 0 ) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have any free slots to buy another car. Sell a car first, or dump one.");
- if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You must play for at least 2 hours to buy a vehicle.");
- new bigstr[1024];
- bigstr = "Vehicle\tPrice\n";
- for(new c = 0; c < 64; c++)
- {
- if(Dealerships[d][dCars][c] >= 400)
- {
- format(bigstr, sizeof(bigstr), "%s%s\t{3e823f}$%s\n", bigstr, GetVehicleFriendlyNameFromModel(Dealerships[d][dCars][c]), AddThousandsSeparators(Dealerships[d][dCarPrice][c]));
- }
- }
- new str[128];
- format(str, sizeof(str), "%s", Dealerships[d][dName]);
- ShowPlayerDialog(playerid, 12460, DIALOG_STYLE_TABLIST_HEADERS, str, bigstr, "Purchase", "Cancel");
- SetPVarInt(playerid, "buyingdealer", d);
- break;
- }
- }
- return 1;
- }
- CMD:gear(playerid, params[])
- {
- if(IsPlayerGagged(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use this while gagged.");
- ShowAccessDialog(playerid, 0);
- return 1;
- }
- CMD:removehyd(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, COLOR_GRAD1, "You must be in a vehicle to use this command.");
- new vid = GetPlayerVehicleID(playerid);
- if(vid == INVALID_VEHICLE_ID)
- return SendClientMessage(playerid, COLOR_GRAD1, "For some epic reason, your car has an invalid vehicle ID.");
- if(GetVehicleComponentInSlot(vid, CARMODTYPE_HYDRAULICS) != 1087)
- return SendClientMessage(playerid, COLOR_GRAD1, "This car does not have hydraulics on it.");
- RemoveVehicleComponent(vid, 1087);
- SendClientMessage(playerid, COLOR_GRAD1, "Hydraulics removed.");
- return 1;
- }
- CMD:hpm(playerid, params[]){
- if(PlayerInfo[playerid][pHelper] == 0)return SendClientMessage(playerid, COLOR_GREY, "You're not a Helper.");
- new targetid, msg[128];
- new str[128];
- if(sscanf(params, "us[128]", targetid, msg))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /hpm [playerid/name] [message]");
- {
- if(IsPlayerConnected(targetid))
- {
- format(str, sizeof(str), "Helper %s: %s", PlayerOOCName(playerid), msg);
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "You messaged %s: %s", PlayerOOCName(targetid), msg);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- new hrank[30];
- switch(PlayerInfo[playerid][pHelper]){
- case 1:hrank = "Trial Helper";
- case 2:hrank = "Helper";
- case 3:hrank = "Senior Helper";
- case 4:hrank = "Head Helper";
- case 5:hrank = "Director of The Helpers Team";
- }
- if(AdminHelp[targetid] == 1)
- {
- format(str, 256, "** %s: %s[%d] has responded to %s's request for help with: %s.", hrank, PlayerICName(playerid), playerid, PlayerICName(targetid), msg);
- SendHelperMessage(NEWBIE_COLOR, str, 0);
- AdminHelp[targetid] = 0;
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
- }
- return 1;
- }
- CMD:hveh(playerid, params[]){
- if(PlayerInfo[playerid][pHelper] == 0)return SendClientMessage(playerid, COLOR_GREY, "You're not a Helper.");
- if(HelpingNewbie[playerid] == false)return SendClientMessage(playerid, COLOR_GREY, "You're not helping a newbie.");
- if(HelperVeh2[playerid] == true)return SendClientMessage(playerid, COLOR_GREY, "You already have a helper vehicle spawned.");
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- helperVeh[playerid] = CreateVehicle(560, x, y, z, 90.0, -1, -1, -1);
- Gas[helperVeh[playerid]] = 100;
- new engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(helperVeh[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(helperVeh[playerid], true, true, alarm, false, bonnet, boot, objective);
- LinkVehicleToInterior(helperVeh[playerid], GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(helperVeh[playerid], GetPlayerVirtualWorld(playerid));
- gCarLock[helperVeh[playerid]] = 0;
- PutPlayerInVehicle(playerid, helperVeh[playerid], 0);
- HelperVeh2[playerid] = true;
- SetVehicleParamsForPlayer(helperVeh[playerid], playerid, 0, 0);
- return 1;
- }
- CMD:hw(playerid, params[])
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You are not inside any vehicle.");
- }
- if(GetPlayerVehicleSeat(playerid) != 0)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You are not in the driver seat.");
- }
- if(engineOn[GetPlayerVehicleID(playerid)] == 1)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "The engine is already on.");
- }
- if(!GetVehNeedHW(GetPlayerVehicleID(playerid), playerid))
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't need to hotwire this vehicle.");
- }
- if(hotWireTime[playerid] > 0)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You are already hotwiring a car.");
- }
- if(PlayerInfo[playerid][pScrew] <= 0)
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "You need a screwdriver to start hotwiring.");
- }
- hotWireVeh[playerid] = GetPlayerVehicleID(playerid);
- hotWireTime[playerid] = GetVehHWTime(playerid);
- new str[128];
- format(str, sizeof(str), "* %s starts to mess with wires under the steering column.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- CMD:siren(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new VID = GetPlayerVehicleID(playerid);
- new str[128];
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 5)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(isMotorbike(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "This vehicle can't have a siren.");
- new x_siren[128];
- if(sscanf(params, "s[128]", x_siren))
- {
- if(PlayerInfo[playerid][pMember] == 4)
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /siren [type]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available types: Roof, Off");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /siren [type]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available types: Inside, Roof, Rooftop, Off");
- return 1;
- }
- }
- else if(strcmp(x_siren, "inside", true) == 0)
- {
- if(PlayerInfo[playerid][pMember] == 4) return SendClientMessage(playerid, COLOR_GRAD2, "You can't use this.");
- if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren.");
- Siren[VID] = 1;
- SirenObject[VID] = CreateDynamicObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
- new VID2 = GetVehicleModel(VID);
- new Float:VX, Float:VY, Float:VZ;
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_FRONTSEAT, VX, VY, VZ);
- AttachDynamicObjectToVehicle(SirenObject[VID], VID, 0.0, VY +0.7, VZ +0.5, 0.0, 0.1, 0.0);
- format(str, sizeof(str), "* %s puts the siren on the dashboard.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_WHITE, "> Siren {00FF00}On{FFFFFF}!");
- return 1;
- }
- else if(strcmp(x_siren, "roof", true) == 0)
- {
- new VID2 = GetVehicleModel(VID);
- if(VID2 == 487 || VID2 == 416) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle cannot have siren.");
- if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren.");
- if(PlayerInfo[playerid][pMember] == 4 && sVehicleInfo[GetDynamicVehicleID(VID)][v_faction] != 4 && VID2 != 560) return SendClientMessage(playerid, COLOR_GRAD2, "You can't place a siren on this vehicle.");
- Siren[VID] = 1;
- SirenObject[VID] = CreateDynamicObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
- new Float:VX, Float:VY, Float:VZ;
- new Float:VX2, Float:VY2, Float:VZ2;
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_SIZE, VX, VY, VZ);
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_FRONTSEAT, VX2, VY2, VZ2);
- AttachDynamicObjectToVehicle(SirenObject[VID], VID, -0.43, VY2, VZ /1.93, 0.0, 0.1, 0.0);
- format(str, sizeof(str), "* %s puts the siren on the roof.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_WHITE, "> Siren {00FF00}On{FFFFFF}!");
- return 1;
- }
- else if(strcmp(x_siren, "rooftop", true) == 0)
- {
- if(PlayerInfo[playerid][pMember] == 4) return SendClientMessage(playerid, COLOR_GRAD2, "You can't use this.");
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "You must be atleast rank 3 to use this.");
- if(Siren[VID] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle already has a siren.");
- Siren[VID] = 1;
- new VID2 = GetVehicleModel(VID);
- if(VID == 487 || VID2 == 416) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle cannot have siren.");
- new Float:VX, Float:VY, Float:VZ;
- new Float:VX2, Float:VY2, Float:VZ2;
- SirenObject[VID] = CreateDynamicObject(19620, 10.0, 10.0, 10.0, 0, 0, 0);
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_SIZE, VX, VY, VZ);
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_FRONTSEAT, VX2, VY2, VZ2);
- AttachDynamicObjectToVehicle(SirenObject[VID], VID, 0, VY2, VZ /1.93, 0.0, 0.1, 0.0);
- format(str, sizeof(str), "* %s puts the siren on the roof.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_WHITE, "> Siren {00FF00}On{FFFFFF}!");
- return 1;
- }
- else if(strcmp(x_siren, "off", true) == 0)
- {
- if(Siren[VID] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it.");
- Siren[VID] = 0;
- if(SirenObject[VID]) { DestroyDynamicObjectEx(SirenObject[VID]); }
- SirenObject[VID] = 0;
- format(str, sizeof(str), "* %s takes down the siren.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_WHITE, "> Siren {820101}Off{FFFFFF}!");
- return 1;
- }
- else
- {
- if(PlayerInfo[playerid][pMember] == 4) return SendClientMessage(playerid, COLOR_GRAD1, "Available types: Roof, Off");
- else return SendClientMessage(playerid, COLOR_GRAD2, "Available types: Inside, Roof, Rooftop, Off");
- }
- }
- else SendClientMessage(playerid, COLOR_GREY, "You're not driving a vehicle.");
- }
- else SendClientMessage(playerid, COLOR_GREY, "You are not a Law Enforcement Official or a Paramedic.");
- }
- return 1;
- }
- CMD:taxisign(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new VID = GetPlayerVehicleID(playerid);
- new str[128];
- if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
- {
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You must be atleast Rank 4.");
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(IsAPlane(VID)) return SendClientMessage(playerid, COLOR_GREY, "This can only be used on cars.");
- else if(IsAHelicopter(VID)) return SendClientMessage(playerid, COLOR_GREY, "This can only be used on cars.");
- else if(IsABike(VID)) return SendClientMessage(playerid, COLOR_GREY, "This can only be used on cars.");
- else if(IsABoat(VID)) return SendClientMessage(playerid, COLOR_GREY, "This can only be used on cars.");
- if(Taxi[VID] == 0)
- {
- Taxi[VID] = 1;
- TaxiSign[VID] = CreateDynamicObject(19308, 10.0, 10.0, 10.0, 0, 0, 0);
- new VID2 = GetVehicleModel(VID);
- new Float:VX, Float:VY, Float:VZ;
- new Float:VX2, Float:VY2, Float:VZ2;
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_SIZE, VX, VY, VZ);
- GetVehicleModelInfo(VID2, VEHICLE_MODEL_INFO_FRONTSEAT, VX2, VY2, VZ2);
- //AttachObjectToVehicle(TaxiSign[VID], VID, -0.1, VY2, VZ/1.7, 0.0, 0.0, 90.0);
- AttachDynamicObjectToVehicle(TaxiSign[VID], VID, 0, VY2, VZ /1.75, 0.0, 0.0, 90.0);
- format(str, sizeof(str), "* %s puts the taxi sign on the roof.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- else
- {
- Taxi[VID] = 0;
- if(TaxiSign[VID]) { DestroyDynamicObjectEx(TaxiSign[VID]); }
- TaxiSign[VID] = 0;
- format(str, sizeof(str), "* %s takes down the taxi sign.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a member of the San Andreas Taxi Company.");
- return 1;
- }
- }
- return 1;
- }
- CMD:removefailedhit(playerid, params[])
- {
- new giveplayerid;
- if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorised to use that command.");
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /removefailedhit [playerid/partOfName]");
- if(PlayerInfo[giveplayerid][pFHits] >= 1)
- {
- PlayerInfo[giveplayerid][pFHits]--;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have removed a failed contract from that player.");
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* You have had a failed contract removed by an Admin.");
- return 1;
- }
- return 1;
- }
- CMD:address(playerid, params[])
- {
- if(PlayerInfo[playerid][pAddressBook] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have an address book.");
- new postalID;
- if(sscanf(params, "d", postalID)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /address [Postal Code]");
- new houseID = -1;
- for(new i = 0; i < MAX_HOUSES; i++){
- if(HouseInfo[i][hSQLID] == postalID){
- houseID = i;
- break;
- }
- }
- if(houseID == -1)
- return SendClientMessage(playerid, COLOR_GREY, "Invalid postal code");
- if(!HouseInfo[houseID][hCreated])
- return SendClientMessage(playerid, COLOR_GREY, "That house does not exist");
- if(CP[playerid] != CHECKPOINT_NONE)
- {
- CP[playerid] = CHECKPOINT_NONE;
- DisablePlayerCheckpointEx(playerid);
- }
- SetPlayerCheckpointEx(playerid, HouseInfo[houseID][hOutsideX], HouseInfo[houseID][hOutsideY], HouseInfo[houseID][hOutsideZ], 2.0);
- CP[playerid] = CHECKPOINT_ADDRESS;
- new msg[128];
- format(msg, sizeof(msg), "That house with the postal code %d has been marked on the map (red dot).", postalID);
- SendClientMessage(playerid, COLOR_WHITE, msg);
- return 1;
- }
- CMD:namechange(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 2.0, -2106.8853, 764.0605, 9006.1152))
- return SendClientMessage(playerid, COLOR_GRAD1, "You can only do this at the Service Desk inside the City Hall.");
- new str[128];
- new bool:isthereadmin = false;
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pAdmin] > 1)
- {
- isthereadmin = true;
- break;
- }
- }
- if(isthereadmin == false)
- return SendClientMessage(playerid, COLOR_GRAD1, "No admins can currently accept your name change request! Try again later.");
- if(PlayerInfo[playerid][pReqNC] > 0)
- {
- format(str, sizeof(str), "You must wait %d seconds before requesting a namechange again!", PlayerInfo[playerid][pReqNC]);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- new name[MAX_PLAYER_NAME];
- if(sscanf(params, "s[24]", name))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /namechange [firstname_lastname]");
- new namechangeprice = 0;
- if(PlayerInfo[playerid][pLevel] <= 5) {
- namechangeprice = 15000 * PlayerInfo[playerid][pLevel];
- }
- else {
- namechangeprice = 50000 * PlayerInfo[playerid][pLevel];
- }
- // Discount for donated groups (50% off)
- if(isDonatedGroup(PlayerInfo[playerid][pGroup]))
- namechangeprice = floatround(namechangeprice / 2, floatround_ceil);
- format(str, sizeof(str), "You don't have enough money ($%d) for that.", namechangeprice);
- if(GetMoney(playerid) < namechangeprice)
- return SendClientMessage(playerid, COLOR_GREY, str);
- new confirm[9];
- if(sscanf(params, "s[24] s[9]", name, confirm))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /namechange [firstname_lastname] [confirm]");
- format(str, sizeof(str), "Are you sure you want to change your name to %s for $%d?", name, namechangeprice);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- else
- {
- if(strcmp(confirm, "confirm", true) == 0)
- {
- if(!IsValidName(name) && PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, -1, "This new name isn't of valid format: \"Firstname_Lastname\"");
- format(str, sizeof(str), "Your name has to be no longer than %d characters.", MAX_PLAYER_NAME);
- if(strlen(name) > MAX_PLAYER_NAME) return SendClientMessage(playerid, COLOR_GREY, str);
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnNamechange", "is", playerid, name);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /namechange [firstname_lastname] [confirm]");
- format(str, sizeof(str), "Are you sure you want to change your name to %s for $%d?", name, namechangeprice);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- return 1;
- }
- CMD:accent(playerid, params[])
- {
- new newAccent[24];
- if(sscanf(params, "s[24]", newAccent)) {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /accent [new accent]");
- SendClientMessage(playerid, COLOR_GRAD1, "Available accents:");
- SendClientMessage(playerid, COLOR_GRAD2, "None, British, Japanese, Chinese, Korean, Scottish, Irish");
- SendClientMessage(playerid, COLOR_GRAD2, "Mexican, Hick, Cuban, Italian, Gangsta, Australian, Arab");
- SendClientMessage(playerid, COLOR_GRAD2, "Canadian, Pikey, Russian, Dutch, German, Pakistani, French");
- SendClientMessage(playerid, COLOR_GRAD2, "Iranian, Norwegian, Chinese, Thai, Brooklyn, Argentinian, Bangladeshi");
- SendClientMessage(playerid, COLOR_GRAD2, "Spanish, Turkish, African, Valley, Sicilian, Albanian, Finnish, Indian, Greek");
- return 1;
- }
- if(!strlen(newAccent))
- return SendClientMessage(playerid, COLOR_GREY, "Enter a valid accent.");
- // Reset accent
- if(!strcmp(newAccent, "none", true))
- {
- Accent[playerid] = "none";
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You will now speak with no accent, to change it, type /accent.");
- return 1;
- }
- // Check available accents
- if(
- strcmp(newAccent, "british", true) &&
- strcmp(newAccent, "japanese", true) &&
- strcmp(newAccent, "chinese", true) &&
- strcmp(newAccent, "korean", true) &&
- strcmp(newAccent, "scottish", true) &&
- strcmp(newAccent, "irish", true) &&
- strcmp(newAccent, "mexican", true) &&
- strcmp(newAccent, "hick", true) &&
- strcmp(newAccent, "cuban", true) &&
- strcmp(newAccent, "italian", true) &&
- strcmp(newAccent, "gangsta", true) &&
- strcmp(newAccent, "australian", true) &&
- strcmp(newAccent, "arab", true) &&
- strcmp(newAccent, "canadian", true) &&
- strcmp(newAccent, "pikey", true) &&
- strcmp(newAccent, "russian", true) &&
- strcmp(newAccent, "dutch", true) &&
- strcmp(newAccent, "french", true) &&
- strcmp(newAccent, "pakistani", true) &&
- strcmp(newAccent, "iranian", true) &&
- strcmp(newAccent, "norwegian", true) &&
- strcmp(newAccent, "chinese", true) &&
- strcmp(newAccent, "brooklyn", true) &&
- strcmp(newAccent, "argentinian", true) &&
- strcmp(newAccent, "thai", true) &&
- strcmp(newAccent, "spanish", true) &&
- strcmp(newAccent, "turkish", true) &&
- strcmp(newAccent, "african", true) &&
- strcmp(newAccent, "valley", true) &&
- strcmp(newAccent, "german", true) &&
- strcmp(newAccent, "sicilian", true) &&
- strcmp(newAccent, "albanian", true) &&
- strcmp(newAccent, "finnish", true) &&
- strcmp(newAccent, "indian", true) &&
- strcmp(newAccent, "bangladeshi", true) &&
- strcmp(newAccent, "greek", true)
- ) return SendClientMessage(playerid, COLOR_GREY, "Enter a valid accent.");
- // Format the new accent
- for(new i = 0; i < strlen(newAccent); i++) {
- newAccent[i] = tolower(newAccent[i]);
- }
- newAccent[0] = toupper(newAccent[0]);
- Accent[playerid] = newAccent;
- // Send message
- new str[128];
- format(str, sizeof(str), "* You will now speak with a %s accent.", newAccent);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:fall(playerid, params[])
- return cmd_falling(playerid, params);
- CMD:falling(playerid, params[]) {
- if(!IsFallingFromInterior(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use this right now.");
- if(IsPlayerRestricted(playerid) || PlayerFrozen[playerid] != 0)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use this right now.");
- if(GetPlayerInterior(playerid) == 0)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot use this right now.");
- // Teleport the player to PD
- SetPlayerPos(playerid, 1538.1589, -1674.6854, 13.5469);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- // Send message
- new str[128];
- format(str, sizeof(str), "You were falling for %i seconds.", fallingSeconds[playerid]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You were automatically teleported to safety. (/fall(ing))");
- // Send admin warning
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s was falling for %i seconds and used /fall(ing). They were teleported to PD.", PlayerName(playerid), fallingSeconds[playerid]);
- ABroadCast(COLOR_WHITE, str, 1);
- return 1;
- }
- /* CMD:report(playerid, params[])
- {
- new now = gettime();
- new str[128];
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /report [text]");
- if(now < (Reported[playerid] + 20))
- {
- format(str, sizeof(str), "You have to wait %d seconds before you can use /report again!", (Reported[playerid] + 20) - now);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else if(PlayerInfo[playerid][pRepMuted] > 0)
- {
- if(PlayerInfo[playerid][pRepMuted] > 60) {
- format(str, sizeof(str), "You are muted from using /report for %d minutes.", PlayerInfo[playerid][pRepMuted]/60);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else if(PlayerInfo[playerid][pRepMuted] < 60) {
- format(str, sizeof(str), "You are muted from using /report for %d seconds.", PlayerInfo[playerid][pRepMuted]);
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- else
- {
- //Reported[playerid] = true;
- //format(reportText[playerid], 80, "%s", result);
- format(str, sizeof(str), "Report from [%d]%s: %s", playerid, PlayerName(playerid), params);
- ABroadCast(COLOR_LIGHTYELLOW, str, 1);
- #if UseDiscordBot 1
- Discord:sendPlayerRequest(DISCORD_ADMINCHAT_CHANNEL, playerid, "Report by", params, 0xFFFF91);
- #endif
- SendClientMessage(playerid, COLOR_YELLOW, "Your report message was sent to online administrators, thank you.");
- Reported[playerid] = gettime();
- areported[playerid] = true;
- }
- return 1;
- } */
- CMD:pdcalls(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not a LEO.");
- SendClientMessage(playerid, COLOR_WHITE, "Police 911 calls:");
- new EMSstring[128], location[MAX_ZONE_NAME];
- foreach( new i: Player )
- {
- if(PlayerCalledPD[i] == 1)
- {
- GetPlayer2DZone(i, location, MAX_ZONE_NAME);
- format(EMSstring, sizeof(EMSstring), "ID: %i - %s : %s", i, PlayerOOCName(i), location);
- SendClientMessage(playerid, COLOR_GRAD1, EMSstring);
- }
- }
- return 1;
- }
- CMD:emscalls(playerid, params[]) //checking injured players
- {
- if(!IsAMedic(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not a Paramedic.");
- SendClientMessage(playerid, COLOR_WHITE, "Emergency Mobile Service:");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "{00BFFF}Usage:{FFFFFF} /accept call (id), in order to accept one of the calls.");
- new EMSstring[128], paraholder[MAX_PLAYER_NAME], location[MAX_ZONE_NAME];
- foreach( new i: Player )
- {
- if(PlayerCalledEMS[i] == 1)
- {
- paraholder = "none";
- if(CallAccepted[i] == 1)
- {
- paraholder = PlayerICName(PlayerParamedic[i]);
- }
- GetPlayer2DZone(i, location, MAX_ZONE_NAME);
- format(EMSstring, sizeof(EMSstring), "ID: %i - %s : %s :: Paramedic: %s", i, PlayerICName(i), location, paraholder);
- SendClientMessage(playerid, COLOR_GRAD1, EMSstring);
- }
- }
- return 1;
- }
- CMD:gml(playerid, params[]) {
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the SAFMD.");
- if(PlayerInfo[playerid][pRank] != 5 && PlayerInfo[playerid][pRank] != 6)
- return SendClientMessage(playerid, COLOR_GREY, "You are not the (District) Chief.");
- new toPlayer;
- if(sscanf(params, "u", toPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gml [playerid/PartOfName]");
- if(!IsPlayerConnected(toPlayer))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(toPlayer == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You cannot issue a marijuana license to yourself.");
- if( GetDistanceBetweenPlayers(playerid, toPlayer) > 3 ||
- PlayerInfo[toPlayer][pMask] ||
- GetPlayerState(toPlayer) == PLAYER_STATE_SPECTATING
- ) return SendClientMessage(playerid, COLOR_GREY, "You are not near this person.");
- new mariStr[128];
- if(PlayerInfo[toPlayer][pMarijuanaLicense]) {
- PlayerInfo[toPlayer][pMarijuanaLicense] = 0;
- format(mariStr, sizeof(mariStr), "Dispatch: %s %s has revoked %s's marijuana license.", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(toPlayer));
- SendClientMessage(toPlayer, COLOR_LIGHTBLUE, "* Your marijuana license has been revoked.");
- }
- else {
- PlayerInfo[toPlayer][pMarijuanaLicense] = 1;
- format(mariStr, sizeof(mariStr), "Dispatch: %s %s has issued a marijuana license to %s.", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(toPlayer));
- SendClientMessage(toPlayer, COLOR_LIGHTBLUE, "* You have received your marijuana license.");
- }
- SendParaMessage(COLOR_DOCTOR, mariStr);
- return 1;
- }
- CMD:getrrk(playerid, params[])
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- new str[128];
- if(IsAMedic(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new inscar = GetPlayerVehicleID(playerid), inseat;
- if(sVehicleInfo[GetDynamicVehicleID(inscar)][v_faction] != 4)
- return SendClientMessage(playerid, COLOR_GREY, "You can not get an RRK from this vehicle!");
- if(GetVehicleModel(inscar) == 416 || GetVehicleModel(inscar) == 563 || GetVehicleModel(inscar) == 489 || GetVehicleModel(inscar) == 490 || sVehicleInfo[GetDynamicVehicleID(inscar)][v_faction] == 4 && GetVehicleModel(inscar) == 560)
- {
- inseat = GetPlayerVehicleSeat(playerid);
- if(inseat != 0) // 0 = Driver //
- {
- if(HasARapidResKit[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You already have a Rapid Response Kit, '/pickrrk' in order to pick it up.");
- return 1;
- }
- RemovePlayerFromVehicle(playerid);
- SetTimerEx("Timer_GetResponseKit", 1500, false, "i", playerid);
- format(str, sizeof(str), "* You have succesfully dragged the Rapid Response Kit from the ambulance/helicopter.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Paramedic %s drags the Rapid Response Kit from the back of the ambulance/helicopter.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You must be in the rear of the vehicle to use this!");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You can not get an RRK from this vehicle!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
- }
- return 1;
- }
- CMD:droprrk(playerid, params)
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- if(IsAMedic(playerid))
- {
- if(HasARapidResKit[playerid] == 1)
- {
- if(RapidResKitActive[playerid] == 1)
- {
- new Float:x, Float:y, Float:z, Float:pAngle;
- GetXYInFrontOfPlayer(playerid, x, y, z, pAngle, 1.0);
- if(RapidResKit[playerid]) { DestroyObject(RapidResKit[playerid]); }
- RapidResKit[playerid] = CreateDynamicObject(1789, x, y, (z -0.5), 0, 0, pAngle -90);
- RapidResKitActive[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not using a Rapid Response Kit.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You do not have a Rapid Response Kit.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
- }
- return 1;
- }
- CMD:pickrrk(playerid, params)
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- if(IsAMedic(playerid))
- {
- if(RapidResKitActive[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can only use one Rapid Response Kit at a time.");
- return 1;
- }
- new Float:x, Float:y, Float:z;
- GetDynamicObjectPos(RapidResKit[playerid], x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
- {
- if(RapidResKit[playerid]) { DestroyDynamicObjectEx(RapidResKit[playerid]); }
- GetPlayerPos(playerid, x, y, z);
- RapidResKit[playerid] = CreateObject(1789, x, y, z, 0, 0, 0);
- AttachObjectToPlayer(RapidResKit[playerid], playerid, 0.00, 1, -0.5, 0, 0, -90);
- RapidResKitActive[playerid] = 1;
- HasARapidResKit[playerid] = 1;
- new str[128];
- format(str, sizeof(str), "* You have succesfully picked up the Rapid Response Kit.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "No rapid response kits in range.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
- }
- return 1;
- }
- CMD:placerrk(playerid, params[])
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- if(IsAMedic(playerid))
- {
- new Float:x, Float:y, Float:z, bool:found =false, rrkholder;
- //for(new i=0;i<MAX_PLAYERS;i++)
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4)
- {
- if(HasARapidResKit[i] == 1)
- {
- if(RapidResKitActive[i] == 0)
- {
- GetDynamicObjectPos(RapidResKit[i], x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
- {
- rrkholder = i;
- found = true;
- break;
- }
- }
- }
- }
- }
- if(found)
- {
- if(RapidResKit[rrkholder]) { DestroyDynamicObjectEx(RapidResKit[rrkholder]); }
- RapidResKit[rrkholder] = 0;
- HasARapidResKit[rrkholder] = 0;
- new str[128];
- format(str, sizeof(str), "* You have succesfully placed the Rapid Response Kit in the ambulance/helicopter.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Paramedic %s places the the Rapid Response Kit back into the ambulance/helicopter.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- if(!found)
- {
- SendClientMessage(playerid, COLOR_GREY, "No Rapid Response Kits in range.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
- }
- return 1;
- }
- CMD:usetemprrk(playerid, params[])
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- if(IsAMedic(playerid))
- {
- if(hasTempRRK[playerid] == 1)
- {
- new giveplayerid;
- if(!sscanf(params, "u", giveplayerid))
- {
- if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GREY, "Cannot use the response kit on yourself.");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "That player is not near you!");
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == PlayerVictim[playerid])
- {
- new str[128];
- ParaOnACall[playerid] = 0;
- CallAccepted[giveplayerid] = 0;
- format(str, sizeof(str), "Dispatch: Paramedic %s has succesfully completed the call of %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
- SendParaMessage(COLOR_DOCTOR, str);
- SetPlayerHealth(giveplayerid, 100);
- SetPlayerArmour(giveplayerid, 0);
- PlayerCalledEMS[giveplayerid] = 0;
- TextDrawHideForPlayer(giveplayerid, Text:DieText);
- TextDrawHideForPlayer(giveplayerid, Text:InjuredText);
- pDeathState[giveplayerid] = PLAYER_STATE_NORMAL;
- ApplyAnimationEx(giveplayerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- hasTempRRK[playerid] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have used your temporary rapid response kit.");
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- format(str, sizeof(str), "* Paramedic %s uses their Rapid Response Kit on %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "This is not your patient.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Player is not connected.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /userrk [playerid/PartOfName]");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have a temporary Rapid Response Kit.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- return 1;
- }
- CMD:sellvest(playerid, params[]) {
- if(PlayerInfo[playerid][pJob] != 8)
- return SendClientMessage(playerid, COLOR_GREY, "You are not a bodyguard.");
- new targetid, price;
- if(sscanf(params, "ui", targetid, price))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellvest [playerid/PartOfName] [price]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(IsNearBank(playerid) && bankactive)
- return SendClientMessage(playerid, COLOR_GREY, "You can not use this inside/outside the bank during an active bank robbery.");
- if(price < 5000 || price > 20000)
- return SendClientMessage(playerid, COLOR_GREY, "Price can't be lower than $5,000 or above $20,000.");
- if(!IsPlayerInRangeOfPlayer(8.0, playerid, targetid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not near this player.");
- if(targetid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can't offer a vest to yourself.");
- new str[128];
- format(str, sizeof(str), "* You offered a kevlar vest to %s for $%i.", PlayerICName(targetid), price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Bodyguard %s wants to sell you a kevlar vest for $%i, (type /accept vest) to accept.", PlayerICName(playerid), price);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- VestOffer[targetid] = playerid;
- VestPrice[targetid] = price;
- return 1;
- }
- CMD:heal(playerid, params[]) {
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- new targetid, price;
- if(sscanf(params, "ui", targetid, price))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /heal [playerid/PartOfName] [price]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(IsNearBank(playerid) && bankactive)
- return SendClientMessage(playerid, COLOR_GREY, "You can not use this inside/outside the bank during an active bank robbery.");
- if(price < 500 || price > 10000)
- return SendClientMessage(playerid, COLOR_GREY, "Price can't be lower than $500 or above $10,000.");
- if(!IsPlayerInRangeOfPlayer(8.0, playerid, targetid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not near this player.");
- if(targetid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can't offer to heal yourself.");
- foreach(new i:Player)
- {
- if(healOffer[i] == playerid)
- {
- healOffer[i] = 999;
- healPrice[i] = 0;
- }
- }
- new str[128];
- format(str, sizeof(str), "* You offered to heal %s for $%i.", PlayerICName(targetid), price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Paramedic %s wants to heal you for $%i, (type /accept heal) to accept.", PlayerICName(playerid), price);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- healOffer[targetid] = playerid;
- healPrice[targetid] = price;
- return 1;
- }
- CMD:userrk(playerid, params[])
- {
- if(FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "The RRK system is disabled.");
- if(IsAMedic(playerid))
- {
- if(HasARapidResKit[playerid] == 1)
- {
- if(RapidResKitActive[playerid] == 0)
- {
- new Float:x, Float:y, Float:z, giveplayerid;
- GetDynamicObjectPos(RapidResKit[playerid], x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
- {
- if(!sscanf(params, "u", giveplayerid))
- {
- if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GREY, "Cannot use the response kit on yourself.");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "That player is not near you!");
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == PlayerVictim[playerid])
- {
- new str[128];
- ParaOnACall[playerid] = 0;
- CallAccepted[giveplayerid] = 0;
- format(str, sizeof(str), "Dispatch: Paramedic %s has succesfully completed the call of %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
- SendParaMessage(COLOR_DOCTOR, str);
- ClearAnimationsEx(giveplayerid);
- SetPlayerHealth(giveplayerid, 100);
- SetPlayerArmour(giveplayerid, 0);
- TextDrawHideForPlayer(giveplayerid, Text:DieText);
- TextDrawHideForPlayer(giveplayerid, Text:InjuredText);
- pDeathState[giveplayerid] = PLAYER_STATE_NORMAL;
- PlayerInfo[playerid][pCallCount] += 1;
- PlayerInfo[playerid][pMonthlyCallCount]++;
- PlayerCalledEMS[giveplayerid] = 0;
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- pInHospital[giveplayerid] = 0;
- format(str, sizeof(str), "* Paramedic %s uses their Rapid Response Kit on %s.", PlayerICName(playerid), PlayerICName(giveplayerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- if(PlayerInfo[giveplayerid][pCash] < 1500)
- {
- if(PlayerInfo[giveplayerid][pAccount] < 1500) return 1; // if he doesnt have any money at all, exit the command, we dont want to generate money
- else
- {
- GiveMoney(playerid, 1500);
- PlayerInfo[giveplayerid][pAccount] -= 1500;
- SendClientMessage(playerid, COLOR_DOCTOR, "You have received $1500 for reviving.");
- SendClientMessage(giveplayerid, COLOR_DOCTOR, "You have been charged $1500 for your treatment from your bank account.");
- }
- }
- else
- {
- GiveMoney(giveplayerid, -1500);
- GiveMoney(playerid, 1500);
- SendClientMessage(playerid, COLOR_DOCTOR, "You have received $1500 for reviving.");
- SendClientMessage(giveplayerid, COLOR_DOCTOR, "You have been charged $1500 for your treatment.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "This is not your patient.");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Player is not connected.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /userrk [playerid/PartOfName]");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Your Rapid Response Kit must be placed nearby.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are still dragging the Rapid Response Kit, '/droprrk' first.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You do not have a Rapid Response Kit.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic.");
- }
- return 1;
- }
- CMD:transferpatient(playerid, params[])
- {
- if(!FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "Use the RRK system instead.");
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- new targetid, hosproom;
- if(sscanf(params, "ui", targetid, hosproom))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /transferpatient [playerid/PartOfName] [room 1-5]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(targetid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can not do this on yourself.");
- if(gLastCar[targetid] != gLastCar[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "That player is not in your vehicle.");
- if(pDeathState[targetid] == PLAYER_STATE_NORMAL)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not injured.");
- if(hosproom < 1 || hosproom > 5)
- return SendClientMessage(playerid, COLOR_GREY, "The room must be between 1 and 5.");
- if(countygenrooms[hosproom] == 1 || allsaintsrooms[hosproom] == 1)
- return SendClientMessage(playerid, COLOR_GREY, "That room is already in use.");
- if(IsPlayerInRangeOfPoint(playerid, 20.0, 1185.8871, -1323.7729, 13.5591)) // All Saints
- {
- allsaintsrooms[hosproom] = 1;
- istreatedinallsaints[targetid] = 1;
- SetPlayerInterior(targetid, 2);
- SetPlayerVirtualWorld(targetid, 2);
- switch(hosproom)
- {
- case 1: SetPlayerPos(targetid, 1169.2732, -1305.9762, 1090.6359);
- case 2: SetPlayerPos(targetid, 1184.0972, -1298.5614, 1090.6359);
- case 3: SetPlayerPos(targetid, 1167.7710, -1290.4994, 1090.2269);
- case 4: SetPlayerPos(targetid, 1186.6525, -1288.7365, 1090.3180);
- case 5: SetPlayerPos(targetid, 1168.7271, -1277.8820, 1090.2269);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 20.0, 2024.6085, -1423.7742, 16.9665)) // County General
- {
- countygenrooms[hosproom] = 1;
- istreatedinallsaints[targetid] = 0;
- SetPlayerInterior(targetid, 1);
- SetPlayerVirtualWorld(targetid, 1);
- switch(hosproom)
- {
- case 1: SetPlayerPos(targetid, -211.0638, -1738.8898, 676.7153);
- case 2: SetPlayerPos(targetid, -211.0641, -1751.6697, 676.7153);
- case 3: SetPlayerPos(targetid, -211.0648, -1759.5143, 676.7153);
- case 4: SetPlayerPos(targetid, -196.6427, -1759.4406, 676.4661);
- case 5: SetPlayerPos(targetid, -196.6368, -1763.9891, 676.4661);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not near any hospital.");
- // Accepted call
- ParaOnACall[playerid] = 0;
- CallAccepted[targetid] = 0;
- new str[128];
- format(str, sizeof(str), "Dispatch: Paramedic %s has succesfully transferred %s to the hospital.", PlayerICName(playerid), PlayerICName(targetid));
- SendParaMessage(COLOR_DOCTOR, str);
- LoopingAnim(targetid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- treatedinroom[targetid] = hosproom;
- PlayerCalledEMS[targetid] = 0;
- pDeathState[targetid] = PLAYER_STATE_NORMAL;
- beingtreatedtime[targetid] = 120;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your patient has been transferred to the requested room, you should now treat them.");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You have been transferred to a room, your paramedic will come to treat you shortly.");
- return 1;
- }
- CMD:releasepatient(playerid, params[])
- {
- if(!FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "Use the RRK system instead.");
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /releasepatient [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(GetDistanceBetweenPlayers(playerid, targetid) > 4)
- return SendClientMessage(playerid, COLOR_GREY, "You must be near the patient.");
- if(beingtreatedtime[targetid] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not being treated.");
- if(targetid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can not release yourself from treatment.");
- beingtreatedtime[targetid] = 0;
- pDeathState[targetid] = PLAYER_STATE_NORMAL;
- TogglePlayerControllable(targetid, true);
- SetCameraBehindPlayer(targetid);
- displayCenterHUDInfo(targetid, "~r~Treated", 8);
- new str[128];
- format(str, sizeof(str), "Paramedic %s has released you from your medical treatment, you have been billed $5000 for it.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "Paramedic %s has released %s from their medical treatment.", PlayerICName(playerid), PlayerICName(targetid));
- SendParaMessage(COLOR_DOCTOR, str);
- GiveMoney(targetid, -5000);
- FMD += 5000;
- if(istreatedinallsaints[targetid] == 1)
- {
- allsaintsrooms[treatedinroom[targetid]] = 0; // all saints
- }
- if(istreatedinallsaints[targetid] == 0)
- {
- countygenrooms[treatedinroom[targetid]] = 0; // county gen
- }
- treatedinroom[targetid] = 0;
- return 1;
- }
- CMD:checkpatient(playerid, params[])
- {
- if(!FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "Use the RRK system instead.");
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /checkpatient [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(GetDistanceBetweenPlayers(playerid, targetid) > 4)
- return SendClientMessage(playerid, COLOR_GREY, "You must be near the patient.");
- if(beingtreatedtime[targetid] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not being treated.");
- new str[128];
- format(str, sizeof(str), "* %s leans over as they check %s's pulse.", PlayerICName(playerid), PlayerICName(targetid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- new heartRate = beingtreatedtime[targetid];
- if(heartRate > 120) format(str, sizeof(str), "too high");
- else if(heartRate > 100) format(str, sizeof(str), "high");
- else if(heartRate > 60) format(str, sizeof(str), "stable");
- else if(heartRate > 30) format(str, sizeof(str), "low");
- else format(str, sizeof(str), "too low");
- format(str, sizeof(str), "%s's heart rate seems to be %s.", PlayerICName(targetid), str);
- SendClientMessage(playerid, COLOR_DOCTOR, str);
- return 1;
- }
- CMD:morphine(playerid, params[])
- {
- if(!FMD_RRK_DISABLED)
- return SendClientMessage(playerid, COLOR_GREY, "Use the RRK system instead.");
- if(!IsAMedic(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not a paramedic.");
- new targetid;
- if(sscanf(params, "u", targetid))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /morphine [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(GetDistanceBetweenPlayers(playerid, targetid) > 4)
- return SendClientMessage(playerid, COLOR_GREY, "You must be near the patient.");
- if(beingtreatedtime[targetid] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not being treated.");
- new str[128];
- format(str, sizeof(str), "* %s injects some morphine into %s's bloodstream.", PlayerICName(playerid), PlayerICName(targetid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- beingtreatedtime[targetid] += 30;
- return 1;
- }
- //=======================================
- CMD:contract(playerid, params[])
- {
- if(PlayerInfo[playerid][pLevel] >= 3)
- {
- new moneys, targetid;
- new str[128];
- if(sscanf(params, "ui", targetid, moneys)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /contract [playerid/PartOfName] [amount]");
- {
- if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN) return SendClientMessage(playerid, COLOR_GREY, "Hitmen cannot place contracts on people.");
- if(IsPlayerConnected(targetid))
- {
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You cannot contract yourself.");
- if(PlayerInfo[targetid][pLevel] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "That player is below level 3.");
- if(moneys < 10000) return SendClientMessage(playerid, COLOR_GREY, "Contract money must be at least $10,000.");
- if(moneys + PlayerInfo[targetid][pHeadValue] > 3000000) return SendClientMessage(playerid, COLOR_GREY, "That player has the maximum amount on their head.");
- if(IsACop(targetid) && moneys < 50000 && !IsS9InFaction(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Contract price must be at least $50,000 for Cops.");
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- new playermoney = PlayerInfo[playerid][pCash];
- if(moneys > 0 && playermoney >= moneys)
- {
- format(str, sizeof(str), "%s", PlayerICName(playerid));
- strmid(PlayerInfo[targetid][pContractBy], str, 0, strlen(str), 255);
- GiveMoney(playerid, -moneys);
- PlayerInfo[targetid][pHeadValue] += moneys;
- format(str, sizeof(str), "%s has placed a contract on %s, for $%d.", PlayerICName(playerid), PlayerICName(targetid), moneys);
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
- {
- SendClientMessage(i, COLOR_YELLOW, str);
- }
- }
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has placed a contract on %s, for $%d.", PlayerOOCName(playerid), PlayerOOCName(targetid), moneys);
- printf("%s has placed a contract on %s, for $%d.", PlayerOOCName(playerid), PlayerOOCName(targetid), moneys);
- ABroadCast(COLOR_WHITE, str, 4);
- format(str, sizeof(str), "* You placed a contract on %s, for $%d.", PlayerICName(targetid), moneys);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s has placed a contract on %s, for $%d at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), PlayerOOCName(targetid), moneys, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("contracts.log", str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "Invalid transaction amount.");
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "That player is not connected.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You must be at least level 3 to place a contract.");
- return 1;
- }
- CMD:contracts(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- SearchingHits(playerid);
- return 1;
- }
- CMD:resetcallcount(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pLeader] == 4)) return AdmErrorMsg;
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `MedicCount` = 0");
- mysql_pquery(sqlGameConnection, query);
- foreach(new i: Player)
- {
- PlayerInfo[i][pCallCount] = 0;
- PlayerInfo[i][pMonthlyCallCount] = 0;
- }
- new msg[128];
- format(msg, sizeof(msg), "{FF0000}AdmWarning{FFFFFF}: %s has reset the Medic Call counter.", PlayerName(playerid));
- SendAdminMessage(COLOR_WHITE, msg);
- SendParaMessage(COLOR_WHITE, msg);
- return 1;
- }
- CMD:ranks(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Agency Ranks:");
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pGroup] == GROUP_HITMAN)
- {
- new rank[60];
- switch(PlayerInfo[i][pGroupRank])
- {
- case 0:
- rank = "Initiate";
- case 1:
- rank = "Freelancer";
- case 2:
- rank = "Operative";
- case 3:
- rank = "Agent";
- case 4:
- rank = "Elite Agent";
- case 5:
- rank = "Vice Director";
- case 6:
- rank = "Director";
- }
- new hitname[MAX_PLAYER_NAME];
- if(GoChase[i] < 999) GetPlayerICName(GoChase[i], hitname, sizeof(hitname));
- else hitname = "Nobody";
- new str[128];
- format(str, sizeof(str), "Name: %s Rank: %s Completed Hits: %d Failed Hits: %d Chasing: %s", PlayerOOCName(i), rank, PlayerInfo[i][pCHits], PlayerInfo[i][pFHits], hitname);
- SendClientMessage(playerid, COLOR_GRAD3, str);
- }
- }
- }
- if(PlayerInfo[playerid][pMember] == 4 || FakeFaction[playerid] == 4)
- {
- SendClientMessage(playerid, COLOR_DOCTOR, "Medic Ranks:");
- new str[128];
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pMember] == 4 || FakeFaction[i] == FACTION_FMD)
- {
- format(str, sizeof(str), "Name: %s | Rank: %s | Count: %i | Monthly Count: %i", PlayerOOCName(i), GetPlayerRank(i), PlayerInfo[i][pCallCount], PlayerInfo[i][pMonthlyCallCount]);
- SendClientMessage(playerid, COLOR_DOCTOR, str);
- }
- }
- }
- return 1;
- }
- CMD:oranks(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_FMD) return AdmErrorMsg;
- mysql_pquery(sqlGameConnection, "SELECT Name, MedicCount, Rank FROM players WHERE Member=4", "MedicCountOffline", "d", playerid);
- return 1;
- }
- CMD:disguise(playerid, params[])
- {
- if( PlayerInfo[playerid][pGroup] != GROUP_HITMAN &&
- PlayerInfo[playerid][pGroup] != GROUP_CRIME &&
- PlayerInfo[playerid][pGroup] != GROUP_CARTEL &&
- PlayerInfo[playerid][pGroup] != GROUP_S9 &&
- PlayerInfo[playerid][pMember] != FACTION_FBI &&
- !isDonatedGroup(PlayerInfo[playerid][pGroup])
- ) return 1;
- if(PlayerInfo[playerid][pGroup] == GROUP_LLS && PlayerInfo[playerid][pGroupRank] < 3)
- return SendClientMessage(playerid, COLOR_GREY, "You need to be atleast rank 3 to use this command.");
- new disguiseID;
- if(sscanf(params, "i", disguiseID)) {
- // Show skin selector with all available skins
- ShowSkinShop(playerid, true, true, true, false, true);
- // Show tip
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "TIP: {FFFFFF}You can use /disguise [skin ID] to disguise without the selector.");
- return 1;
- }
- if(disguiseID < 1 || disguiseID > 311 || disguiseID == 74)
- return SendClientMessage(playerid, COLOR_GREY, "You entered an invalid skin ID.");
- // Only HA and S9 can disguise into restricted skins
- if(isRestrictedModel(disguiseID) && PlayerInfo[playerid][pGroup] != GROUP_HITMAN && PlayerInfo[playerid][pGroup] != GROUP_S9 && PlayerInfo[playerid][pMember] != FACTION_FBI)
- return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to disguise into restricted skins.");
- // Set the skin
- PlayerInfo[playerid][pModel] = disguiseID;
- SetPlayerSkin(playerid, disguiseID);
- PlayerInfo[playerid][pClothes] = 0;
- // Action
- new str[128];
- format(str, sizeof(str), "* %s changes their clothes.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 7.0, 5000);
- format(str, sizeof(str), "> %s changes their clothes.", PlayerICName(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, str);
- return 1;
- }
- CMD:callerid(playerid, params[])
- {
- if(
- PlayerInfo[playerid][pGroup] == GROUP_HITMAN ||
- PlayerInfo[playerid][pGroup] == GROUP_CRIME ||
- PlayerInfo[playerid][pGroup] == GROUP_CARTEL ||
- PlayerInfo[playerid][pMember] == FACTION_FBI ||
- PlayerInfo[playerid][pGroup] == GROUP_S9 ||
- PlayerInfo[playerid][pGroup] == GROUP_OPG ||
- isDonatedGroup(PlayerInfo[playerid][pGroup])
- ) {
- switch(callerID[playerid])
- {
- case false:
- {
- SendClientMessage(playerid, COLOR_YELLOW, "[Caller ID] You have toggled your caller ID off, meaning you will be hidden.");
- callerID[playerid] = true;
- }
- case true:
- {
- SendClientMessage(playerid, COLOR_YELLOW, "[Caller ID] You have toggled your caller ID on, meaning you will show to others.");
- callerID[playerid] = false;
- }
- }
- }
- return 1;
- }
- CMD:profile(playerid, params[])
- {
- if( PlayerInfo[playerid][pGroup] != GROUP_HITMAN &&
- PlayerInfo[playerid][pGroup] != GROUP_S9 &&
- PlayerInfo[playerid][pMember] != FACTION_FBI &&
- PlayerInfo[playerid][pMember] != FACTION_JD &&
- PlayerInfo[playerid][pGroup] != 7
- ) return 1;
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /profile [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- ShowProfile(playerid, targetid);
- return 1;
- }
- CMD:givehit(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- if(PlayerInfo[playerid][pGroupRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be at least rank 4 to give out contracts.");
- new targetid, id2;
- if(sscanf(params, "uu", targetid, id2)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givehit [playerid/PartOfName] [targetid/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(!IsPlayerConnected(id2)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid targetid.");
- if(PlayerInfo[targetid][pGroup] != GROUP_HITMAN && PlayerInfo[playerid][pGroupRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be the leader to give hits to non-hitmen.");
- if(PlayerInfo[id2][pHeadValue] == 0 || IsS9InFaction(id2)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player doesn't have a contract on their head.");
- new str[128];
- format(str, sizeof(str), "* You offered %s a contract to kill %s.", PlayerICName(targetid), PlayerICName(id2));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Hitman %s has offered you a contract to kill %s (type /accept contract), to accept it.", PlayerICName(playerid), PlayerICName(id2));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- ContractOffer[targetid] = playerid;
- ContractID[targetid] = id2;
- return 1;
- }
- CMD:denyhit(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- if(PlayerInfo[playerid][pGroupRank] < GROUP_HITMAN_RANKS) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be the leader to deny hits.");
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /denyhit [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[targetid][pHeadValue] == 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} There is no contract on that player!");
- new str[128];
- format(str, sizeof(str), "You have removed %s's contract.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- ClearContract(targetid);
- return 1;
- }
- CMD:givemehit(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- if(PlayerInfo[playerid][pGroupRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be at least rank 1 to give out contracts to yourself.");
- new hitid;
- if(sscanf(params, "u", hitid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /givemehit [playerid/PartOfName]");
- if(!IsPlayerConnected(hitid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid playerid.");
- if(PlayerInfo[hitid][pHeadValue] == 0 || PlayerInfo[playerid][pMember] == FACTION_S9) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player doesn't have a contract on their head.");
- new str[128];
- format(str, sizeof(str), "* You have offered yourself a contract to kill %s (type /accept contract), to accept it.", PlayerICName(hitid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- ContractOffer[playerid] = playerid;
- ContractID[playerid] = hitid;
- return 1;
- }
- CMD:hauc(playerid, params[])
- return cmd_hitmanundercover(playerid, params);
- CMD:hitmanundercover(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN && PlayerInfo[playerid][pGroup] != GROUP_S9)
- return 1;
- hitmanUndercover[playerid] = !hitmanUndercover[playerid];
- if(hitmanUndercover[playerid]) {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Undercover mode enabled.");
- SendClientMessage(playerid, COLOR_GREY, "Crimes and tickets will be hidden from your MDC profile.");
- }
- else {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Undercover mode disabled.");
- SendClientMessage(playerid, COLOR_GREY, "Crimes and tickets on your MDC profile will now show again.");
- }
- return 1;
- }
- CMD:order(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN && PlayerInfo[playerid][pGroup] != GROUP_LLS)
- return 1;
- if(!IsPlayerNearHitmenHQ(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not at your headquarters.");
- if(PlayerInfo[playerid][pGroup] == 1){
- showHitmanDialog(playerid);}
- if(PlayerInfo[playerid][pGroup] == 8){
- showPakiArmory(playerid);}
- return 1;
- }
- CMD:mask(playerid, params[])
- {
- /*
- Smo do not re-add mask to donated groups they abuse them and troll pretending to be HA/S9
- and break rules while masked. It's been a mess with mask and tons of players are complaining
- about this. There was a poll on the forums regarding it and it had significantly more support
- to remove them then to keep them (even some people who donated for a group said yes).
- - Sparke
- */
- new str[128];
- if(PlayerInfo[playerid][pGroup] == GROUP_HITMAN ||
- PlayerInfo[playerid][pGroup] == GROUP_CRIME ||
- PlayerInfo[playerid][pGroup] == GROUP_CARTEL ||
- PlayerInfo[playerid][pMember] == FACTION_FBI ||
- PlayerInfo[playerid][pGroup] == GROUP_S9 ||
- PlayerInfo[playerid][pGroup] == GROUP_LLS ||
- PlayerInfo[playerid][pGroup] == GROUP_OPG ||
- PlayerInfo[playerid][pGroup] == GROUP_EXEC ||
- PlayerInfo[playerid][pGroup] == GROUP_BRATVA ||
- PlayerInfo[playerid][pGroup] == 3 ||
- PlayerInfo[playerid][pGroup] == GROUP_FACISTS) {
- if(PlayerInfo[playerid][pMask]) {
- SetPlayerMasked(playerid, false);
- format(str, sizeof(str), "* %s has taken their mask off.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 7.0, 5000);
- SendClientMessage(playerid, COLOR_PURPLE, str);
- } else {
- SetPlayerMasked(playerid, true);
- format(str, sizeof(str), "* %s has put their mask on.", PlayerICName(playerid));
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 7.0, 5000);
- SendClientMessage(playerid, COLOR_PURPLE, str);
- }
- }
- return 1;
- }
- //the following hitman commands were scripted by Calvin Catt
- //new takebadge
- CMD:takebadge(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /takebadge [playerid/partOfName]");
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't take a badge off yourself.");
- new str[128];
- if(IsPlayerInRangeOfPlayer(2.0, playerid, giveplayerid)) {
- if(pDeathState[giveplayerid] == PLAYER_STATE_REVIVE || PlayerCuffed[giveplayerid] > 0 || PlayerTazed[giveplayerid] > 0 || PlayerTied[giveplayerid]) {
- if(PlayerInfo[giveplayerid][pBadge]) {
- format(str, sizeof(str), "* %s has taken your badge.", PlayerICName(playerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s reached into %s's pockets and took a badge.", PlayerICName(playerid), PlayerICName(giveplayerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- //PlayerInfo[playerid][pHAFakeBadge] = PlayerInfo[giveplayerid][pBadge]; //pBadge should correspond to faction name, 1 for SAPD, 2 fbi etc
- PlayerInfo[playerid][pHAFakeBadge] = PlayerInfo[giveplayerid][pMember]; //this should be deleted once the above line is done
- PlayerInfo[giveplayerid][pBadge] = 0; //it should actually TAKE the badge from the player, requiring them to GET A NEW BADGE
- //do the animation
- SetPlayerFacingPlayer(playerid, giveplayerid);
- OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}Error:{FFFFFF} That player does not have a badge.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "That player must be Injured, Cuffed, Tied.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}Error:{FFFFFF} That player is not in range.");
- }
- return 1;
- }
- CMD:placebadge(playerid)
- {
- new str[128];
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- if(!IsPlayerInRangeOfPoint(playerid, 10, 312.7244,-166.1414,999.6010) && GetPlayerVirtualWorld(playerid) != 5) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not at your Headquarters.");
- switch(PlayerInfo[playerid][pHAFakeBadge])
- {
- case 7:
- {
- format(str, sizeof(str), "* %s places a Judicial Department badge into the armory.", PlayerICName(playerid));
- HitmanBadgeSCOTUS += 1;
- }
- case 6:
- {
- format(str, sizeof(str), "* %s places a Government badge into the armory.", PlayerICName(playerid));
- HitmanBadgeGOV += 1;
- }
- case 5:
- {
- format(str, sizeof(str), "* %s places a Department of Corrections badge into the armory.", PlayerICName(playerid));
- HitmanBadgeNG += 1;
- }
- case 4:
- {
- format(str, sizeof(str), "* %s places a Los Santos Fire Medical Department badge into the armory.", PlayerICName(playerid));
- HitmanBadgeLSFMD += 1;
- }
- case 3:
- {
- format(str, sizeof(str), "* %s places a San Andreas Sheriff Department badge into the armory.", PlayerICName(playerid));
- HitmanBadgeRCSD += 1;
- }
- case 2:
- {
- format(str, sizeof(str), "* %s places a Federal Bureau of Investigations badge into the armory.", PlayerICName(playerid));
- HitmanBadgeFBI += 1;
- }
- case 1:
- {
- format(str, sizeof(str), "* %s places a San Andreas Police Department badge into the armory.", PlayerICName(playerid));
- HitmanBadgeSAPD += 1;
- }
- default:
- return SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}Error:{FFFFFF} You do not have a fake badge.");
- }
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pHAFakeBadge] = 0;
- return 1;
- }
- CMD:givebadge(playerid, params[])
- {
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /givebadge [playerid/partOfName]");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD2, "That player is not in range.");
- if((IsACop(playerid) || IsASenate(playerid) || IsAMedic(playerid) || IsANG(playerid) || IsAFBI(playerid) || PlayerInfo[playerid][pMember] == 7) && PlayerInfo[playerid][pLeader] >= 1)
- {
- new str[128];
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "* %s gives %s a badge.", sendername, giveplayer);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* %s has given you a badge.", sendername);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[giveplayerid][pBadge] = 1;
- return 1;
- }
- return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorised to use that command.");
- }
- CMD:fakebadge(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_HITMAN) return 1;
- if(PlayerInfo[playerid][pHAFakeBadge] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You do not have a fake badge.");
- switch(PlayerInfo[playerid][pOnDuty])
- {
- case 1:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have unequipped your fake badge.");
- PlayerInfo[playerid][pOnDuty] = 0;
- usingFakeBadge[playerid] = false;
- SetPlayerToTeamColor(playerid);
- }
- default:
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have equipped your fake badge.");
- PlayerInfo[playerid][pOnDuty] = 1;
- usingFakeBadge[playerid] = true;
- SetPlayerToTeamColor(playerid);
- }
- }
- return 1;
- }
- CMD:reloadvipcars(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use this command.");
- new
- i, j, vehicleID, count,
- deleteIt[ sizeof(VipCars) ] = {1, ...};
- // Figuring out which VipCars need not to be deleted //
- foreach(i:Player) {
- vehicleID = GetPlayerVehicleID(i);
- if(vehicleID == INVALID_VEHICLE_ID)
- continue;
- for(j = 0; j < sizeof(VipCars); j++) {
- if(vehicleID == VipCars[j])
- deleteIt[j] = 0;
- }
- }
- // Deleting the VipCars that need to be deleted //
- for(i = 0; i < sizeof(VipCars); i++) {
- if(deleteIt[i]) {
- count++;
- CreateVIPCar(i);
- }
- }
- new str[128];
- format(str, sizeof(str), "* %d VIP cars were reloaded.", count);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- CMD:killcp(playerid, params[])
- {
- if(CP[playerid] != CHECKPOINT_NONE)
- {
- CP[playerid] = CHECKPOINT_NONE;
- DisablePlayerCheckpointEx(playerid);
- SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed! ");
- }
- else if(goingJob[playerid] == true)
- {
- DisablePlayerCheckpointEx(playerid);
- goingJob[playerid] = false;
- SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed! ");
- }
- else if(isRepairing[playerid] == true)
- {
- isRepairing[playerid] = false;
- DisablePlayerCheckpointEx(playerid);
- SendClientMessage(playerid, COLOR_WHITE, "Checkpoint removed.");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You do not have any checkpoints.");
- }
- return 1;
- }
- CMD:doorknock(playerid, params[])
- {
- new hID = IsPlayerNearHouse(playerid);
- new str[128];
- if(hID != -1)
- {
- foreach( new i: Player )
- {
- if(GetPlayerVirtualWorld(i) == GetHouseVirtualWorld(hID))
- {
- format(str, sizeof(str), "* You hear knocking at the door.");
- SendClientMessage(i, COLOR_PURPLE, str);
- }
- }
- format(str, sizeof(str), "* %s knocks on the door.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not near a house door.");
- }
- return 1;
- }
- CMD:doorshout(playerid, params[])
- {
- new hID, msg[128];
- new bool:found;
- new str[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(GetPlayerVirtualWorld(playerid) == 0) // Player is outside
- {
- for(new i = 0; i < MAX_HOUSES; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5, HouseInfo[i][hOutsideX], HouseInfo[i][hOutsideY], HouseInfo[i][hOutsideZ]))
- {
- hID = i;
- found = true;
- break;
- }
- }
- if(found)
- {
- if(strcmp(Accent[playerid], "none", true, 4)) format(str, sizeof(str), "(Outside) %s: [%s Accent] %s.", PlayerICName(playerid), Accent[playerid], msg);
- else format(str, sizeof(str), "(Outside) %s: %s.", PlayerICName(playerid), msg);
- foreach( new i: Player )
- {
- if(IsPlayerInRangeOfPoint(i, 50, HouseInfo[hID][hInsideX], HouseInfo[hID][hInsideY], HouseInfo[hID][hInsideZ]))
- {
- SendClientMessage(i, COLOR_WHITE, str);
- }
- }
- if(strcmp(Accent[playerid], "none", true, 3)) format(str, sizeof(str), "%s shouts: [%s Accent] %s.", PlayerICName(playerid), Accent[playerid], msg);
- else format(str, sizeof(str), "%s shouts: %s.", PlayerICName(playerid), msg);
- ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(strcmp(Accent[playerid], "none", true, 3)) format(str, sizeof(str), "shouts: [%s Accent] %s.", Accent[playerid], msg);
- else format(str, sizeof(str), "shouts: %s.", msg);
- SetPlayerChatBubble(playerid, str, COLOR_WHITE, 30.0, 10000);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not near a house door.");
- }
- }
- else //Player is inside
- {
- for(new i = 0; i < MAX_HOUSES; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 5, HouseInfo[i][hInsideX], HouseInfo[i][hInsideY], HouseInfo[i][hInsideZ]))
- {
- hID = i;
- found = true;
- break;
- }
- }
- if(found)
- {
- if(strcmp(Accent[playerid], "none", true, 4)) format(str, sizeof(str), "(Inside) %s: [%s Accent] %s.", PlayerICName(playerid), Accent[playerid], msg);
- else format(str, sizeof(str), "(Inside) %s: %s.", PlayerICName(playerid), msg);
- foreach( new i: Player )
- {
- if(IsPlayerInRangeOfPoint(playerid, 50, HouseInfo[hID][hOutsideX], HouseInfo[hID][hOutsideY], HouseInfo[hID][hOutsideZ]))
- {
- SendClientMessage(i, COLOR_WHITE, str);
- }
- }
- if(strcmp(Accent[playerid], "none", true, 3)) format(str, sizeof(str), "%s shouts: [%s Accent] %s.", PlayerICName(playerid), Accent[playerid], msg);
- else format(str, sizeof(str), "%s shouts: %s.", PlayerICName(playerid), msg);
- ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- if(ThiefText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(nametagText[playerid] != Text3D:INVALID_3DTEXT_ID) return 1;
- if(strcmp(Accent[playerid], "none", true, 3)) format(str, sizeof(str), "shouts: [%s Accent] %s.", Accent[playerid], msg);
- else format(str, sizeof(str), "shouts: %s.", msg);
- SetPlayerChatBubble(playerid, str, COLOR_WHITE, 30.0, 10000);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not near a house door.");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /doorshout [text]");
- }
- return 1;
- }
- CMD:tikis(playerid, params[])
- {
- new str[128];
- format(str, sizeof(str), "You have %d tikis.", PlayerInfo[playerid][pTikis]);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- CMD:tikistore(playerid, params[])
- {
- if(Packages[playerid] > 0)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Materials Packages.");
- }
- if(Crates[playerid] > 0)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Drug Crates.");
- }
- if(CP[playerid] == CHECKPOINT_DROPCAR)
- {
- return SendClientMessage(playerid, COLOR_GREY, "You must drop your car at the crane first.");
- }
- SetPlayerCheckpointEx(playerid, 2352.995, -1463.545, 24.000, 3);
- CP[playerid] = CHECKPOINT_TIKISTORE;
- SendClientMessage(playerid, COLOR_GREY, "The tiki store has been marked on your map.");
- return 1;
- }
- CMD:aenter(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pMapper] == MAPPERRANK_MANAGER)
- {
- for(new i = 0; i < sizeof(EntranceRef); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, Entrances[i][outside_x], Entrances[i][outside_y], Entrances[i][outside_z]) && GetPlayerVirtualWorld(playerid) == Entrances[i][outside_w] && GetPlayerInterior(playerid) == Entrances[i][outside_i])
- {
- SetPlayerPos(playerid, Entrances[i][inside_x], Entrances[i][inside_y], Entrances[i][inside_z]);
- SetPlayerFacingAngle(playerid, Entrances[i][inside_a]);
- SetPlayerInterior(playerid, Entrances[i][inside_i]);
- PlayerInfo[playerid][pInt] = Entrances[i][inside_i]; //this was commented for some reason
- SetPlayerVirtualWorld(playerid, Entrances[i][inside_w]);
- PlayerInfo[playerid][pVirtualWorld] = Entrances[i][inside_w]; //this was commented for some reason
- SetCameraBehindPlayer(playerid);
- if(Entrances[i][freeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- return 1;
- }
- }
- for(new h = 1; h < sizeof(HouseInfo); h++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[h][hOutsideX], HouseInfo[h][hOutsideY], HouseInfo[h][hOutsideZ]))
- {
- SetPlayerPos(playerid, HouseInfo[h][hInsideX], HouseInfo[h][hInsideY], HouseInfo[h][hInsideZ]);
- SetPlayerFacingAngle(playerid, HouseInfo[h][hInsideA]);
- SetPlayerInterior(playerid, HouseInfo[h][hInterior]);
- SetPlayerVirtualWorld(playerid, HouseInfo[h][hSQLID]);
- PlayerInfo[playerid][pInt] = HouseInfo[h][hInterior];
- PlayerInfo[playerid][pVirtualWorld] = h;
- SetCameraBehindPlayer(playerid);
- new string34[75];
- format(string34, sizeof(string34), "~b~%s", HouseInfo[h][hTag]);
- displayCenterHUDInfo(playerid, string34, 8); //display for 8 seconds
- inHouse[playerid] = true;
- if(HouseInfo[h][hFreeze])
- {
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- }
- return 1;
- }
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:exchange(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 2, -2237.1008, 130.3685, 1035.4141)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the tiki store counter.");
- new string[450];
- format(string, sizeof(string), "SD Pistol\t\t1 tikis\nFull Armor\t\t3 tikis\n25 pot\t\t\t4 tikis\n25 crack\t\t8 tikis\n10,000 materials\t10 tikis\n$100,000\t\t12 tikis\nGamble\t\t\t12 tikis\nMace\t\t\t12 tikis\nVoodoo Magic\t\t25 tikis\nC4\t\t\t16 tikis\nGear Ticket\t\t6 tikis\nLarge Boombox\t6 tikis\nTec9\t\t\t12 tikis\nGrenade (1 ammo)\t18 tikis\nRPG (1 ammo)\t\t24 tikis\nSilver VIP\t\t40 tikis\nKnife\t\t\t15 tikis");
- ShowPlayerDialog(playerid, 93, DIALOG_STYLE_LIST, "Tiki Exchange", string, "{FF4500}Exchange", "{FF4500}Cancel");
- return 1;
- }
- CMD:deployspikes(playerid, params[])
- {
- if(!IsACop(playerid) && !(PlayerInfo[playerid][pMember] == 5) && PlayerInfo[playerid][pMember] != FACTION_SANG) return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / NG Member.");
- if(PlayerInfo[playerid][pMember] == 1)
- {
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be deploying spike strips (R3+).");
- }
- else if(PlayerInfo[playerid][pMember] == 3)
- {
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be deploying spike strips (R3+).");
- }
- else if(PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(PlayerInfo[playerid][pRank] < 2) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be deploying spike strips (R2+)");
- }
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use this while in a car.");
- new Float:plocx, Float:plocy, Float:plocz, Float:ploca;
- GetPlayerPos(playerid, plocx, plocy, plocz);
- GetPlayerFacingAngle(playerid, ploca);
- new location[MAX_ZONE_NAME];
- GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
- new str[128];
- format(str, sizeof(str), "HQ: %s %s %s has placed a spike strip at %s.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), location);
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(3, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 0, 0, 0, 0, 0);
- GetPlayerFacingAngle(playerid, ploca);
- CreateStrip(plocx, plocy, plocz, ploca);
- Streamer_Update(playerid);
- return 1;
- }
- CMD:backupclear(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- new fakefac[10];
- switch(FakeFaction[playerid])
- {
- case 1:
- fakefac = "SAPD";
- case 4:
- fakefac = "SAFMD";
- case 5:
- fakefac = "DoC";
- case 14:
- fakefac = "SANG";
- default:
- fakefac = "SAPD";
- }
- if(backupType[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a backup request out.");
- if(backupType[playerid] == 1) //SAPD
- {
- // If player is S9 and not in a faction - or if they are an they are in a faction but masked then send DHS
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s has cancelled their police backup request.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- }
- else format(str, sizeof(str), "HQ: All units, %s %s %s has cancelled their police backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerOOCName(playerid));
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 1)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 2) //FBI | DEA
- {
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting police backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- }
- else {
- format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their FBI backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- }
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 2)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 3) //SASD
- {
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting police backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- } else {
- format(str, sizeof(str), "DISPATCH: %s %s %s has cancelled their SASD backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- }
- SendRadioMessage(3, TEAM_BLUE_COLOR, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 3)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 4) //FMD
- {
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting police backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- } else {
- format(str, sizeof(str), "HQ: All units, %s %s %s has cancelled their medical backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- }
- SendRadioMessage(4, TEAM_BLUE_COLOR, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 4)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 5) //DOC
- {
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting police backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- } else format(str, sizeof(str), "HQ: All units, %s %s %s has cancelled their DoC backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 5)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 14)
- {
- if((PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMember] == 0) ||
- (PlayerInfo[playerid][pGroup] == GROUP_S9 && PlayerInfo[playerid][pMask] == 1)) {
- format(str, sizeof(str), "HQ: All units, S9 %s %s is requesting SANG backup, they have been marked on your GPS.", RealS9Rank(playerid), PlayerInfo[playerid][pMaskName]);
- } else format(str, sizeof(str), "HQ: All units, %s %s %s has cancelled their SANG backup request.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- SendRadioMessage(14, COLOR_SANG, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 14)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- else if(backupType[playerid] == 666) //s9
- {
- format(str, sizeof(str), "DISPATCH: %s %s has cancelled their S9 backup request.", RealS9Rank(playerid), PlayerOOCName(playerid));
- SendGroupMessage(GROUP_S9, COLOR_S9, str);
- SendClientMessage(playerid, COLOR_YELLOW, "You have cancelled your backup request.");
- backupType[playerid] = 0;
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pGroup] == GROUP_S9)
- {
- SetPlayerMarkerForPlayer(i, playerid, TCOLOR_WHITE);
- SetPlayerToTeamColor(playerid);
- }
- }
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the SAPD, FBI, SASD, DoC or FMD.");
- return 1;
- }
- CMD:bkc(playerid, params[]) return cmd_backupclear(playerid, params);
- CMD:backup(playerid, params[])
- {
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Backup signal has been jammed.");
- if(pDeathState[playerid] == PLAYER_STATE_REVIVE)
- {
- new str[128];
- format(str, sizeof(str), "* %s attempts to reach his backup button but fails.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- if(PlayerInfo[playerid][pMember] == 1 /*SAPD*/ || PlayerInfo[playerid][pMember] == 2 /*FBI*/ || PlayerInfo[playerid][pMember] == 3 /*SASD*/ || PlayerInfo[playerid][pMember] == 4 /*FMD*/ || PlayerInfo[playerid][pMember] == 5/*DoC*/ || PlayerInfo[playerid][pMember] == FACTION_SANG /*SANG*/|| PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- new type[8];
- if(sscanf(params, "s[8]", type)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /backup [Police, FBI, Medic, SANG]");
- {
- if(strmatch(type, "s9"))
- {
- CallS9Backup(playerid);
- }
- else if(strmatch(type, "police"))
- {
- CallPoliceBackup(playerid);
- }
- else if(strmatch(type, "fbi"))
- {
- CallFBIBackup(playerid);
- }
- /*else if(strmatch(type, "sasd"))
- {
- CallSASTBackup(playerid);
- }*/
- /*else if(strmatch(type, "doc"))
- {
- CallDOCBackup(playerid);
- }*/
- else if(strmatch(type, "medic"))
- {
- CallMedicalBackup(playerid);
- }
- else if(strmatch(type, "sang"))
- {
- CallSANGBackup(playerid);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /backup [Police, FBI, SASD, DoC, Medic, SANG]");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the SAPD, FBI, SASD, DoC, FMD or SANG.");
- return 1;
- }
- CMD:bk(playerid, params[]) return cmd_backup(playerid, params);
- CMD:deletespike(playerid, params[])
- {
- if(!IsACop(playerid) && !(PlayerInfo[playerid][pMember] == FACTION_SANG)) return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / NG Member.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use this while in a car.");
- if(PlayerInfo[playerid][pMember] == 1)
- {
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be removing spike strips (R3+).");
- }
- else if(PlayerInfo[playerid][pMember] == 3)
- {
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be removing spike strips (R3+).");
- }
- else if(PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(PlayerInfo[playerid][pRank] < 2) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be removing spike strips (R2+)");
- }
- DeleteClosestStrip(playerid);
- return 1;
- }
- CMD:deletespikes(playerid, params[])
- {
- if(!IsACop(playerid) && !(PlayerInfo[playerid][pMember] == FACTION_SANG)) return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / NG Member.");
- if(PlayerInfo[playerid][pMember] == 1)
- {
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be removing spike strips (R4+).");
- }
- else if(PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(PlayerInfo[playerid][pRank] < 2) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to be removing spike strips (R2+)");
- }
- new str[128];
- format(str, sizeof(str), "HQ: %s %s %s has deleted all spike strips.", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid));
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(3, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- SendRadioMessage(14, TEAM_BLUE_COLOR, str);
- DeleteAllStrip();
- return 1;
- }
- CMD:duty(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] == 2)
- {
- if(JobDuty[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Lawyer Job and will not receive calls anymore.");
- JobDuty[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Lawyer Job and will receive calls from people in need.");
- JobDuty[playerid] = 1;
- }
- }
- else if(PlayerInfo[playerid][pJob] == 7)
- {
- if(JobDuty[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Mechanic Job and will not receive calls anymore.");
- JobDuty[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Mechanic Job and will receive calls from people in need.");
- JobDuty[playerid] = 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You must be a lawyer/mechanic to use this command.");
- if(PlayerInfo[playerid][pMember] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Police officers use /SAPD at the locker rooms.");
- }
- }
- return 1;
- }
- CMD:sitlicense(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1491.2963, 1306.1758, 1093.2964))
- {
- new section[10];
- if(sscanf(params, "s[10]", section))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sitlicense [driving($10,000)/sailing($20,000)]");
- {
- if(strmatch(section, "driving"))
- {
- if(PlayerInfo[playerid][pCarLicense] == 0)
- {
- if(PlayerInfo[playerid][pCash] >= 9999)
- {
- dmvSlot[playerid] = 1;
- autoFailed[playerid] = false;
- SetPlayerVirtualWorld(playerid, playerid +1);
- SetPlayerInterior(playerid, 0);
- GameTextForPlayer(playerid, "Driving Test ~r~Started~w~!", 3000, 5);
- PlayerInfo[playerid][pCash] -= 10000;
- SetPlayerRaceCheckpoint(playerid, 0, carLicensePositions[0][0], carLicensePositions[0][1], carLicensePositions[0][2], carLicensePositions[1][0], carLicensePositions[1][1], carLicensePositions[1][2], 3.0);
- SendClientMessage(playerid, COLOR_YELLOW, "Follow the marked positions on your GPS to complete the license. (-$5,000)");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> RULES: ");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Do not go over the speed of 50 MPH.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Do not damage the vehicle too much.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Drive on the correct side of the road.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Stop at traffic lights which display RED.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "> Always watch the road, and keep two hands on the steering wheel.");
- SendClientMessage(playerid, COLOR_YELLOW, "Failure to follow the above rules will result in an automatic fail.");
- SetPlayerPos(playerid, 1235.0735, -1815.1517, 13.6038);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 5);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You can't afford this.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You already have your drivers license!");
- }
- else if(strmatch(section, "sailing"))
- {
- if(PlayerInfo[playerid][pBoatLicense] == 0)
- {
- if(PlayerInfo[playerid][pCash] >= 20000)
- {
- SendClientMessage(playerid, COLOR_GREY, "This will be added soon, you have the license automatically.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You can't afford this.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You already have your sailing license!");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sitlicense [driving/sailing]");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're must be at the desk in the DMV station.");
- return 1;
- }
- CMD:unloadtrash(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 19) return SendClientMessage(playerid, COLOR_GREY, "You are not a Waste Collector.");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be driving the Garbage Truck.");
- if(unloadingTrashTimer[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are already unloading trash.");
- new deliverypoint; //none
- if(IsPlayerInRangeOfPoint(playerid, 10.0, 89.6221,-259.6307,1.5781)) { //at blueberry
- deliverypoint = 1;
- } else if(IsPlayerInRangeOfPoint(playerid, 10.0, 2902.5264,-2119.8174,2.7550)) { //at illegal point (LS)
- if(PlayerInfo[playerid][pWasteSkill] < 400) return SendClientMessage(playerid, COLOR_GREY, "You must be a level 5 Waste Collector to dump trash here.");
- deliverypoint = 2;
- }
- if(deliverypoint > 0) {
- new slot = -1;
- new vehicleid = GetPlayerVehicleID(playerid);
- for(new i = 0; i < sizeof(GarbageTruck); i++) { //find the vehicle id in the array
- if(vehicleid == GarbageTruck[i][vehicle_id]) { //found the garbage truck player is sitting in
- slot = i;
- }
- }
- if(slot == -1) return SendClientMessage(playerid, COLOR_GREY, "You are not in a garbage truck.");
- TogglePlayerControllable(playerid, 0); //freeze
- new str[128];
- format(str, sizeof(str), "* %s has begun unloading their trash.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- unloadingTrashTimer[playerid] = SetTimerEx("Timer_unloadTrash", 5 *1000, 0, "iii", playerid, slot, deliverypoint); //5 seconds
- } else {
- SendClientMessage(playerid, COLOR_GREY, "You are not at the trash delivery point in the Blueberry Junkyard.");
- }
- return 1;
- }
- CMD:gettrash(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 19) return SendClientMessage(playerid, COLOR_GREY, "You are not a Waste Collector.");
- if(CP[playerid] == CHECKPOINT_GARBAGE) return SendClientMessage(playerid, COLOR_GREY, "You are already holding Trash.");
- for(new i = 0; i < sizeof(trashInfo); i++) {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, trashInfo[i][posX], trashInfo[i][posY], trashInfo[i][posZ])) {
- if(trashInfo[i][tAmount] > 0) { //there is trash
- new vehicleid = findNearestGarbageTruck(playerid);
- if(vehicleid != -1) {
- //get position behind vehicle
- new Float:vehX, Float:vehY, Float:vehZ, Float:vehA;
- GetVehiclePos(vehicleid, vehX, vehY, vehZ);
- GetVehicleZAngle(vehicleid, vehA);
- vehX -= (3 * floatsin(-vehA, degrees));
- vehY -= (3 * floatcos(-vehA, degrees));
- //make sure the back of the vehicle is not sitting on the /gettrash position
- if(isPosWithinRange(4.0, trashInfo[i][posX], trashInfo[i][posY], trashInfo[i][posZ], vehX, vehY, vehZ)) {
- hasTruckCheckpoint[playerid] = -1; //have to reset this
- return SendClientMessage(playerid, COLOR_GREY, "The garbage truck must be at least 4 metres from the bin.");
- }
- //set the checkpoint
- DisablePlayerCheckpointEx(playerid);
- CP[playerid] = CHECKPOINT_GARBAGE; //set checkpoint ID
- SetPlayerCheckpointEx(playerid, vehX, vehY, vehZ, 3.0);
- //pickup trash
- ApplyAnimationEx(playerid, "CARRY", "liftup", 4.0, 0, 0, 0, 0, 0, 0);
- Timer_SetPlayerPickupObject(playerid, 1);
- displayCenterHUDInfo(playerid, "~w~Load the trash into the back of the truck.", 8); //display for 8 seconds
- trashInfo[i][tAmount]--; //deincrement
- //update 3dtext
- new str[128];
- format(str, sizeof(str), "Trash\n{FFFFFF}%d/%d\n/gettrash", trashInfo[i][tAmount], trashInfo[i][tLimit]);
- UpdateDynamic3DTextLabelText(trashInfo[i][trashLabelID], 0x43527DFF, str);
- return 1;
- } else {
- return SendClientMessage(playerid, COLOR_GREY, "You are not near a Garbage Truck.");
- }
- } else {
- return SendClientMessage(playerid, COLOR_GREY, "The bin is empty.");
- }
- }
- }
- return 1;
- }
- CMD:finddcars(playerid, params[])
- {
- if(PlayerInfo[playerid][pDonateRank] < 4) return AdmErrorMsg;
- DisablePlayerCheckpointEx(playerid);
- CP[playerid] = CHECKPOINT_DCARS; //set checkpoint ID
- SetPlayerCheckpointEx(playerid, 1113.95, -1884.83, 13.04, 3.0);
- return 1;
- }
- CMD:getmats(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 9 && PlayerInfo[playerid][pDonateRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not a Arms Dealer/Gold VIP.");
- new str[128];
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1423.6151, -1320.5438, 13.5546)) //materials pickup 1
- {
- if(Packages[playerid] >= 10)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't hold any more Materials Packages.");
- return 1;
- }
- if(Crates[playerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Drug Crates.");
- return 1;
- }
- if(GetPlayerVirtualWorld(playerid) != 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't do that while in a Virtual World.");
- SetPlayerHealth(playerid, 0.0);
- return 1;
- }
- if(PlayerInfo[playerid][pDonateRank] == 0 && PlayerInfo[playerid][pCash] < matprice) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that. ($500).");
- if(PlayerInfo[playerid][pDonateRank] == 1 && PlayerInfo[playerid][pCash] < 560) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($560).");
- if(PlayerInfo[playerid][pDonateRank] == 2 && PlayerInfo[playerid][pCash] < 620) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($620).");
- if(PlayerInfo[playerid][pDonateRank] == 3 && PlayerInfo[playerid][pCash] < 700) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($700).");
- if(PlayerInfo[playerid][pDonateRank] == 4 && PlayerInfo[playerid][pCash] < 750) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($750).");
- GotMats[playerid] = 1;
- if(PlayerInfo[playerid][pDonateRank] ==0)GiveMoney(playerid, -matprice);
- else if(PlayerInfo[playerid][pDonateRank] ==1)GiveMoney(playerid, -560);
- else if(PlayerInfo[playerid][pDonateRank] ==2)GiveMoney(playerid, -620);
- else if(PlayerInfo[playerid][pDonateRank] ==3)GiveMoney(playerid, -700);
- else if(PlayerInfo[playerid][pDonateRank] ==4)GiveMoney(playerid, -750);
- else return SendClientMessage(playerid, COLOR_GREY, "There were an error in the system. Report the bug with code: 025sS2.");
- Packages[playerid] = 10;
- CP[playerid] = CHECKPOINT_MATERIALS_1;
- SetPlayerCheckpointEx(playerid, 2172.1879, -2263.9683, 13.3362, 3.0); //materials factory 1
- format(str, sizeof(str), "* You bought 10 Materials Packages for $%d.", matprice);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- displayCenterHUDInfo(playerid, "~w~Deliver ~n~~r~Deliver the Packages", 8); //display for 8 seconds
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2390.5244,-2008.4646,13.5537)) //materials pickup 2
- {
- if(Packages[playerid] >= 10)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't hold any more Materials Packages.");
- return 1;
- }
- if(Crates[playerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Drug Crates.");
- return 1;
- }
- if(GetPlayerVirtualWorld(playerid) != 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't do that while in a Virtual World.");
- SetPlayerHealth(playerid, 0.0);
- return 1;
- }
- if(PlayerInfo[playerid][pDonateRank] == 0 && PlayerInfo[playerid][pCash] < matprice) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that. ($500).");
- if(PlayerInfo[playerid][pDonateRank] == 1 && PlayerInfo[playerid][pCash] < 560) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($560).");
- if(PlayerInfo[playerid][pDonateRank] == 2 && PlayerInfo[playerid][pCash] < 620) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($620).");
- if(PlayerInfo[playerid][pDonateRank] == 3 && PlayerInfo[playerid][pCash] < 700) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($700).");
- if(PlayerInfo[playerid][pDonateRank] == 4 && PlayerInfo[playerid][pCash] < 750) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that ($750).");
- GotMats[playerid] = 1;
- if(PlayerInfo[playerid][pDonateRank] ==0)GiveMoney(playerid, -matprice);
- else if(PlayerInfo[playerid][pDonateRank] ==1)GiveMoney(playerid, -560);
- else if(PlayerInfo[playerid][pDonateRank] ==2)GiveMoney(playerid, -620);
- else if(PlayerInfo[playerid][pDonateRank] ==3)GiveMoney(playerid, -700);
- else if(PlayerInfo[playerid][pDonateRank] ==4)GiveMoney(playerid, -750);
- Packages[playerid] = 10;
- CP[playerid] = CHECKPOINT_MATERIALS_2;
- SetPlayerCheckpointEx(playerid, 2288.1233,-1104.7793,38.4565, 3.0); //materials factory 2
- format(str, sizeof(str), "* You bought 10 Materials Packages for $%d.", matprice);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- displayCenterHUDInfo(playerid, "~w~Deliver ~n~~r~Deliver the Packages", 8); //display for 8 seconds
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not at a Materials Pickup.");
- return 1;
- }
- CMD:getcrate(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 17) return SendClientMessage(playerid, COLOR_GREY, "You are not a Drug Smuggler.");
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, 2411.9382, -2598.7937, 14.2131)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the Drug Factory in the Ocean Docks."); //drug factory
- if(Crates[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't carry more than 1 Crate at a time.");
- if(Packages[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Materials Packages.");
- if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that while in a Virtual World.");
- if(PlayerInfo[playerid][pCash] < 1000) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
- GiveMoney(playerid, -crackcprice);
- DrugsLoaded[playerid] = 1;
- GotDrugs[playerid] = 1;
- Crates[playerid] = 1;
- CP[playerid] = CHECKPOINT_UNLOADDRUGS;
- SetPlayerCheckpointEx(playerid, 2341.1091, -1160.8990, 27.1636, 3.0); // drugs house (near drug smuggler /getjob)
- new str[128];
- format(str, sizeof(str), "* You bought a Drug Crate for $%d.", crackcprice);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- displayCenterHUDInfo(playerid, "~b~Drug Factory~n~~w~ Deliver the crates", 8); //display for 8 seconds
- PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
- return 1;
- }
- CMD:sdtazer(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pGroup] == GROUP_S9 || PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- new str[128];
- if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /sdtazer in the paintball.");
- if(PlayerInfo[playerid][pHospital] || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use that command whilst you're injured.");
- if(IsAtEvent[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /sdtazer in an event.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use that command whilst in vehicle");
- if(PlayerHasRod[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You must put your fishing rod away before you unholster your tazer !");
- if(playerHoldingTazer[playerid] == 0)
- {
- playerHoldingTazer[playerid] = 1;
- GivePlayerAdminGun(playerid, 23);
- SetPlayerArmedWeapon(playerid, 23);
- format(str, sizeof(str), "* %s unholsters their pistol tazer.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else if(playerHoldingTazer[playerid] == 1)
- {
- playerHoldingTazer[playerid] = 0;
- TakePlayerWeapon(playerid, 23);
- if(GetPlayerWeapon(playerid) == 16){ TakePlayerWeapon(playerid, 16); }
- format(str, sizeof(str), "* %s holsters their pistol tazer back.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You currently have the hand held tazer out! use /handtazer.");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:pdcctv(playerid, params[]) {
- if(!IsACop(playerid))
- return AdmErrorMsg;
- if(!IsPlayerInRangeOfPoint(playerid, 10.0, -1739, 1045, 19010) && !watchingPDCCTV[playerid] && !PlayerInfo[playerid][pAdmin])
- return SendClientMessage(playerid, COLOR_GREY, "You are not in the CCTV control room.");
- new watchName[50];
- if(sscanf(params, "s[50]", watchName)) {
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /pdcctv [camera name/off]");
- SendClientMessage(playerid, COLOR_WHITE, "Security camera's: lobby[1-6], reception[1-2], breakroom[1-4], ihallway[1-4], northentrance[1-2], southentrance[1-2], hallway[1-6] ..");
- SendClientMessage(playerid, COLOR_WHITE, ".. pdhall[1-4], range[1-3], classroom[1-2], cells[1-4], training[1-2], chief[1-2], deputychief[1-2], interview[1-2], visitorcentre[1-4] ..");
- SendClientMessage(playerid, COLOR_WHITE, ".. meetingroom[1-2], commander[1-2]");
- return 1;
- }
- if(strcmp(watchName, "off", true) == 0) {
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 1);
- SetPlayerPos(playerid, -1736.2784, 1045.6595, 19010.9844);
- Timer_FreezePlayer(playerid, FREEZE, ENTER_FREEZE);
- SetCameraBehindPlayer(playerid);
- watchingPDCCTV[playerid] = false;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have stopped watching the PD CCTV.");
- return 1;
- }
- else if(strcmp(watchName, "lobby1", true) == 0) {
- SetPlayerCameraPos(playerid, -2194.9006, 837.4761, 9999.2656 + 3.0);
- SetPlayerCameraLookAt(playerid, -2205.1531, 843.8560, 9999.2656);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "lobby2", true) == 0) {
- SetPlayerCameraPos(playerid, -2195.3711, 849.1130, 9999.2656 + 3.0);
- SetPlayerCameraLookAt(playerid, -2205.1531, 843.8560, 9999.2656);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "lobby3", true) == 0) {
- SetPlayerCameraPos(playerid, -2213.4512, 849.5378, 10000.5947 + 3.0);
- SetPlayerCameraLookAt(playerid, -2205.1531, 843.8560, 9999.2656);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "lobby4", true) == 0) {
- SetPlayerCameraPos(playerid, -2212.8047, 838.0676, 9999.2656 + 3.0);
- SetPlayerCameraLookAt(playerid, -2205.1531, 843.8560, 9999.2656);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "lobby5", true) == 0) {
- SetPlayerCameraPos(playerid, -2195.1741,831.1974,9999.2852 + 1.0);
- SetPlayerCameraLookAt(playerid, -2197.7964,833.9078,9999.2852);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "lobby6", true) == 0) {
- SetPlayerCameraPos(playerid, -2199.7219,835.9839,9999.2852 + 1.0);
- SetPlayerCameraLookAt(playerid, -2197.7964,833.9078,9999.2852);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "reception1", true) == 0) {
- SetPlayerCameraPos(playerid, -2201.6248,831.6694,9999.2852 + 1.0);
- SetPlayerCameraLookAt(playerid, -2207.7883,834.0488,9999.2852);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "reception2", true) == 0) {
- SetPlayerCameraPos(playerid, -2212.5559,835.6365,9999.2852 + 1.0);
- SetPlayerCameraLookAt(playerid, -2207.7883,834.0488,9999.2852);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "breakroom1", true) == 0) {
- SetPlayerCameraPos(playerid, -2196.3716,835.7168,10002.7510 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.0688,833.7182,10003.5684);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "breakroom2", true) == 0) {
- SetPlayerCameraPos(playerid, -2196.3765,831.8576,10002.7510 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.0688,833.7182,10003.5684);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "breakroom3", true) == 0) {
- SetPlayerCameraPos(playerid, -2212.5220,831.8672,10002.7510 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.0688,833.7182,10003.5684);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "breakroom4", true) == 0) {
- SetPlayerCameraPos(playerid, -2212.1777,835.2151,10002.7510 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.0688,833.7182,10003.5684);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "ihallway1", true) == 0) {
- SetPlayerCameraPos(playerid, -2183.1384,671.9155,29999.2578 + 1.0);
- SetPlayerCameraLookAt(playerid, -2184.3118,673.3903,29999.2578);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "ihallway2", true) == 0) {
- SetPlayerCameraPos(playerid, -2183.2749,674.8887,29999.2578 + 1.0);
- SetPlayerCameraLookAt(playerid, -2185.7339,675.5837,29999.2539);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "ihallway3", true) == 0) {
- SetPlayerCameraPos(playerid, -2187.7839,676.1004,29999.2539 + 1.0);
- SetPlayerCameraLookAt(playerid, -2185.7339,675.5837,29999.2539);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "ihallway4", true) == 0) {
- SetPlayerCameraPos(playerid, -2189.9875,675.8231,29999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -2194.2334,675.1637,29996.3906);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "northentrance1", true) == 0) {
- SetPlayerCameraPos(playerid, -2207.2639,675.1575,9999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.9517,678.7458,9999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "northentrance2", true) == 0) {
- SetPlayerCameraPos(playerid, -2202.0784,682.3348,9999.2490 + 1.0);
- SetPlayerCameraLookAt(playerid, -2204.9517,678.7458,9999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "southentrance1", true) == 0) {
- SetPlayerCameraPos(playerid, -2184.7759,682.1206,9999.2500 + 1.0);
- SetPlayerCameraLookAt(playerid, -2182.0103,678.9568,9999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "southentrance2", true) == 0) {
- SetPlayerCameraPos(playerid, -2179.5823,674.8994,9999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -2182.0103,678.9568,9999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway1", true) == 0) {
- SetPlayerCameraPos(playerid, -2188.2073,685.6133,9999.2461 + 1.0);
- SetPlayerCameraLookAt(playerid, -2187.1963,680.4162,9999.2451);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway2", true) == 0) {
- SetPlayerCameraPos(playerid, -2187.1829,671.8939,9999.2441 + 1.0);
- SetPlayerCameraLookAt(playerid, -2193.6934,672.5224,9999.2461);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway3", true) == 0) {
- SetPlayerCameraPos(playerid, -2200.4116,672.1728,9999.2451 + 1.0);
- SetPlayerCameraLookAt(playerid, -2199.6001,678.1775,9999.2461);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway4", true) == 0) {
- SetPlayerCameraPos(playerid, -2199.3936,681.9821,9999.2490 + 1.0);
- SetPlayerCameraLookAt(playerid, -2200.1128,676.9109,9999.2461);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway5", true) == 0) {
- SetPlayerCameraPos(playerid, -2187.7322,682.1759,10005.6055 + 1.0);
- SetPlayerCameraLookAt(playerid, -2192.4780,681.5775,10002.3789);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "hallway6", true) == 0) {
- SetPlayerCameraPos(playerid, -2189.8718,674.8250,9999.2490 + 1.0);
- SetPlayerCameraLookAt(playerid, -2195.1807,675.5056,9995.7441);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "pdhall1", true) == 0) {
- SetPlayerCameraPos(playerid, 1515.1285,992.1891,20002.4180 + 1.0);
- SetPlayerCameraLookAt(playerid, 1523.2596,1000.3075,20000.9707);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "pdhall2", true) == 0) {
- SetPlayerCameraPos(playerid, 1515.3373,1007.2783,20002.4180 + 1.0);
- SetPlayerCameraLookAt(playerid, 1523.2596,1000.3075,20000.9707);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "pdhall3", true) == 0) {
- SetPlayerCameraPos(playerid, 1536.9497,1003.7917,20002.4180 + 1.0);
- SetPlayerCameraLookAt(playerid, 1523.2596,1000.3075,20000.9707);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "pdhall4", true) == 0) {
- SetPlayerCameraPos(playerid, 1536.9130,995.6707,20002.4180 + 1.0);
- SetPlayerCameraLookAt(playerid, 1523.2596,1000.3075,20000.9707);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "range1", true) == 0) {
- SetPlayerCameraPos(playerid, 638.6300,1196.4585,19999.0078 + 1.0);
- SetPlayerCameraLookAt(playerid, 640.0083,1203.2472,19999.0078);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "range2", true) == 0) {
- SetPlayerCameraPos(playerid, 640.3500,1210.9076,19999.0078 + 1.0);
- SetPlayerCameraLookAt(playerid, 637.9573,1204.7377,19999.0078);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "range3", true) == 0) {
- SetPlayerCameraPos(playerid, 635.9122,1196.6862,19999.0156 + 1.0);
- SetPlayerCameraLookAt(playerid, 629.4274,1203.3196,19999.0078);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "classroom1", true) == 0) {
- SetPlayerCameraPos(playerid, 1428.5245,2362.1665,9999.2500 + 1.0);
- SetPlayerCameraLookAt(playerid, 1424.7708,2358.6121,9999.2500);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "classroom2", true) == 0) {
- SetPlayerCameraPos(playerid, 1421.6503,2355.1406,9999.2500 + 1.0);
- SetPlayerCameraLookAt(playerid, 1424.7708,2358.6121,9999.2500);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "training1", true) == 0) {
- SetPlayerCameraPos(playerid, 1991.8910,2234.7529,9001.0859 + 2.0);
- SetPlayerCameraLookAt(playerid, 1997.4098,2243.8499,9001.0859);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "training2", true) == 0) {
- SetPlayerCameraPos(playerid, 2004.5945,2251.4368,9001.0859 + 2.0);
- SetPlayerCameraLookAt(playerid, 1997.4098,2243.8499,9001.0859);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "chief1", true) == 0) {
- SetPlayerCameraPos(playerid, 1559.7275,-1679.4202,62.4216 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 1);
- }
- else if(strcmp(watchName, "chief2", true) == 0) {
- SetPlayerCameraPos(playerid, 1570.2179,-1671.8938,62.4206 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 1);
- }
- else if(strcmp(watchName, "deputychief1", true) == 0) {
- SetPlayerCameraPos(playerid, 1559.7275,-1679.4202,62.4216 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 2);
- }
- else if(strcmp(watchName, "deputychief2", true) == 0) {
- SetPlayerCameraPos(playerid, 1570.2179,-1671.8938,62.4206 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 2);
- }
- else if(strcmp(watchName, "commander1", true) == 0) {
- SetPlayerCameraPos(playerid, 1559.7275,-1679.4202,62.4216 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 3);
- }
- else if(strcmp(watchName, "commander2", true) == 0) {
- SetPlayerCameraPos(playerid, 1570.2179,-1671.8938,62.4206 + 1.0);
- SetPlayerCameraLookAt(playerid, 1565.5474,-1675.5798,62.4216);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 3);
- }
- else if(strcmp(watchName, "interview1", true) == 0) {
- SetPlayerCameraPos(playerid, -1895.3286,-1976.8623,9999.2510 + 1.0);
- SetPlayerCameraLookAt(playerid, -1893.4800,-1975.4288,9999.2510);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "interview2", true) == 0) {
- SetPlayerCameraPos(playerid, -1891.6520,-1972.2003,9999.2510 + 1.0);
- SetPlayerCameraLookAt(playerid, -1893.4800,-1975.4288,9999.2510);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "visitorcentre1", true) == 0) {
- SetPlayerCameraPos(playerid, -1097.2747,-945.3013,39999.2969 + 1.0);
- SetPlayerCameraLookAt(playerid, -1093.4115,-944.6501,39999.7969);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "visitorcentre2", true) == 0) {
- SetPlayerCameraPos(playerid, -1089.6659,-942.6491,39999.2969 + 1.0);
- SetPlayerCameraLookAt(playerid, -1093.4115,-944.6501,39999.7969);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "visitorcentre3", true) == 0) {
- SetPlayerCameraPos(playerid, -1089.7083,-950.7468,39999.2969 + 1.0);
- SetPlayerCameraLookAt(playerid, -1093.8798,-948.7925,39999.2969);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "visitorcentre4", true) == 0) {
- SetPlayerCameraPos(playerid, -1097.2716,-948.1333,39999.2969 + 1.0);
- SetPlayerCameraLookAt(playerid, -1093.8798,-948.7925,39999.2969);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "cells1", true) == 0) {
- SetPlayerCameraPos(playerid, -1112.5077,-940.8301,29999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -1115.6938,-945.0039,29999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "cells2", true) == 0) {
- SetPlayerCameraPos(playerid, -1118.5940,-949.9542,29999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -1115.6938,-945.0039,29999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "cells3", true) == 0) {
- SetPlayerCameraPos(playerid, -1114.9211,-937.3802,29999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -1116.3842,-939.3708,29999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "cells4", true) == 0) {
- SetPlayerCameraPos(playerid, -1116.3246,-953.4129,29999.2480 + 1.0);
- SetPlayerCameraLookAt(playerid, -1114.7020,-951.2482,29999.2480);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "meetingroom1", true) == 0) {
- SetPlayerCameraPos(playerid, -1738.9769,1048.3790,29010.9844 + 1.0);
- SetPlayerCameraLookAt(playerid, -1736.7620,1045.6794,29012.0332);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else if(strcmp(watchName, "meetingroom2", true) == 0) {
- SetPlayerCameraPos(playerid, -1734.5846,1043.2177,29010.9844 + 1.0);
- SetPlayerCameraLookAt(playerid, -1736.7620,1045.6794,29012.0332);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, 10);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Invalid camera name.");
- TogglePlayerControllable(playerid, 0);
- watchingPDCCTV[playerid] = true;
- SetTimerEx("Timer_bringPlayerToCam", 1000, false, "i", playerid);
- return 1;
- }
- CMD:handtazer(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pGroup] == GROUP_S9 || PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /sdtazer in the paintball.");
- if(PlayerInfo[playerid][pHospital] || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use that command whilst you're injured.");
- if(IsAtEvent[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[WARNING] You are not allowed to use /sdtazer in an event.");
- if(PlayerHasRod[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You must put your fishing rod away before you unholster your tazer !");
- if(playerHoldingTazer[playerid] == 0)
- {
- playerHoldingTazer[playerid] = 2;
- SetPlayerAttachedObject(playerid, INDEX_7, 18642, 6, 0.06, 0.01, 0.08, 180.0, 0.0, 0.0);
- SetPlayerArmedWeapon(playerid, 0);
- format(str, sizeof(str), "* %s unholsters their hand held tazer.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else if(playerHoldingTazer[playerid] == 2)
- {
- playerHoldingTazer[playerid] = 0;
- RemovePlayerAttachedObject(playerid, INDEX_7);
- format(str, sizeof(str), "* %s holsters their hand held tazer back.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else return SendClientMessage(playerid, COLOR_GRAD1, "You currently have the pistol tazer out! use /sdtazer.");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:taxi(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 10)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1782.8840, -1933.6039, 13.6108))
- {
- ShowPlayerDialog(playerid, DIALOG_TAXI, DIALOG_STYLE_LIST, "Taxi Lockers", "Uniforms\nWeapons", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not near to the lockers.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You're not a taxi member (faction).");
- return 1;
- }
- CMD:legend(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You are not logged in!");
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Legend", "{FFFFFF}Normal Players\n{2641fe}San Andreas Police Department\n{8D8Dff}Federal Bureau of Investigation\n{FC97C0}San Andreas Fire and Medical Department\n{260059}Department of Corrections\n{696969}San Andreas Government\n{BA6103}Judicial Department\n{006699}San Andreas Network\n{E4D00A}Taxi Driver\n{800080}VIP Members\n{F4A419}Prisoner", "Close", "");
- return 1;
- }
- CMD:sapd(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == FACTION_SAPD || PlayerInfo[playerid][pMember] == FACTION_SASD)
- {
- if(IsPlayerNearSAPDHQ(playerid))
- {
- ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not in your locker room.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop.");
- return 1;
- }
- CMD:sas(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 414, 2537, 10))
- {
- ShowPlayerDialog(playerid, DIALOG_SAS_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nChange Uniform\nKevlar + Health($5,0000)\nColt45 ($1,000)", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not in your locker room.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not SAS.");
- return 1;
- }
- CMD:sasd(playerid, params[]) return cmd_sapd(playerid, params);
- CMD:govlocker(playerid, params[])
- {
- if(IsASenate(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, -2109.0344, 748.9362, 9008.7012)) // Custom interior
- {
- ShowPlayerDialog(playerid, DIALOG_SENATE_MAIN, DIALOG_STYLE_LIST, "Government", "Duty\nChange Uniform\nArmory", "Select", "Cancel"); // Senate Locker
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not at your locker in city hall.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the Government.");
- return 1;
- }
- CMD:jd(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_JD)
- return AdmErrorMsg;
- if(
- IsPlayerInRangeOfPoint(playerid, 5.0, 208.7923, 145.9888, 1003.0234) ||
- IsPlayerInRangeOfPoint(playerid, 5.0, -2578.3757, 183.4767, 8500.6064)
- ) return ShowPlayerDialog(playerid, DIALOG_HC_MAIN, DIALOG_STYLE_LIST, "Judicial Department", "Duty\nChange uniform\nArmory", "Select", "Cancel");
- SendClientMessage(playerid, COLOR_GREY, "You are not at your locker in the Court House.");
- return 1;
- }
- CMD:san(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 751.12, -1366.62, 9053.50))
- {
- ShowPlayerDialog(playerid, SANEWSLOCKER, DIALOG_STYLE_LIST, "SAN", "Duty\nChange Uniform\nGear\n", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not in your locker room.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the SA News.");
- return 1;
- }
- CMD:safmd(playerid, params[])
- {
- if(IsAMedic(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 5, 1190.5627,-1345.5804,1093.8661))
- {
- ShowPlayerDialog(playerid, DIALOG_LSFMD_MAIN, DIALOG_STYLE_LIST, "SAFMD", "Duty\nChange Uniform\nOff Duty\nGear", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not at the first aid room.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Paramedic / Fireman.");
- return 1;
- }
- CMD:doc(playerid, params[])
- {
- if(!IsANG(playerid))
- return 1;
- if( !IsPlayerInRangeOfPoint(playerid, 4, 409.6481, 2255.6724, 9002.6348) ||
- GetPlayerVirtualWorld(playerid) != DOC_WORLD ||
- GetPlayerInterior(playerid) != DOC_INT
- ) return SendClientMessage(playerid, COLOR_GRAD2, "You are not at the locker.");
- ShowPlayerDialog(playerid, DIALOG_PG_MAIN, DIALOG_STYLE_LIST, "DoC locker", "Duty\nEquipment\nClear Suspect\nUniform\nSWAT", "Select", "Cancel");
- return 1;
- }
- CMD:sang(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_SANG) return AdmErrorMsg;
- if(!IsPlayerInRangeOfPoint(playerid, 3, -219.9993, 1406.8696, 27.7656)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not at your locker.");
- ShowPlayerDialog(playerid, DIALOG_SANG_MAIN, DIALOG_STYLE_LIST, "SANG locker", "Duty\nEquipment\nClear Suspect\nUniform\nCivilians Clothes Menu", "Select", "Cancel");
- return 1;
- }
- // Command for old fbi | new DEA lockers //
- CMD:fbi(playerid, params[])
- {
- if(IsAFBI(playerid))
- {
- if(IsPlayerNearFBIHQ(playerid))
- {
- new bool: Admin;
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- Admin = true;
- break;
- }
- }
- if(Admin) ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect\nNamechange ({33AA33}Available{FFFFFF})", "Select", "Cancel");
- else ShowPlayerDialog(playerid, DIALOG_LEO_MAIN, DIALOG_STYLE_LIST, GetPlayerFactionName(playerid), "Duty\nUndercover\nChange Uniform\nArmory\nSWAT\nClear Suspect\nRelease Suspect\nNamechange ({FF0000}Not available{FFFFFF})", "Select", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not in your locker room.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of the FBI.");
- return 1;
- }
- //----------------------------------------------------------Bugs------------------------------------------------------
- CMD:plantbug(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- new target, Float: z[3], Float: x[3];
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /plantbug [playerid/PartOfName]");
- if(PlayerInfo[target][pAdmin] > 1) {
- SendClientMessage(playerid, COLOR_WHITE, "You can't bug an admin");
- new str[128];
- format(str, sizeof(str), "* %s just attempted to plant a bug on you.", PlayerName(playerid));
- SendClientMessage(target, COLOR_WHITE, str);
- return 1;
- }
- if(!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- GetPlayerPos(playerid, z[0], z[1], z[2]);
- if(!IsPlayerInRangeOfPoint(target, 5.0, z[0], z[1], z[2])) return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- SendClientMessage(playerid, -1, "NOTE: Make sure you and the target stand still.");
- GetPlayerPos(target, x[0], x[1], x[2]);
- buggedPos[0][playerid] = z[0];
- buggedPos[1][playerid] = z[1];
- buggedPos[2][playerid] = z[2];
- buggedPos[0][target] = x[0];
- buggedPos[1][target] = x[1];
- buggedPos[2][target] = x[2];
- WireOfferID[target] = playerid;
- return 1;
- }
- CMD:removebug(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- new toplayerid;
- new str[128];
- if(sscanf(params, "u", toplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removebug [playerid/PartOfName]");
- {
- if(!IsPlayerConnected(toplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[toplayerid][pWire] == 1)
- {
- if(IsPlayerInRangeOfPlayer(5.0, playerid, toplayerid) || IsPlayerInAnyVehicle(playerid) && sVehicleInfo[GetDynamicVehicleID(GetPlayerVehicleID(playerid))][v_faction] == 2 && GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
- {
- if(playerid == toplayerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't remove your own bug.");
- PlayerInfo[toplayerid][pWire] = 0;
- format(str, sizeof(str), "* You have removed the bug from %s.", PlayerICName(toplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not near that player or in a survillance vehicle.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is not bugged.");
- }
- }
- // else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You have no access to this command !");
- else return 1;
- return 1;
- }
- CMD:searchbug(playerid, params[]) //search for a bug on yourself
- {
- if(PlayerInfo[playerid][pWire] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You find a small electrical device attached to you, which resembles a surveillance bug.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Use /removemybug to remove it.");
- PlayerInfo[playerid][pWireFound] = 1;
- }
- else SendClientMessage(playerid, COLOR_GREY, "You find nothing.");
- return 1;
- }
- CMD:removemybug(playerid, params[]) //for removing bugs after searching for them
- {
- if(PlayerInfo[playerid][pWireFound] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have removed the bug from yourself.");
- PlayerInfo[playerid][pWire] = 0;
- PlayerInfo[playerid][pWireFound] = 0;
- }
- else SendClientMessage(playerid, COLOR_GREY, "You can't remove something you haven't found!");
- return 1;
- }
- //-----------------------------------------------------------------------------------------------------------------------
- CMD:pickupbomb(playerid, params[])
- {
- if(BombID[playerid] != -1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehid = GetPlayerVehicleID(playerid);
- if(BombID[playerid] == vehid && BombInCar[playerid])
- {
- BombID[playerid] = -1;
- HoldingDetonator[playerid] = 0;
- TakePlayerWeapon(playerid, 40);
- PlayerInfo[playerid][pBombs]++;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have disarmed the C4.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "This vehicle does not have a bomb in it.");
- }
- new Float:X, Float:Y, Float:Z;
- GetDynamicObjectPos(BombID[playerid], X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid, 1.5, X, Y, Z))
- {
- SetPlayerFacingObject(playerid, BombID[playerid]);
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant_2Idle", 4.0, 0, 0, 0, 0, 0);
- if(BombID[playerid]) { DestroyDynamicObjectEx(BombID[playerid]); }
- BombID[playerid] = -1;
- HoldingDetonator[playerid] = 0;
- TakePlayerWeapon(playerid, 40);
- PlayerInfo[playerid][pBombs]++;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have disarmed the C4.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not near your C4.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You haven't planted a C4 yet.");
- return 1;
- }
- CMD:plantbomb(playerid, params[])
- {
- if(PlayerInfo[playerid][pBombs] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have any C4 Explosives.");
- if(PlayerInfo[playerid][pHospital] != 0 || PlayerTied[playerid] != 0 || PlayerCuffed[playerid] != 0 || PlayerTazed[playerid] != 0 || PlayerFrozen[playerid] != 0 || IsFishing[playerid] != 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- BombInCar[playerid] = 1;
- BombID[playerid] = GetPlayerVehicleID(playerid);
- }
- else
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(BombID[playerid]) { DestroyDynamicObjectEx(BombID[playerid]); }
- X += (1 * floatsin(-A, degrees));
- Y += (1 * floatcos(-A, degrees));
- BombID[playerid] = CreateDynamicObject(1654, X, Y, Z -0.9, 0, 90, 0);
- Streamer_Update(playerid);
- BombInCar[playerid] = 0;
- }
- ResetPlayerWeapons(playerid);
- GivePlayerGun(playerid, 40);
- PlayerInfo[playerid][pBombs]--;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have placed the C4, the device is now armed.");
- return 1;
- }
- CMD:poisonmeal(playerid, params[]) return cmd_poisonfood(playerid, params);
- CMD:poisonfood(playerid, params[])
- {
- if(PlayerInfo[playerid][pPoison] > 0)
- {
- for(new i = 0; i < foodTrays; i++)
- {
- new Float:objX, Float:objY, Float:objZ;
- GetDynamicObjectPos(foodTray[i][0], objX, objY, objZ);
- if(IsPlayerInRangeOfPoint(playerid, 1.6, objX, objY, objZ))
- {
- if(foodTray[i][2] > TRAY_EMPTY)
- { //if the tray has food on it
- foodTray[i][4] = TRAY_POISONED; //poisoned
- OnePlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have placed poison in the food.");
- }
- break;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You do not have any poison !");
- }
- return 1;
- }
- CMD:arrest(playerid, params[])
- {
- new str[128];
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(IsAtArrestPoint(playerid))
- {
- new suspect, price, minutes, bail, bprice;
- if(sscanf(params, "uiiii", suspect, price, minutes, bail, bprice)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /arrest [playerid/name] [price] [minutes] [bail (0 - 1)] [bprice]");
- {
- if(price < 1 || price > 20000) return SendClientMessage(playerid, COLOR_GREY, "Price can't be below $1 or above $20,000.");
- if(minutes < 1 || minutes > 60) return SendClientMessage(playerid, COLOR_GREY, "Minutes can't be below 1 or above 60.");
- if(bail < 0 || bail > 1) return SendClientMessage(playerid, COLOR_GREY, "Bail can't be below 0 or above 1.");
- if(bprice < 0 || bprice > 1000000) return SendClientMessage(playerid, COLOR_GREY, "Bail Price can't be below $0 or above $1,000,000.");
- if(IsPlayerConnected(suspect))
- {
- if(GetDistanceBetweenPlayers(playerid, suspect) < 5)
- {
- if(PlayerInfo[suspect][pWantedLevel] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Player must be at least Wanted Level 1.");
- return 1;
- }
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimePID` = '%e'", PlayerInfo[suspect][pID]);
- mysql_pquery(sqlGameConnection, query);
- format(str, sizeof(str), "* You arrested %s.", PlayerICName(suspect));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You were arrested by %s, $%d", PlayerICName(playerid), price);
- SendClientMessage(suspect, COLOR_LIGHTRED, str);
- GiveMoney(suspect, -price);
- //SetPlayerPos(suspect, -1116.11, -946.57 ,29999.24);
- ClearGuns(suspect);
- ResetPlayerWeapons(suspect);
- isBOLO[suspect] = 0;
- if(PlayerInfo[playerid][pMember] ==1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] ==3 || PlayerInfo[playerid][pMember] == 7) //police
- {
- format(str, sizeof(str), "Dispatch: %s %s arrested suspect %s, over", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(suspect));
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(3, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- }
- PlayerInfo[suspect][pVirtualWorld] = 191991;
- SetPlayerVirtualWorld(suspect, PlayerInfo[suspect][pVirtualWorld]);
- PlayerInfo[suspect][pInt] = 247;
- SetPlayerInterior(suspect, PlayerInfo[suspect][pInt]);
- new rand = random(sizeof(prisoncells));
- PrisonCell[suspect] = rand;
- SetPlayerPos(suspect, prisoncells[rand][0], prisoncells[rand][1], prisoncells[rand][2]);
- Timer_FreezePlayer(suspect, FREEZE, ENTER_FREEZE);
- SetCameraBehindPlayer(suspect);
- TogglePlayerControllable(suspect, true);
- PlayerInfo[suspect][pJailTime] = minutes * 60;
- PlayerInfo[suspect][pJailed] = 1;
- SetPlayerSpawn(suspect);
- //SetPlayerPos(suspect, -1116.11, -946.57 ,29999.24);
- if(bail == 1)
- {
- JailPrice[suspect] = bprice;
- format(str, sizeof(str), "* You are jailed for %d seconds, Bail: $%d.", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, str);
- }
- else
- {
- JailPrice[suspect] = 0;
- format(str, sizeof(str), "* You are jailed for %d seconds, Bail: Unavailable.", PlayerInfo[suspect][pJailTime]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, str);
- }
- showNewbieTipMessage(suspect, 5); //jailtip
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerFree(suspect, playerid, "arrested");
- PlayerInfo[suspect][pWantedLevel] = 0;
- SetPlayerToTeamColor(suspect);
- WantLawyer[suspect] = 1;
- OnPlayerSave(suspect);
- Timer_FreezePlayer(suspect, FREEZE, ENTER_FREEZE);
- SetTimerEx("Timer_UncuffSuspect", 5000, false, "i", suspect);
- SetPlayerPos(suspect, -1116.11, -946.57 ,29999.24);
- PlayerInfo[suspect][pVirtualWorld] = 191991;
- SetPlayerVirtualWorld(suspect, PlayerInfo[suspect][pVirtualWorld]);
- PlayerInfo[suspect][pInt] = 247;
- SetPlayerInterior(suspect, PlayerInfo[suspect][pInt]);
- SetPlayerSpawn(suspect);
- SetPlayerSpawn(suspect);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1423.1179, -1458.7749, 1616.3573)) // At court house
- {
- new suspect, price, minutes, bail, bprice;
- if(sscanf(params, "uiiii", suspect, price, minutes, bail, bprice)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /arrest [playerid/name] [price] [minutes] [bail (0 - 1)] [bprice]");
- {
- if(price < 1 || price > 20000) return SendClientMessage(playerid, COLOR_GREY, "Price can't be below $1 or above $20,000.");
- if(minutes < 1 || minutes > 30) return SendClientMessage(playerid, COLOR_GREY, "Minutes can't be below 1 or above 30.");
- if(bail < 0 || bail > 1) return SendClientMessage(playerid, COLOR_GREY, "Bail can't be below 0 or above 1.");
- if(bprice < 0) return SendClientMessage(playerid, COLOR_GREY, "Bail Price can't be below $0.");
- if(IsPlayerConnected(suspect))
- {
- if(GetDistanceBetweenPlayers(playerid, suspect) < 5)
- {
- if(PlayerInfo[suspect][pWantedLevel] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "Player must be at least Wanted Level 1.");
- return 1;
- }
- format(str, sizeof(str), "* You arrested %s.", PlayerICName(suspect));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You were arrested by %s, $%d", PlayerICName(playerid), price);
- SendClientMessage(suspect, COLOR_LIGHTRED, str);
- GiveMoney(suspect, -price);
- ClearGuns(suspect);
- ResetPlayerWeapons(suspect);
- isBOLO[suspect] = 0;
- if(PlayerInfo[playerid][pMember] ==1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] ==3 || PlayerInfo[playerid][pMember] == 7) //police
- {
- format(str, sizeof(str), "Dispatch: %s %s arrested suspect %s, over", GetPlayerRank(playerid), PlayerICName(playerid), PlayerICName(suspect));
- SendRadioMessage(1, TEAM_BLUE_COLOR, str);
- SendRadioMessage(2, TEAM_BLUE_COLOR, str);
- SendRadioMessage(3, TEAM_BLUE_COLOR, str);
- SendRadioMessage(5, TEAM_BLUE_COLOR, str);
- }
- PlayerInfo[suspect][pVirtualWorld] = 10;
- SetPlayerVirtualWorld(suspect, PlayerInfo[suspect][pVirtualWorld]);
- PlayerInfo[suspect][pInt] = 10;
- SetPlayerInterior(suspect, PlayerInfo[suspect][pInt]);
- SetPlayerPos(suspect, -1110.17, -941.69, 29999.24);
- PlayerInfo[suspect][pJailCell] = 1;
- SetCameraBehindPlayer(suspect);
- TogglePlayerControllable(suspect, true);
- PlayerInfo[suspect][pJailTime] = minutes * 60;
- PlayerInfo[suspect][pJailed] = 1;
- if(bail == 1)
- {
- JailPrice[suspect] = bprice;
- format(str, sizeof(str), "* You are jailed for %d seconds, Bail: $%d.", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, str);
- }
- else
- {
- JailPrice[suspect] = 0;
- format(str, sizeof(str), "* You are jailed for %d seconds, Bail: Unavailable.", PlayerInfo[suspect][pJailTime]);
- SendClientMessage(suspect, COLOR_LIGHTBLUE, str);
- }
- showNewbieTipMessage(suspect, 5); //jailtip
- PlayerInfo[suspect][pArrested] += 1;
- SetPlayerFree(suspect, playerid, "arrested");
- PlayerInfo[suspect][pWantedLevel] = 0;
- SetPlayerToTeamColor(suspect);
- WantLawyer[suspect] = 1;
- isBOLO[suspect] = 0;
- OnPlayerSave(suspect);
- Timer_FreezePlayer(suspect, FREEZE, ENTER_FREEZE);
- SetTimerEx("Timer_UncuffSuspect", 5000, false, "i", suspect);
- new query[128], name[24];
- GetPlayerName(suspect, name, 24);
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimePID` = '%d'", PlayerInfo[suspect][pID]);
- mysql_pquery(sqlGameConnection, query);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not at an Arrest Point.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / Judicial Department.");
- return 1;
- }
- // Command to hide or show a badge
- CMD:badge(playerid, params[]) {
- if(
- PlayerInfo[playerid][pMember] != FACTION_SAPD &&
- PlayerInfo[playerid][pMember] != FACTION_FBI &&
- PlayerInfo[playerid][pMember] != FACTION_JD &&
- PlayerInfo[playerid][pMember] != FACTION_FMD &&
- PlayerInfo[playerid][pMember] != FACTION_SANG
- ) return AdmErrorMsg;
- if(!PlayerInfo[playerid][pOnDuty])
- return SendClientMessage(playerid, COLOR_GREY, "You do not have a badge on you.");
- PlayerInfo[playerid][pHidingBadge] = !PlayerInfo[playerid][pHidingBadge];
- if(PlayerInfo[playerid][pHidingBadge]) {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now hiding your badge.");
- }
- else SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are no longer hiding your badge.");
- SetPlayerToTeamColor(playerid);
- return 1;
- }
- CMD:cuff(playerid, params[])
- {
- if(IsACop(playerid) || IsANG(playerid) || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pGroup] == GROUP_S9 || PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /cuff [playerid/partofname]");
- {
- if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, COLOR_GREY, "Cannot use this while in a vehicle.");
- if(IsPlayerConnected(targetid))
- {
- if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "You cannot do that!");
- if(PlayerInfo[playerid][pHospital] || IsPlayerRestricted(playerid) || pDeathState[playerid] != PLAYER_STATE_NORMAL) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use that command whilst you're injured.");
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't cuff yourself.");
- if(IsPlayerInRangeOfPlayer(2.0, playerid, targetid))
- {
- if(PlayerTied[targetid] > 0) return SendClientMessage(playerid, COLOR_GREY, "That player is tied up.");
- if(PlayerCuffed[targetid] > 0) return SendClientMessage(playerid, COLOR_GREY, "That player is already cuffed.");
- if(IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Suspect is in a car, get him out first.");
- if(GetPlayerSpecialAction(targetid) == SPECIAL_ACTION_HANDSUP)setPlayerCuffed(targetid, 0);
- else if(PlayerTazed[targetid]) setPlayerCuffed(targetid, 0); //freeze player
- else return SendClientMessage(playerid, COLOR_GREY, "That player is not restrained or does not have their hands up.");
- format(str, sizeof(str), "* You were cuffed by officer %s.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You cuffed %s.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s hand cuffs %s, so he wont go anywhere.", PlayerICName(playerid), PlayerICName(targetid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- displayCenterHUDInfo(targetid, "~r~Cuffed.", 8); //display for 8 seconds
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / NG / Judicial Department member.");
- return 1;
- }
- CMD:uncuff(playerid, params[])
- {
- if(IsACop(playerid) || IsANG(playerid) || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pGroup] == GROUP_S9 || PlayerInfo[playerid][pGroup] == GROUP_HITMAN)
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid))return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /uncuff [Playerid/PartOfName]");
- {
- if(IsPlayerConnected(targetid))
- {
- if(targetid != INVALID_PLAYER_ID)
- {
- if(targetid == playerid && PlayerInfo[playerid][pAdmin] <= 1) return SendClientMessage(playerid, COLOR_GREY, "You can't Uncuff yourself.");
- if(IsPlayerInRangeOfPlayer(2.0, playerid, targetid))
- {
- if(PlayerCuffed[targetid])
- {
- if(beingDragged[targetid])return SendClientMessage(playerid, COLOR_GREY, "Stop dragging the player first.");
- format(str, sizeof(str), "* You were Uncuffed by %s.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* You uncuffed %s.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s has uncuffed %s.", PlayerICName(playerid), PlayerICName(targetid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- displayCenterHUDInfo(targetid, "~g~Uncuffed.", 8); //display for 8 seconds
- setPlayerUncuffed(targetid);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player isn't Cuffed.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is Offline.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / NG / Judicial Department Member.");
- return 1;
- }
- CMD:suspect(playerid, params[]) return SendClientMessage(playerid, COLOR_LIGHTRED, "Please use the new MDC system - /mdc");
- CMD:su(playerid, params[]) return cmd_suspect(playerid, params);
- CMD:addpoint(playerid, params[])
- {
- if(IsACop(playerid))
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /addpoint [playerid/PartOfName]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(PlayerInfo[targetid][pCarLicense] != 1) return SendClientMessage(playerid, COLOR_GREY, "That player doesn't have a driver license.");
- if(IsACop(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player can not be given driver points.");
- format(str, sizeof(str), "%s has gave you a driver point.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have given %s a driver point.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pDriverPoints] ++;
- if(PlayerInfo[targetid][pDriverPoints] >= 3)
- {
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You have reached 3 driver points and therefore your driver license was automatically revoked.");
- PlayerInfo[targetid][pDriverPoints] = 0; // reset the points
- PlayerInfo[targetid][pCarLicense] = 0; // revoke the license
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "The point you have given to that player has resulted in their license being revoked.");
- }
- }
- return 1;
- }
- CMD:speedgun(playerid, params[])
- {
- if(IsACop(playerid))
- {
- new str[128];
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "~~~~~~~~~~\t\tVehicles Speed in Area\t\t~~~~~~~~~~");
- for(new i = 0; i <= GetPlayerPoolSize(); i++)
- {
- if(IsPlayerInRangeOfPlayer(20.0, playerid, i))
- {
- if(IsPlayerInAnyVehicle(i) && i != playerid && GetPlayerVehicleSeat(i) == 0)
- {
- format(str, sizeof(str), "Vehicle:\t%s\tSpeed:\t%d", GetVehicleFriendlyName(GetPlayerVehicleID(i)), GetVehicleSpeed(GetPlayerVehicleID(i)));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:trunk(playerid, params[])
- {
- if(inPaintball[playerid] > 0) return SendClientMessage(playerid, COLOR_GRAD1, "You cannot use that command at this time.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be OUTSIDE of the vehicle in order to do this.");
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) != 2)
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't open the trunk from a passenger seat");
- return 1;
- }
- new check = 0;
- IsByVehTrunk[playerid] = -1;
- for(new i = 0; i < MAX_VEHICLES; i++) //check if player by any trunk - jacob
- {
- new Float:vtpos[4];
- GetVehiclePos(i, vtpos[0], vtpos[1], vtpos[2]);
- GetVehicleZAngle(i, vtpos[3]);
- new Float:vtinfo[3];
- GetVehicleModelInfo(GetVehicleModel(i), VEHICLE_MODEL_INFO_SIZE, vtinfo[0], vtinfo[1], vtinfo[2]);
- new Float:distance = (vtinfo[1]/2 + 0.5);
- vtpos[0] += (distance * -floatsin(-vtpos[3], degrees));
- vtpos[1] += (distance * -floatcos(-vtpos[3], degrees));
- if(IsPlayerInRangeOfPoint(playerid, 1.7, vtpos[0], vtpos[1], vtpos[2]))
- {
- IsByVehTrunk[playerid] = i;
- }
- }
- if(IsAPlane(IsByVehTrunk[playerid]) || IsABike(IsByVehTrunk[playerid]) || IsAHelicopter(IsByVehTrunk[playerid]) || IsATrain(IsByVehTrunk[playerid]) || IsABoat(IsByVehTrunk[playerid]) || IsABus(IsByVehTrunk[playerid]) || GetVehicleModel(GetPlayerVehicleID(IsByVehTrunk[playerid])) == 523)
- {
- SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have a trunk.");
- return 1;
- }
- if(IsByVehTrunk[playerid] == -1) return SendClientMessage(playerid, COLOR_GREY, "You are not by any vehicles.");
- if(gCarLock[IsByVehTrunk[playerid]] == 1) return SendClientMessage(playerid, COLOR_GREY, "That vehicle's trunk is locked.");
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- if(CreatedCars[i] == IsByVehTrunk[playerid])
- {
- check = 1;
- break;
- }
- }
- if(check == 1) return SendClientMessage(playerid, COLOR_RED, "This vehicle trunk is not available.");
- ShowPlayerDialog(playerid, TRUNKDIALOG, DIALOG_STYLE_LIST, "Trunk", "Open / Close\nCheck\nPut stuff\nTake stuff", "Ok", "Cancel"); //Trunk
- return 1;
- }
- CMD:admins(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE, "Admins Online:");
- if(minutesOnline[playerid] < 30 && PlayerInfo[playerid][pConnectTime] < 1) return 1; //stop hackers viewing admins online
- new str[128];
- if(PlayerInfo[playerid][pAdmin] == 0)
- {
- new alevel[500];
- foreach(new i:Player)
- {
- if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pStealthed] == 0 && !PlayerInfo[i][pHiddenAss])
- {
- if(PlayerInfo[i][pAdmin] == 1)
- {
- alevel = "Probationary Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 2)
- {
- alevel = "Junior Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 3)
- {
- alevel = "General Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 4 && PlayerInfo[i][pAdmin] <= 1336)
- {
- alevel = "Senior Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 1337 && PlayerInfo[i][pAdmin] <= 99998)
- {
- alevel = "Head Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 99999)
- {
- alevel = "Executive Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 1999999998)
- {
- alevel = "Co-Owner";
- }
- if(PlayerInfo[i][pAdmin] == 1999999999)
- {
- alevel = "Community Director";
- }
- if(ADuty[i])
- {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- } else {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- }
- else if(PlayerInfo[playerid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 1339 && !PlayerInfo[playerid][pHiddenAss])
- {
- new dif = 0;
- new plvl = 0;
- new tlvl = 0;
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- plvl = PlayerInfo[playerid][pAdmin];
- tlvl = PlayerInfo[i][pAdmin];
- dif = (tlvl -=plvl);
- if(dif < 4 || PlayerInfo[i][pStealthed] == 0)
- {
- new alevel[50];
- if(PlayerInfo[i][pAdmin] == 1)
- {
- alevel = "Probationary Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 2)
- {
- alevel = "Junior Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 3)
- {
- alevel = "General Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 4 && PlayerInfo[i][pAdmin] <= 1336)
- {
- alevel = "Senior Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 1337 && PlayerInfo[i][pAdmin] <= 99998)
- {
- alevel = "Head Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 99999)
- {
- alevel = "Executive Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 199999999)
- {
- alevel = "Community Director";
- }
- if(ADuty[i])
- {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- } else {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- //SendClientMessage(playerid, COLOR_GREY, str); This SCM is literally useless, it'd send everything double, lol
- }
- }
- }
- }
- else if(PlayerInfo[playerid][pAdmin] > 1339 && !PlayerInfo[playerid][pHiddenAss])
- {
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- new alevel[50];
- if(PlayerInfo[i][pAdmin] == 1)
- {
- alevel = "Probationary Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 2)
- {
- alevel = "Junior Administrator";
- }
- if(PlayerInfo[i][pAdmin] == 3)
- {
- alevel = "General Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 4 && PlayerInfo[i][pAdmin] <= 1336)
- {
- alevel = "Senior Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 1337 && PlayerInfo[i][pAdmin] <= 99998)
- {
- alevel = "Head Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 99999)
- {
- alevel = "Executive Administrator";
- }
- if(PlayerInfo[i][pAdmin] >= 199999999)
- {
- alevel = "Community Director";
- }
- if(ADuty[i])
- {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- } else {
- if(PlayerPaused[i]) format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", alevel, PlayerOOCName(i));
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:withdraw(playerid, params[])
- {
- if(!IsPlayerAtBankingPoint(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not at a bank counter.");
- new amount;
- new str[128];
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /withdraw [amount]");
- format(str, sizeof(str), "You have $%d in your bank account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, str);
- return 1;
- }
- else
- {
- if(amount > PlayerInfo[playerid][pAccount] || amount < 1) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much.");
- GiveMoney(playerid, amount);
- PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] -amount;
- format(str, sizeof(str), "You have withdrawn $%d from your bank account. Total: $%d.", amount, PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- return 1;
- }
- CMD:payday(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 99999) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- PayDay();
- return 1;
- }
- CMD:signcheck(playerid, params[])
- {
- if(PlayerInfo[playerid][pCheck] == 1)
- {
- new num;
- if(sscanf(params, "i", num)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /signcheck [check number]");
- if(num == CheckNumber[playerid])
- {
- SendPayCheck(playerid);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "Invalid check number.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have a check ready to pick up.");
- return 1;
- }
- CMD:bank(playerid, params[])
- {
- if(!IsPlayerAtBankingPoint(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not at the bank counter.");
- new amount;
- new str[128];
- if(sscanf(params, "i", amount))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /bank [amount]");
- format(str, sizeof(str), "You have $%d in your bank account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, str);
- return 1;
- }
- if(amount > PlayerInfo[playerid][pCash] || amount < 1)
- return SendClientMessage(playerid, COLOR_GRAD2, "You don't have that much.");
- GiveMoney(playerid, -amount);
- new curfunds = PlayerInfo[playerid][pAccount];
- PlayerInfo[playerid][pAccount] = amount +PlayerInfo[playerid][pAccount];
- SendClientMessage(playerid, COLOR_WHITE, "Bank Statement:");
- format(str, sizeof(str), "Old Balance: $%d", curfunds);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- format(str, sizeof(str), "Deposit: $%d", amount);
- SendClientMessage(playerid, COLOR_GRAD4, str);
- format(str, sizeof(str), "New Balance: $%d", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_WHITE, str);
- return 1;
- }
- CMD:deposit(playerid, params[])
- return cmd_bank(playerid, params);
- CMD:atm(playerid, params[])
- {
- if(!IsAtATM(playerid)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not at an ATM machine.");
- new str[128];
- showNewbieTipMessage(playerid, 2); //atm tip
- new atmstring[128];
- format(atmstring, sizeof(atmstring), "You have a total of $%d in your bank account\nType below the amount of money you want to withdraw:", PlayerInfo[playerid][pAccount]);
- ShowPlayerDialog(playerid, 59, DIALOG_STYLE_INPUT, "ATM", atmstring, "Withdraw", "Cancel");
- format(str, sizeof(str), "* %s presses a button and checks their balance.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- CMD:ipod(playerid, params[])
- {
- if(PlayerInfo[playerid][piPod] == 1)
- {
- DisplayDialogForPlayer(playerid, 108);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have an iPod.");
- return 1;
- }
- CMD:dice(playerid, params[])
- {
- new dice = random(6) +1;
- new str[128];
- if(PlayerInfo[playerid][pDice] == 1)
- {
- format(str, sizeof(str), "* %s throws a dice that lands on %d.", PlayerICName(playerid), dice);
- ProxDetector(5.0, playerid, str, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have a dice.");
- return 1;
- }
- CMD:flipcoin(playerid, params[])
- {
- if(PlayerInfo[playerid][pCash] > 0)
- {
- new str[128];
- switch(random(2))
- {
- case 1:
- {
- format(str, sizeof(str), "* %s flips a coin that lands on Tails.", PlayerICName(playerid));
- GiveMoney(playerid, -1);
- ProxDetector(5.0, playerid, str, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN);
- }
- default:
- {
- format(str, sizeof(str), "* %s flips a coin that lands on Heads.", PlayerICName(playerid));
- GiveMoney(playerid, -1);
- ProxDetector(5.0, playerid, str, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN, COLOR_LIGHTGREEN);
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have any money.");
- return 1;
- }
- CMD:fstats(playerid, params[])
- {
- if(PlayerInfo[playerid][pFMember] == 255) return SendClientMessage(playerid, COLOR_GREY, "You are not in a family.");
- new fam = PlayerInfo[playerid][pFMember];
- new str[128];
- format(str, 256, "Family: %s, Money: $%d, Mats: %d, Cannabis: %d, Cocaine: %d, Meth: %d\nPromethazine: %d, Codeine: %d Lean: %d",
- FamilyInfo[fam][FamilyName], FamilyInfo[fam][FamilyBank], FamilyInfo[fam][FamilyMats], FamilyInfo[fam][FamilyCannabis], FamilyInfo[fam][FamilyCocaine], FamilyInfo[fam][FamilyMeth], FamilyInfo[fam][FamilyPromethazine], FamilyInfo[fam][FamilyCodeine], FamilyInfo[fam][FamilyLean]);
- SendClientMessage(playerid, COLOR_YELLOW2, str);
- format(str, sizeof(str), "Colt45: %d, Shotgun: %d, MP5: %d, AK47: %d, M4: %d, Rifle: %d, Sniper: %d, SPAS12: %d, Deagle: %d, UZI: %d, TEC9: %d",
- FamilyInfo[fam][Colt45], FamilyInfo[fam][Shotgun], FamilyInfo[fam][MP5],
- FamilyInfo[fam][AK47], FamilyInfo[fam][M4], FamilyInfo[fam][Rifle], FamilyInfo[fam][Sniper], FamilyInfo[fam][SPAS12], FamilyInfo[fam][Deagle], FamilyInfo[fam][UZI], FamilyInfo[fam][TEC9]);
- SendClientMessage(playerid, COLOR_YELLOW2, str);
- return 1;
- }
- CMD:afstats(playerid, params[])
- {
- //if(!(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pGangDirector])) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- new fam;
- new str[128];
- if(sscanf(params, "i", fam)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /afstats [family]");
- if(fam < 1 || fam > 20) return SendClientMessage(playerid, COLOR_GREY, "Family number must be between 1 and 20.");
- format(str, 256, "Family: %s, Money: $%d, Mats: %d, Cannabis: %d, Cocaine: %d, Meth: %d\nPromethazine: %d, Codeine: %d Lean: %d",
- FamilyInfo[fam][FamilyName], FamilyInfo[fam][FamilyBank], FamilyInfo[fam][FamilyMats], FamilyInfo[fam][FamilyCannabis], FamilyInfo[fam][FamilyCocaine], FamilyInfo[fam][FamilyMeth], FamilyInfo[fam][FamilyPromethazine], FamilyInfo[fam][FamilyCodeine], FamilyInfo[fam][FamilyLean]);
- SendClientMessage(playerid, COLOR_YELLOW2, str);
- format(str, sizeof(str), "Colt45: %d, Shotgun: %d, MP5: %d, AK47: %d, M4: %d, Rifle: %d, Sniper: %d, SPAS12: %d, Deagle: %d, UZI: %d, TEC9: %d",
- FamilyInfo[fam][Colt45], FamilyInfo[fam][Shotgun], FamilyInfo[fam][MP5],
- FamilyInfo[fam][AK47], FamilyInfo[fam][M4], FamilyInfo[fam][Rifle], FamilyInfo[fam][Sniper], FamilyInfo[fam][SPAS12], FamilyInfo[fam][Deagle], FamilyInfo[fam][UZI], FamilyInfo[fam][TEC9]);
- SendClientMessage(playerid, COLOR_YELLOW2, str);
- return 1;
- }
- CMD:preparefood(playerid, params[])
- {
- new str[128];
- if(hasFoodTray[playerid])
- {
- format(str, sizeof(str), "* %s has prepared their Meal.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- removePlayerFoodTray(playerid);
- Streamer_Update(playerid);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not carrying any food.");
- return 1;
- }
- CMD:preparemeal(playerid, params[]) return cmd_preparefood(playerid, params);
- CMD:eat(playerid, params[])
- {
- if(hasFoodTray[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You cannot eat while carrying food.");
- eatFromTray(playerid);
- return 1;
- }
- CMD:cleanup(playerid, params[])
- {
- cleanUpFood(playerid);
- return 1;
- }
- CMD:buyproducts(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 5) return SendClientMessage(playerid, COLOR_GREY, "You are not a product dealer.");
- if(IsPlayerInRangeOfPoint(playerid, 3, 987.8038, -1366.2513, 13.5787))
- {
- new amount;
- new str[128];
- if(sscanf(params, "i", amount)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /buyproducts [amount]");
- {
- if(amount < 1 || amount > 500)
- {
- SendClientMessage(playerid, COLOR_GREY, "Cannot buy less than 1 product or more than 500 products.");
- return 1;
- }
- new price = amount * prodprice;
- if(GetMoney(playerid) >= price)
- {
- if(amount + PlayerInfo[playerid][pProducts] > 500) return SendClientMessage(playerid, COLOR_GREY, "You can't hold more than 500 products.");
- format(str, sizeof(str), "* You bought %d products for $%d.", amount, price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You must sell those products to business owners.");
- GiveMoney(playerid, -price);
- PlayerInfo[playerid][pProducts] += amount;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not at the products purchase location.");
- if(CP[playerid] != CHECKPOINT_NONE)
- {
- CP[playerid] = CHECKPOINT_NONE;
- DisablePlayerCheckpointEx(playerid);
- }
- SendClientMessage(playerid, COLOR_GREY, "The products purchase location has been marked on your map.");
- SetPlayerCheckpointEx(playerid, 987.8038, -1366.2513, 13.5787, 4);
- CP[playerid] = CHECKPOINT_BUYPRODUCTS;
- return 1;
- }
- return 1;
- }
- CMD:buyprod(playerid, params[]) return cmd_buyproducts(playerid, params);
- CMD:sellproducts(playerid, params[])
- {
- if(PlayerInfo[playerid][pJob] != 5) return SendClientMessage(playerid, COLOR_GREY, "You are not a Product Dealer.");
- new amount, price, targetid;
- new str[128];
- if(sscanf(params, "uii", targetid, amount, price)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /sellproducts [playerid/PartOfName] [amount] [price]");
- {
- if(amount < 1 || amount > 500)
- {
- SendClientMessage(playerid, COLOR_GREY, "Product amount can't be lower than 1, or above 500.");
- return 1;
- }
- if(price < 1 || price > 500000)
- {
- SendClientMessage(playerid, COLOR_GREY, "Price can't be lower than $1, or above $500,000.");
- return 1;
- }
- if(amount > PlayerInfo[playerid][pProducts])
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much Products with you.");
- return 1;
- }
- if(IsPlayerConnected(targetid))
- {
- if(targetid != INVALID_PLAYER_ID)
- {
- if(IsPlayerInRangeOfPlayer(8.0, playerid, targetid))
- {
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can't sell to yourself.");
- format(str, sizeof(str), "* You offered %s to buy %d Products for $%d.", PlayerICName(targetid), amount, price);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* Product Dealer %s wants to sell you %d Products for $%d, (type /accept products) to buy.", PlayerICName(playerid), amount, price);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- ProdOffer[targetid] = playerid;
- ProdPrice[targetid] = price;
- ProdAmount[targetid] = amount;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- }
- return 1;
- }
- CMD:sellprod(playerid, params[]) return cmd_sellproducts(playerid, params);
- CMD:unblocknumber(playerid, params[])
- {
- new slot;
- new str[128];
- if(sscanf(params, "i", slot)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /unblocknumber [slot (1-5 /blocklist)]");
- {
- switch(slot)
- {
- case 1:
- {
- if(Blocked[playerid][Number1] != -1)
- {
- format(str, sizeof(str), "You have unblocked the number %d from slot 1.", Blocked[playerid][Number1]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- Blocked[playerid][Number1] = -1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "There is nobody in that slot you have blocked.");
- }
- case 2:
- {
- if(Blocked[playerid][Number2] != -1)
- {
- format(str, sizeof(str), "You have unblocked the number %d from slot 2.", Blocked[playerid][Number2]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- Blocked[playerid][Number2] = -1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "There is nobody in that slot you have blocked.");
- }
- case 3:
- {
- if(Blocked[playerid][Number3] != -1)
- {
- format(str, sizeof(str), "You have unblocked the number %d from slot 3.", Blocked[playerid][Number3]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- Blocked[playerid][Number3] = -1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "There is nobody in that slot you have blocked.");
- }
- case 4:
- {
- if(Blocked[playerid][Number4] != -1)
- {
- format(str, sizeof(str), "You have unblocked the number %d from slot 4.", Blocked[playerid][Number4]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- Blocked[playerid][Number4] = -1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "There is nobody in that slot you have blocked.");
- }
- case 5:
- {
- if(Blocked[playerid][Number5] != -1)
- {
- format(str, sizeof(str), "You have unblocked the number %d from slot 5.", Blocked[playerid][Number5]);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- Blocked[playerid][Number5] = -1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "There is nobody in that slot you have blocked.");
- }
- default:
- return SendClientMessage(playerid, COLOR_GREY, "Slots are from 1 - 5. Check /blocklist.");
- }
- }
- return 1;
- }
- CMD:blocknumber(playerid, params[])
- {
- if(!CheckBlockedSlots(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You have blocked all 5 numbers.");
- new number;
- new str[128];
- if(sscanf(params, "i", number)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /blocknumber [# number]");
- {
- new count =0;
- foreach( new i: Player )
- if(IsPlayerConnected(i))
- if(PlayerInfo[i][pPnumber] == number)
- count =1;
- if(count == 0) return SendClientMessage(playerid, COLOR_GREY, "Nobody with that number is connected.");
- if(Blocked[playerid][Number1] == -1)
- {
- Blocked[playerid][Number1] = number;
- }
- else if(Blocked[playerid][Number2] == -1)
- {
- Blocked[playerid][Number2] = number;
- }
- else if(Blocked[playerid][Number3] == -1)
- {
- Blocked[playerid][Number3] = number;
- }
- else if(Blocked[playerid][Number4] == -1)
- {
- Blocked[playerid][Number4] = number;
- }
- else if(Blocked[playerid][Number5] == -1)
- {
- Blocked[playerid][Number5] = number;
- }
- format(str, sizeof(str), "You have successfully blocked the number \"%d\" from being able to call or SMS you.", number);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- return 1;
- }
- CMD:blocklist(playerid, params[])
- {
- new n1[6], n2[6], n3[6], n4[6], n5[6], numStr[128];
- if(Blocked[playerid][Number1] == -1)n1 = "None";
- else format(n1, sizeof(n1), "#%d", Blocked[playerid][Number1]);
- if(Blocked[playerid][Number2] == -1)n2 = "None";
- else format(n2, sizeof(n2), "#%d", Blocked[playerid][Number2]);
- if(Blocked[playerid][Number3] == -1)n3 = "None";
- else format(n3, sizeof(n3), "#%d", Blocked[playerid][Number3]);
- if(Blocked[playerid][Number4] == -1)n4 = "None";
- else format(n4, sizeof(n4), "#%d", Blocked[playerid][Number4]);
- if(Blocked[playerid][Number5] == -1)n5 = "None";
- else format(n5, sizeof(n5), "#%d", Blocked[playerid][Number5]);
- format(numStr, sizeof(numStr), "%s\n%s\n%s\n%s\n%s", n1, n2, n3, n4, n5);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_LIST, "Blocked Numbers", numStr, "Close", "");
- return 1;
- }
- CMD:sa(playerid, params[])
- return cmd_stopani(playerid, params);
- CMD:stopani(playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, -1,"{FF0000}Error:{FFFFFF} You cannot /stopani when you are inside a vehicle.");
- if( PlayerTied[playerid] > 0 ||
- PlayerCuffed[playerid] > 0 ||
- PlayerTazed[playerid] > 0 ||
- pDeathState[playerid] != PLAYER_STATE_NORMAL ||
- IsPlayerFalling(playerid)
- ) return SendClientMessage(playerid, COLOR_GREY, "You cannot do that at this time.");
- new str[128];
- if(gettime() < (StopAniTimer[playerid] + 3))
- {
- format(str, sizeof(str), "You have to wait %d seconds before you can use /stopani.", (StopAniTimer[playerid] + 3) - gettime());
- SendClientMessage(playerid, COLOR_GREY, str);
- }
- else
- {
- ClearAnimationsEx(playerid);
- StopAniTimer[playerid] = gettime();
- }
- return 1;
- }
- CMD:buymeal(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 450.2574, -83.6515, 999.5547) || IsPlayerInRangeOfPoint(playerid, 2.0, 2737.5417, -2491.6199, 1299.8378) || IsPlayerInRangeOfPoint(playerid, 2.0, 2737.5415,-2491.6519,1299.8378))
- {
- ShowPlayerDialog(playerid, DIALOG_BUYMEAL, DIALOG_STYLE_LIST, "Meals", "Bread $2\nApple $3\nCok O Pops $5\nMashed Potatoes $5\nCarrot $1\nGreen Beans $4\nPork Roll $5\nSausage $7\nChicken $20", "Purchase", "Cancel");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not near to the canteen of the prison.");
- return 1;
- }
- CMD:train(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 3, 766.1840, 13.3013, 1000.7027)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not at a trainer.");
- ShowPlayerDialog(playerid, DIALOG_TRAIN, DIALOG_STYLE_LIST, "Gym", "Normal Free\nBoxing $50,000\nKung Fu $50,000\nKneehead $50,000\nGrabkick $50,000\nElbow $50,000", "Learn", "Cancel"); //Training
- return 1;
- }
- CMD:dropcar(playerid, params[])
- {
- if(gPlayerLogged[playerid] > 0)
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be driving a vehicle.");
- if(Packages[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Materials Packages.");
- if(Crates[playerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "You must finish delivering your Drug Crates !");
- if(PlayerInfo[playerid][pCarTime] == 0)
- {
- // If the player has their owned vehicle spawned, check if the current vehicle is theirs
- if(playerSpawnedVehicle[playerid] > -1) {
- new vehid = GetPlayerVehicleID( playerid );
- if( vehid == PlayerVehicles[playerid][playerSpawnedVehicle[playerid]][pvID] ) {//vehicles.inc
- return SendClientMessage( playerid, COLOR_GREY, "You cannot deliver your own vehicle to the Crane!" );
- }
- }
- PlayerInfo[playerid][pCarTime] = 0;
- displayCenterHUDInfo(playerid, "~w~Car Selling ~n~~r~Drop the car at the Crane!", 8); //display for 8 seconds
- CP[playerid] = CHECKPOINT_DROPCAR;
- SetPlayerCheckpointEx(playerid, 2696.0520, -2225.8101, 13.2554, 8.0);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You already sold a car, wait till your reload time is over.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not logged in.");
- return 1;
- }
- CMD:dropcartime(playerid, params[])
- {
- if(PlayerInfo[playerid][pCarTime] != 0)
- {
- new str[128];
- format(str, sizeof(str), "[Drop Car Time] You must wait %d seconds before you can drop another car.", PlayerInfo[playerid][pCarTime]);
- SendClientMessage(playerid, COLOR_GREEN, str);
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You haven't got a time before you can drop a car again.");
- return 1;
- }
- CMD:time(playerid, params[])
- {
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- new str[128];
- if(minute < 10)
- {
- if(second < 10)
- {
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d~n~Jail Time Left: %02d seconds", day, GetMonthFromInt(month), hour, minute, second, PlayerInfo[playerid][pJailTime]);
- }
- else
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d", day, GetMonthFromInt(month), hour, minute, second);
- }
- }
- else
- {
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d~n~Jail Time Left: %02d seconds", day, GetMonthFromInt(month), hour, minute, second, PlayerInfo[playerid][pJailTime]);
- }
- else
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d", day, GetMonthFromInt(month), hour, minute, second);
- }
- }
- }
- else
- {
- if(second < 10)
- {
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d~n~Jail Time Left: %02d seconds", day, GetMonthFromInt(month), hour, minute, second, PlayerInfo[playerid][pJailTime]);
- }
- else
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d", day, GetMonthFromInt(month), hour, minute, second);
- }
- }
- else
- {
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d~n~Jail Time Left: %02d seconds", day, GetMonthFromInt(month), hour, minute, second, PlayerInfo[playerid][pJailTime]);
- }
- else
- {
- format(str, sizeof(str), "~y~%02d %s~w~~n~%02d:%02d:%02d", day, GetMonthFromInt(month), hour, minute, second);
- }
- }
- }
- displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
- if(!IsPlayerInAnyVehicle(playerid))
- {
- ApplyAnimationEx(playerid, "COP_AMBIENT", "Coplook_watch", 4.0, 0, 0, 0, 0, 0);
- }
- return 1;
- }
- CMD:gotocar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new vehid;
- if(sscanf(params, "i", vehid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotocar [vehicleid]");
- {
- if(!IsValidVehicle(vehid))
- return SendClientMessage(playerid, -1, "Could not find any vehicle with that ID.");
- new Float:vX, Float:vY, Float:vZ;
- GetVehiclePos(vehid, vX, vY, vZ);
- SetPlayerPos(playerid, vX, vY, vZ +3);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 999;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:gotoobj(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pMapper] == MAPPERRANK_MANAGER)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new objid;
- if(sscanf(params, "i", objid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /gotoobj [objectid]");
- {
- new Float:objX, Float:objY, Float:objZ;
- GetObjectPos(objid, objX, objY, objZ);
- SetPlayerPos(playerid, objX, objY, objZ +3);
- displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:goincar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return SendClientMessage(playerid, COLOR_GREY, "You can not do that while spectating.");
- new vehid;
- if(sscanf(params, "i", vehid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /goincar [vehicleid]");
- {
- new Float:vX, Float:vY, Float:vZ;
- GetVehiclePos(vehid, vX, vY, vZ);
- SetPlayerPos(playerid, vX, vY, vZ +3);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerInterior(playerid, 0);
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 999;
- PlayerInfo[playerid][pVirtualWorld] = 0;
- PutPlayerInVehicle(playerid, vehid, 0);
- displayCenterHUDInfo(playerid, "~r~Teleporting.", 8); //display for 8 seconds
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:ticket(playerid, params[])
- {
- if(IsACop(playerid) || IsAJudge(playerid) || IsANG(playerid))
- {
- if(IsACop(playerid) && PlayerInfo[playerid][pOnDuty] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not on Duty.");
- return 1;
- }
- new giveplayerid, moneys, result[64];
- new str[128];
- if(sscanf(params, "uis[64]", giveplayerid, moneys, result)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /ticket [ID/PartOfName] [Price] [Reason]");
- if(moneys < 1 || moneys > 99999)
- {
- SendClientMessage(playerid, COLOR_GREY, "Ticket Money can't be below 1 or higher then 99999.");
- return 1;
- }
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(IsPlayerInRangeOfPlayer(8.0, playerid, giveplayerid))
- {
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "* You gave %s a Ticket costing $%d, reason: %s.", giveplayer, moneys, result);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s %s has given you a Ticket costing $%d, reason: %s.", GetPlayerRank(playerid), sendername, moneys, result);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s %s writes up a Ticket and gives it to %s.", GetPlayerRank(playerid), sendername, giveplayer);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* Type /mytickets to view your tickets.");
- AddCrime(playerid, giveplayerid, 1, result);
- AddTicket(playerid, giveplayerid, moneys, result, 0);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD.");
- return 1;
- }
- CMD:mytickets(playerid, params[])
- {
- if(!IsPlayerConnected(playerid)) return 1;
- new query[128], rows, fields, Date[128], TicketReason[128], Amount, RealName[128], TicketID, Cache:result;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 1 ORDER BY `TicketID`", PlayerInfo[playerid][pID]);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- if(!rows) return SendClientMessage(playerid, COLOR_LIGHTRED, "You have no active tickets.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "---[Unpaid Tickets]---");
- new str[128];
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "TicketReason", TicketReason);
- cache_get_field_content(i, "IssuerName", RealName);
- cache_get_field_content(i, "Date", Date);
- Amount = cache_get_field_content_int(i, "Amount");
- TicketID = cache_get_field_content_int(i, "TicketID");
- format(str, sizeof(str), "* [ID: %d] (%s) | $%d | %s | %s *", TicketID, Date, Amount, TicketReason, RealName);
- SendClientMessage(playerid, COLOR_LIGHTRED, str);
- }
- cache_delete(Cache:result, sqlGameConnection);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "TIP: You can use /paidtickets to see the last 20 tickets you've paid.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "TIP: Use /payticket [ticketid] to pay the fine.");
- return 1;
- }
- CMD:paidtickets(playerid, params[])
- {
- if(!IsPlayerConnected(playerid)) return 1;
- new query[128], rows, fields, Date[128], TicketReason[128], Amount, RealName[128], TicketID, Cache:result;
- new str[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketPID` = %d AND `Active` = 0 ORDER BY `TicketID` LIMIT 20", PlayerInfo[playerid][pID]);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- if(!rows) return SendClientMessage(playerid, COLOR_LIGHTRED, "You have no paid tickets.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "---[Old Tickets]---");
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "TicketReason", TicketReason);
- cache_get_field_content(i, "IssuerName", RealName);
- cache_get_field_content(i, "Date", Date);
- Amount = cache_get_field_content_int(i, "Amount");
- TicketID = cache_get_field_content_int(i, "TicketID");
- format(str, sizeof(str), "* [ID: %d] (%s) | $%d | %s | %s *", TicketID, Date, Amount, TicketReason, RealName);
- SendClientMessage(playerid, COLOR_LIGHTGREEN, str);
- }
- cache_delete(Cache:result, sqlGameConnection);
- return 1;
- }
- CMD:payticket(playerid, params[])
- {
- if(!IsPlayerConnected(playerid)) return 1;
- if(!IsPlayerInRangeOfPoint(playerid, 20, 250.01, 67.69, 1003.64)) return SendClientMessage(playerid, COLOR_GREY, "You are not inside the Police Department.");
- new tid, rows, fields, query[128], pid, amount, active, date[128], crimeid, Cache:result;
- if(sscanf(params, "i", tid)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /payticket [ticketid] - use /mytickets to see active tickets.");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `tickets` WHERE `TicketID` = '%d' LIMIT 1", tid);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- if(!rows) return SendClientMessage(playerid, COLOR_GREY, "There is no ticket with that ID.");
- active = cache_get_field_content_int(0, "Active");
- amount = cache_get_field_content_int(0, "Amount");
- pid = cache_get_field_content_int(0, "TicketPID");
- cache_get_field_content(0, "Date", date);
- if(pid != PlayerInfo[playerid][pID]) return SendClientMessage(playerid, COLOR_GREY, "This is not your ticket.");
- if(!active) return SendClientMessage(playerid, COLOR_GREY, "This ticket has already been paid.");
- if(PlayerInfo[playerid][pCash] < amount) return SendClientMessage(playerid, COLOR_GREY, "You can't afford that.");
- cache_delete(Cache:result, sqlGameConnection);
- new query2[128];
- mysql_format(sqlGameConnection, query2, sizeof(query2), "UPDATE `tickets` SET `Active` = 0 WHERE `TicketID` = '%d'", tid);
- mysql_pquery(sqlGameConnection, query2);
- new str[128];
- format(str, sizeof(str), "* You have paid off ticket #%d for $%d", tid, amount);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- GiveMoney(playerid, -amount);
- SaveStuff();
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `DATE` = '%e' LIMIT 1", date);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- if(!rows) return 1;
- crimeid = cache_get_field_content_int(0, "CrimeID");
- cache_delete(Cache:result, sqlGameConnection);
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `newcrimes` SET `CrimeEnabled` = 0 WHERE `CrimeID` = '%d'", crimeid);
- mysql_pquery(sqlGameConnection, query);
- return 1;
- }
- CMD:drag(playerid, params[])
- {
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /drag [playerid/name]");
- {
- if(PlayerInfo[targetid][pAdmin] > 1) return SendClientMessage(playerid, COLOR_GREY, "You can't drag an admin.");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player isn't connected.");
- if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "You can not drag an NPC!");
- if(targetid == playerid) return SendClientMessage(playerid, -1, "You can not drag yourself!");
- if(GetDistanceBetweenPlayers(playerid, targetid) > 4.0)return SendClientMessage(playerid, COLOR_GREY, "You must be close to the player.");
- if(!PlayerCuffed[targetid]) return SendClientMessage(playerid, COLOR_GREY, "This player must first be cuffed.");
- if(!beingDragged[targetid])
- {
- if(isDragging[playerid] == true) return SendClientMessage(playerid, COLOR_WHITE, "You are already dragging someone else!");
- if(PlayerCuffed[playerid] || beingDragged[playerid]) return SendClientMessage(playerid, COLOR_WHITE, "You can not do that right now!");
- beingDragged[targetid] = true;
- isDragging[playerid] = true;
- format(str, sizeof(str), "You are being dragged by %s.", PlayerICName(playerid));
- SendClientMessage(targetid, COLOR_YELLOW, str);
- format(str, sizeof(str), "You are dragging %s, use /drag again to stop it.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- dragTimer[targetid] = SetTimerEx("Timer_dragTimerActual", 1000, 1, "dd", playerid, targetid);
- }
- else
- {
- beingDragged[targetid] = false;
- isDragging[playerid] = false;
- SendClientMessage(playerid, COLOR_WHITE, "You have stopped dragging your target.");
- SendClientMessage(targetid, COLOR_WHITE, "You aren't being dragged anymore.");
- KillTimer(dragTimer[targetid]);
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD.");
- return 1;
- }
- CMD:dcallsign(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pGroup] == GROUP_S9){
- if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle.");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(playerid, COLOR_GREY, "You must be the driver.");
- new vehicleid = GetPlayerVehicleID(playerid);
- new
- dynvehID = GetDynamicVehicleID(vehicleid);
- if( sVehicleInfo[dynvehID][v_faction] < 1 ) return SendClientMessage( playerid, COLOR_GREY, "This isn't a faction owned vehicle." );
- Delete3DTextLabel(UnitsCallSign[vehicleid]);
- SendClientMessage(playerid, COLOR_WHITE, "Callsign removed.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a member of a government organization.");
- return 1;
- }
- CMD:mdc(playerid, params[])
- {
- if(GetMDCAccessType(playerid) == MDC_ACCESS_NONE) return AdmErrorMsg;
- if(CheckForJammer(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Database unreachable - no signal.");
- if(IsPlayerNearMDC(playerid)) {
- new mdcString[128], accessCode;
- accessCode = PlayerInfo[playerid][pID] + 3450;
- format(mdcString, sizeof(mdcString), "You have logged in to the MDC with your access code: #%i [%s]", accessCode, MDCAccessToStr(GetMDCAccessType(playerid)));
- SendMDCMessage(playerid, mdcString);
- return MDC_MAIN;
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You have no MDC at hand.");
- }
- CMD:owiretransfer(playerid, params[]) return cmd_otransfer(playerid, params);
- CMD:otransfer(playerid, params[])
- {
- // Restricted to faction leaders to prevent players spamming and sending a shit ton of queriez
- if(PlayerInfo[playerid][pLeader] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You can't use that command!");
- if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_GRAD1, "You must be level 3.");
- if(IsPlayerAtBankingPoint(playerid) || PlayerInfo[playerid][pPnumber] != 0 && PhoneOffline[playerid] == 0)
- {
- new giveplayername[MAX_PLAYER_NAME+1], amount;
- if(sscanf(params, "s[MAX_PLAYER_NAME+1]d", giveplayername, amount)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /otransfer [Firstname_Lastname] [amount]");
- {
- if(strcmp(giveplayername, PlayerName(playerid), true) == 0) return SendClientMessage(playerid, COLOR_WHITE, "You can not pay yourself!");
- if(IsPlayerConnected(ReturnUser(giveplayername))) return SendClientMessage(playerid, COLOR_WHITE, "That player is online!");
- new playermoney = PlayerInfo[playerid][pAccount];
- if(amount < 50000) return SendClientMessage(playerid, COLOR_WHITE, "Transfer amount must be greater than or equal to $50,000!");
- if(playermoney < amount) return SendClientMessage(playerid, COLOR_WHITE, "You don't have enough money to do that!");
- new query[50];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Bank` FROM `players` WHERE `Name` = '%e'", giveplayername);
- mysql_pquery(sqlGameConnection, query, "OfflineTransfer", "dsd", playerid, giveplayername, amount);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You must be at the bank counter or have an online phone to do this.");
- return 1;
- }
- CMD:wiretransfer(playerid, params[])
- return cmd_transfer(playerid, params);
- CMD:transfer(playerid, params[])
- {
- if(PlayerInfo[playerid][pLevel] < 3)
- return SendClientMessage(playerid, COLOR_GRAD1, "You must be level 3 or above to use this.");
- if(PlayerInfo[playerid][pCash] < 0)
- return SendClientMessage(playerid, COLOR_GRAD1, "You must not be in debt to use this.");
- if(PlayerInfo[playerid][pJailed] || PlayerInfo[playerid][pAdminJailed])
- return SendClientMessage(playerid, COLOR_GREY, "You can't use this while you're in prison.");
- if(
- !(IsPlayerAtBankingPoint(playerid)) &&
- !(PlayerInfo[playerid][pPnumber] && !PhoneOffline[playerid])
- ) return SendClientMessage(playerid, COLOR_GREY, "You are not at a bank and do not have a cellphone.");
- new targetid, amount;
- if(sscanf(params, "ud", targetid, amount))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /transfer [playerid/PartOfName] [amount]");
- if(!IsPlayerConnected(targetid))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(targetid == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "You can't transfer money to yourself.");
- if(!gPlayerLogged[targetid])
- return SendClientMessage(playerid, COLOR_GREY, "That player has not logged in.");
- if(amount < 1 || amount > PlayerInfo[playerid][pAccount])
- return SendClientMessage(playerid, COLOR_GREY, "You do not have enough money in your bank account.");
- PlayerInfo[playerid][pAccount] -= amount;
- PlayerInfo[targetid][pAccount] += amount;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlaySound(targetid, 1052, 0.0, 0.0, 0.0);
- new str[128];
- format(str, sizeof(str), "You have transferred $%s to %s's account.", AddThousandsSeparators(amount), PlayerOOCName(targetid));
- SendClientMessage(playerid, COLOR_ORANGE, str);
- format(str, sizeof(str), "You have received $%s into your account from %s", AddThousandsSeparators(amount), PlayerOOCName(playerid));
- SendClientMessage(targetid, COLOR_ORANGE, str);
- // Logging
- if(amount >= 500000)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s transferred $%s to %s", PlayerOOCName(playerid), AddThousandsSeparators(amount), PlayerOOCName(targetid));
- ABroadCast(COLOR_YELLOW, str, 1);
- }
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "%s transferred $%d to %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), amount, PlayerOOCName(targetid), day, GetMonthFromInt(month), hour, minute, second);
- PayLog(str);
- logswrite("pay.log", str);
- return 1;
- }
- CMD:armory(playerid, params[]) {
- // Syndicate and CJNG armory
- if( PlayerInfo[playerid][pGroup] != GROUP_CRIME &&
- PlayerInfo[playerid][pGroup] != GROUP_CARTEL
- ) return 1;
- if( !IsPlayerNearSyndicateHQ(playerid) &&
- !IsPlayerNearCJNGHQ(playerid)
- ) return SendClientMessage(playerid, COLOR_CRIME, "You are not at your HQ.");
- showCrimeDialog(playerid);
- return 1;
- }
- CMD:cjng(playerid, params[])
- return cmd_armory(playerid, params);
- CMD:upgrade(playerid, params[])
- {
- if(PlayerInfo[playerid][gPupgrade] < 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have any Upgrade Points.");
- new name[24];
- new str[128];
- if(sscanf(params, "s[24]", name))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /upgrade [name]");
- SendClientMessage(playerid, COLOR_GREY, "Available names: Armor, Health");
- format(str, sizeof(str), "* You have %d upgrade points remaining.", PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- else
- {
- if(strcmp(name, "armor", true) == 0)
- {
- if(PlayerInfo[playerid][pSHealth] >= 100)
- {
- SendClientMessage(playerid, COLOR_GREY, "Your Armor upgrade is at its limit.");
- return 1;
- }
- PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth] +1;
- PlayerInfo[playerid][gPupgrade]--;
- format(str, sizeof(str), "* You have upgraded your spawn Armor to %d, changes will take effect when you respawn.", PlayerInfo[playerid][pSHealth]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- else if(strcmp(name, "health", true) == 0)
- {
- if(PlayerInfo[playerid][pSHP] >= 100)
- {
- SendClientMessage(playerid, COLOR_GREY, "Your Health upgrade is at its limit.");
- return 1;
- }
- PlayerInfo[playerid][pSHP] = PlayerInfo[playerid][pSHP] +1;
- PlayerInfo[playerid][gPupgrade]--;
- format(str, sizeof(str), "* You have upgraded your spawn Health to %d, changes will take effect when you respawn.", PlayerInfo[playerid][pSHP]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- }
- return 1;
- }
- CMD:taxwithdraw(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != 6) return SendClientMessage(playerid, COLOR_GREY, "You are not a part of the government.");
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "Only R4+ can use this.");
- if(!IsPlayerAtBankingPoint(playerid))
- return SendClientMessage(playerid, COLOR_GREY, "You are not at a bank counter.");
- new amount, reason[64];
- new str[128];
- if(sscanf(params, "is[64]", amount, reason))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /taxwithdraw [amount] [reason]");
- format(str, sizeof(str), "There is currently $%d in the Treasury.", TaxValue);
- SendClientMessage(playerid, COLOR_GRAD3, str);
- return 1;
- }
- else
- {
- if(amount > TaxValue || amount < 1) return SendClientMessage(playerid, COLOR_GRAD2, "There is not enough in the Treasury.");
- GiveMoney(playerid, amount);
- TaxValue = TaxValue -amount;
- format(str, sizeof(str), "You have withdrawn $%d from the Treasury, Total: $%d ", amount, TaxValue);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(str, sizeof(str), "%s has withdrawn $%d from the Treasury, Total: $%d", PlayerICName(playerid), amount, TaxValue);
- foreach(new i:Player){
- if(PlayerInfo[i][pMember] == 6 && i != playerid)
- SendClientMessage(i, COLOR_YELLOW, str);
- }
- SaveStuff();
- }
- return 1;
- }
- CMD:helpers(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE, "Helpers Online:");
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pHelper] >= 1 && PlayerInfo[i][pStealthed] == 0 && !PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss])
- {
- new hlevel[50];
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pHelper] != 0)
- {
- if(PlayerInfo[i][pHelper] == 1)
- {
- hlevel = "Trial Helper";
- }
- if(PlayerInfo[i][pHelper] == 2)
- {
- format(hlevel, sizeof(hlevel), "Helper");
- }
- if(PlayerInfo[i][pHelper] == 3)
- {
- format(hlevel, sizeof(hlevel), "Senior Helper");
- }
- if(PlayerInfo[i][pHelper] == 4)
- {
- format(hlevel, sizeof(hlevel), "Head Helper");
- }
- if(PlayerInfo[i][pHelper] >= 5)
- {
- format(hlevel, sizeof(hlevel), "Director of The Helpers Team");
- }
- }
- if(PlayerInfo[playerid][pHelper] == 0)
- {
- if(PlayerInfo[i][pHelper] == 1)
- {
- hlevel = "Trial Helper";
- }
- if(PlayerInfo[i][pHelper] == 2)
- {
- hlevel = "Helper";
- }
- if(PlayerInfo[i][pHelper] == 3)
- {
- hlevel = "Senior Helper";
- }
- if(PlayerInfo[i][pHelper] == 4)
- {
- hlevel = "Head Helper";
- }
- if(PlayerInfo[i][pHelper] >= 5)
- {
- hlevel = "Director of The Helpers Team";
- }
- }
- if(HDuty[i])
- {
- if(PlayerPaused[i])format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", hlevel, name);
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{00FF00}On-Duty{AFAFAF}]", hlevel, name);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- } else
- {
- if(PlayerPaused[i])format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", hlevel, name);
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s [{f45342}Off-Duty{AFAFAF}]", hlevel, name);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:devs(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE, "Developers Online:");
- new devrank[64];
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pDev] >= 1 && PlayerInfo[i][pStealthed] == 0 && !PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss])
- {
- if(PlayerInfo[i][pDev] == DEVRANK_JUNIOR)
- {
- devrank = "Junior Developer";
- }
- if(PlayerInfo[i][pDev] == DEVRANK_SENIOR)
- {
- devrank = "Senior Developer";
- }
- if(PlayerInfo[i][pDev] == DEVRANK_MANAGER)
- {
- devrank = "Development Manager";
- }
- if(PlayerInfo[i][pDev] == DEVRANK_LEAD)
- {
- devrank = "Lead Developer";
- }
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(!PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss]) {
- if(PlayerPaused[i])format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s", devrank, name);
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s", devrank, name);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:hidestatus(playerid) {
- if(PlayerInfo[playerid][pDev] >= 1 || PlayerInfo[playerid][pMapper] >= 1 || PlayerInfo[playerid][pTester] >= 1) {
- switch(PlayerInfo[playerid][pHidingStatus])
- {
- case 1:
- {
- PlayerInfo[playerid][pHidingStatus] = 0;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are no longer hiding your status.");
- }
- case 0:
- {
- PlayerInfo[playerid][pHidingStatus] = 1;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now hiding your status.");
- }
- }
- }
- return 1;
- }
- CMD:reportbug(playerid, params[])
- {
- if(PlayerInfo[playerid][pBugMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are banned from using /reportbug.");
- if(IsPlayerRestricted(playerid) || PlayerFrozen[playerid] != 0) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- if(gettime() - JustBugReported[playerid] <= 45) return SendClientMessage(playerid, COLOR_GREY, "Wait 45 seconds after sending a next bug report.");
- new text[128];
- if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /reportbug [text]");
- {
- JustBugReported[playerid] = gettime();
- HasActiveBugReport[playerid] = 1;
- new str[128];
- format(str, sizeof(str), "Bug Report From [%d]%s: %s", playerid, PlayerOOCName(playerid), text);
- /*#if UseDiscordBot 1
- Discord:sendPlayerRequest(DISCORD_BUG_CHANNEL, playerid, "Bug report by", text, 0x42953F);
- #endif*/
- SendTesterMessage(0x00FF0000, str);
- SendClientMessage(playerid, COLOR_YELLOW, "Your bug report message was sent to the online testers, thank you.");
- }
- return 1;
- }
- CMD:denybug(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] > TESTERRANK_NONE)
- {
- new targetid, reason[128];
- new str[128];
- if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /d(eny)bug [playerid/PartOfName] [Reason]");
- {
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "That player is not logged in/invalid player id");
- if(HasActiveBugReport[targetid] == 1)
- {
- format(str, 256, "** Tester: %s[%d] has denied %s's bug report, reason: %s", PlayerOOCName(playerid), playerid, PlayerOOCName(targetid), reason);
- SendTesterMessage(0x00FF0000, str);
- format(str, 256, "** Tester %s[%d] has denied your bug report, reason: %s", PlayerOOCName(playerid), playerid, reason);
- SendClientMessage(targetid, 0x00FF0000, str);
- HasActiveBugReport[targetid] = 0;
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "That player did not report any bugs.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not a tester.");
- return 1;
- }
- CMD:dbug(playerid, params[]) return cmd_denybug(playerid, params);
- CMD:acceptbug(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] > TESTERRANK_NONE)
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ac(cept)bug [playerid/PartOfName]");
- {
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "That player is not logged in/invalid player id");
- if(HasActiveBugReport[targetid] == 1)
- {
- new str[128];
- new Float:tx, Float:ty, Float:tz;
- OnABugReport[playerid] = 1;
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- PlayerInfo[playerid][BugReportX] = X;
- PlayerInfo[playerid][BugReportY] = Y;
- PlayerInfo[playerid][BugReportZ] = Z;
- PlayerInfo[playerid][BugReportInterior] = GetPlayerInterior(playerid);
- PlayerInfo[playerid][BugReportVW] = GetPlayerVirtualWorld(playerid);
- format(str, 256, "** Tester: %s[%d] has accepted %s's bug report.", PlayerICName(playerid), playerid, PlayerICName(targetid));
- SendTesterMessage(0x00FF0000, str);
- format(str, 256, "** Tester %s[%d] has accepted your bug report, please remain at your current position.", PlayerICName(playerid), playerid);
- SendClientMessage(targetid, 0x00FF0000, str);
- HasActiveBugReport[targetid] = 0;
- GetPlayerPos(targetid, tx, ty, tz);
- SetPlayerPos(playerid, tx, ty + 0.5, tz + 0.3);
- SetPlayerInterior(playerid, GetPlayerInterior(targetid));
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
- Timer_FreezePlayer(targetid, FREEZE, TESTER_FREEZE);
- PlayerInfo[playerid][pTesterReports]++;
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "That player did not report any bugs.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not a tester.");
- return 1;
- }
- CMD:acbug(playerid, params[]) return cmd_acceptbug(playerid, params);
- CMD:treturn(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] == TESTERRANK_NONE) return SendClientMessage(playerid, COLOR_GRAD2, "You are not a tester.");
- if(OnABugReport[playerid] == 1)
- {
- OnABugReport[playerid] = 0;
- SetPlayerPos(playerid, PlayerInfo[playerid][BugReportX], PlayerInfo[playerid][BugReportY], PlayerInfo[playerid][BugReportZ]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][BugReportInterior]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][BugReportVW]);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not on a bug report.");
- return 1;
- }
- CMD:testers(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE, "Testers Online:");
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pTester] >= 1 && PlayerInfo[i][pStealthed] == 0)
- {
- new tlevel[50];
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[playerid][pTester] != 0)
- {
- new treports = PlayerInfo[i][pTesterReports];
- if(PlayerInfo[i][pTester] == TESTERRANK_REGULAR)
- {
- format(tlevel, sizeof(tlevel), "[Count: %d] Regular Tester", treports);
- }
- if(PlayerInfo[i][pTester] == TESTERRANK_SENIOR)
- {
- format(tlevel, sizeof(tlevel), "[Count: %d] Senior Tester", treports);
- }
- if(PlayerInfo[i][pTester] == TESTERRANK_MANAGER)
- {
- format(tlevel, sizeof(tlevel), "[Count: %d] Tester Manager", treports);
- }
- }
- if(PlayerInfo[playerid][pTester] == 0)
- {
- if(PlayerInfo[i][pTester] == 1)
- {
- tlevel = "Regular Tester";
- }
- if(PlayerInfo[i][pTester] == 2)
- {
- tlevel = "Senior Tester";
- }
- if(PlayerInfo[i][pTester] == 3)
- {
- tlevel = "Tester Manager";
- }
- }
- if(!PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss]) {
- if(PlayerPaused[i])format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s", tlevel, name);
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s", tlevel, name);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:mappers(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE, "Mappers Online:");
- new maprank[64];
- new str[128];
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMapper] >= 1 && PlayerInfo[i][pStealthed] == 0 && !PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss])
- {
- if(PlayerInfo[i][pMapper] == MAPPERRANK_REGULAR)
- {
- maprank = "Regular Mapper";
- }
- if(PlayerInfo[i][pMapper] == MAPPERRANK_SENIOR)
- {
- maprank = "Senior Mapper";
- }
- if(PlayerInfo[i][pMapper] == MAPPERRANK_MANAGER)
- {
- maprank = "Mapping Manager";
- }
- if(!PlayerInfo[i][pHidingStatus] && !PlayerInfo[i][pHiddenAss]) {
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerPaused[i])format(str, sizeof(str), "{FFFFFF}[{E9CF8D}Paused{FFFFFF}] {AFAFAF}%s: %s", maprank, name);
- else format(str, sizeof(str), "{FFFFFF}[{00FF00}Available{FFFFFF}] {AFAFAF}%s: %s", maprank, name);
- SendClientMessage(playerid, COLOR_GRAD2, str);
- }
- }
- }
- }
- return 1;
- }
- CMD:government(playerid, params[])
- {
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
- {
- new str[128];
- if(PlayerInfo[playerid][pMember] == 2)
- {
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 4 to be able to use this.");
- }
- else if(PlayerInfo[playerid][pMember] == 7)
- {
- if(PlayerInfo[playerid][pRank] < 1) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 4 to be able to use this.");
- }
- else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 3)
- {
- if(PlayerInfo[playerid][pRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 5 to be able to use this.");
- }
- else if(PlayerInfo[playerid][pMember] == 6){
- if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 4 to be able to use this.");
- }
- else if(PlayerInfo[playerid][pMember] == 14){
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 4 to be able to use this.");
- }
- else
- {
- if(PlayerInfo[playerid][pRank] < 5) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 5 to be able to use this.");
- }
- new msg[128];
- if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/gov)ernment [text]");
- {
- SendClientMessageToAll(COLOR_WHITE, "Public Service Announcement:");
- format(str, sizeof(str), "%s %s %s: %s", GetPlayerFactionName(playerid), GetPlayerRank(playerid), PlayerICName(playerid), msg);
- new color = COLOR_DBLUE;
- switch(PlayerInfo[playerid][pMember]) {
- case 2: color = TCOLOR_NAVYBLUE;
- case 3: color = TCOLOR_BEIGE;
- case 4: color = TCOLOR_PARAMEDIC;
- case 5: color = COLOR_DOC_NAMETAG;
- case 6: color = TCOLOR_SENATE;
- case 7: color = TCOLOR_HIGHCOURT;
- case 14: color = COLOR_SANG;
- }
- SendClientMessageToAll(color, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You are not a Cop / FBI / SASD / Fireman / Paramedic / NG Member / Judicial Department / President.");
- return 1;
- }
- CMD:gov(playerid, params[]) return cmd_government(playerid, params);
- CMD:ggovernment(playerid, params[])
- {
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(PlayerInfo[playerid][pGroup] == GROUP_S9)
- {
- new str[128];
- if(PlayerInfo[playerid][pGroup] == 10)
- {
- if(PlayerInfo[playerid][pGroupRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "You need to be Rank 3 to be able to use this.");
- }
- new msg[128];
- if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/gov)ernment [text]");
- {
- SendClientMessageToAll(COLOR_WHITE, "Public Service Announcement:");
- format(str, sizeof(str), "Sector 9 %s Unknown: %s", GetPlayerGroupRankName(playerid), msg);
- new color = COLOR_DBLUE;
- if(PlayerInfo[playerid][pGroup] == GROUP_S9) color = 0x1F1F1FAA;
- SendClientMessageToAll(color, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GREY, "S9");
- return 1;
- }
- CMD:ggov(playerid, params[]) return cmd_ggovernment(playerid, params);
- CMD:ame(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ame [action (is annotated above characters head)]");
- new str[128];
- format(str, sizeof(str), "* %s %s", PlayerICName(playerid), params);
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s %s", PlayerICName(playerid), params);
- SendClientMessage(playerid, COLOR_PURPLE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/AME %s %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), params, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("ame.log", str);
- return 1;
- }
- CMD:amy(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /amy [action (is annotated above characters head)]");
- new str[128];
- format(str, sizeof(str), "* %s's %s", PlayerICName(playerid), params);
- SetPlayerChatBubble(playerid, str, COLOR_PURPLE, 20.0, 15000);
- format(str, sizeof(str), "> %s's %s", PlayerICName(playerid), params);
- SendClientMessage(playerid, COLOR_PURPLE, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/AMY %s's %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), params, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("amy.log", str);
- return 1;
- }
- CMD:checkrecord(playerid, params[]) {
- if(checkingID[playerid] == -1) {
- SendClientMessage(playerid, COLOR_GREY, "You have no criminal record on you.");
- return SendClientMessage(playerid, COLOR_GREY, "HINT: {FFFFFF}Talk to the receptionist inside the SAPD lobby.");
- }
- //SendClientMessage(playerid, COLOR_LIGHTBLUE, checkingName[playerid]);
- new query[128], rows, fields, CrimeType, CrimeReason[128], cstr[5000], Date[50], copname[28], isEnabled, Cache:result;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", checkingID[playerid]);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- if(!rows) {
- new noCrimeStr[128];
- format(noCrimeStr, sizeof(noCrimeStr), "%s's criminal record is completely empty.", checkingName[playerid]);
- SendClientMessage(playerid, COLOR_GREY, noCrimeStr);
- return 1;
- }
- // Get the crimes
- format(cstr, sizeof(cstr), "Date\tType\tIssuer\tReason\n");
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "CrimeReason", CrimeReason);
- cache_get_field_content(i, "RealName", copname);
- cache_get_field_content(i, "Date", Date);
- CrimeType = cache_get_field_content_int(i, "CrimeType");
- isEnabled = cache_get_field_content_int(i, "CrimeEnabled");
- if(isEnabled) format(cstr, sizeof(cstr), "%s{1CC343}(%s)\t{1CC343}%s\t{1CC343}%s\t{1CC343}%s\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
- else format(cstr, sizeof(cstr), "%s{FF5F5F}(%s)\t{FF5F5F}%s\t{FF5F5F}%s\t{FF5F5F}%s{FFFFFF}\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
- }
- // Format dialog title
- new recordTitle[50];
- format(recordTitle, sizeof(recordTitle), "Copy of %s's criminal record", checkingName[playerid]);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, recordTitle, cstr, "Close", "");
- cache_delete(Cache:result, sqlGameConnection);
- return 1;
- }
- /*CMD:me(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /me [action]");
- new str[128];
- format(str, sizeof(str), "* %s %s", PlayerICName(playerid), params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/ME %s %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), params, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("me.log", str);
- return 1;
- }*/
- CMD:me(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /me [action]");
- new str[128];
- if(strlen(params) > MAX_SPLIT_LENGTH)
- {
- format(str, sizeof(str), "* %s %.*s...", PlayerICName(playerid),MAX_SPLIT_LENGTH, params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* ...%s", params[MAX_SPLIT_LENGTH]);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else
- {
- format(str, sizeof(str), "* %s %s", PlayerICName(playerid), params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/ME %s %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), params, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("me.log", str);
- return 1;
- }
- CMD:my(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /my [action]");
- new str[128];
- if(strlen(params) > MAX_SPLIT_LENGTH)
- {
- format(str, sizeof(str), "* %s's %.*s...", PlayerICName(playerid),MAX_SPLIT_LENGTH, params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* ...%s", params[MAX_SPLIT_LENGTH]);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else
- {
- format(str, sizeof(str), "* %s's %s", PlayerICName(playerid), params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/MY %s's %s at %02d %s %02d:%02d:%02d", PlayerOOCName(playerid), params, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("my.log", str);
- return 1;
- }
- CMD:do(playerid, params[])
- {
- if(WatchingTV[playerid] == true) return 1;
- if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this whilst muted.");
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /do [local chat]");
- new str[128];
- if(strlen(params) > MAX_SPLIT_LENGTH)
- {
- format(str, sizeof(str), "* %s %.*s...", params, MAX_SPLIT_LENGTH);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* ...%s (( %s ))", params[MAX_SPLIT_LENGTH], PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- else
- {
- format(str, sizeof(str), "* %s (( %s ))", params, PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "/DO %s (( %s )) at %02d %s %02d:%02d:%02d", params, PlayerOOCName(playerid), day, GetMonthFromInt(month), hour, minute, second);
- logswrite("do.log", str);
- return 1;
- }
- //////////////////////////////////////////////////////////////
- CMD:listads(playerid, params[])
- {
- if(advertInfo[0][AD_ACTIVE] == false) return SendClientMessage(playerid, COLOR_GRAD2, "There is currently no advertisements. Check back later.");
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pMember] == 9 && PlayerInfo[playerid][pRank] >= 4)
- {
- // if admin/news display name too
- new vstr[5120];
- for(new i; i < MAX_ADVERTS; i++)
- {
- if(advertInfo[i][AD_ACTIVE] == true)
- {
- format(vstr, sizeof(vstr), "%s{82BF50}%d{FFFFFF}: %s.\nCall {82BF50}%s {FFFFFF}on {82BF50}%d{FFFFFF}.\n\n",
- vstr, i+1, advertInfo[i][AD_STRING], advertInfo[i][AD_AUTHOR], advertInfo[i][AD_PHONE]);
- ShowPlayerDialog(playerid, 12513, DIALOG_STYLE_INPUT, "Advertisements", vstr, "Call", "Cancel");
- }
- }
- }
- else {
- // else don't show name
- // if admin/news display name too
- new vstr[5120];
- for(new i; i < MAX_ADVERTS; i++)
- {
- if(advertInfo[i][AD_ACTIVE] == true)
- {
- format(vstr, sizeof(vstr), "%s{82BF50}%d{FFFFFF}: %s.\n{82BF50}Phone number{FFFFFF}: %d.\n\n",
- vstr, i+1, advertInfo[i][AD_STRING], advertInfo[i][AD_PHONE]);
- ShowPlayerDialog(playerid, 12513, DIALOG_STYLE_INPUT, "Advertisements", vstr, "Call", "Cancel");
- }
- }
- }
- return 1;
- }
- CMD:advertise(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(PlayerInfo[playerid][pAdMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You have been banned from posting ads.");
- if(PlayerInfo[playerid][pConnectTime] <= 1) return SendClientMessage(playerid, COLOR_GREY, "You need to play for longer than 1 hour before placing an advertisement.");
- if(PlayerInfo[playerid][pTut] == 0 || PlayerInfo[playerid][pHospital] == 1) return 1;
- if(!IsPlayerInRangeOfPoint(playerid, 20.0, ADVERTISE_COORDS) && PlayerInfo[playerid][pPnumber] == 0) return SendClientMessage(playerid, COLOR_GRAD2, "You don't have a cell phone. You can buy a cell phone from a 24-7.");
- if(PlayerInfo[playerid][pJailed] == 1 || PlayerInfo[playerid][pJailed] == 2 || PlayerInfo[playerid][pAdminJailed] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't use this while you're in prison.");
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/ad)vertise [advert text]");
- new str[128];
- if(gettime() < (adds + 60) && (PlayerInfo[playerid][pAdmin] < 3))
- {
- format(str, sizeof(str), "Please wait %d seconds to post your advertisement.", (adds + 60) - gettime());
- SendClientMessage(playerid, COLOR_GRAD2, str);
- return 1;
- }
- else
- {
- new payout, pricePerChar;
- // Players will have to pay more if they're not in SAN HQ
- if(IsPlayerInRangeOfPoint(playerid, 3.0, ADVERTISE_COORDS))
- {
- pricePerChar = 100;
- } else {
- pricePerChar = 200;
- }
- payout = strlen(params) * pricePerChar;
- if(PlayerInfo[playerid][pCash] < payout)
- {
- format(str, sizeof(str), "* You used %d characters which cost $%d, you don't have enough.", strlen(params), payout);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- GiveMoney(playerid, -payout);
- format(str, sizeof(str), "Advertisement [Ph: %d] %s", PlayerInfo[playerid][pPnumber], params);
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- OOCNews(TEAM_GROVE_COLOR, str);
- format(str, sizeof(str), "~r~Paid ~r~$%d!~n~~w~Advertisement contained: %d characters", payout, strlen(params));
- displayCenterHUDInfo(playerid, str, 8); //display for 8 seconds
- NEWS += payout;
- SaveFactionBanks();
- if(PlayerInfo[playerid][pAdmin] < 4) adds = gettime();
- if(adCount >= MAX_ADVERTS) adCount = 0;
- format(advertInfo[adCount][AD_AUTHOR], sizeof(name), "%s", name);
- format(advertInfo[adCount][AD_STRING], 128, "%s", params);
- advertInfo[adCount][AD_PHONE] = PlayerInfo[playerid][pPnumber];
- advertInfo[adCount][AD_ACTIVE] = true;
- LastAd = adCount;
- adCount++;
- }
- return 1;
- }
- CMD:ad(playerid, params[]) return cmd_advertise(playerid, params);
- CMD:lastad(playerid, params[]) {
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- if(advertInfo[0][AD_ACTIVE] == false) return SendClientMessage(playerid, COLOR_GRAD2, "There are no advertisements currently.");
- new lastAdMessage[128];
- format(lastAdMessage, sizeof(lastAdMessage), "Last advertisement was done by %s.", advertInfo[LastAd][AD_AUTHOR]);
- return SendClientMessage(playerid, COLOR_WHITE, lastAdMessage);
- }
- CMD:checkactivity(playerid, params[])
- {
- if(!PlayerInfo[playerid][pBizMod]) return AdmErrorMsg;
- new query[500];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT Name, BizKey, pHouseID, PropDate FROM players WHERE BizKey != 0 OR pHouseID !=0 LIMIT 50");
- mysql_pquery(sqlGameConnection, query, "CheckProps", "i", playerid);
- return 1;
- }
- CMD:makepropertymod(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makepropertymod [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pBizMod])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a property moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's property moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pBizMod] = 0;
- format(str, sizeof(str), "You removed %s's status of a property moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a property moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s property moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pBizMod] = 1;
- format(str, sizeof(str), "You gave %s the status of a property moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:omakepropertymod(playerid, params[]){
- if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new playerName[MAX_PLAYER_NAME+1];
- if(sscanf(params, "s[25]", playerName))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /omakepropertymod [Firstname_Lastname]");
- if(IsPlayerConnected(ReturnUser(playerName)))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} That player is already connected. Use /makepropertymod");
- new _query[128];
- inline oPropModCheck(playa){
- if(!cache_num_rows())
- return SendClientMessage(playerid, -1, "{FF0000}Error:{FFFFFF} Player name not found.");
- new
- _bizMod = cache_get_field_content_int(0, "BizMod"),
- _str[128];
- _bizMod = !_bizMod;
- mysql_format(sqlGameConnection, _query, sizeof(_query), "UPDATE `players` SET `BizMod`='%d' WHERE `Name` = '%e'", _bizMod, playerName);
- mysql_pquery(sqlGameConnection, _query);
- if(_bizMod)
- format(_str, sizeof(_str), "{FF0000}AdmWarning{FFFFFF}: %s (o)granted %s property moderator status.", PlayerICName(playa), playerName);
- else
- format(_str, sizeof(_str), "{FF0000}AdmWarning{FFFFFF}: %s (o)removed %s property moderator status.", PlayerICName(playa), playerName);
- ABroadCast(COLOR_WHITE, _str, 1);
- }
- mysql_format(sqlGameConnection, _query, sizeof(_query), "SELECT `BizMod` FROM `players` WHERE `Name`='%e' LIMIT 1", playerName);
- mysql_pquery_inline(sqlGameConnection, _query, using inline oPropModCheck, "i", playerid);
- return 1;
- }
- CMD:makefactiondirector(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makefactiondirector [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pFactionDirector])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a faction director.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's faction director status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pFactionDirector] = 0;
- format(str, sizeof(str), "You removed %s's status of a faction director.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- OnPlayerSave(playerid);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a faction director.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s faction director status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pFactionDirector] = 1;
- format(str, sizeof(str), "You gave %s the status of a faction director.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- OnPlayerSave(playerid);
- }
- }
- return 1;
- }
- CMD:makefactionmod(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337 && !PlayerInfo[playerid][pFactionDirector]) return AdmErrorMsg;
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makefactionmod [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pFactionMod])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a faction moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's faction moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pFactionMod] = 0;
- format(str, sizeof(str), "You removed %s's status of a faction moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- OnPlayerSave(playerid);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a faction moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s faction moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pFactionMod] = 1;
- format(str, sizeof(str), "You gave %s the status of a faction moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- OnPlayerSave(playerid);
- }
- }
- return 1;
- }
- CMD:makebanappealer(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makebanappealer [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pBanAppealer])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a ban appealer.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's ban appealer status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pBanAppealer] = 0;
- format(str, sizeof(str), "You removed %s's status of a ban appealer.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a ban appealer.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s ban appealer status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pBanAppealer] = 1;
- format(str, sizeof(str), "You gave %s the status of a ban appealer.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:eventkick(playerid, params[])
- {
- new targetid, reason[30];
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pEventModd] || PlayerEventMod[playerid])
- {
- if(sscanf(params, "us[96]", targetid, reason)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /eventkick [playerid] [reason]");
- {
- if(IsAtEvent[targetid] != 0)
- {
- ResetPlayerAdminWeaponsEx(targetid);
- SetPlayerSpawn(targetid);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s kicked from the event by %s, reason: %s.", PlayerICName(targetid), PlayerICName(playerid), reason);
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s kicked from the event by %s, reason: %s.", PlayerICName(targetid), PlayerICName(playerid), reason);
- SendEventHelperMessage(COLOR_WHITE, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "That player is not in the event !");
- }
- }
- }
- return 1;
- }
- CMD:makeeventhelper(playerid, params[])
- {
- new targetid;
- new str[128];
- if(PlayerInfo[playerid][pEventModd] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} /makeeventhelper [playerid]");
- {
- if(PlayerInfo[targetid][pEventModd] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "That player is an event admin.");
- if(PlayerEventMod[targetid])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a player event moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's event helper status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's event helper status.", PlayerICName(playerid), PlayerICName(targetid));
- SendEventHelperMessage(COLOR_WHITE, str);
- PlayerEventMod[targetid] = 0;
- format(str, sizeof(str), "You removed %s's status of an event moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SetPlayerHealth(targetid, 100);
- SetPlayerArmour(targetid, 100);
- SetPlayerToTeamColor(targetid);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a player event moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s event helper status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerEventMod[targetid] = 1;
- format(str, sizeof(str), "You gave %s the status of an event moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SetPlayerHealth(targetid, 9999999);
- SetPlayerArmour(targetid, 9999999);
- SetPlayerColor(targetid, COLOR_EVENTHELP);
- }
- }
- return 1;
- }
- CMD:makeeventmod(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337 || PlayerInfo[playerid][pPR]) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeeventmod [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pEventModd])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer an event moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's event moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pEventModd] = 0;
- format(str, sizeof(str), "You removed %s's status of an event moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now an event moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s event moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pEventModd] = 1;
- format(str, sizeof(str), "You gave %s the status of an event moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:makecomplaintmod(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 99999)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makecomplaintmod [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pComplaintModd])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a complaint moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's complaint moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pComplaintModd] = 0;
- format(str, sizeof(str), "You removed %s's status of a complaint moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a complaint moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s complaint moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pComplaintModd] = 1;
- format(str, sizeof(str), "You gave %s the status of a complaint moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:makeshopmod(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 99999)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeshopmod [playerid]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(PlayerInfo[targetid][pShopMod])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a shop moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's shop moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pShopMod] = 0;
- format(str, sizeof(str), "You removed %s's status of a shop moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a shop moderator.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s shop moderator status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pShopMod] = 1;
- format(str, sizeof(str), "You gave %s the status of a shop moderator.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:makefamed(playerid, params[])
- {
- if(PlayerInfo[playerid][pFamed] < 2 && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid, rank[24];
- new str[128];
- if(sscanf(params, "us[24]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makefamed [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Famed' 'Manager'");
- return 1;
- }
- new rnkname2[16];
- if(strcmp(rank, "none", true) == 0 || strcmp(rank, "famed", true) == 0 || strcmp(rank, "manager", true) == 0)
- {
- if(strcmp(rank, "none", true) == 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as a famed member.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You are no longer a famed member/manager.");
- PlayerInfo[targetid][pFamed] = 0;
- format(str, sizeof(str), "You removed %s's status of a famed member.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- if(strcmp(rank, "famed", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_FAMED;
- PlayerInfo[targetid][pFamed] = 1;
- rnkname2 = "famed member";
- format(str, sizeof(str), "You have been given the status of a %s.", rnkname2);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of '%s' by %s.", PlayerICName(targetid), rnkname2, PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s.", PlayerICName(targetid), rnkname2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "manager", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- PlayerInfo[targetid][pTag] = NTAG_MANAGERFAMED;
- PlayerInfo[targetid][pFamed] = 2;
- rnkname2 = "famed manager";
- format(str, sizeof(str), "You have been given the status of a %s.", rnkname2);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of '%s' by %s.", PlayerICName(targetid), rnkname2, PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s.", PlayerICName(targetid), rnkname2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to make famed managers.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- return 1;
- }
- CMD:makegangdirector(playerid, params[])
- {
- if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid;
- new str[128];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makegangdirector [playerid]");
- {
- if(PlayerInfo[targetid][pGangDirector])
- {
- SendClientMessage(targetid, COLOR_RED, "You are no longer a gang director.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s removed %s's gang director status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pGangDirector] = 0;
- format(str, sizeof(str), "You removed %s's status of a gang director.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- SendClientMessage(targetid, COLOR_RED, "You are now a gang director.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s granted %s gang director status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- PlayerInfo[targetid][pGangDirector] = 1;
- format(str, sizeof(str), "You gave %s the status of a gang director.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- return 1;
- }
- CMD:maketester(playerid, params[])
- {
- if(PlayerInfo[playerid][pTester] < TESTERRANK_MANAGER && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid, rank[24];
- new str[128];
- if(sscanf(params, "us[24]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /maketester [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Regular' 'Senior' or 'Manager'");
- }
- else
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(strcmp(rank, "none", true) == 0 || strcmp(rank, "regular", true) == 0 || strcmp(rank, "senior", true) == 0 || strcmp(rank, "manager", true) == 0)
- {
- if(strcmp(rank, "none", true) == 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as a tester.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You are no longer a tester.");
- PlayerInfo[targetid][pTester] = TESTERRANK_NONE;
- format(str, sizeof(str), "You have removed %s from the tester team.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- if(strcmp(rank, "regular", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_TESTER;
- PlayerInfo[targetid][pTester] = TESTERRANK_REGULAR;
- format(str, sizeof(str), "You have been given the status of a %s tester.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s tester by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s tester.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "senior", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_STESTER;
- PlayerInfo[targetid][pTester] = TESTERRANK_SENIOR;
- format(str, sizeof(str), "You have been given the status of a %s tester.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s tester by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s tester.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "manager", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_MANAGERTESTER;
- PlayerInfo[targetid][pTester] = TESTERRANK_MANAGER;
- format(str, sizeof(str), "You have been given the status of a %s tester.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s tester by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s tester.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- }
- return 1;
- }
- CMD:makemapper(playerid, params[])
- {
- if(PlayerInfo[playerid][pMapper] < MAPPERRANK_MANAGER && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid, rank[24];
- new str[128];
- if(sscanf(params, "us[24]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makemapper [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Regular' 'Senior' or 'Manager'");
- }
- else
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(strcmp(rank, "none", true) == 0 || strcmp(rank, "regular", true) == 0 || strcmp(rank, "senior", true) == 0 || strcmp(rank, "manager", true) == 0)
- {
- if(strcmp(rank, "none", true) == 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as a Mapper.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You are no longer a Mapper.");
- PlayerInfo[targetid][pMapper] = MAPPERRANK_NONE;
- format(str, sizeof(str), "You removed %s from the mapper team.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- if(strcmp(rank, "regular", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_MAPPER;
- PlayerInfo[targetid][pMapper] = MAPPERRANK_REGULAR;
- format(str, sizeof(str), "You have been given the status of a %s Mapper.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Mapper by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s mapper.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "senior", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_SENIORMAPPER;
- PlayerInfo[targetid][pMapper] = MAPPERRANK_SENIOR;
- format(str, sizeof(str), "You have been given the status of a %s Mapper.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Mapper by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s mapper.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "manager", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_MANAGERMAPPER;
- PlayerInfo[targetid][pMapper] = MAPPERRANK_MANAGER;
- format(str, sizeof(str), "You have been given the status of a %s Mapper.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s Mapper by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s mapper.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- }
- return 1;
- }
- CMD:makedev(playerid, params[])
- {
- if(PlayerInfo[playerid][pDev] <= DEVRANK_SENIOR && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid, rank[24];
- new str[128];
- if(sscanf(params, "us[24]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makedev [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Junior' 'Senior' 'Manager' or 'Lead'");
- }
- else
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(strcmp(rank, "none", true) == 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as a developer.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You are no longer a developer.");
- format(str, sizeof(str), "You removed %s's developer status.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pDev] = DEVRANK_NONE;
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- else if(strcmp(rank, "junior", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_JUNIORDEV;
- PlayerInfo[targetid][pDev] = DEVRANK_JUNIOR;
- format(str, sizeof(str), "You have been given the status of a %s developer.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s developer by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s developer.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else if(strcmp(rank, "senior", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_SENIORDEV;
- PlayerInfo[targetid][pDev] = DEVRANK_SENIOR;
- format(str, sizeof(str), "You have been given the status of a %s developer.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s developer by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s developer.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else if(strcmp(rank, "manager", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_MANAGERDEV;
- PlayerInfo[targetid][pDev] = DEVRANK_MANAGER;
- format(str, sizeof(str), "You have been given the status of a %s developer.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of Development %s by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s developer.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else if(strcmp(rank, "lead", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_LEADDEV;
- PlayerInfo[targetid][pDev] = DEVRANK_LEAD;
- format(str, sizeof(str), "You have been given the status of a %s developer.", rank);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a %s developer by %s.", PlayerICName(targetid), rank, PlayerICName(playerid));
- ABroadCast(COLOR_WHITE, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s developer.", PlayerICName(targetid), rank);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- }
- }
- return 1;
- }
- CMD:omakemapper(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pMapper] >= 3 || PlayerInfo[playerid][pDev] >= 3)
- {
- new name[MAX_PLAYER_NAME], rank[24];
- if(sscanf(params, "s[24]s[24]", name, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /omakemapper [Firstname_Lastname] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Regular' 'Senior' or 'Manager'");
- }
- else
- {
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "That player is currently online.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "onomakemapper", "ssd", name, rank, playerid);
- return 1;
- }
- }
- return 1;
- }
- CMD:omakedev(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pDev] >= 3)
- {
- new name[MAX_PLAYER_NAME], rank[24];
- if(sscanf(params, "s[24]s[24]", name, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /omakedev [Firstname_Lastname] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Junior' 'Senior' 'Manager' or 'Lead'");
- }
- else
- {
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "That player is currently online.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOMakeDev", "ssd", name, rank, playerid);
- return 1;
- }
- }
- return 1;
- }
- CMD:omaketester(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pTester] >= TESTERRANK_MANAGER)
- {
- new name[MAX_PLAYER_NAME], rank[16];
- if(sscanf(params, "s[24]s[16]", name, rank))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /omaketester [full name(case sensitive)] [none, regular, senior, manager]");
- if(IsPlayerConnected(GetPlayerIDFromName(name)))
- return SendClientMessage(playerid, COLOR_GREY, "That player is currently online.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnOMakeTester", "ssd", name, rank, playerid);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:omakehelper(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pHelper] >= 3)
- {
- new name[MAX_PLAYER_NAME + 1];
- new rank[16];
- if(sscanf(params, "s[24]s[16]", name, rank))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /omakehelper [full name(case sensitive)] [none, helper, senior]");
- if(IsPlayerConnected(GetPlayerIDFromName(name)))
- return SendClientMessage(playerid, COLOR_GREY, "That player is currently online.");
- mysql_format(sqlGameConnection, sqlstring, sizeof(sqlstring), "SELECT * FROM `players` WHERE `Name` = '%e'", name);
- mysql_pquery(sqlGameConnection, sqlstring, "OnOMakeHelper", "iss", playerid, name, rank);
- }
- else
- {
- return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:makehelper(playerid, params[])
- {
- if(PlayerInfo[playerid][pHelper] < 3 && PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
- new targetid, rank[10];
- new str[128];
- if(sscanf(params, "us[10]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makehelper [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'Trial' 'Helper' 'Senior' 'Head' 'Director'");
- return 1;
- }
- else
- {
- new rnkname2[50];
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't connected.");
- if(strcmp(rank, "none", true) == 0 || strcmp(rank, "helper", true) == 0 || strcmp(rank, "senior", true) == 0 || strcmp(rank, "head", true) == 0 || strcmp(rank, "director", true) == 0 || strcmp(rank, "trial", true) == 0)
- {
- if(strcmp(rank, "none", true) == 0)
- {
- if(PlayerInfo[targetid][pHelper] == 0) return SendClientMessage(playerid, COLOR_GREY, "That player isn't a helper.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's helper status.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "* You are no longer a helper.");
- format(str, sizeof(str), "* You removed %s from the helper team.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- PlayerInfo[targetid][pHelper] = 0;
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- if(strcmp(rank, "helper", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_HELPER;
- PlayerInfo[targetid][pHelper] = 2;
- rnkname2 = "helper";
- }
- if(strcmp(rank, "senior", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_SHELPER;
- PlayerInfo[targetid][pHelper] = 3;
- rnkname2 = "senior helper";
- }
- if(strcmp(rank, "trial", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_THELPER;
- PlayerInfo[targetid][pHelper] = 1;
- rnkname2 = "trial helper";
- }
- if(strcmp(rank, "head", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pHelper] >= 4)
- {
- PlayerInfo[targetid][pTag] = NTAG_HHELPER;
- PlayerInfo[targetid][pHelper] = 4;
- rnkname2 = "head helper";
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to make head helpers.");
- }
- if(strcmp(rank, "director", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pHelper] >= 4)
- {
- PlayerInfo[targetid][pTag] = NTAG_DOPR;
- PlayerInfo[targetid][pHelper] = 5;
- rnkname2 = "Director of The Helpers Team";
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to make director helpers.");
- }
- format(str, sizeof(str), "You have been given the status of a %s.", rnkname2);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of a '%s' by %s.", PlayerICName(targetid), rnkname2, PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- format(str, sizeof(str), "You gave %s the status of a %s.", PlayerICName(targetid), rnkname2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- }
- return 1;
- }
- CMD:newbie(playerid, params[])
- {
- new msg[1024], name[24], string[1250];
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- if(PlayerInfo[playerid][pTut] == 0) return 1;
- if((nonewbie) && PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "The Newbie channel has been disabled by an Admin.");
- if(PlayerInfo[playerid][pNewbieMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are banned from speaking in that channel.");
- if(PlayerInfo[playerid][pTogNewbie]) return SendClientMessage(playerid, COLOR_GREY, "Newbie chat channel is currently turned off, use /tognewbie.");
- if(gettime() < (UseNewbieTimer[playerid] + 50))
- {
- format(string, sizeof(string), "You have to wait %d seconds before you can use /newbie again!", (UseNewbieTimer[playerid] + 50) - gettime());
- SendClientMessage(playerid, COLOR_GREY, string);
- return 1;
- }
- else
- {
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- if(sscanf(params, "s[1024]", msg)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} (/newb)ie [message]");
- {
- new plevel = PlayerInfo[playerid][pLevel], hlevel = PlayerInfo[playerid][pHelper], alevel = PlayerInfo[playerid][pAdmin], vlevel = PlayerInfo[playerid][pDonateRank], stealthed = PlayerInfo[playerid][pStealthed];
- if(PlayerInfo[playerid][pTag] == 0)
- {
- if(plevel >= 2 && vlevel == 0 && alevel == 0 && stealthed == 0) format(string, sizeof(string), "** Player Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(plevel == 1 && vlevel == 0 && alevel == 0 && stealthed == 0) format(string, sizeof(string), "** Newbie Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(hlevel == 1) format(string, sizeof(string), "** Helper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], PlayerICName(playerid), playerid, msg);
- if(hlevel >= 2) format(string, sizeof(string), "** Head Helper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(vlevel == 1) format(string, sizeof(string), "** Bronze VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(vlevel == 2) format(string, sizeof(string), "** Silver VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(vlevel == 3) format(string, sizeof(string), "** Gold VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(vlevel == 4) format(string, sizeof(string), "** Platinum VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "** Admin Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_NEWBIE)
- {
- format(string, sizeof(string), "** Newbie Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_PLAYER)
- {
- format(string, sizeof(string), "** Player Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_BVIP)
- {
- format(string, sizeof(string), "** Bronze VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_SVIP)
- {
- format(string, sizeof(string), "** Silver VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_GVIP)
- {
- format(string, sizeof(string), "** Gold VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_DVIP)
- {
- format(string, sizeof(string), "** Platinum VIP Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_HELPER)
- {
- format(string, sizeof(string), "** Helper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_SHELPER)
- {
- format(string, sizeof(string), "** Senior Helper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_HHELPER)
- {
- format(string, sizeof(string), "** Head Helper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_DOPR)
- {
- format(string, sizeof(string), "** Director of The Helpers Team Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_ADMIN)
- {
- format(string, sizeof(string), "** Admin Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_JUNIORDEV)
- {
- format(string, sizeof(string), "** Junior Developer Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], PlayerICName(playerid), playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_SENIORDEV)
- {
- format(string, sizeof(string), "** Senior Developer Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MANAGERDEV)
- {
- format(string, sizeof(string), "** Development Manager Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_LEADDEV)
- {
- format(string, sizeof(string), "** Lead Developer Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_FAMED)
- {
- format(string, sizeof(string), "** Famed Member Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_OLDSCHOOL)
- {
- format(string, sizeof(string), "** Old School Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MODOLDSCHOOL)
- {
- format(string, sizeof(string), "** Old School Moderator Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MANAGERFAMED)
- {
- format(string, sizeof(string), "** Famed Manager Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_ECONO)
- {
- format(string, sizeof(string), "** Player Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_TESTER)
- {
- format(string, sizeof(string), "** Tester Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_STESTER)
- {
- format(string, sizeof(string), "** Senior Tester Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MAPPER)
- {
- format(string, sizeof(string), "** Mapper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_SENIORMAPPER)
- {
- format(string, sizeof(string), "** Senior Mapper Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MANAGERMAPPER)
- {
- format(string, sizeof(string), "** Mapping Manager Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_MANAGERTESTER)
- {
- format(string, sizeof(string), "** Beta-Tester Manager Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == NTAG_CUSTOM)
- {
- format(string, sizeof(string), "** %s Level(%d) %s [%d]: %s **", PlayerInfo[playerid][pLevel], CustomTag[playerid], name, playerid, msg);
- }
- else if(PlayerInfo[playerid][pTag] == PlayerInfo[playerid][pNewbieTagName]){
- format(string, sizeof(string), "** %s %s [%d]: %s **", PlayerInfo[playerid][pNewbieTagName], name, playerid, msg);
- }
- }
- }
- if( strlen( string ) > 175 ) return SendClientMessage( playerid, COLOR_GREY, "Your message was too long, try shorten it and try again." );
- OOCNewbie(NEWBIE_COLOR, string);
- if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pHelper] <= 0) UseNewbieTimer[playerid] = gettime();
- return 1;
- }
- CMD:newb(playerid, params[]) return cmd_newbie(playerid, params);
- CMD:changepass(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You are not logged in.");
- new newpassword[65];
- new str[128];
- if(sscanf(params, "s[65]", newpassword)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /changepass [newpassword]");
- format(str, sizeof(str), "You have changed your account password to '%s'.", newpassword);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- //Hash & save
- HashPassword(newpassword, playerid);
- return 1;
- }
- /*CMD:ipcheck(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new tempstr[128];
- if(!sscanf(params, "s[64]", tempstr))
- {
- new dotcount = 0;
- for(new i = 0; i < strlen(tempstr); i++)
- {
- if(tempstr[i] == '.') dotcount++;
- }
- if(dotcount == 3)
- {
- new link[128];
- format(ipchecking[playerid], 24, "%s", tempstr);
- format(link, sizeof(link), "api.ipinfodb.com/v3/ip-country/?key=dc38a04953231bea8bb1203f36fd244393b50bf52e59afb40ae1e26db9fdbce6&ip=%s", tempstr);
- HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
- }
- else
- {
- new query[256];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `IP` FROM `players` WHERE `Name` = '%e' LIMIT 1", tempstr);
- mysql_pquery(sqlGameConnection, query, "OnOIPCheck", "is", playerid, tempstr);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /oipcheck [Name_Surname or IP]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }*/
- CMD:unbanip(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBanAppealer])
- {
- new query[128], ip[16];
- new str[128];
- if(sscanf(params, "s[16]", ip)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /unbanip [ip address]");
- format(str, sizeof(str), "unbanip %s", ip);
- SendRconCommand(str);
- SendRconCommand("reloadbans");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `banlist` WHERE `IP` = '%e' LIMIT 1", ip);
- mysql_pquery(sqlGameConnection, query, "OnUnbanIP", "is", playerid, ip);
- strmid(sendername, PlayerOOCName(playerid), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has unbanned IP: %s", sendername, ip);
- ABroadCast(COLOR_WHITE, str, 1);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:banaccount(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] > 1 || PlayerInfo[playerid][pBanAppealer])
- {
- new query[500], reason[64], name[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "s[24]s[64]", name, reason)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /banaccount [full name(case sensitive)] [reason]");
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} that player is connected.");
- if(UseAdmCmdTimer[playerid] > 2)
- {
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: (autoban) /banaccount spam.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);
- format(reason, sizeof(reason), "/banaccount spam.");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "OnBanAccount", "iss", playerid, name, reason);
- return 1;
- }
- else
- {
- AdmErrorMsg;
- }
- return 1;
- }
- //ochangepass
- CMD:ochangepass(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 99999)
- {
- new playersname[MAX_PLAYER_NAME], query[128], newpassword[65];
- if(sscanf(params, "s[24]s[65]", playersname, newpassword)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /ochangepass [full name (case sensitive)] [newpassword]");
- new giveplayerid = ReturnUser(playersname);
- if(IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player is currently online.");
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `AdminLevel` FROM `players` WHERE `Name` = '%e' LIMIT 1", playersname);
- mysql_pquery(sqlGameConnection, query, "OnOChangePass", "iss", playerid, playersname, newpassword);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FF0000}You're not authorized to use that command.");
- }
- return 1;
- }
- CMD:togspeedo(playerid, params[])
- {
- if(CurrentSpeedUnitMPH[playerid] == true)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You have changed the speed unit to KMH.");
- CurrentSpeedUnitMPH[playerid] = false;
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "You have changed the speed unit to MPH.");
- CurrentSpeedUnitMPH[playerid] = true;
- }
- return 1;
- }
- CMD:lastdriver(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!ADuty[playerid] && PlayerInfo[playerid][pAdmin] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
- new vehicleid;
- if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /lastdriver [vehicleid (from /dl)]");
- if(strmatch(LastDriver[vehicleid], "")) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error{FFFFFF}: There is no LastDriver.");
- new str[128];
- format(str, sizeof(str), "{FF0000}[vehicleid: %d] LastDriver{FFFFFF}: %s. Vehicle name: %s.", vehicleid, LastDriver[vehicleid], vehName[GetVehicleModel(vehicleid)-400]);
- SendClientMessage(playerid, COLOR_LIGHTRED, str);
- new playa = ReturnUser(LastDriver[vehicleid]);
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- format(str, sizeof(str), "{FF0000}[%s: %d] LastCar{FFFFFF}: %d. Vehicle name: %s.", PlayerOOCName(playa), playa, gLastCar[playa], vehName[GetVehicleModel(gLastCar[playa])-400]);
- SendClientMessage(playerid, COLOR_LIGHTRED, str);
- }
- }
- return 1;
- }
- AdmErrorMsg;
- return 1;
- }
- CMD:togdoubleexp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pDev] >= DEVRANK_LEAD)
- {
- if(!DOUBLE_EXP_MODE) {
- //enable double exp mode
- SendClientMessageToAll(COLOR_LIGHTBLUE, "2x EXP bonus has been enabled.");
- SendRconCommand("hostname Project Roleplay [2x EXP Bonus]");
- DOUBLE_EXP_MODE = 1;
- ADMIN_ENABLED_DOUBLE_EXP_MODE = 1;
- } else {
- //disable double exp mode
- SendClientMessageToAll(COLOR_LIGHTBLUE, "2x EXP bonus has been disabled.");
- SendRconCommand("hostname Project Roleplay");
- DOUBLE_EXP_MODE = 0;
- ADMIN_ENABLED_DOUBLE_EXP_MODE = 0;
- }
- } else {
- AdmErrorMsg;
- }
- return 1;
- }
- CMD:atogpms(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pDev] >= 2)
- {
- new str[128];
- if(TogPMGlobal)
- {
- format(str, sizeof(str), "{FF0000}AdmWarn{FFFFFF} %s has enabled PM's (/pm)", PlayerOOCName(playerid));
- } else {
- format(str, sizeof(str), "{FF0000}AdmWarn{FFFFFF} %s has disabled PM's (/pm)", PlayerOOCName(playerid));
- }
- TogPMGlobal = !TogPMGlobal;
- SendClientMessageToAll(COLOR_WHITE, str);
- }
- return 1;
- }
- CMD:atogpm(playerid, params[]) return cmd_atogpms(playerid, params);
- CMD:rpm(playerid, params[]) {
- if(lastPMedID[playerid] == INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_GREY, "You have no PM to reply to.");
- new pmText[128];
- if(sscanf(params, "s[128]", pmText))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /rpm [message]");
- format(pmText, sizeof(pmText), "%i %s", lastPMedID[playerid], pmText);
- cmd_pm(playerid, pmText);
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- if(TogPMGlobal)
- return SendClientMessage(playerid, COLOR_GREY, "This feature is currently disabled.");
- new player2, msg[128];
- if(TogPM[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "You have PM's disabled, /togpm.");
- if((pDeathState[playerid] == PLAYER_STATE_REVIVE || PlayerCuffed[playerid] > 0 || PlayerTazed[playerid] > 0))
- return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
- if(sscanf(params, "us[128]", player2, msg))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /pm [Playerid/PartOfName] [message]");
- if(!IsPlayerConnected(player2))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(TogPM[player2])
- return SendClientMessage(playerid, COLOR_GREY, "That player has PM's disabled.");
- if(player2 == INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- if(player2 == playerid){
- return SendClientMessage(playerid, COLOR_GREY, "You can't pm yourself.");
- }
- if(BlockedPM[player2][playerid])
- return SendClientMessage(playerid, -1, "{FF0000}Error:{FFFFFF} That player has restricted you from private messaging them!");
- if(ADuty[player2] == true) return SendClientMessage(playerid, COLOR_GREY, "Do not disturb an admin on duty! Use /report instead!");
- new str[128];
- LastPM[playerid] = gettime();
- lastPMedID[player2] = playerid;
- if(PlayerInfo[playerid][pAdmin]) format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] == 0)
- {
- format(str, sizeof(str), "(( PM from {F28E3C}%s{FFB900} [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- } else {
- format(str, sizeof(str), "(( PM from %s [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- }
- if(PlayerInfo[player2][pAdmin]) format(str, sizeof(str), "(( PM from %s [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- if(!(PlayerInfo[player2][pAdmin])) SendClientMessage(player2, 0xFFB900ff, str);
- else SendClientMessage(player2, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[player2][pAdmin] >= 2 && PlayerInfo[player2][pStealthed] == 0)
- {
- format(str, sizeof(str), "(( PM to {F28E3C}%s{FFB900} [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- } else {
- format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- }
- if(PlayerInfo[playerid][pAdmin]) format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- if(!(PlayerInfo[playerid][pAdmin])) SendClientMessage(playerid, 0xFFB900ff, str);
- else SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s PM'ed %s (ID %d): %s", PlayerOOCName(playerid), PlayerOOCName(player2), player2, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- format(str, sizeof(str), "** (( PM %s to %s: %s )) **", PlayerOOCName(playerid), PlayerOOCName(player2), msg);
- SendShadowMsg(SCOLOR_CYAN, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "** (( PM %s to %s: %s )) ** at %02d %s %02d:%02d:%02d ", PlayerOOCName(playerid), PlayerOOCName(player2), msg, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("PM.log", str);
- return 1;
- }
- CMD:apm(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "Not authorized");
- new player2, msg[128];
- if(sscanf(params, "us[128]", player2, msg))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /apm [Playerid/PartOfName] [message]");
- if(!IsPlayerConnected(player2))
- return SendClientMessage(playerid, COLOR_GREY, "Unknown player.");
- if(player2 == INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_GREY, "That player is not connected.");
- new str[128];
- if(PlayerInfo[playerid][pAdmin]) format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pStealthed] == 0)
- {
- format(str, sizeof(str), "(( PM from {F28E3C}%s{FFB900} [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- } else {
- format(str, sizeof(str), "(( PM from %s [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- }
- if(PlayerInfo[player2][pAdmin]) format(str, sizeof(str), "(( PM from %s [%d]: %s ))", PlayerOOCName(playerid), playerid, msg);
- if(!(PlayerInfo[player2][pAdmin])) SendClientMessage(player2, 0xFFB900ff, str);
- else SendClientMessage(player2, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[player2][pAdmin] >= 2 && PlayerInfo[player2][pStealthed] == 0)
- {
- format(str, sizeof(str), "(( PM to {F28E3C}%s{FFB900} [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- } else {
- format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- }
- if(PlayerInfo[playerid][pAdmin]) format(str, sizeof(str), "(( PM to %s [%d]: %s ))", PlayerOOCName(player2), player2, msg);
- if(!(PlayerInfo[playerid][pAdmin])) SendClientMessage(playerid, 0xFFB900ff, str);
- else SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(IsPlayerConnected(beingSpectatedID[playerid]) && SpectatingID[beingSpectatedID[playerid]] == playerid)
- {
- format(str, sizeof(str), "[AdmWrn] %s PM'ed %s (ID %d): %s", PlayerOOCName(playerid), PlayerOOCName(player2), player2, msg);
- SendClientMessage(beingSpectatedID[playerid], COLOR_YELLOW, str);
- }
- format(str, sizeof(str), "[/APM]** (( PM %s to %s: %s )) **", PlayerOOCName(playerid), PlayerOOCName(player2), msg);
- SendShadowMsg(SCOLOR_CYAN, str);
- new year, month, day;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- hour = FixHour(hour);
- format(str, sizeof(str), "** (( PM %s to %s: %s )) ** at %02d %s %02d:%02d:%02d ", PlayerOOCName(playerid), PlayerOOCName(player2), msg, day, GetMonthFromInt(month), hour, minute, second);
- logswrite("APM.log", str);
- return 1;
- }
- CMD:blockpm(playerid, params[]) {
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /blockpm [Name_Surname/ID]");
- if(!IsPlayerConnected(giveplayerid))
- return SendClientMessage(playerid, -1, "{FF0000}Error:{FFFFFF} You have to specify valid player id!");
- BlockedPM[playerid][giveplayerid] = !BlockedPM[playerid][giveplayerid];
- va_SendClientMessage(playerid, -1, "{FF0000}WARNING:{FFFFFF} You have %s %s(%i) from sending private messages to you.",
- BlockedPM[playerid][giveplayerid] ? "{FF0000}disallowed{FFFFFF}" : "{1ad94d}allowed{FFFFFF}", PlayerOOCName(giveplayerid), giveplayerid);
- return 1;
- }
- CMD:togpm(playerid, params[])
- {
- if(TogPMGlobal) return 1;
- if(IsPlayerConnected(playerid)) {
- if(TogPM[playerid])
- {
- TogPM[playerid] = false;
- SendClientMessage(playerid, 0xFFB900ff, "You have enabled your PM's.");
- } else {
- TogPM[playerid] = true;
- SendClientMessage(playerid, 0xFFB900ff, "You have disabled your PM's.");
- }
- }
- return 1;
- }
- CMD:bs(playerid, params[])
- {
- if(PlayerBlinded[playerid] > 0) return SendClientMessage(playerid, -1, "You can't use this command while blindfolded.");
- if(blackscreened[playerid] == true)
- {
- SetCameraBehindPlayer(playerid);
- blackscreened[playerid] = false;
- }
- else
- {
- SetPlayerCameraPos(playerid, 5022.7349, 4058.9658, 990.7913);
- SetPlayerCameraLookAt(playerid, 5023.7285, 4058.8816, 990.9172);
- blackscreened[playerid] = true;
- }
- return 1;
- }
- CMD:factionmods(playerid, params[]) return cmd_factionmoderators(playerid, params);
- CMD:factionmoderators(playerid, params[])
- {
- new query[150];
- if(PlayerInfo[playerid][pFactionMod] == 0 && PlayerInfo[playerid][pAdmin] <= 4) return AdmErrorMsg;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name`, `Member` FROM `players` WHERE `FactionMod` = 1");
- mysql_pquery(sqlGameConnection, query, "Onfactionmoderators", "i", playerid);
- return 1;
- }
- CMD:propmods(playerid, params[])
- {
- new query[150];
- if(PlayerInfo[playerid][pBizMod] == 0 && PlayerInfo[playerid][pAdmin] <= 4) return AdmErrorMsg;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `BizMod` = 1");
- mysql_pquery(sqlGameConnection, query, "onPropModerators", "i", playerid);
- return 1;
- }
- //Faction leader chat
- CMD:fl(playerid, params[])
- {
- new flstring[128],
- flc[128];
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- if(toggedflchat[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't use this if you have it toggled off.");
- if(sscanf(params, "s[128]", flc)) return SendClientMessage(playerid, -1, "[USAGE]: /fl [message]");
- if(
- PlayerInfo[playerid][pLeader] > 0 ||
- (PlayerInfo[playerid][pGroup] == GROUP_HITMAN && PlayerInfo[playerid][pGroupRank] >= 5) ||
- (PlayerInfo[playerid][pGroup] == 2 && PlayerInfo[playerid][pGroupRank] > GROUP_CRIME_RANKS-1) ||
- (PlayerInfo[playerid][pGroup] == GROUP_CARTEL && PlayerInfo[playerid][pGroupRank] > GROUP_CARTEL_RANKS-1) ||
- PlayerInfo[playerid][pFactionMod] != 0)
- {
- if(PlayerInfo[playerid][pFactionMod]) format(flstring, sizeof(flstring), "[Faction Mod] %s: %s", PlayerICName(playerid), flc);
- else if(PlayerInfo[playerid][pFactionDirector]) format(flstring, sizeof(flstring), "[Faction Director] %s: %s", PlayerICName(playerid), flc);
- else if(
- PlayerInfo[playerid][pGroup] == 1 ||
- PlayerInfo[playerid][pGroup] == 2 ||
- PlayerInfo[playerid][pGroup] == GROUP_CARTEL
- ) format(flstring, sizeof(flstring), "[%s] %s: %s", GetPlayerGroupName(playerid), PlayerInfo[playerid][pMaskName], flc);
- else if(PlayerInfo[playerid][pGroup] == 10) format(flstring, sizeof(flstring), "[S9] Agent %s: %s", PlayerInfo[playerid][pMaskName], flc);
- else format(flstring, sizeof(flstring), "[%s] %s: %s", GetPlayerFactionName(playerid), PlayerICName(playerid), flc);
- SendLeaderMessage(COLOR_LEADER, flstring);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this.");
- return 1;
- }
- CMD:togglefl(playerid, params[])
- {
- if(PlayerInfo[playerid][pLeader] > 0 || (PlayerInfo[playerid][pGroup] == 1 && PlayerInfo[playerid][pGroupRank] > GROUP_HITMAN_RANKS-1) || (PlayerInfo[playerid][pGroup] == 2 && PlayerInfo[playerid][pGroupRank] > GROUP_CRIME_RANKS-1) || PlayerInfo[playerid][pFactionMod] != 0)
- {
- if(toggedflchat[playerid] == 0)
- {
- toggedflchat[playerid] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have turned the faction leader chat off.");
- }
- else
- {
- toggedflchat[playerid] = 0;
- SendClientMessage(playerid, COLOR_WHITE, "You have turned the faction leader chat on.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this.");
- }
- return 1;
- }
- CMD:togbug(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_FBI && PlayerInfo[playerid][pGroup] != GROUP_S9) return AdmErrorMsg;
- PlayerInfo[playerid][pBuggedTog] = !PlayerInfo[playerid][pBuggedTog];
- if(PlayerInfo[playerid][pBuggedTog]) SendClientMessage(playerid, COLOR_GREY, "You have disabled bugged messages.");
- else SendClientMessage(playerid, COLOR_GREY, "You have enabled bugged messages.");
- return 1;
- }
- CMD:breakcuffs(playerid, params[])
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /breakcuffs [playerid]");
- if(!IsPlayerInRangeOfPlayer(3.0, playerid, targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not near you.");
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- if(PlayerCuffed[targetid] == 0) return SendClientMessage(playerid, COLOR_GREY, "That player is not cuffed.");
- if(targetid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You can not break your own cuffs.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must not be in any vehicle.");
- if(PlayerInfo[playerid][pScrew] < 1) return SendClientMessage(playerid, COLOR_GREY, "You need a screwdriver to do this.");
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GRAD1, "You can not do this at this time.");
- breakingpcuffs[playerid] = targetid;
- isbreakingcuffs[playerid] = true;
- SetPlayerProgressBarValue(playerid, breakcuffs[playerid], 0);
- ShowPlayerProgressBar(playerid, breakcuffs[playerid]);
- SetPlayerProgressBarValue(targetid, breakcuffs[targetid], 0);
- ShowPlayerProgressBar(targetid, breakcuffs[targetid]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You are now breaking that player's cuffs.");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Press your sprint key repeatedly to procceed (default: SPACE)");
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "Your cuffs are being broken by another person.");
- new str[128];
- format(str, sizeof(str), "* %s starts to lockpick %s's cuffs.", PlayerICName(playerid), PlayerICName(targetid));
- ProxDetector(30, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- CMD:summon(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_JD)
- return SendClientMessage(playerid, COLOR_GREY, "You must be a member of the Judicial Department to use this.");
- new suedname[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "s", suedname))
- return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /summon [Player Name]");
- if(IsPlayerConnected(GetPlayerIDFromName(suedname)))
- {
- new targetid = GetPlayerIDFromName(suedname);
- PlayerInfo[targetid][pSueNotice] = 1;
- format(str, sizeof(str), "You have summoned %s to the court!", suedname);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT `Name` FROM `players` WHERE `Name` = '%e'", suedname);
- mysql_pquery(sqlGameConnection, query, "OnPSummonP", "is", playerid, suedname);
- }
- return 1;
- }
- CMD:reportmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return AdmErrorMsg;
- new targetid, minutes;
- if(sscanf(params, "ui", targetid, minutes)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /reportmute [playerid/PartOfName] [minutes] (use 0 to unmute).");
- if(targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- if(minutes > 60) return SendClientMessage(playerid, COLOR_GREY, "Maximum report mute time is 60 minutes.");
- new str[128];
- if(minutes == 0)
- {
- PlayerInfo[targetid][pRepMuted] = 0;
- format(str, sizeof(str), "You have unmuted %s from using report.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(targetid, COLOR_GREY, "You were unmuted from using report by an admin.");
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has unmuted %s from using report.", PlayerOOCName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_WHITE, str, 1);
- }
- if(minutes > 0)
- {
- PlayerInfo[targetid][pRepMuted] = 60*minutes; // convert minutes to seconds
- if(PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pStealthed] == 1)
- {
- format(str, sizeof(str), "You were muted from using report by an admin for %d minutes.", minutes);
- SendClientMessage(targetid, COLOR_GREY, str);
- }
- else
- {
- format(str, sizeof(str), "You were muted from using report by %s for %d minutes.", PlayerOOCName(playerid), minutes);
- SendClientMessage(targetid, COLOR_GREY, str);
- }
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has muted %s from using report for %d minutes.", PlayerOOCName(playerid), PlayerICName(targetid), minutes);
- ABroadCast(COLOR_WHITE, str, 1);
- }
- return 1;
- }
- CMD:myinsurance(playerid, params[])
- {
- if(PlayerInfo[playerid][pInsurance] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You have no insurance. You can get an insurance at the All Saints Hospital for $50,000.");
- SendClientMessage(playerid, COLOR_GREY, "TIP: Insurance reduces your hospital bills by 25 percents and reduces your recovery time at the hospital.");
- }
- else
- {
- new str[128];
- format(str, sizeof(str), "You have %d insurance uses left.", PlayerInfo[playerid][pInsurance]);
- SendClientMessage(playerid, COLOR_GREY, str);
- SendClientMessage(playerid, COLOR_GREY, "TIP: Insurance reduces your hospital bills by 25 percents and reduces your recovery time at the hospital.");
- }
- return 1;
- }
- CMD:buyinsurance(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1174.5452, -1321.2003, 1089.5674)) return SendClientMessage(playerid, COLOR_GREY, "You are not by the computer inside the All Saints Hospital.");
- if(PlayerInfo[playerid][pInsurance] > 0) return SendClientMessage(playerid, COLOR_GREY, "You already have insurance (/myinsurance).");
- new str[128];
- if(PlayerInfo[playerid][pCash] < insuranceprice)
- {
- format(str, sizeof(str), "You do not have enough money (price: %d).", insuranceprice);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- if(isnull(params))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /buyinsurance confirm");
- SendClientMessage(playerid, COLOR_GREY, "TIP: This will give you insurance for the next 5 times you recover in hospital.");
- SendClientMessage(playerid, COLOR_GREY, "TIP: Insurance will reduce your hospital bills by 25 percents, and make you recover faster.");
- format(str, sizeof(str), "The current price for insurance is: %d", insuranceprice);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- if(!strcmp(params, "confirm", true))
- {
- PlayerInfo[playerid][pInsurance] = 5;
- GiveMoney(playerid, -insuranceprice);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Congratulations, you have bought insurance! (/myinsurance)");
- }
- else SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /buyinsurance confirm");
- return 1;
- }
- CMD:usebeer(playerid, params[])
- {
- if(PlayerInfo[playerid][pBeer] < 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have a beer, visit a 24/7 and buy a case of beer.");
- if(IsPlayerRestricted(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can not do this right now.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You cannot use this in a vehicle.");
- PlayerInfo[playerid][pBeer]--;
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- displayCenterHUDInfo(playerid, "~r~Beer~w~ withdrawn!~n~press LMB to drink, press F to drop.", 8); //display for 8 seconds
- return 1;
- }
- CMD:removecrimes(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new psqlid;
- if(sscanf(params, "d", psqlid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /removecrimes [SQLID]");
- new query[128], rows, fields, CrimeType, CrimeReason[128], cstr[5000], Date[50], copname[28], isEnabled, Cache:result;
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `newcrimes` WHERE `CrimePID` = %d ORDER BY `CrimeID` DESC LIMIT 20", psqlid);
- result = mysql_query(sqlGameConnection, query);
- cache_get_data(rows, fields, sqlGameConnection);
- searchingsqlid[playerid] = psqlid;
- if(!rows) return ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "Player Charges", "That player has no crimes on record.", "Done", "");
- format(cstr, sizeof(cstr), "Date\tType\tIssuer\tReason\n");
- for(new i = 0; i < rows; i++)
- {
- cache_get_field_content(i, "CrimeReason", CrimeReason);
- cache_get_field_content(i, "RealName", copname);
- cache_get_field_content(i, "Date", Date);
- CrimeType = cache_get_field_content_int(i, "CrimeType");
- isEnabled = cache_get_field_content_int(i, "CrimeEnabled");
- if(isEnabled) format(cstr, sizeof(cstr), "%s{1CC343}(%s)\t{1CC343}%s\t{1CC343}%s\t{1CC343}%s\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
- else format(cstr, sizeof(cstr), "%s{FF5F5F}(%s)\t{FF5F5F}%s\t{FF5F5F}%s\t{FF5F5F}%s{FFFFFF}\n", cstr, Date, GetCrimeType(CrimeType), copname, CrimeReason);
- }
- cache_delete(Cache:result, sqlGameConnection);
- ShowPlayerDialog(playerid, DIALOG_CHARGES_REMOVE, DIALOG_STYLE_TABLIST_HEADERS, "Crime Removal Dialog", cstr, "Remove", "Close");
- return 1;
- }
- // /osetnumber for set offline player's number. ~Troy Bradshaw [ GOLDEN ]
- CMD:osetnumber(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pDev] >= 3 || PlayerInfo[playerid][pBizMod] == 1)
- {
- new name[MAX_PLAYER_NAME], num;
- if(sscanf(params, "s[24]i", name, num))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /osetnumber [Firstname_Lastname] [number]");
- }
- else
- {
- if(IsPlayerConnected(GetPlayerIDFromName(name))) return SendClientMessage(playerid, COLOR_GREY, "That player is currently online.");
- new query[128];
- mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM `players` WHERE `Name` = '%e' LIMIT 1", name);
- mysql_pquery(sqlGameConnection, query, "oSetNum", "sid", name, num, playerid);
- return 1;
- }
- }
- return 1;
- }
- CMD:setbadgenumber(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] != FACTION_SAPD && PlayerInfo[playerid][pMember] != FACTION_FBI && PlayerInfo[playerid][pMember] != FACTION_FMD && PlayerInfo[playerid][pMember] != FACTION_GOV && PlayerInfo[playerid][pMember] != FACTION_SANG) return AdmErrorMsg;
- if(PlayerInfo[playerid][pRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "Only R4+ can use this.");
- new targetid, bnumber;
- if(sscanf(params, "ud", targetid, bnumber)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /setbadgenumber [playerid/partOfName] [#number]");
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- if(PlayerInfo[targetid][pMember] != PlayerInfo[playerid][pMember]) return SendClientMessage(playerid, COLOR_GREY, "That player is not in your faction.");
- if((bnumber > 99999 || bnumber < 10000) && bnumber != 0) return SendClientMessage(playerid, COLOR_GREY, "The badge number must be 5 digits long (between 10,000 to 99,999) or 0.");
- PlayerInfo[targetid][pBadgeNumber] = bnumber;
- new str[128];
- format(str, sizeof(str), "You have set %s's badge number to: %d", PlayerICName(targetid), bnumber);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "%s has set your badge number to: %d", PlayerICName(playerid), bnumber);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- return 1;
- }
- // RESET JETPACK
- CMD:takejetpack(playerid, params[])
- {
- new trgID;
- if(sscanf(params, "u", trgID)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Usage:{FFFFFF} /takejetpack [playerid]");
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(GetPlayerSpecialAction(trgID) == SPECIAL_ACTION_USEJETPACK)
- {
- aGun[playerid][12] = 0;
- SetPlayerSpecialAction(trgID, SPECIAL_ACTION_NONE);
- SendClientMessage(playerid, COLOR_WHITE, "You have reset player's jetpack.");
- SendClientMessage(trgID, COLOR_WHITE, "An admin reset your jetpack");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:mydoors( playerid, params[] )
- {
- new doorstr[1000],
- Dstr[128],
- dcount;
- for( new d; d < MAX_DOORS; d++ )
- {
- if( Entrances[d][eowner] == PlayerInfo[playerid][pID] )
- {
- format(Dstr, sizeof(Dstr), "%s | | ID: %d\n", Entrances[d][doorname], d);
- strcat(doorstr, Dstr);
- dcount++;
- }
- }
- if(dcount > 0) return ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "List of your Doors", doorstr, "Close", "");
- else return SendClientMessage(playerid, COLOR_GREY, "No door found!");
- }
- CMD:listdoors( playerid, params[] )
- {
- new doorstr[1000],
- Dstr[128],
- dcount,
- PsqlID;
- if(sscanf(params, "i", PsqlID)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/listdoors [sqlid]" );
- if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pDev] >= 2 || PlayerInfo[playerid][pBizMod] != 0 || PlayerInfo[playerid][pMapper] >= 3 || PlayerInfo[playerid][pBizMod])
- {
- for( new d; d < MAX_DOORS; d++ )
- {
- if( Entrances[d][eowner] == PsqlID )
- {
- format(Dstr, sizeof(Dstr), "%s | | ID: %d\n", Entrances[d][doorname], d);
- strcat(doorstr, Dstr);
- dcount++;
- }
- }
- if(dcount > 0) return ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "List of the doors", doorstr, "Close", "");
- else return SendClientMessage(playerid, COLOR_GREY, "No door found!");
- }
- else return AdmErrorMsg;
- }
- // Lists the number of spawned vehicles IG //
- CMD:spawnedvehicles(playerid) {
- if(PlayerInfo[playerid][pDev] < 2) return AdmErrorMsg;
- new str[128];
- format(str, sizeof(str), "There are %d vehicles spawned w/o trains.", Iter_Count(Vehicle));
- SendClientMessage(playerid, -1, str);
- return 1;
- }
- CMD:givefamxp(playerid, params[])
- {
- if(PlayerInfo[playerid][pGangDirector] != 1 && PlayerInfo[playerid][pAdmin] < 4) return AdmErrorMsg;
- new famid;
- if(sscanf(params, "d", famid)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF}/givefamxp [famid]");
- if(famid < 1 || famid > 20) return SendClientMessage(playerid, COLOR_GREY, "Family slot must be between 1-20");
- famid -= 1; // famid is now the id instead of the slot
- new msg[128];
- format(msg, sizeof(msg), "Your family has been given 20 XP by %s", PlayerOOCName(playerid));
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pFMember] != famid) continue;
- SendClientMessage(i, COLOR_LIGHTBLUE, msg);
- }
- format(msg, sizeof(msg), "You have given slot %d 20 XP.", famid+1); // send the slot
- SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
- GrantFamXP(famid, 20);
- printf("%s has given family ID %d (slot %d) 20 XP.", PlayerName(playerid), famid, famid+1); // log the id and the slot
- return 1;
- }
- CMD:oshelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pOldSchool] >= 1 || PlayerInfo[playerid][pAdmin] >= 1337)
- {
- SendClientMessage(playerid, COLOR_GREEN, "____________________________________________");
- SendClientMessage(playerid, COLOR_ORANGE, "Old School:{FFFFFF} /oshelp /osmembers /(togos)chat /(o)ld(s)chool(c)hat /makeoldschool");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:osmembers(playerid, params[])
- {
- if(PlayerInfo[playerid][pOldSchool] >= 1)
- {
- new count = 0;
- SendClientMessage(playerid, COLOR_WHITE, "Old School Member(s)");
- foreach( new i: Player )
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][pOldSchool] != 0)
- {
- new name[24], str[128];
- strmid(name, str_replace('_', ' ', PlayerName(i)), 0, MAX_PLAYER_NAME);
- if(PlayerInfo[i][pOldSchool] == 1)format(str, sizeof(str), "%s (ID %d)", name, i);
- else format(str, sizeof(str), "%s (ID %d) - Moderator", name, i);
- SendClientMessage(playerid, COLOR_OLDSCHOOL, str);
- count++;
- }
- }
- if(count == 0) return SendClientMessage(playerid, COLOR_GREY, "No Old School members online.");
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:osc(playerid, params[]) return cmd_oldschoolchat(playerid, params);
- CMD:oldschoolchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pOldSchool] >= 1)
- {
- if(OldSchoolChatTog[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Old School chat is currently turned off, use /(togos)chat.");
- new msg[128];
- if(!sscanf(params, "s[128]", msg))
- {
- if(IsPlayerConnected(playerid))
- {
- new osrank[32], str[128];
- if(PlayerInfo[playerid][pOldSchool] == 1) osrank = "Old School";
- if(PlayerInfo[playerid][pOldSchool] == 2) osrank = "Old School Moderator";
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- format(str, sizeof(str), "** %s %s: %s **", osrank, name, msg);
- SendOldSchoolMessage(COLOR_OLDSCHOOL, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /(o)ld(s)chool(c)hat [message]");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:togos(playerid, params[]) return cmd_togoschat(playerid, params);
- CMD:togoschat(playerid, params[])
- {
- if(PlayerInfo[playerid][pOldSchool] >= 1)
- {
- if(OldSchoolChatTog[playerid] == 0)
- {
- OldSchoolChatTog[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD1, "** Old School chat disabled.");
- }
- else
- {
- OldSchoolChatTog[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD1, "** Old School chat enabled.");
- }
- }
- else return AdmErrorMsg;
- return 1;
- }
- CMD:makeos(playerid, params[])
- {
- if(PlayerInfo[playerid][pOldSchool] < 2 && PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new targetid, rank[24];
- if(sscanf(params, "us[24]", targetid, rank))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeos [playerid] [rank]");
- SendClientMessage(playerid, COLOR_GRAD2, "{00BFFF}Usage:{FFFFFF} 'None' 'OldSchool' 'Moderator'");
- return 1;
- }
- new rnkname2[25], str[128];
- if(strcmp(rank, "none", true) == 0 || strcmp(rank, "oldschool", true) == 0 || strcmp(rank, "moderator", true) == 0)
- {
- if(strcmp(rank, "none", true) == 0)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has removed %s's status as an Old School member.", PlayerICName(playerid), PlayerICName(targetid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, "You are no longer an Old School member.");
- PlayerInfo[targetid][pOldSchool] = 0;
- format(str, sizeof(str), "You removed %s's status of an Old School member.", PlayerICName(targetid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- if(PlayerInfo[playerid][pLevel] >= 2)PlayerInfo[targetid][pTag] = NTAG_PLAYER;
- else PlayerInfo[targetid][pTag] = NTAG_NEWBIE;
- return 1;
- }
- if(strcmp(rank, "OldSchool", true) == 0)
- {
- PlayerInfo[targetid][pTag] = NTAG_OLDSCHOOL;
- PlayerInfo[targetid][pOldSchool] = 1;
- rnkname2 = "Old School member";
- format(str, sizeof(str), "You have been given the status of an %s.", rnkname2);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of '%s' by %s.", PlayerICName(targetid), rnkname2, PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- format(str, sizeof(str), "You gave %s the status of an %s.", PlayerICName(targetid), rnkname2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(strcmp(rank, "Moderator", true) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- PlayerInfo[targetid][pTag] = NTAG_MODOLDSCHOOL;
- PlayerInfo[targetid][pOldSchool] = 2;
- rnkname2 = "Old School moderator";
- format(str, sizeof(str), "You have been given the status of aa %s.", rnkname2);
- SendClientMessage(targetid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has been given the status of '%s' by %s.", PlayerICName(targetid), rnkname2, PlayerICName(playerid));
- ABroadCast(COLOR_LIGHTRED, str, 1);
- format(str, sizeof(str), "You gave %s the status of aa %s.", PlayerICName(targetid), rnkname2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to make Old School moderators.");
- }
- }
- else return SendClientMessage(playerid, COLOR_GRAD2, "Invalid rank specified.");
- return 1;
- }
- CMD:intdb(playerid, params[])
- {
- new string[128];
- format(string, sizeof(string), "PlayerInfo[playerid][pInt] is %d", PlayerInfo[playerid][pInt]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "Interior is %d", GetPlayerInterior(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "PlayerInfo[playerid][pVirtualWorld] is %d", PlayerInfo[playerid][pVirtualWorld]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "VirtualWorld is %d", GetPlayerVirtualWorld(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- CMD:checkstatus(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "{00BFFF}Usage:{FFFFFF} /checkstatus [playerid/PartOfName]");
- if(!IsPlayerConnected(target) || target == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Invalid playerid.");
- new msg[70];
- format(msg, sizeof(msg), "~~~~~~~~~~~ %s Statuses ~~~~~~~~~~~", PlayerName(target));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
- if(PlayerInfo[target][pBanAppealer]) SendClientMessage(playerid, -1, "{FF0000}Ban Appealer");
- if(PlayerInfo[target][pGangModd]) SendClientMessage(playerid, -1, "{387C44}Gang Moderator");
- if(PlayerInfo[target][pEventModd]) SendClientMessage(playerid, -1, "{00CC99}Event Moderator");
- if(PlayerInfo[target][pComplaintModd]) SendClientMessage(playerid, -1, "{FFA500}Complaint Moderator");
- if(PlayerInfo[target][pShopMod]) SendClientMessage(playerid, -1, "{FFCC33}Shop Moderator");
- if(PlayerInfo[target][pFactionMod]) SendClientMessage(playerid, -1, "{2641FE}Faction Moderator");
- if(PlayerInfo[target][pGangDirector]) SendClientMessage(playerid, -1, "{387C44}Gang Director");
- if(PlayerInfo[target][pBizMod]) SendClientMessage(playerid, -1, "{3399FF}Property Moderator");
- if(PlayerInfo[target][pFactionDirector]) SendClientMessage(playerid, -1, "{2641FE}Faction Director");
- if(PlayerInfo[target][pHelper] > 0) SendClientMessage(playerid, -1, "{00FFFF}Helper");
- if(PlayerInfo[target][pTester] > 0) SendClientMessage(playerid, -1, "{00FF00}Tester");
- if(PlayerInfo[target][pDev] > 0) SendClientMessage(playerid, -1, "{660033}Developer");
- return 1;
- }
- CMD:makeadmin(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999)
- return AdmErrorMsg;
- new player, adminlevel;
- if(sscanf(params, "ui", player, adminlevel))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /makeadmin [playerid/partofname] [admin level]");
- if(!IsPlayerConnected(player))
- return SendClientMessage(playerid, COLOR_GREY, "This player is not connected.");
- printf("AdmCmd: %s has promoted %s to level %d admin.", PlayerOOCName(playerid), PlayerOOCName(player), adminlevel);
- if(adminlevel < 2)
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- else PlayerInfo[playerid][pTag] = NTAG_ADMIN;
- new str[128], dialogstr[512];
- if(adminlevel > PlayerInfo[player][pAdmin])
- {
- format(str, sizeof(str), "You have been promoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have promoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "You have been demoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have demoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(adminlevel >= 1){ //for security code
- format(dialogstr, sizeof(dialogstr), "%s\nPlease enter your personal security key to protect yourself from hackers.\nMake sure you remember this key because you will be asked for this key everytime you login back to your account.\nRefrain from giving this key or your account password to anyone because we won't be responsible for your loss, unless you prove it.", PlayerOOCName(player));
- ShowPlayerDialog(player, DIALOG_SECURITY_CODE, DIALOG_STYLE_INPUT, "Security Key", dialogstr, "Enter", "");
- }
- PlayerInfo[player][pAdmin] = adminlevel;
- if(adminlevel < 1)
- {
- PlayerInfo[player][pAdmin] = 0;
- PlayerInfo[player][pSecKey] = 0;
- gAdminAuthorized[player] = 0;
- format(CustomTag[player], 50, "None");
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- customRankName[player] = false;
- format(customRank[player], 24, "None");
- PlayerInfo[player][pBanAppealer] = 0;
- PlayerInfo[player][pGangModd] = 0;
- PlayerInfo[player][pEventModd] = 0;
- PlayerInfo[player][pComplaintModd] = 0;
- PlayerInfo[player][pShopMod] = 0;
- PlayerInfo[player][pFactionMod] = 0;
- PlayerInfo[player][pGangDirector] = 0;
- PlayerInfo[player][pBizMod] = 0;
- }
- return 1;
- }
- CMD:savagecommandma(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 0)
- return AdmErrorMsg;
- new player, adminlevel;
- if(sscanf(params, "ui", player, adminlevel))
- return SendClientMessage(playerid, COLOR_WHITE, "Unknown Command");
- if(!IsPlayerConnected(player))
- return SendClientMessage(playerid, COLOR_GREY, "This player is not connected.");
- printf("AdmCmd: %s has promoted %s to level %d admin.", PlayerOOCName(playerid), PlayerOOCName(player), adminlevel);
- if(adminlevel < 2)
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- else PlayerInfo[playerid][pTag] = NTAG_ADMIN;
- new str[128], dialogstr[512];
- if(adminlevel > PlayerInfo[player][pAdmin])
- {
- format(str, sizeof(str), "You have been promoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have promoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- else
- {
- format(str, sizeof(str), "You have been demoted to a level %d admin by %s.", adminlevel, PlayerOOCName(playerid));
- SendClientMessage(player, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "You have demoted %s to a level %d admin.", PlayerOOCName(player), adminlevel);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- }
- if(adminlevel >= 1){ //for security code
- format(dialogstr, sizeof(dialogstr), "Hello %s\nPlease enter your personal security code to protect you from hackers.\nMake sure you remember this code because you will be asked for this code everytime you login back to your account.\nOther then that don't give this code or your account password to anyone we won't be responsible for your loss, until you prove it.", PlayerOOCName(player));
- ShowPlayerDialog(player, DIALOG_SECURITY_CODE, DIALOG_STYLE_INPUT, "Security Code", dialogstr, "Enter", "");
- }
- PlayerInfo[player][pAdmin] = adminlevel;
- if(adminlevel < 1)
- {
- PlayerInfo[player][pAdmin] = 0;
- PlayerInfo[player][pSecKey] = 0;
- gAdminAuthorized[player] = 0;
- format(CustomTag[player], 50, "None");
- PlayerInfo[player][pTag] = NTAG_PLAYER;
- customRankName[player] = false;
- format(customRank[player], 24, "None");
- PlayerInfo[player][pBanAppealer] = 0;
- PlayerInfo[player][pGangModd] = 0;
- PlayerInfo[player][pEventModd] = 0;
- PlayerInfo[player][pComplaintModd] = 0;
- PlayerInfo[player][pShopMod] = 0;
- PlayerInfo[player][pFactionMod] = 0;
- PlayerInfo[player][pGangDirector] = 0;
- PlayerInfo[player][pBizMod] = 0;
- }
- return 1;
- }
- CMD:fixvw(playerid, params[])
- {
- new int = GetPlayerInterior(playerid),
- vw = GetPlayerVirtualWorld(playerid);
- if(int == 0 && vw != 0)
- {
- SetPlayerVirtualWorld(playerid, 0);
- SendClientMessage(playerid, SAMP_COLOR, "Your virtual world was fixed.");
- }
- return 1;
- }
- CMD:bail(playerid, params[])
- {
- /* if(PlayerInfo[playerid][pJailed] != 1)
- return SendClientMessage(playerid, COLOR_GREY, "You're not in jail.");
- if(JailPrice[playerid] == 0)
- return SendClientMessage(playerid, COLOR_GREY, "You don't have a bail price.");
- if(PlayerInfo[playerid][pCash] < JailPrice[playerid])
- return SendClientMessage(playerid, COLOR_GREY, "You can't afford bail.");
- new str[128];
- format(str, sizeof(str), "* You bailed yourself out for: $%d", JailPrice[playerid]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- GiveMoney(playerid, -JailPrice[playerid]);
- JailPrice[playerid] = 0;
- WantLawyer[playerid] = 0;
- CallLawyer[playerid] = 0;
- PlayerInfo[playerid][pJailTime] = 1;*/
- SendClientMessage(playerid, COLOR_GREY, "Command is disabled.");
- return 1;
- }
- CMD:anticheat(playerid, params[])
- {
- new str[224];
- format(str, sizeof(str), "Version: v1.0\n\nTotal Hackers Banned: %d\nDesynced weapons detected: %d", anticheatbans, anticheatwarns);
- ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_MSGBOX, "sarp Anti-Cheat", str, "Ok", "Cancel");
- return 1;
- }
- CMD:setstat(playerid, params[])
- {
- new giveplayerid, stat, amount, str[128];
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "uii", giveplayerid, stat, amount))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- new logstring[128];
- new year, month, day;
- getdate(year, month, day);
- strmid(sendername, PlayerICName(playerid), 0, MAX_PLAYER_NAME);
- strmid(giveplayer, PlayerICName(giveplayerid), 0, MAX_PLAYER_NAME);
- switch(stat)
- {
- case 1:
- {
- if(amount != 2){
- PlayerInfo[giveplayerid][pLevel] = amount;
- format(str, sizeof(str), "That players Level was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Level to %d", day, month, year, sendername, giveplayer, amount);
- } else {
- PlayerInfo[giveplayerid][pLevel] = amount;
- format(str, sizeof(str), "That players Level was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Level to %d", day, month, year, sendername, giveplayer, amount);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* An Admin has set your Level to 2.");
- SendClientMessage(giveplayerid, COLOR_YELLOW, "Reminder: {FFFFFF}Global Chat is available for you now, use /togglobal to enable it.");
- }
- }
- case 2:
- {
- PlayerInfo[giveplayerid][pSHealth] = amount;
- format(str, sizeof(str), "That players Armor Upgade was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Armor Upgade to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 3:
- {
- PlayerInfo[giveplayerid][gPupgrade] = amount;
- format(str, sizeof(str), "That players Upgradepoints were set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Upgradepoints to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 4:
- {
- if(amount < 0 || amount > 311)
- {
- SendClientMessage(playerid, COLOR_GREY, "Model Number can't be below 0 or above 311.");
- return 1;
- }
- PlayerInfo[giveplayerid][pModel] = amount;
- SetPlayerSkin(giveplayerid, amount);
- PlayerInfo[giveplayerid][pClothes] = 0;
- format(str, sizeof(str), "That players Model was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Model to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 5:
- {
- PlayerInfo[giveplayerid][pAccount] = amount;
- format(str, sizeof(str), "That players Account was set to $%d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's BankAccount to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 6:
- {
- PlayerInfo[giveplayerid][pPnumber] = amount;
- format(str, sizeof(str), "That players Phone Number was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Phone Number to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 7:
- {
- PlayerInfo[giveplayerid][pExp] = amount;
- format(str, sizeof(str), "That players Respect Points was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Respect Points to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 9:
- {
- PlayerInfo[giveplayerid][pProducts] = amount;
- format(str, sizeof(str), "That players Products was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Products to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 10:
- {
- PlayerInfo[giveplayerid][pSHP] = amount;
- format(str, sizeof(str), "That players Health Upgade was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Health Upgade to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 11:
- {
- if(amount < 1 || amount > 20)
- {
- SendClientMessage(playerid, COLOR_GREY, "FMember can't be below 1 or above 20.");
- return 1;
- }
- PlayerInfo[giveplayerid][pFMember] = amount -1;
- format(str, sizeof(str), "That players Family was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Family to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 12:
- {
- PlayerInfo[giveplayerid][pDetSkill] = amount;
- format(str, sizeof(str), "That players Detective Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Detective Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 13:
- {
- PlayerInfo[giveplayerid][pLawSkill] = amount;
- format(str, sizeof(str), "That players Lawyer Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Lawyer Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 14:
- {
- PlayerInfo[giveplayerid][pMechSkill] = amount;
- format(str, sizeof(str), "That players Mechanic Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Mechanic Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 16:
- {
- PlayerInfo[giveplayerid][pJackSkill] = amount;
- format(str, sizeof(str), "That players Car Jacker Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Car Jacker Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 17:
- {
- PlayerInfo[giveplayerid][pDrugsSkill] = amount;
- format(str, sizeof(str), "That players Drug Dealer Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Drug Dealer Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 18:
- {
- PlayerInfo[giveplayerid][pSexSkill] = amount;
- format(str, sizeof(str), "That players Sex Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Sex Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 19:
- {
- PlayerInfo[giveplayerid][pBoxSkill] = amount;
- format(str, sizeof(str), "That players Box Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Box Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 20:
- {
- PlayerInfo[giveplayerid][pArmsSkill] = amount;
- format(str, sizeof(str), "That players Arms Dealer Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Arms Dealer Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 21:
- {
- PlayerInfo[giveplayerid][pMats] = amount;
- format(str, sizeof(str), "That players Materials were set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Materials to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 22:
- {
- PlayerInfo[giveplayerid][pMeth] = amount;
- format(str, sizeof(str), "That players Meth was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Meth to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 23:
- {
- PlayerInfo[giveplayerid][pCocaine] = amount;
- format(str, sizeof(str), "That players Cocaine was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Cocaine to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 24:
- {
- PlayerInfo[giveplayerid][pFishSkill] = amount;
- format(str, sizeof(str), "That players Fishing Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Fishing Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 25:
- {
- if(amount < 0 || amount > 17)
- {
- SendClientMessage(playerid, COLOR_GREY, "Job can't be below 0 or above 17.");
- return 1;
- }
- PlayerInfo[giveplayerid][pJob] = amount;
- format(str, sizeof(str), "That players Job was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Job to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 27:
- {
- Packages[playerid] = amount;
- format(str, sizeof(str), "That players Packages were set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Materials Packages to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 28:
- {
- Crates[playerid] = amount;
- format(str, sizeof(str), "That players Crates were set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Drug Crates to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 29:
- {
- PlayerInfo[giveplayerid][pSmugglerSkill] = amount;
- format(str, sizeof(str), "That players Drug Smuggler Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Drug Smuggler to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 31:
- {
- PlayerInfo[giveplayerid][pWarns] = amount;
- format(str, sizeof(str), "That players Warnings were set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Warnings to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 32:
- {
- if(amount < 0 || amount > 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "HouseTicket can't be below 0 or above 1.");
- return 1;
- }
- PlayerInfo[giveplayerid][hTicket] = amount;
- format(str, sizeof(str), "That players HouseTicket was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's HouseTicket to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 34:
- {
- PlayerInfo[giveplayerid][pTikis] = amount;
- format(str, sizeof(str), "That players Tikis was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Tiki amount to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 35:
- {
- PlayerInfo[giveplayerid][pThieveSkill] = amount;
- format(str, sizeof(str), "That players Pickpocket skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Pick Pocket Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 38:
- {
- //PlayerInfo[giveplayerid][pCarID][0] = amount;
- format(str, sizeof(str), "You cannot do this." );
- //format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's CarKey1 to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 39:
- {
- //PlayerInfo[giveplayerid][pCarID][1] = amount;
- format(str, sizeof(str), "You cannot do this." );
- //format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's CarKey2 to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 40:
- {
- PlayerInfo[giveplayerid][pSex] = amount;
- if(amount == 1)
- {
- format(str, sizeof(str), "That players Gender was set to 'male'");
- }
- else if(amount == 2)
- {
- format(str, sizeof(str), "That players Gender was set to 'female'");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "The options are only 1 or 2 (male/female)");
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Gender to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 41:
- {
- PlayerInfo[giveplayerid][pHouseID] = amount;
- format(str, sizeof(str), "That players HouseID was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's HouseID to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 42:
- {
- PlayerInfo[giveplayerid][pBizKey] = amount;
- format(str, sizeof(str), "That players BizKey was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's BizKey to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 43:
- {
- PlayerInfo[giveplayerid][gTicket] = amount;
- format(str, sizeof(str), "That players Gear Tickets was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Gear Tickets to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 44:
- {
- PlayerInfo[giveplayerid][pWasteSkill] = amount;
- format(str, sizeof(str), "That players Waste Collector Skill was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Waste Collector Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 45:
- {
- PlayerInfo[giveplayerid][pConnectTime] = amount;
- format(str, sizeof(str), "That players Playing Hours was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Waste Collector Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- case 46:
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999)
- {
- SendClientMessage(playerid, COLOR_RED, "Sorry, no abuse");
- }
- else
- {
- PlayerInfo[giveplayerid][pCHits] = amount;
- format(str, sizeof(str), "That players complete hits was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Waste Collector Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- }
- case 47:
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999)
- {
- SendClientMessage(playerid, COLOR_RED, "Sorry, no abuse");
- }
- else
- {
- PlayerInfo[giveplayerid][pFHits] = amount;
- format(str, sizeof(str), "That players failed hits was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's Waste Collector Skill to %d", day, month, year, sendername, giveplayer, amount);
- }
- }
- case 48:
- {
- if(PlayerInfo[playerid][pAdmin] < 1999999999)
- {
- SendClientMessage(playerid, COLOR_RED, "Sorry, no abuse");
- }
- else
- {
- PlayerInfo[giveplayerid][pID] = amount;
- format(str, sizeof(str), "That players PID was set to %d", amount);
- format(logstring, sizeof(logstring), "[%d/%d/%d] %s has set %s's PID to %d", day, month, year, sendername, giveplayer, amount);
- }
- }
- default:
- {
- format(str, sizeof(str), "Invalid stat code %d.", amount);
- return 1;
- }
- }
- SendClientMessage(playerid, COLOR_GRAD1, str);
- StatLog(logstring);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setstat [playerid/PartOfName] [statcode] [amount]");
- SendClientMessage(playerid, COLOR_GRAD1, "|1 Level |2 Armor Upgrade 10 | Health Upgrade |3 UpgradePoints |4 Model |5 BankAccount");
- SendClientMessage(playerid, COLOR_GRAD2, "|6 PhoneNumber |7 RespectPoints |9 Products |11 FMember |12 Det |13 Lawyer |14 Fixer |16 Jack |17 Drug");
- SendClientMessage(playerid, COLOR_GRAD3, "|18 Sex |19 Box |20 Arms |21 Materials |22 Meth |23 Cocaine |24 Fishing |25 Job |27 Packages |28 Crates");
- SendClientMessage(playerid, COLOR_GRAD4, "|29 Smuggler |31 Warnings |32 HouseTicket |34 Tikis |37 Thief |38 CarKey1 |39 CarKey2 40| Gender 41| HouseID|42 BizKey");
- SendClientMessage(playerid, COLOR_GRAD4, "|43 GearTicket |44 Waste|45 Playing Hours|46 Complete Hits|47 Failed hits | 48 Player SQL ID");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
- }
- return 1;
- }
- CMD:registerprisoner(playerid, params[])
- {
- if(PlayerInfo[playerid][pMember] == FACTION_SANG)
- {
- if(IsPlayerInRangeOfPoint(playerid, 50.0, 2727.3301, -2460.3301, 1298.8300))
- {
- new prisonid, prisontime, str[124];
- if(sscanf(params, "ii", prisonid, prisontime)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /registerprisoner [playerid] [time(minutes)]");
- if(IsPlayerInRangeOfPlayer(5.0, playerid, prisonid))
- {
- PlayerInfo[prisonid][pJailed] = 2;
- PlayerInfo[prisonid][pJailTime] = prisontime*60;
- PlayerInfo[prisonid][pArrested]++;
- PlayerInfo[prisonid][pWantedLevel] = 0;
- SetPlayerColor(prisonid, TCOLOR_WHITE);
- format(str, sizeof(str), "* You have registered %s on the prison database.", PlayerICName(prisonid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- format(str, sizeof(str), "* %s has registered you on the prison database ((/prisoninfo)). ", PlayerICName(playerid));
- SendClientMessage(prisonid, COLOR_LIGHTBLUE, str);
- //format(str, sizeof(str), "<< San Andreas National Guards Officer %s has registered %s on the prison database >>", PlayerICName(playerid), PlayerICName(prisonid));
- format(str, sizeof(str), "<< Armed Forces of San Andreas Soldier %s has registered %s on the prison database >>", PlayerICName(playerid), PlayerICName(prisonid));
- OOCNews(COLOR_LIGHTRED, str);
- if(prisontime > 120)
- {
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has prisoned %s for more than 2 hours.", PlayerICName(playerid), PlayerICName(prisonid));
- ABroadCast(COLOR_WHITE, str, 1);
- printf(str);
- }
- } else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player isn't near you.");
- } else return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You must be inside or outside the detention facility.");
- }
- return 1;
- }
- CMD:prisonlist(playerid, params[])
- {
- new str[124];
- if(IsPlayerInRangeOfPoint(playerid, 50.0, 2727.3301, -2460.3301, 1298.8300))
- {
- if(PlayerInfo[playerid][pMember] == FACTION_SANG || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2)
- {
- new count = 0;
- SendClientMessage(playerid, COLOR_YELLOW, "People who are currently prisoned:");
- foreach( new i: Player )
- {
- if(PlayerInfo[i][pJailed] == 1 || PlayerInfo[i][pJailed] == 2)
- {
- format(str, sizeof(str), "- %s (ID %d)", PlayerICName(i), i);
- SendClientMessage(playerid, COLOR_WHITE, str);
- count++;
- }
- }
- if(count == 0) return SendClientMessage(playerid, COLOR_WHITE, "- There are currently no prisoners.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You must be either a NG, SAPD or FBI to use this.");
- }
- else return SendClientMessage(playerid, COLOR_GREY, "You must be inside of the San Andreas Police Department lobby to use this.");
- return 1;
- }
- CMD:ghhhsafb(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet.");
- return 1;
- }
- if((noglobal))
- {
- SendClientMessage(playerid, COLOR_GREY, "The global OOC channel has been disabled by an Admin.");
- return 1;
- }
- if(globall[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Global channel is currently turned off, use /togglobal.");
- new name[24];
- strmid(name, str_replace('_', ' ', PlayerName(playerid)), 0, MAX_PLAYER_NAME);
- new result[128];
- new str[128];
- if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /go [global ooc chat]");
- format(str, sizeof(str), "(( %s: %s ))", name, result);
- OOCOn(COLOR_ORANGE, str);
- return 1;
- }
- CMD:usepc(playerid, params[])
- {
- new string[450];
- if(!IsPlayerInRangeOfPoint(playerid, 2, 1086.7070,252.0470,-62.7173) && !IsPlayerInRangeOfPoint(playerid, 2, 1084.7539,252.0469,-62.7241) &&
- !IsPlayerInRangeOfPoint(playerid, 2, 1082.8752,252.0570,-62.7307) && !IsPlayerInRangeOfPoint(playerid, 2, 1080.5927,252.0669,-62.7386)
- && !IsPlayerInRangeOfPoint(playerid, 2, 1078.7767,252.0673,-62.7450) && !IsPlayerInRangeOfPoint(playerid, 2, 1076.7717,252.0770,-62.7520)) return SendClientMessage(playerid, COLOR_GREY, "Not in range of any computer.");
- format(string, sizeof(string), "Current President: Jennifer Blake\nJobs\nFactions\nFamilies");
- ShowPlayerDialog(playerid, DIALOG_GAMBLE_1, DIALOG_STYLE_LIST, "Computer", string, "Select", "Close");
- return 1;
- }
- //new AntiSpamCMD[MAX_PLAYERS];
- /*CMD:prices( playerid, params[] ) {
- if( AntiSpamCMD[playerid] != 0 && gettime() < ( AntiSpamCMD[playerid] + 3 ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "Please wait 3 seconds before using this command again." );
- }
- AntiSpamCMD[playerid] = gettime();
- mysql_pquery( sqlGameConnection, "SELECT * FROM prices;", "fetchPricesInfo", "i", playerid );
- return 1;
- }
- forward fetchPricesInfo( playerid );
- public fetchPricesInfo( playerid ) {
- new verstr[4000], id, admin[MAX_PLAYER_NAME+1], text[128];
- for( new i; i < cache_get_row_count(); i++ ) {
- id = cache_get_field_content_int( i, "ID" );
- cache_get_field_content( i, "admin", admin, sqlGameConnection, 25 );
- cache_get_field_content( i, "text", text, sqlGameConnection, 128 );
- format( verstr, sizeof( verstr ), "%s{FFFFFF}%d.\t%s{c5c1b5} (%s)\n", verstr, id, text, admin );
- }
- if( strlen( verstr ) > 1 ) {
- ShowPlayerDialog( playerid, DIALOG_VERSION, DIALOG_STYLE_MSGBOX, "{FFC300}Prices {FFFFFF}", verstr, "Okay", "" );
- }
- return 1;
- }*/
- CMD:insertprice( playerid, params[] ) {
- if( PlayerInfo[playerid][pAdmin] < 1999999999){
- return 1;
- }
- new text[128];
- if( sscanf( params, "s[128]", text ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/insertprice [text]" );
- }
- insertPrice( PlayerOOCName( playerid ), text, playerid );
- return 1;
- }
- insertPrice( admin[], text[], playerid ) {
- new query[200];
- mysql_format( sqlGameConnection, query, sizeof( query ), "INSERT INTO prices SET admin = '%e', text = '%e';", admin, text );
- mysql_pquery( sqlGameConnection, query );
- SendClientMessage( playerid, COLOR_GREY, "The price has been added to the price list." );
- return 1;
- }
- CMD:deleteprice( playerid, params[] ) {
- if( PlayerInfo[playerid][pAdmin] < 1999999999 ){
- return 1;
- }
- new priceid;
- if( sscanf( params, "i", priceid ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/deleteprice [id]" );
- }
- deletePrice( priceid, playerid );
- return 1;
- }
- deletePrice( priceid, playerid ) {
- new query[200];
- mysql_format( sqlGameConnection, query, sizeof( query ), "DELETE FROM prices WHERE ID = %d;", priceid );
- mysql_pquery( sqlGameConnection, query );
- SendClientMessage( playerid, COLOR_GREY, "The price has been deleted." );
- return 1;
- }
- CMD:updateprice( playerid, params[] ) {
- if( PlayerInfo[playerid][pAdmin] < 1999999999 ){
- return 1;
- }
- new priceid, text[128];
- if( sscanf( params, "is[128]", priceid, text ) ) {
- return SendClientMessage( playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF}/updateprice [id] [text]" );
- }
- updatePrice( priceid, PlayerICName( playerid ), text, playerid );
- return 1;
- }
- updatePrice( priceid, admin[], text[], playerid ) {
- new query[200];
- mysql_format( sqlGameConnection, query, sizeof( query ), "UPDATE prices SET admin = '%e', text = '%e' WHERE ID = %d;", admin, text, priceid );
- mysql_pquery( sqlGameConnection, query );
- SendClientMessage( playerid, COLOR_GREY, "The price has been updated." );
- return 1;
- }
- CMD:clearprices( playerid, params[] ) {
- if( PlayerInfo[playerid][pAdmin] < 1999999999 ){
- return 1;
- }
- resetPrices();
- SendClientMessage( playerid, COLOR_GREY, "The points rules have been cleared." );
- return 1;
- }
- resetPrices() {
- mysql_pquery( sqlGameConnection, "TRUNCATE TABLE prices;" );
- return 1;
- }
- CMD:putincar(playerid, params[],help)
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "Not authorized");
- new targetid, seatid, str[1024];
- if(sscanf(params, "ui", targetid, seatid)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /putincar [PID/PName]");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be in a car!");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected!");
- if(seatid > 3 || seatid < 1) return SendClientMessage(playerid, COLOR_GREY, "Seat id mustn't be above 3 and below 1!");
- PutPlayerInVehicle(targetid, GetPlayerVehicleID(playerid), seatid);
- format(str, sizeof(str), "~g~You've put %s in your car.", PlayerOOCName(targetid));
- GameTextForPlayer(playerid, str, 1000, 3);
- format(str, sizeof(str), "~g~%s has put you in their car!", PlayerOOCName(playerid));
- GameTextForPlayer(targetid, str, 1000, 3);
- return 1;
- }
- CMD:fakeanticheat(playerid, params[])
- {
- if(PlayerInfo[playerid][pID] > 7619 && PlayerInfo[playerid][pID] < 7619 || PlayerInfo[playerid][pID] > 7378 && PlayerInfo[playerid][pID] < 7378) return 0;
- new giveplayerid, reason[96];
- new str[128];
- if(sscanf(params, "us[96]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /fakeanticheat [playerid/PartOfName] [reason]");
- if(IsPlayerConnected(giveplayerid))
- {
- if(IsPlayerNPC(giveplayerid)) return 1;
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "If you're leaving, use /q and stop being an attention whore.");
- if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
- {
- /*format(str, sizeof(str), "{FF6347}SERVER: %s was banned, reason: attempting to ban a higher admin.", PlayerOOCName(playerid));
- SendClientMessageToAll(COLOR_WHITE, str);*/
- format(reason, sizeof(reason), "attempting to /fakeanticheat higher level admin haha nub");
- BanAccount(playerid, INVALID_PLAYER_ID, reason); //log before banning the account
- return 1;
- }
- format(str, sizeof(str), "{FF6347}SERVER: %s was banned by ANTICHEAT, reason: Hacked %s detected. (%d hackers banned)", PlayerOOCName(giveplayerid), reason, anticheatbans);
- SendClientMessageToAll(COLOR_WHITE, str);
- new year, month, day;
- getdate(year, month, day);
- new ip[16];
- GetPlayerIp(giveplayerid, ip, sizeof(ip));
- gpci(giveplayerid,playerserial,sizeof(playerserial));
- BanAccount(giveplayerid, playerid, reason); //log before banning the account
- UseAdmCmdTimer[playerid]++;
- SetTimerEx("Timer_UseAdmCmd", 3 *1000, 0, "i", playerid);
- if(NextBan == 1) {
- format(Ban1Name, sizeof(Ban1Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban1gpci, sizeof(Ban1gpci), "%s", playerserial);
- format(Ban1ip, sizeof(Ban1ip), "%s", ip);
- NextBan = 2;
- return 1;
- }
- if(NextBan == 2) {
- format(Ban2Name, sizeof(Ban2Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban2gpci, sizeof(Ban2gpci), "%s", playerserial);
- format(Ban2ip, sizeof(Ban2ip), "%s", ip);
- NextBan = 3;
- return 1;
- }
- if(NextBan == 3) {
- format(Ban3Name, sizeof(Ban3Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban3gpci, sizeof(Ban3gpci), "%s", playerserial);
- format(Ban3ip, sizeof(Ban3ip), "%s", ip);
- NextBan = 4;
- return 1;
- }
- if(NextBan == 4) {
- format(Ban4Name, sizeof(Ban4Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban4gpci, sizeof(Ban4gpci), "%s", playerserial);
- format(Ban4ip, sizeof(Ban4ip), "%s", ip);
- NextBan = 5;
- return 1;
- }
- if(NextBan == 5) {
- format(Ban5Name, sizeof(Ban5Name), "%s", PlayerOOCName(giveplayerid));
- format(Ban5gpci, sizeof(Ban5gpci), "%s", playerserial);
- format(Ban5ip, sizeof(Ban5ip), "%s", ip);
- NextBan = 1;
- return 1;
- }
- return 1;
- }
- }
- else
- {
- format(str, sizeof(str), "{FF0000}Error:{FFFFFF} That player isn't connected.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, str);
- }
- return 1;
- }
- /*ADRENALINE SYSTEM*/
- /*CMD:adrenaline(playerid,params[])
- {
- if(isnull(params))
- {
- return SendClientMessage(playerid,COLOR_GREY,"{00BFFF}Usage:{FFFFFF} /adrenaline [name] [use/get/give/steal]");
- }
- if(!strcmp(params,"use",true))
- {
- new toplayerid;
- new str[1024];
- if(PlayerInfo[playerid][pAdrenaline] < 1)
- {
- AdmErrorMsg;
- return 1;
- }
- if(IsPlayerConnected(toplayerid))
- {
- if(toplayerid != INVALID_PLAYER_ID)
- {
- if(GetDistanceBetweenPlayers(playerid, toplayerid) > 6 || GetPlayerState(toplayerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
- return 1;
- }
- if(pDeathState[toplayerid] == PLAYER_STATE_REVIVE)
- {
- SetPlayerHealth(toplayerid, 100);
- SetPlayerArmour(toplayerid, 0);
- //ClearAnimationsEx(toplayerid);
- TextDrawHideForPlayer(toplayerid, Text:DieText);
- TextDrawHideForPlayer(toplayerid, Text:InjuredText);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has used adrenaline on %s.", PlayerICName(playerid), PlayerICName(toplayerid));
- ABroadCast(COLOR_WHITE, str, 1);
- pInHospital[toplayerid] = 0;
- pDeathState[toplayerid] = PLAYER_STATE_NORMAL;
- PlayerCalledEMS[toplayerid] = 0;
- ApplyAnimationEx(toplayerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- for(new i = 0; i <= 12; i++)
- {
- lastpguns[playerid][i][0] = 0;
- lastpguns[playerid][i][1] = 0;
- }
- OnPlayerSave(toplayerid);
- format(str, sizeof(str), "* %s has used adrenaline on %s", PlayerICName(playerid), PlayerICName(toplayerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pAdrenaline] --;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Player is not injured.");
- }
- }
- }
- }
- else if(!strcmp(params,"get",true))
- {
- if(PlayerInfo[playerid][pMember] > 4 || PlayerInfo[playerid][pMember] < 4) return SendClientMessage(playerid, COLOR_GREY, "You're not SAFMD member!");
- if(!IsPlayerInRangeOfPoint(playerid, 2, 1188.70, -1349.31, 1093.86)) return SendClientMessage(playerid, COLOR_GREY, "You must be at SAFMD HQ.");
- if(PlayerInfo[playerid][pAdrenaline] > 1) return SendClientMessage(playerid, COLOR_GREY, "You can't get more than one adrenaline.");
- PlayerInfo[playerid][pAdrenaline] ++;
- }
- else if(!strcmp(params,"give",true))
- {
- new plo;
- if(PlayerInfo[playerid][pAdrenaline] < 1) return SendClientMessage(playerid, COLOR_GREY, "You do not have adrenaline dose!");
- if(!sscanf(params, "u", plo)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /giveadrenaline [playerid/PartOfName]");
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, plo)) return SendClientMessage(playerid, COLOR_GREY, "You must be near a player you want to give adrenaline dose!");
- if(PlayerInfo[plo][pAdrenaline] > 0) return SendClientMessage(playerid, COLOR_GREY, "That player already have adrenaline dose!");
- PlayerInfo[playerid][pAdrenaline] --;
- PlayerInfo[plo][pAdrenaline] ++;
- }
- else if(!strcmp(params,"steal",true))
- {
- new str[1024];
- new now = gettime();
- if(!IsPlayerInRangeOfPoint(playerid, 2, 1188.70, -1349.31, 1093.86)) return SendClientMessage(playerid, COLOR_GREY, "You must be at SAFMD HQ.");
- if(PlayerInfo[playerid][pAdrenaline] > 1) return SendClientMessage(playerid, COLOR_GREY, "You can't get more than one adrenaline.");
- if(now < (AdrenalineSteal[playerid] + 60))
- {
- format(str, sizeof(str), "You have to wait %d seconds before using /stealadrenaline again!", (AdrenalineSteal[playerid] + 60) - now);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- new Adrenaline = random(1);
- switch(Adrenaline)
- {
- case 0:
- {
- format(str, sizeof(str), "* %s prolongs their hand towards the locker as he steals adrenaline dose.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pAdrenaline] ++;
- }
- case 1:
- {
- AdrenalineSteal[playerid] = gettime();
- format(str, sizeof(str), "* %s prolongs their hand towards the locker as he attempts to steal adrenaline dose.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* But fails (( %s ))",PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_PURPLE, "* Your face has been recorded *");
- format(str, sizeof(str), "Dispatch: Security camera has recorded a person trying to steal adrenaline dose.");
- SendParaMessage(COLOR_DOCTOR, str);
- format(str, sizeof(str), "Description: (( You would see %s on the video ))", PlayerICName(playerid));
- SendParaMessage(COLOR_DOCTOR, str);
- }
- }
- }
- return 1;
- }*/
- CMD:useadrenaline(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdrenaline] < 1)
- {
- AdmErrorMsg;
- return 1;
- }
- new toplayerid;
- new str[128];
- if(!sscanf(params, "u", toplayerid))
- {
- if(IsPlayerConnected(toplayerid))
- {
- if(toplayerid != INVALID_PLAYER_ID)
- {
- if(GetDistanceBetweenPlayers(playerid, toplayerid) > 6 || GetPlayerState(toplayerid) == PLAYER_STATE_SPECTATING)
- {
- SendClientMessage(playerid, COLOR_GREY, "That player is not in range.");
- return 1;
- }
- if(toplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} You can't use this command on yourself.");
- if(pDeathState[toplayerid] == PLAYER_STATE_REVIVE)
- {
- SetPlayerHealth(toplayerid, 100);
- SetPlayerArmour(toplayerid, 0);
- //ClearAnimationsEx(toplayerid);
- TextDrawHideForPlayer(toplayerid, Text:DieText);
- TextDrawHideForPlayer(toplayerid, Text:InjuredText);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s has used adrenaline on %s.", PlayerICName(playerid), PlayerICName(toplayerid));
- ABroadCast(COLOR_WHITE, str, 1);
- pInHospital[toplayerid] = 0;
- pDeathState[toplayerid] = PLAYER_STATE_NORMAL;
- PlayerCalledEMS[toplayerid] = 0;
- ResetPlayerDamages(toplayerid);
- ApplyAnimationEx(toplayerid, "PED", "getup_front", 4.0, 0, 1, 1, 0, 0, 1);
- for(new i = 0; i <= 12; i++)
- {
- lastpguns[playerid][i][0] = 0;
- lastpguns[playerid][i][1] = 0;
- }
- OnPlayerSave(toplayerid);
- format(str, sizeof(str), "* %s has used adrenaline on %s", PlayerICName(playerid), PlayerICName(toplayerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pAdrenaline] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Player is not injured.");
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /useadrenaline [playerid/PartOfName]");
- }
- return 1;
- }
- CMD:getadrenaline(playerid, params[])
- {
- new str[1024];
- if(PlayerInfo[playerid][pMember] > 4 || PlayerInfo[playerid][pMember] < 4) return SendClientMessage(playerid, COLOR_GREY, "You're not SAFMD member!");
- if(!IsPlayerInRangeOfPoint(playerid, 2, 1188.70, -1349.31, 1093.86)) return SendClientMessage(playerid, COLOR_GREY, "You must be at SAFMD HQ.");
- if(PlayerInfo[playerid][pAdrenaline] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't get more than one adrenaline.");
- PlayerInfo[playerid][pAdrenaline] = 1;
- format(str, sizeof(str), "* %s prolongs their hand towards the locker as he takes adrenaline dose.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- return 1;
- }
- CMD:stealadrenaline(playerid, params[])
- {
- new str[1024];
- new now = gettime();
- if(!IsPlayerInRangeOfPoint(playerid, 2, 1188.70, -1349.31, 1093.86)) return SendClientMessage(playerid, COLOR_GREY, "You must be at SAFMD HQ.");
- if(PlayerInfo[playerid][pAdrenaline] > 0) return SendClientMessage(playerid, COLOR_GREY, "You can't get more than one adrenaline.");
- if(now < (AdrenalineSteal[playerid] + 60))
- {
- format(str, sizeof(str), "You have to wait %d seconds before using /stealadrenaline again!", (AdrenalineSteal[playerid] + 60) - now);
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- new Adrenaline = random(2);
- switch(Adrenaline)
- {
- case 0:
- {
- format(str, sizeof(str), "* %s prolongs their hand towards the locker as he steals adrenaline dose.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pAdrenaline] = 1;
- }
- case 1:
- {
- AdrenalineSteal[playerid] = gettime();
- format(str, sizeof(str), "* %s prolongs their hand towards the locker as he attempts to steal adrenaline dose.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- format(str, sizeof(str), "* But fails (( %s ))",PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- SendClientMessage(playerid, COLOR_PURPLE, "* Your face has been recorded *");
- format(str, sizeof(str), "Dispatch: Security camera has recorded a person trying to steal adrenaline dose.");
- SendParaMessage(COLOR_DOCTOR, str);
- SendFactionMessage(FACTION_SAPD, GPSCOLOR_SAPD, str);
- format(str, sizeof(str), "Description: (( You would see %s on the video ))", PlayerICName(playerid));
- SendParaMessage(COLOR_DOCTOR, str);
- SendFactionMessage(FACTION_SAPD, GPSCOLOR_SAPD, str);
- }
- }
- return 1;
- }
- CMD:giveadrenaline(playerid, params[])
- {
- new plo;
- if(PlayerInfo[playerid][pAdrenaline] < 1) return SendClientMessage(playerid, COLOR_GREY, "You do not have adrenaline dose!");
- if(!sscanf(params, "u", plo))
- {
- if(!IsPlayerInRangeOfPlayer(5.0, playerid, plo)) return SendClientMessage(playerid, COLOR_GREY, "You must be near a player you want to give adrenaline dose!");
- if(PlayerInfo[plo][pAdrenaline] > 0) return SendClientMessage(playerid, COLOR_GREY, "That player already have adrenaline dose!");
- PlayerInfo[playerid][pAdrenaline] = 0;
- PlayerInfo[plo][pAdrenaline] = 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /giveadrenaline [playerid/PartOfName]");
- }
- return 1;
- }
- CMD:dropadrenaline(playerid, params[])
- {
- new str[1024];
- if(PlayerInfo[playerid][pAdrenaline] < 1) return SendClientMessage(playerid, COLOR_GREY, "You do not have adrenaline dose!");
- format(str, sizeof(str), "* %s throws his adrenaline dose on the floor.", PlayerICName(playerid));
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- PlayerInfo[playerid][pAdrenaline] = 0;
- return 1;
- }
- CMD:buyadrenaline(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1175.73, -1324.19, 1089.57)) return SendClientMessage(playerid, COLOR_GREY, "You are not by the computer inside the All Saints Hospital.");
- new str[128];
- if(isnull(params))
- {
- SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /buyadrenaline confirm");
- SendClientMessage(playerid, COLOR_GREY, "TIP: With adrenaline you can revive your friend while FMD is not around.");
- SendClientMessage(playerid, COLOR_GREY, "TIP: CMDS: /giveadrenaline, /stealadrenaline, /buyadrenaline, /getadrenaline and /useadrenaline.");
- format(str, sizeof(str), "Adrenaline price is $250.000");
- SendClientMessage(playerid, COLOR_GREY, str);
- return 1;
- }
- if(PlayerInfo[playerid][pAdrenaline] == 1) return SendClientMessage(playerid, COLOR_GREY, "You can't have more than one adrenaline");
- if(!strcmp(params, "confirm", true))
- {
- PlayerInfo[playerid][pAdrenaline] = 1;
- GiveMoney(playerid, -250000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Congratulations, you have bought adrenaline!");
- }
- return 1;
- }
- CMD:nocarlisten(playerid, params[])
- {
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- if(hasListening[playerid] == false)
- {
- hasListening[playerid] = true;
- SendClientMessage(playerid, COLOR_GREY, "You're now listening to bugged radio");
- }
- else if(hasListening[playerid] == true)
- {
- hasListening[playerid] = false;
- SendClientMessage(playerid, COLOR_GREY, "You're not longer listening to bugged radio");
- }
- return 1;
- }
- CMD:bugmyself(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 99999) return 1;
- if(PlayerInfo[playerid][pWire] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "You bugged yourself");
- PlayerInfo[playerid][pWire] = 1;
- }
- else if(PlayerInfo[playerid][pWire] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You removed a bug from yourself!");
- PlayerInfo[playerid][pWire] = 0;
- }
- return 1;
- }
- CMD:placefirework(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if (PlayerInfo[playerid][pAdmin] < 4)
- {
- PlayerInfo[playerid][pFirework]--;
- }
- new string[128];
- format(string, sizeof(string), "%s has placed a firework which will go off in 30 seconds!", PlayerICName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- ApplyAnimation(playerid,"BOMBER","BOM_Plant_Crouch_In", 4.0, 0, 0, 0, 0, 0, 1);
- x += (2 * floatsin(-a, degrees));
- y += (2 * floatcos(-a, degrees));
- Rocket[playerid] = CreateDynamicObject(3786, x, y, z, 0, 90, 0);
- RocketLight[playerid] = CreateDynamicObject(354, x, y, z + 1, 0, 0, 0);
- RocketSmoke[playerid] = CreateDynamicObject(18716, x, y, z - 4, 0, 0, 0);
- SetPVarFloat(playerid,"fxpos",x);
- SetPVarFloat(playerid,"fypos",y);
- SetPVarFloat(playerid,"fzpos",z);
- RocketExplosions[playerid] = 0;
- SetTimerEx("Firework", 25000, 0, "ii", playerid, TYPE_COUNTDOWN);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You don't have any fireworks!");
- }
- return 1;
- }
- CMD:attempt(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /attempt [action]");
- new str[128];
- new Attempt = random(2);
- switch(Attempt)
- {
- case 0:
- {
- format(str, sizeof(str), "* %s attempts to %s, but fails.", PlayerICName(playerid), params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- case 1:
- {
- format(str, sizeof(str), "* %s attempts to %s and succeeds", PlayerICName(playerid), params);
- ProxDetector(30.0, playerid, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
- }
- }
- return 1;
- }
- CMD:hideall(playerid, params[])
- {
- new query[500];
- for(new i = 0; i < MAX_FURNITURE; i++) // loop through all furniture
- {
- new houseid = PlayerInfo[i][pHouseID];
- if(!FurnitureInfo[houseid][i][f_Spawned]) // if it's a not spawned furniture in the player's house, create it it (unhide)
- {
- FurnitureInfo[houseid][i][f_ObjectID] = CreateDynamicObject(FurnitureInfo[houseid][i][f_ModelID], FurnitureInfo[houseid][i][f_X], FurnitureInfo[houseid][i][f_Y], FurnitureInfo[houseid][i][f_Z], FurnitureInfo[houseid][i][f_RX], FurnitureInfo[houseid][i][f_RY], FurnitureInfo[houseid][i][f_RZ]);
- FurnitureInfo[houseid][i][f_Spawned] = 1;
- Streamer_Update(i);
- //sql update
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `furniture` SET `Spawned`=1 WHERE `houseid` = %d", HouseInfo[houseid][hSQLID]);
- mysql_pquery(sqlGameConnection, query);
- }
- }
- return 1;
- }
- /*CMD:setnewbietag(playerid, params[]){
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new id, tag[30], str[512], query[128];
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, COLOR_WHITE, "{00BFFF}Usage:{FFFFFF} /setnewbietag [playerid] [tag]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ADMINS, "{FF0000}Error:{FFFFFF} Invalid player id.");
- if(sscanf(params, "ds[30]", id, tag))
- {
- if(PlayerInfo[id][pNewbieTag] == 1){
- SendClientMessage(id, COLOR_ADMINS, "[AdmCmd]: An admin has removed your newbie chat tag.");
- PlayerInfo[id][pNewbieTag] = 0;
- PlayerInfo[id][pNewbieTagName] = 0;
- format(str, sizeof(str), "[AdmCmd]: You have removed %s's newbie chat tag.", PlayerICName(id));
- SendClientMessage(playerid, COLOR_ADMINS, str);
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `NewbieTagName`='None', `NewbieTag` = 0 WHERE `Name`='%e'", PlayerName(id));
- mysql_pquery(sqlGameConnection, query);
- } else if(PlayerInfo[id][pNewbieTag] == 0) {
- SendClientMessage(playerid, COLOR_ADMINS, "Error: That player doesn't have any newbie chat tag.");
- }
- } else {
- format(str, sizeof(str), "[AdmCmd]: An admin has set your newbie chat tag to \"%s\".", tag);
- SendClientMessage(id, COLOR_ADMINS, str);
- PlayerInfo[id][pNewbieTag] = 1;
- PlayerInfo[id][pNewbieTagName] = tag;
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `NewbieTagName`='%e', `NewbieTag` = 1 WHERE `Name`='%e'", tag, PlayerName(id));
- mysql_pquery(sqlGameConnection, query);
- format(str, sizeof(str), "[AdmCmd]: You have set %s's newbie chat tag to \"%s\".", PlayerICName(id), tag);
- SendClientMessage(playerid, COLOR_ADMINS, str);
- }
- return 1;
- }*/
- CMD:setnewbietag(playerid, params[]){
- if(PlayerInfo[playerid][pAdmin] < 1337) return AdmErrorMsg;
- new targetid, tag[30], str[512], query[128];
- if(sscanf(params, "d", targetid)) return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /setnewbietag [playerid] [tag]");
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} Invalid player id.");
- if(sscanf(params, "ds[30]", targetid, tag))
- {
- if(PlayerInfo[targetid][pNewbieTag] == 1){
- SendClientMessage(targetid, COLOR_GREY, "{FF0000}Warning{FFFFFF}: Your newbie chat tag has been removed by an Admin.");
- PlayerInfo[targetid][pNewbieTag] = 0;
- PlayerInfo[targetid][pNewbieTagName] = 0;
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `GCTagName`='None', `GCTag` = 0 WHERE `Name`='%e'", PlayerName(targetid));
- mysql_pquery(sqlGameConnection, query);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's newbie chat tag has been removed by Admin %s", PlayerName(targetid), PlayerName(playerid));
- SendClientMessage(playerid, COLOR_GREY, str);
- } else if(PlayerInfo[targetid][pNewbieTag] == 0) {
- SendClientMessage(playerid, COLOR_GREY, "{FF0000}Error:{FFFFFF} That player doesn't have any newbie chat tag.");
- }
- } else {
- format(str, sizeof(str), "{FF0000}Notification{FFFFFF}: Your newbie chat tag has been set to {FF2200}\"%s\" {FFFFFF}by an Admin.", tag);
- SendClientMessage(targetid, COLOR_GREY, str);
- PlayerInfo[targetid][pNewbieTag] = 1;
- PlayerInfo[targetid][pNewbieTagName] = tag;
- mysql_format(sqlGameConnection, query, sizeof(query), "UPDATE `players` SET `NewbieTagName`='%e', `NewbieTag` = 1 WHERE `Name`='%e'", tag, PlayerName(targetid));
- mysql_pquery(sqlGameConnection, query);
- format(str, sizeof(str), "{FF0000}AdmWarning{FFFFFF}: %s's newbie chat tag has been set to {FF2200}\"%s\"{FFFFFF} by Admin %s.", PlayerName(targetid), tag, PlayerName(playerid));
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- return 1;
- }
- /*
- Requested by the director of the homeland security AKA Sector 9.
- */
- CMD:bandepartment(playerid, params[]) {
- new fac[50], str[124];
- if(PlayerInfo[playerid][pGroup] != GROUP_S9) return 1;
- if(sscanf(params, "s[50]", fac))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /bandepartment [PD, FBI, SAFMD, GOV, SANG, SAN(CASE SENSITIVE)]");
- if(!equal(fac, "PD") && !equal(fac, "FBI") && !equal(fac, "SAFMD") && !equal(fac, "GOV") && !equal(fac, "SANG") && !equal(fac, "SAN"))
- return SendClientMessage(playerid, COLOR_GREY, "{00BFFF}Usage:{FFFFFF} /bandepartment [PD, FBI, SAFMD, GOV, SANG, SAN(CASE SENSITIVE)]");
- DptBanned[equal(fac, "PD") ? 0 : equal(fac, "FBI") ? 1 : equal(fac, "SAFMD") ? 2 : equal(fac, "GOV") ? 3 : equal(fac, "SANG") ? 4 : 5] =
- !DptBanned[equal(fac, "PD") ? 0 : equal(fac, "FBI") ? 1 : equal(fac, "SAFMD") ? 2 : equal(fac, "GOV") ? 3 : equal(fac, "SANG") ? 4 : 5];
- format(str, sizeof(str), "{FF0000}WARNING:{FFFFFF} The homeland security has %s your department radio communications!",
- DptBanned[equal(fac, "PD") ? 0 : equal(fac, "FBI") ? 1 : equal(fac, "SAFMD") ? 2 : equal(fac, "GOV") ? 3 : equal(fac, "SANG") ? 4 : 5] ?
- "{FF0000}restricted{FFFFFF}" : "{1AD94D}unrestricted{FFFFFF}");
- SendFactionMessage(equal(fac, "PD") ? FACTION_SAPD : equal(fac, "FBI") ? FACTION_FBI : equal(fac, "SAFMD") ? FACTION_FMD :
- equal(fac, "GOV") ? FACTION_GOV : equal(fac, "SANG") ? FACTION_SANG : FACTION_NEWS, COLOR_GREY, str);
- va_SendClientMessage(playerid, -1, "You've %s %s from using /(d)epartment.", DptBanned[equal(fac, "PD") ? 0 : equal(fac, "FBI") ? 1 : equal(fac, "SAFMD") ? 2 : equal(fac, "GOV") ? 3 : equal(fac, "SANG") ? 4 : 5] ?
- "{FF0000}restricted{FFFFFF}" : "{1AD94D}unrestricted{FFFFFF}", fac);
- return 1;
- }
|