| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971 |
- /*
- /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
- | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
- | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
- | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
- | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
- | $$\ $$$| $$ \ $$ | $$ \ $$| $$
- | $$ \ $$| $$$$$$/ | $$ | $$| $$
- |__/ \__/ \______/ |__/ |__/|__/
- Gift System
- Next Generation Gaming, LLC
- (created by Next Generation Gaming Development Team)
-
- * Copyright (c) 2016, Next Generation Gaming, LLC
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are not permitted in any case.
- *
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- forward GiftPlayer_(playerid, giveplayerid, gtype); // For use via CallRemoteFunction
- public GiftPlayer_(playerid, giveplayerid, gtype) return GiftPlayer(playerid, giveplayerid, gtype);
- stock GiftPlayer(playerid, giveplayerid, gtype = 2) // Default is the normal giftbox
- {
- if(gtype == 1)
- {
- if(GetPVarInt(giveplayerid, "GiftFail") >= 20)
- {
- new string[128];
- GivePlayerCash(giveplayerid, 20000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Congratulations, you have won $20,000!");
- format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- format(string, sizeof(string), "* %s(%d) was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- SetPVarInt(giveplayerid, "GiftFail", GetPVarInt(giveplayerid, "GiftFail")+1);
- }
-
- new string[128], value = 0;
- if(gtype == 1)
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(playerid != MAX_PLAYERS && PlayerInfo[playerid][pAdmin] < 2) return true;
-
- if(playerid != MAX_PLAYERS) return GiftPlayer(MAX_PLAYERS, giveplayerid, 1);
-
- new randgift = Random(0, 100);
- printf("randgift %d", randgift);
- switch(randgift)
- {
- case 0..50: // cat 1 - Common gifts
- {
- new randy = random(32);
- printf("cat 1 %d", randy);
- if(randy == 0)
- {
- if(dgVar[dgMoney][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCash(giveplayerid, dgVar[dgMoney][2]);
- format(string, sizeof(string), "Congratulations, you have won $%s!", number_format(dgVar[dgMoney][2]));
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), number_format(dgVar[dgMoney][2]));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMoney][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), number_format(dgVar[dgMoney][2]));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 1)
- {
- if(dgVar[dgRimKit][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pRimMod] += dgVar[dgRimKit][2];
- format(string, sizeof(string), "Congratulations, you have won %d rimkit(s)!", dgVar[dgRimKit][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRimKit][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRimKit][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRimKit][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 2)
- {
- if(dgVar[dgFirework][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirework] += dgVar[dgFirework][2];
- format(string, sizeof(string), "Congratulations, you have won %d firework(s)!", dgVar[dgFirework][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirework][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirework][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirework][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 3)
- {
- if(dgVar[dgGVIP][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPExVoucher] += dgVar[dgGVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Gold VIP Voucher(s)!", dgVar[dgGVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 4)
- {
- if(dgVar[dgGVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPVoucher] += dgVar[dgGVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Gold VIP Voucher(s)!", dgVar[dgGVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- if(randy == 5)
- {
- if(dgVar[dgSVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPExVoucher] += dgVar[dgSVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Silver VIP Voucher (s)!", dgVar[dgSVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 6)
- {
- if(dgVar[dgSVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPVoucher] += dgVar[dgSVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Silver VIP Voucher(s)!", dgVar[dgSVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 7)
- {
- if(dgVar[dgCarSlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehicleSlot] += dgVar[dgCarSlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Car Slot(s)!", dgVar[dgCarSlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarSlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarSlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarSlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 8)
- {
- if(dgVar[dgToySlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pToySlot] += dgVar[dgToySlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Toy Slot(s)!", dgVar[dgToySlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgToySlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgToySlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgToySlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 9)
- {
- if(dgVar[dgArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- new Float: armor;
- GetArmour(giveplayerid, armor);
-
- if(armor+dgVar[dgArmor][2] >= 100) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetArmour(giveplayerid, armor + dgVar[dgArmor][2]);
- format(string, sizeof(string), "Congratulations, you have won %d Armour!", dgVar[dgArmor][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgArmor][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgArmor][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 10)
- {
- if(dgVar[dgFirstaid][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirstaid] += dgVar[dgFirstaid][2];
- format(string, sizeof(string), "Congratulations, you have won %d Firstaid(s)!", dgVar[dgFirstaid][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirstaid][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirstaid][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirstaid][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 11)
- {
- if(dgVar[dgDDFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Door");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgDDFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgDDFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgDDFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgDDFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 12)
- {
- if(dgVar[dgGateFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Gate Gate");
-
- format(string, sizeof(string), "Congratulations, you have won %d Gate Flag(s)!", dgVar[dgGateFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGateFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGateFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGateFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 13)
- {
- if(dgVar[dgCredits][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCredits(giveplayerid, dgVar[dgCredits][2], 1);
- format(string, sizeof(string), "Congratulations, you have won %d Credit(s)!", dgVar[dgCredits][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCredits][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCredits][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCredits][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 14)
- {
- if(dgVar[dgPriorityAd][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pAdvertVoucher] += dgVar[dgPriorityAd][2];
- format(string, sizeof(string), "Congratulations, you have won %d Priority Advertisement Voucher(s)!", dgVar[dgPriorityAd][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPriorityAd][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPriorityAd][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPriorityAd][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 15)
- {
- if(dgVar[dgHealthNArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetHealth(giveplayerid, 100.0);
- SetArmour(giveplayerid, 100);
- format(string, sizeof(string), "Congratulations, you have won Full Health & Armor!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgHealthNArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 16)
- {
- if(dgVar[dgGiftReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGiftVoucher] += dgVar[dgGiftReset][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Gift Reset Voucher(s)!", dgVar[dgGiftReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGiftReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGiftReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGiftReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 17)
- {
- if(dgVar[dgMaterial][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pMats] += dgVar[dgMaterial][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Material(s)!", dgVar[dgMaterial][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgMaterial][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMaterial][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgMaterial][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 18)
- {
- if(dgVar[dgWarning][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- if(dgVar[dgWarning][2] > 3 || dgVar[dgWarning][2] < 0)
- {
- if(PlayerInfo[giveplayerid][pWarns] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pWarns] -= dgVar[dgWarning][2];
- }
- else
- return GiftPlayer(playerid, giveplayerid, 1);
-
- format(string, sizeof(string), "Congratulations, you have won a %d Warning(s) Removal!", dgVar[dgWarning][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgWarning][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgWarning][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgWarning][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 19)
- {
- if(dgVar[dgPot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][0] += dgVar[dgPot][2];
- format(string, sizeof(string), "Congratulations, you have won %d pot!", dgVar[dgPot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 20)
- {
- if(dgVar[dgCrack][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][1] += dgVar[dgCrack][2];
- format(string, sizeof(string), "Congratulations, you have won %d Crack!", dgVar[dgCrack][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCrack][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCrack][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCrack][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 21)
- {
- if(dgVar[dgPaintballToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPaintTokens] += dgVar[dgPaintballToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Paintball Token(s)!", dgVar[dgPaintballToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPaintballToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPaintballToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPaintballToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 22)
- {
- if(dgVar[dgVIPToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pTokens] += dgVar[dgVIPToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d VIP Token(s)!", dgVar[dgVIPToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgVIPToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgVIPToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgVIPToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 23)
- {
- if(dgVar[dgRespectPoint][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pExp] += dgVar[dgRespectPoint][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Respect Point(s)!", dgVar[dgRespectPoint][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRespectPoint][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRespectPoint][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRespectPoint][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 24)
- {
- if(dgVar[dgCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehVoucher] += dgVar[dgCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Car Voucher(s)!", dgVar[dgCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 25)
- {
- if(dgVar[dgBuddyInvite][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] != 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 180;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "BUDDY INVITE: %s(%d) has been invited to VIP by System", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/setvip.log", string);
-
- format(string, sizeof(string), "Congratulations, you have won a Buddy Invite!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgBuddyInvite][1]--;
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 26)
- {
- if(dgVar[dgLaser][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][v][ptBone] = 6;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your laser.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the laser, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Laser!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgLaser][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 27)
- {
- if(dgVar[dgCustomToy][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- /*new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][v][ptBone] = 1;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your custom toy.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the custom toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }*/
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "[GIFTBOX] 1x Custom Toy");
-
- format(string, sizeof(string), "Congratulations, you have won a Custom Toy!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCustomToy][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 28)
- {
- if(dgVar[dgAdmuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pADMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pADMuteTotal] -= dgVar[dgAdmuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Admute Reset(s)!", dgVar[dgAdmuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgAdmuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgAdmuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgAdmuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 29)
- {
- if(dgVar[dgNewbieMuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pNMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pNMuteTotal] -= dgVar[dgNewbieMuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Newbie Mute Reset(s)!", dgVar[dgNewbieMuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgNewbieMuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 30)
- {
- if(dgVar[dgRestrictedCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pCarVoucher] += dgVar[dgRestrictedCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Restricted Car Voucher(s)!", dgVar[dgRestrictedCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRestrictedCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 31)
- {
- if(dgVar[dgPlatinumVIPVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][3] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPVIPVoucher] += dgVar[dgPlatinumVIPVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d 1 month PVIP Voucher(s)!", dgVar[dgPlatinumVIPVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPlatinumVIPVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- else return SendClientMessageEx(giveplayerid, COLOR_RED, "Seems like the dynamic giftbox is empty, please try again.");
- }
- case 51..80: // cat 2 - Slightly more rare gifts
- {
- new randy = random(32);
- printf("cat 1 %d", randy);
- if(randy == 0)
- {
- if(dgVar[dgMoney][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCash(giveplayerid, dgVar[dgMoney][2]);
- format(string, sizeof(string), "Congratulations, you have won $%s!", number_format(dgVar[dgMoney][2]));
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), number_format(dgVar[dgMoney][2]));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMoney][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), number_format(dgVar[dgMoney][2]));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 1)
- {
- if(dgVar[dgRimKit][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pRimMod] += dgVar[dgRimKit][2];
- format(string, sizeof(string), "Congratulations, you have won %d rimkit(s)!", dgVar[dgRimKit][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRimKit][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRimKit][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRimKit][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 2)
- {
- if(dgVar[dgFirework][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirework] += dgVar[dgFirework][2];
- format(string, sizeof(string), "Congratulations, you have won %d firework(s)!", dgVar[dgFirework][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirework][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirework][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirework][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 3)
- {
- if(dgVar[dgGVIP][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPExVoucher] += dgVar[dgGVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Gold VIP Voucher(s)!", dgVar[dgGVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 4)
- {
- if(dgVar[dgGVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPVoucher] += dgVar[dgGVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Gold VIP Voucher(s)!", dgVar[dgGVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 5)
- {
- if(dgVar[dgSVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPExVoucher] += dgVar[dgSVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Silver VIP Voucher (s)!", dgVar[dgSVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 6)
- {
- if(dgVar[dgSVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPVoucher] += dgVar[dgSVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Silver VIP Voucher(s)!", dgVar[dgSVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 7)
- {
- if(dgVar[dgCarSlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehicleSlot] += dgVar[dgCarSlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Car Slot(s)!", dgVar[dgCarSlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarSlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarSlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarSlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 8)
- {
- if(dgVar[dgToySlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pToySlot] += dgVar[dgToySlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Toy Slot(s)!", dgVar[dgToySlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgToySlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgToySlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgToySlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 9)
- {
- if(dgVar[dgArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- new Float: armor;
- GetArmour(giveplayerid, armor);
-
- if(armor+dgVar[dgArmor][2] >= 100) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetArmour(giveplayerid, armor + dgVar[dgArmor][2]);
- format(string, sizeof(string), "Congratulations, you have won %d Armour!", dgVar[dgArmor][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgArmor][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgArmor][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 10)
- {
- if(dgVar[dgFirstaid][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirstaid] += dgVar[dgFirstaid][2];
- format(string, sizeof(string), "Congratulations, you have won %d Firstaid(s)!", dgVar[dgFirstaid][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirstaid][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirstaid][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirstaid][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 11)
- {
- if(dgVar[dgDDFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Door");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgDDFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgDDFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgDDFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgDDFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 12)
- {
- if(dgVar[dgGateFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Gate");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgGateFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGateFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGateFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGateFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 13)
- {
- if(dgVar[dgCredits][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCredits(giveplayerid, dgVar[dgCredits][2], 1);
- format(string, sizeof(string), "Congratulations, you have won %d Credit(s)!", dgVar[dgCredits][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCredits][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCredits][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCredits][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 14)
- {
- if(dgVar[dgPriorityAd][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pAdvertVoucher] += dgVar[dgPriorityAd][2];
- format(string, sizeof(string), "Congratulations, you have won %d Priority Advertisement Voucher(s)!", dgVar[dgPriorityAd][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPriorityAd][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPriorityAd][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPriorityAd][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 15)
- {
- if(dgVar[dgHealthNArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetHealth(giveplayerid, 100.0);
- SetArmour(giveplayerid, 100);
- format(string, sizeof(string), "Congratulations, you have won Full Health & Armor!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgHealthNArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 16)
- {
- if(dgVar[dgGiftReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGiftVoucher] += dgVar[dgGiftReset][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Gift Reset Voucher(s)!", dgVar[dgGiftReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGiftReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGiftReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGiftReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 17)
- {
- if(dgVar[dgMaterial][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pMats] += dgVar[dgMaterial][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Material(s)!", dgVar[dgMaterial][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgMaterial][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMaterial][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgMaterial][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 18)
- {
- if(dgVar[dgWarning][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- if(dgVar[dgWarning][2] > 3 || dgVar[dgWarning][2] < 0)
- {
- if(PlayerInfo[giveplayerid][pWarns] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pWarns] -= dgVar[dgWarning][2];
- }
- else
- return GiftPlayer(playerid, giveplayerid, 1);
-
- format(string, sizeof(string), "Congratulations, you have won a %d Warning(s) Removal!", dgVar[dgWarning][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgWarning][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgWarning][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgWarning][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 19)
- {
- if(dgVar[dgPot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][0] += dgVar[dgPot][2];
- format(string, sizeof(string), "Congratulations, you have won %d pot!", dgVar[dgPot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 20)
- {
- if(dgVar[dgCrack][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][1] += dgVar[dgCrack][2];
- format(string, sizeof(string), "Congratulations, you have won %d Crack!", dgVar[dgCrack][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCrack][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCrack][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCrack][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 21)
- {
- if(dgVar[dgPaintballToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPaintTokens] += dgVar[dgPaintballToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Paintball Token(s)!", dgVar[dgPaintballToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPaintballToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPaintballToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPaintballToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 22)
- {
- if(dgVar[dgVIPToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pTokens] += dgVar[dgVIPToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d VIP Token(s)!", dgVar[dgVIPToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgVIPToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgVIPToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgVIPToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 23)
- {
- if(dgVar[dgRespectPoint][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pExp] += dgVar[dgRespectPoint][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Respect Point(s)!", dgVar[dgRespectPoint][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRespectPoint][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRespectPoint][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRespectPoint][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 24)
- {
- if(dgVar[dgCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehVoucher] += dgVar[dgCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Car Voucher(s)!", dgVar[dgCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 25)
- {
- if(dgVar[dgBuddyInvite][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] != 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 180;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "BUDDY INVITE: %s(%d) has been invited to VIP by System", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/setvip.log", string);
-
- format(string, sizeof(string), "Congratulations, you have won a Buddy Invite!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgBuddyInvite][1]--;
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 26)
- {
- if(dgVar[dgLaser][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][v][ptBone] = 6;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your laser.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the laser, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Laser!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgLaser][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 27)
- {
- if(dgVar[dgCustomToy][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][v][ptBone] = 1;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your custom toy.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the custom toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Custom Toy!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCustomToy][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 28)
- {
- if(dgVar[dgAdmuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pADMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pADMuteTotal] -= dgVar[dgAdmuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Admute Reset(s)!", dgVar[dgAdmuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgAdmuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgAdmuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgAdmuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 29)
- {
- if(dgVar[dgNewbieMuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pNMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pNMuteTotal] -= dgVar[dgNewbieMuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Newbie Mute Reset(s)!", dgVar[dgNewbieMuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgNewbieMuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 30)
- {
- if(dgVar[dgRestrictedCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pCarVoucher] += dgVar[dgRestrictedCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Restricted Car Voucher(s)!", dgVar[dgRestrictedCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRestrictedCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 31)
- {
- if(dgVar[dgPlatinumVIPVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][3] == 1) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPVIPVoucher] += dgVar[dgPlatinumVIPVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d 1 month PVIP Voucher(s)!", dgVar[dgPlatinumVIPVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPlatinumVIPVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- else return SendClientMessageEx(giveplayerid, COLOR_RED, "Seems like the dynamic giftbox is empty, please try again.");
- }
- case 81..95: // cat 3 rarish
- {
- new randy = random(32);
- printf("cat 1 %d", randy);
- if(randy == 0)
- {
- if(dgVar[dgMoney][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCash(giveplayerid, dgVar[dgMoney][2]);
- format(string, sizeof(string), "Congratulations, you have won $%s!", number_format(dgVar[dgMoney][2]));
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), number_format(dgVar[dgMoney][2]));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMoney][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), number_format(dgVar[dgMoney][2]));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 1)
- {
- if(dgVar[dgRimKit][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pRimMod] += dgVar[dgRimKit][2];
- format(string, sizeof(string), "Congratulations, you have won %d rimkit(s)!", dgVar[dgRimKit][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRimKit][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRimKit][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRimKit][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 2)
- {
- if(dgVar[dgFirework][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirework] += dgVar[dgFirework][2];
- format(string, sizeof(string), "Congratulations, you have won %d firework(s)!", dgVar[dgFirework][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirework][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirework][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirework][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 3)
- {
- if(dgVar[dgGVIP][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPExVoucher] += dgVar[dgGVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Gold VIP Voucher(s)!", dgVar[dgGVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 4)
- {
- if(dgVar[dgGVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPVoucher] += dgVar[dgGVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Gold VIP Voucher(s)!", dgVar[dgGVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 5)
- {
- if(dgVar[dgSVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPExVoucher] += dgVar[dgSVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Silver VIP Voucher (s)!", dgVar[dgSVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 6)
- {
- if(dgVar[dgSVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPVoucher] += dgVar[dgSVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Silver VIP Voucher(s)!", dgVar[dgSVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 7)
- {
- if(dgVar[dgCarSlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehicleSlot] += dgVar[dgCarSlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Car Slot(s)!", dgVar[dgCarSlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarSlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarSlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarSlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 8)
- {
- if(dgVar[dgToySlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pToySlot] += dgVar[dgToySlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Toy Slot(s)!", dgVar[dgToySlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgToySlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgToySlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgToySlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 9)
- {
- if(dgVar[dgArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- new Float: armor;
- GetArmour(giveplayerid, armor);
-
- if(armor+dgVar[dgArmor][2] >= 100) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetArmour(giveplayerid, armor + dgVar[dgArmor][2]);
- format(string, sizeof(string), "Congratulations, you have won %d Armour!", dgVar[dgArmor][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgArmor][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgArmor][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 10)
- {
- if(dgVar[dgFirstaid][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirstaid] += dgVar[dgFirstaid][2];
- format(string, sizeof(string), "Congratulations, you have won %d Firstaid(s)!", dgVar[dgFirstaid][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirstaid][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirstaid][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirstaid][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 11)
- {
- if(dgVar[dgDDFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Door");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgDDFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgDDFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgDDFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgDDFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 12)
- {
- if(dgVar[dgGateFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Gate");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgGateFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGateFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGateFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGateFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 13)
- {
- if(dgVar[dgCredits][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCredits(giveplayerid, dgVar[dgCredits][2], 1);
- format(string, sizeof(string), "Congratulations, you have won %d Credit(s)!", dgVar[dgCredits][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCredits][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCredits][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCredits][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 14)
- {
- if(dgVar[dgPriorityAd][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pAdvertVoucher] += dgVar[dgPriorityAd][2];
- format(string, sizeof(string), "Congratulations, you have won %d Priority Advertisement Voucher(s)!", dgVar[dgPriorityAd][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPriorityAd][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPriorityAd][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPriorityAd][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 15)
- {
- if(dgVar[dgHealthNArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetHealth(giveplayerid, 100.0);
- SetArmour(giveplayerid, 100);
- format(string, sizeof(string), "Congratulations, you have won Full Health & Armor!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgHealthNArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 16)
- {
- if(dgVar[dgGiftReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGiftVoucher] += dgVar[dgGiftReset][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Gift Reset Voucher(s)!", dgVar[dgGiftReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGiftReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGiftReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGiftReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 17)
- {
- if(dgVar[dgMaterial][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pMats] += dgVar[dgMaterial][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Material(s)!", dgVar[dgMaterial][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgMaterial][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMaterial][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgMaterial][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 18)
- {
- if(dgVar[dgWarning][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- if(dgVar[dgWarning][2] > 3 || dgVar[dgWarning][2] < 0)
- {
- if(PlayerInfo[giveplayerid][pWarns] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pWarns] -= dgVar[dgWarning][2];
- }
- else
- return GiftPlayer(playerid, giveplayerid, 1);
-
- format(string, sizeof(string), "Congratulations, you have won a %d Warning(s) Removal!", dgVar[dgWarning][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgWarning][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgWarning][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgWarning][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 19)
- {
- if(dgVar[dgPot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][0] += dgVar[dgPot][2];
- format(string, sizeof(string), "Congratulations, you have won %d pot!", dgVar[dgPot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 20)
- {
- if(dgVar[dgCrack][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][1] += dgVar[dgCrack][2];
- format(string, sizeof(string), "Congratulations, you have won %d Crack!", dgVar[dgCrack][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCrack][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCrack][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCrack][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 21)
- {
- if(dgVar[dgPaintballToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPaintTokens] += dgVar[dgPaintballToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Paintball Token(s)!", dgVar[dgPaintballToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPaintballToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPaintballToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPaintballToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 22)
- {
- if(dgVar[dgVIPToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pTokens] += dgVar[dgVIPToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d VIP Token(s)!", dgVar[dgVIPToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgVIPToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgVIPToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgVIPToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 23)
- {
- if(dgVar[dgRespectPoint][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pExp] += dgVar[dgRespectPoint][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Respect Point(s)!", dgVar[dgRespectPoint][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRespectPoint][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRespectPoint][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRespectPoint][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 24)
- {
- if(dgVar[dgCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehVoucher] += dgVar[dgCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Car Voucher(s)!", dgVar[dgCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 25)
- {
- if(dgVar[dgBuddyInvite][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] != 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 180;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "BUDDY INVITE: %s(%d) has been invited to VIP by System", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/setvip.log", string);
- format(string, sizeof(string), "Congratulations, you have won a Buddy Invite!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgBuddyInvite][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 26)
- {
- if(dgVar[dgLaser][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][v][ptBone] = 6;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your laser.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the laser, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Laser!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgLaser][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 27)
- {
- if(dgVar[dgCustomToy][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][v][ptBone] = 1;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your custom toy.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the custom toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Custom Toy!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCustomToy][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 28)
- {
- if(dgVar[dgAdmuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pADMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pADMuteTotal] -= dgVar[dgAdmuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Admute Reset(s)!", dgVar[dgAdmuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgAdmuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgAdmuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgAdmuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 29)
- {
- if(dgVar[dgNewbieMuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pNMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pNMuteTotal] -= dgVar[dgNewbieMuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Newbie Mute Reset(s)!", dgVar[dgNewbieMuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgNewbieMuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 30)
- {
- if(dgVar[dgRestrictedCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pCarVoucher] += dgVar[dgRestrictedCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Restricted Car Voucher(s)!", dgVar[dgRestrictedCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRestrictedCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 31)
- {
- if(dgVar[dgPlatinumVIPVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][3] == 2) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPVIPVoucher] += dgVar[dgPlatinumVIPVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d 1 month PVIP Voucher(s)!", dgVar[dgPlatinumVIPVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPlatinumVIPVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- else return SendClientMessageEx(giveplayerid, COLOR_RED, "Seems like the dynamic giftbox is empty, please try again.");
- }
- case 96..100: // cat 4 super rare
- {
- new randy = random(32);
- printf("cat 1 %d", randy);
- if(randy == 0)
- {
- if(dgVar[dgMoney][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMoney][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCash(giveplayerid, dgVar[dgMoney][2]);
- format(string, sizeof(string), "Congratulations, you have won $%s!", number_format(dgVar[dgMoney][2]));
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), number_format(dgVar[dgMoney][2]));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMoney][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted $%s, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), number_format(dgVar[dgMoney][2]));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 1)
- {
- if(dgVar[dgRimKit][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRimKit][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pRimMod] += dgVar[dgRimKit][2];
- format(string, sizeof(string), "Congratulations, you have won %d rimkit(s)!", dgVar[dgRimKit][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRimKit][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRimKit][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d rimkit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRimKit][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 2)
- {
- if(dgVar[dgFirework][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirework][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirework] += dgVar[dgFirework][2];
- format(string, sizeof(string), "Congratulations, you have won %d firework(s)!", dgVar[dgFirework][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirework][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirework][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d firework(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirework][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 3)
- {
- if(dgVar[dgGVIP][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPExVoucher] += dgVar[dgGVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Gold VIP Voucher(s)!", dgVar[dgGVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 4)
- {
- if(dgVar[dgGVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGVIPEx][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGVIPVoucher] += dgVar[dgGVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Gold VIP Voucher(s)!", dgVar[dgGVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Gold VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 5)
- {
- if(dgVar[dgSVIP][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIP][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPExVoucher] += dgVar[dgSVIP][2];
- format(string, sizeof(string), "Congratulations, you have won %d Seven day Silver VIP Voucher (s)!", dgVar[dgSVIP][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIP][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIP][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Seven day Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIP][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 6)
- {
- if(dgVar[dgSVIPEx][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgSVIPEx][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pSVIPVoucher] += dgVar[dgSVIPEx][2];
- format(string, sizeof(string), "Congratulations, you have won %d One Month Silver VIP Voucher(s)!", dgVar[dgSVIPEx][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgSVIPEx][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgSVIPEx][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d One Month Silver VIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgSVIPEx][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 7)
- {
- if(dgVar[dgCarSlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehicleSlot] += dgVar[dgCarSlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Car Slot(s)!", dgVar[dgCarSlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarSlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarSlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarSlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 8)
- {
- if(dgVar[dgToySlot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarSlot][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pToySlot] += dgVar[dgToySlot][2];
- format(string, sizeof(string), "Congratulations, you have won %d Toy Slot(s)!", dgVar[dgToySlot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgToySlot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgToySlot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Toy Slot(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgToySlot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 9)
- {
- if(dgVar[dgArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgArmor][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- new Float: armor;
- GetArmour(giveplayerid, armor);
-
- if(armor+dgVar[dgArmor][2] >= 100) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetArmour(giveplayerid, armor + dgVar[dgArmor][2]);
- format(string, sizeof(string), "Congratulations, you have won %d Armour!", dgVar[dgArmor][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgArmor][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Armour, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgArmor][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 10)
- {
- if(dgVar[dgFirstaid][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgFirstaid][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pFirstaid] += dgVar[dgFirstaid][2];
- format(string, sizeof(string), "Congratulations, you have won %d Firstaid(s)!", dgVar[dgFirstaid][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgFirstaid][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgFirstaid][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Firstaid(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgFirstaid][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 11)
- {
- if(dgVar[dgDDFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgDDFlag][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Door");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgDDFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgDDFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgDDFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Door Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgDDFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 12)
- {
- if(dgVar[dgGateFlag][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGateFlag][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Dynamic Gift Box: 1 Dynamic Gate");
-
- format(string, sizeof(string), "Congratulations, you have won %d Dynamic Door Flag(s)!", dgVar[dgGateFlag][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This prize may take up to 48 hours to be rewarded..");
- format(string, sizeof(string), "* %s was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGateFlag][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGateFlag][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Dynamic Gate Flag(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGateFlag][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 13)
- {
- if(dgVar[dgCredits][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCredits][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- GivePlayerCredits(giveplayerid, dgVar[dgCredits][2], 1);
- format(string, sizeof(string), "Congratulations, you have won %d Credit(s)!", dgVar[dgCredits][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCredits][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCredits][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Credit(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCredits][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 14)
- {
- if(dgVar[dgPriorityAd][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPriorityAd][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pAdvertVoucher] += dgVar[dgPriorityAd][2];
- format(string, sizeof(string), "Congratulations, you have won %d Priority Advertisement Voucher(s)!", dgVar[dgPriorityAd][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPriorityAd][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPriorityAd][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Priority Advertisement Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPriorityAd][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 15)
- {
- if(dgVar[dgHealthNArmor][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgHealthNArmor][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- SetHealth(giveplayerid, 100.0);
- SetArmour(giveplayerid, 100);
- format(string, sizeof(string), "Congratulations, you have won Full Health & Armor!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgHealthNArmor][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Full Health & Armor, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 16)
- {
- if(dgVar[dgGiftReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgGiftReset][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pGiftVoucher] += dgVar[dgGiftReset][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Gift Reset Voucher(s)!", dgVar[dgGiftReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgGiftReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgGiftReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Gift Reset Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgGiftReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 17)
- {
- if(dgVar[dgMaterial][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgMaterial][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pMats] += dgVar[dgMaterial][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Material(s)!", dgVar[dgMaterial][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgMaterial][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgMaterial][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Material(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgMaterial][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 18)
- {
- if(dgVar[dgWarning][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgWarning][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- if(dgVar[dgWarning][2] > 3 || dgVar[dgWarning][2] < 0)
- {
- if(PlayerInfo[giveplayerid][pWarns] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pWarns] -= dgVar[dgWarning][2];
- }
- else
- return GiftPlayer(playerid, giveplayerid, 1);
-
- format(string, sizeof(string), "Congratulations, you have won a %d Warning(s) Removal!", dgVar[dgWarning][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgWarning][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgWarning][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Warning(s) Removal, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgWarning][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 19)
- {
- if(dgVar[dgPot][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPot][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][0] += dgVar[dgPot][2];
- format(string, sizeof(string), "Congratulations, you have won %d pot!", dgVar[dgPot][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPot][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPot][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d pot, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPot][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 20)
- {
- if(dgVar[dgCrack][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCrack][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDrugs][1] += dgVar[dgCrack][2];
- format(string, sizeof(string), "Congratulations, you have won %d Crack!", dgVar[dgCrack][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCrack][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCrack][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Crack, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCrack][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 21)
- {
- if(dgVar[dgPaintballToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPaintballToken][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPaintTokens] += dgVar[dgPaintballToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Paintball Token(s)!", dgVar[dgPaintballToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPaintballToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPaintballToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Paintball Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPaintballToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 22)
- {
- if(dgVar[dgVIPToken][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgVIPToken][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pTokens] += dgVar[dgVIPToken][2];
- format(string, sizeof(string), "Congratulations, you have won a %d VIP Token(s)!", dgVar[dgVIPToken][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgVIPToken][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgVIPToken][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d VIP Token(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgVIPToken][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 23)
- {
- if(dgVar[dgRespectPoint][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRespectPoint][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pExp] += dgVar[dgRespectPoint][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Respect Point(s)!", dgVar[dgRespectPoint][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRespectPoint][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRespectPoint][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Respect Point(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRespectPoint][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 24)
- {
- if(dgVar[dgCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCarVoucher][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pVehVoucher] += dgVar[dgCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Car Voucher(s)!", dgVar[dgCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 25)
- {
- if(dgVar[dgBuddyInvite][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgBuddyInvite][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pDonateRank] != 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 180;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "BUDDY INVITE: %s(%d) has been invited to VIP by System", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/setvip.log", string);
-
- format(string, sizeof(string), "Congratulations, you have won a Buddy Invite!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgBuddyInvite][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a BuddyInvite, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 26)
- {
- if(dgVar[dgLaser][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgLaser][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][v][ptBone] = 6;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your laser.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the laser, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Laser!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgLaser][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Laser, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 27)
- {
- if(dgVar[dgCustomToy][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgCustomToy][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- new icount = GetPlayerToySlots(giveplayerid), success = 0;
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][v][ptBone] = 1;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- success = 1;
- break;
- }
- }
-
- if(success == 0)
- {
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = dgVar[dgCustomToy][2];
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your custom toy.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the custom toy, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- }
-
- format(string, sizeof(string), "Congratulations, you have won a Custom Toy!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgCustomToy][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted a Custom Toy, enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 28)
- {
- if(dgVar[dgAdmuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgAdmuteReset][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pADMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pADMuteTotal] -= dgVar[dgAdmuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Admute Reset(s)!", dgVar[dgAdmuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgAdmuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgAdmuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Admute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgAdmuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 29)
- {
- if(dgVar[dgNewbieMuteReset][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgNewbieMuteReset][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
- if(PlayerInfo[giveplayerid][pNMuteTotal] == 0) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pNMuteTotal] -= dgVar[dgNewbieMuteReset][2];
-
- format(string, sizeof(string), "Congratulations, you have won %d Newbie Mute Reset(s)!", dgVar[dgNewbieMuteReset][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgNewbieMuteReset][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Newbie Mute Reset(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgNewbieMuteReset][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 30)
- {
- if(dgVar[dgRestrictedCarVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgRestrictedCarVoucher][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pCarVoucher] += dgVar[dgRestrictedCarVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d Restricted Car Voucher(s)!", dgVar[dgRestrictedCarVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgRestrictedCarVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d Restricted Car Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgRestrictedCarVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
-
- if(randy == 31)
- {
- if(dgVar[dgPlatinumVIPVoucher][1] == value) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][0] == 0) return GiftPlayer(playerid, giveplayerid, 1);
- if(dgVar[dgPlatinumVIPVoucher][3] == 3) return GiftPlayer(playerid, giveplayerid, 1);
-
- PlayerInfo[giveplayerid][pPVIPVoucher] += dgVar[dgPlatinumVIPVoucher][2];
- format(string, sizeof(string), "Congratulations, you have won a %d 1 month PVIP Voucher(s)!", dgVar[dgPlatinumVIPVoucher][2]);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
- format(string, sizeof(string), "* %s was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
- dgVar[dgPlatinumVIPVoucher][1]--;
- format(string, sizeof(string), "* %s(%d) was just gifted %d 1 month PVIP Voucher(s), enjoy!", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), dgVar[dgPlatinumVIPVoucher][2]);
- SetPVarInt(giveplayerid, "GiftFail", 0), PlayerInfo[giveplayerid][pGiftTime] = 300, Log("logs/giftbox.log", string), SaveDynamicGiftBox(), OnPlayerStatsUpdate(giveplayerid);
- return true;
- }
- else return SendClientMessageEx(giveplayerid, COLOR_RED, "Seems like the dynamic giftbox is empty, please try again.");
- }
- }
- }
- SaveDynamicGiftBox();
- }
- if(gtype == 2)
- {
- if(playerid == MAX_PLAYERS || PlayerInfo[playerid][pAdmin] >= 2)
- {
- new randgift = Random(1, 103);
- if(randgift >= 1 && randgift <= 83)
- {
- new gift = Random(1, 12);
- if(gift == 1)
- {
- if(PlayerInfo[giveplayerid][pConnectHours] < 2 || PlayerInfo[giveplayerid][pWRestricted] > 0) return GiftPlayer(playerid, giveplayerid);
- return GiftPlayer(playerid, giveplayerid);
- /* GivePlayerValidWeapon(giveplayerid, 27, 100);
- GivePlayerValidWeapon(giveplayerid, 24, 100);
- GivePlayerValidWeapon(giveplayerid, 31, 100);
- GivePlayerValidWeapon(giveplayerid, 34, 100);
- GivePlayerValidWeapon(giveplayerid, 29, 100);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a full weapon set!");
- format(string, sizeof(string), "* %s was just gifted a full weapon set, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); */
- }
- else if(gift == 2)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] > 2) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pFirstaid]++;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a first aid kit!");
- format(string, sizeof(string), "* %s was just gifted a first aid kit, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 3)
- {
- PlayerInfo[giveplayerid][pMats] += 2000;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 2,000 materials!");
- format(string, sizeof(string), "* %s was just gifted 2,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- if(PlayerInfo[giveplayerid][pWarns] != 0)
- {
- PlayerInfo[giveplayerid][pWarns]--;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a single warning removal!");
- format(string, sizeof(string), "* %s was just gifted a single warning removal, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Random gift ended up in a removal of one warning - let's try again!");
- GiftPlayer(playerid, giveplayerid);
- return 1;
- }
- }
- else if(gift == 5)
- {
- PlayerInfo[giveplayerid][pDrugs][0] += 50;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 50 grams of pot!");
- format(string, sizeof(string), "* %s was just gifted 50 grams of pot, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 6)
- {
- PlayerInfo[giveplayerid][pDrugs][1] += 25;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 25 grams of crack!");
- format(string, sizeof(string), "* %s was just gifted 25 grams of crack, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 7)
- {
- GivePlayerCash(giveplayerid, 20000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $20,000!");
- format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 8)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pPaintTokens] += 10;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 paintball tokens!");
- format(string, sizeof(string), "* %s was just gifted 10 paintball tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 9)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] < 1) return GiftPlayer(playerid, giveplayerid);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pTokens] += 5;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 5 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 5 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 10)
- {
- PlayerInfo[giveplayerid][pFirework] += 2;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 2 Fireworks!");
- format(string, sizeof(string), "* %s was just gifted 2 Fireworks, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 11)
- {
- PlayerInfo[giveplayerid][pExp] += 5;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 5 Respect Points!");
- format(string, sizeof(string), "* %s was just gifted 5 Respect Points, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(randgift > 83 && randgift <= 98)
- {
- new gift = Random(1, 9);
- if(gift == 1)
- {
- GivePlayerCash(giveplayerid, 150000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $150,000!");
- format(string, sizeof(string), "* %s was just gifted $150,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 2)
- {
- PlayerInfo[giveplayerid][pMats] += 15000;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 15,000 materials!");
- format(string, sizeof(string), "* %s was just gifted 15,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 3)
- {
- PlayerInfo[giveplayerid][pExp] += 10;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 respect points!");
- format(string, sizeof(string), "* %s was just gifted 10 respect points, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- PlayerInfo[giveplayerid][pVehVoucher]++;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free car!");
- SendClientMessageEx(giveplayerid, COLOR_CYAN, " 1 Car Voucher has been added to your account.");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note you may access your voucher(s) with /myvouchers");
-
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won a free car", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s was just gifted by the system and he won a free car.", GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 4);
- format(string, sizeof(string), "* %s was just gifted a free car, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 5)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] > 0)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pTokens] += 15;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 15 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 15 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else
- {
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 180;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "You have been invited to become a Level 1 VIP for 3 hours. Enjoy!", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "BUDDY INVITE: %s(%d) has won a buddyinvite.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/setvip.log", string);
- format(string, sizeof(string), "* %s was just gifted 3 hours of VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(gift == 6)
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Laser Pointer!");
- format(string, sizeof(string), "* %s was just gifted a Free Laser Pointer, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- new icount = GetPlayerToySlots(giveplayerid);
- for(new v = 0; v < icount; v++)
- {
- if(PlayerToyInfo[giveplayerid][v][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][v][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][v][ptBone] = 6;
- PlayerToyInfo[giveplayerid][v][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][v][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][v][ptTradable] = 1;
-
- g_mysql_NewToy(giveplayerid, v);
- PlayerInfo[giveplayerid][pGiftTime] = 300;
- return 1;
- }
- }
-
- for(new i = 0; i < MAX_PLAYERTOYS; i++)
- {
- if(PlayerToyInfo[giveplayerid][i][ptModelID] == 0)
- {
- PlayerToyInfo[giveplayerid][i][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][i][ptBone] = 6;
- PlayerToyInfo[giveplayerid][i][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptRotZ] = 0.0;
- PlayerToyInfo[giveplayerid][i][ptScaleX] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleY] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptScaleZ] = 1.0;
- PlayerToyInfo[giveplayerid][i][ptTradable] = 1;
- PlayerToyInfo[giveplayerid][i][ptSpecial] = 1;
-
- g_mysql_NewToy(giveplayerid, i);
-
- SendClientMessageEx(giveplayerid, COLOR_GRAD1, "Due to you not having any available slots, we've temporarily gave you an additional slot to use/sell/trade your laser.");
- SendClientMessageEx(giveplayerid, COLOR_RED, "Note: Please take note that after selling the laser, the temporarily additional toy slot will be removed.");
- break;
- }
- }
- //AddFlag(giveplayerid, INVALID_PLAYER_ID, "Free Laser Pointer (Gift)");
- //SendClientMessageEx(giveplayerid, COLOR_GREY, "You have no empty toy slots, so you have been flagged for a free laser.");
- }
- else if(gift == 7)
- {
- if(PlayerInfo[giveplayerid][pADMuteTotal] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pADMuteTotal] = 0;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Admute Reset!");
- format(string, sizeof(string), "* %s was just gifted a Free Admute Reset, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 8)
- {
- if(PlayerInfo[giveplayerid][pNMuteTotal] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pNMuteTotal] = 0;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Nmute Reset!");
- format(string, sizeof(string), "* %s was just gifted a Free Nmute Reset, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(randgift > 98 && randgift <= 100)
- {
- new gift = Random(1, 6);
- if(gift == 1 && PlayerInfo[giveplayerid][pDonateRank] <= 2) // Silver VIP can get it extended, I suppose
- {
- PlayerInfo[giveplayerid][pSVIPVoucher]++;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won one month of Silver VIP!");
- SendClientMessageEx(giveplayerid, COLOR_CYAN, " 1 Silver VIP Voucher has been added to your account.");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note you may access your voucher(s) with /myvouchers");
- if(playerid == MAX_PLAYERS) {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won one month of Silver VIP.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s was just gifted by the system and he won one month of Silver VIP.", GetPlayerNameEx(giveplayerid));
- }
- else {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won one month of Silver VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won one month of Silver VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- }
- ABroadCast(COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "* %s was just gifted one month of Silver VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 2)
- {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won a free house", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s was just gifted by the system and he won a free house.", GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free house!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
- AddFlag(giveplayerid, INVALID_PLAYER_ID, "Free House (Gift)");
- format(string, sizeof(string), "* %s was just gifted a free house, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 3)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] < 1) return GiftPlayer(playerid, giveplayerid);
- if(PlayerInfo[giveplayerid][pDonateRank] >= 4) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pTokens] += 50;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 50 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 50 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- GivePlayerCash(giveplayerid, 500000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $500,000!");
- if(playerid == MAX_PLAYERS) {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won $500,000.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s was just gifted by the system and he won $500,000.", GetPlayerNameEx(giveplayerid));
- }
- else {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won $500,000.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won $500,000.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- }
- ABroadCast(COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "* %s was just gifted $500,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 5)
- {
- PlayerInfo[giveplayerid][pGVIPVoucher]++;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won one month of Gold VIP!");
- SendClientMessageEx(giveplayerid, COLOR_CYAN, " 1 Gold VIP Voucher has been added to your account.");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note you may access your voucher(s) with /myvouchers");
- if(playerid == MAX_PLAYERS) {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won one month of Gold VIP.", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s was just gifted by the system and he won one month of Gold VIP.", GetPlayerNameEx(giveplayerid));
- }
- else {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won one month of Gold VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid));
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won one month of Gold VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- }
- ABroadCast(COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "* %s was just gifted one month of Gold VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(randgift > 100 && randgift <= 103) // Rim Mod
- {
- new gift = Random(1, 10);
- if(gift >= 1 && gift <= 3)
- {
- if(RimMod > 0) // Rim Kit
- {
- PlayerInfo[giveplayerid][pRimMod]++;
- RimMod--;
- g_mysql_SaveMOTD();
- if(playerid == MAX_PLAYERS) {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won a rim modification kit. (%d left)", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), RimMod);
- }
- else {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won a rim modification kit. (%d left)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), RimMod);
- }
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "* %s was just gifted a rim modification kit, enjoy! Only %d kits left.", GetPlayerNameEx(giveplayerid), RimMod);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else
- {
- GiftPlayer(MAX_PLAYERS, giveplayerid);
- return 1;
- }
- }
- else if(gift == 4) //
- {
- if(CarVoucher > 0)
- {
- PlayerInfo[giveplayerid][pCarVoucher]++;
- CarVoucher--;
- g_mysql_SaveMOTD();
- if(playerid == MAX_PLAYERS) {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won a restricted car voucher. (%d left)", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), CarVoucher);
- }
- else {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won a restricted car voucher. (%d left)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), CarVoucher);
- }
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "* %s was just gifted a restricted car voucher, enjoy! Only %d car vouchers left.", GetPlayerNameEx(giveplayerid), CarVoucher);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- SendClientMessageEx(giveplayerid, COLOR_CYAN, " 1 Restricted Car Voucher has been added to your account.");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note you may access your voucher(s) with /myvouchers");
- }
- else
- {
- GiftPlayer(MAX_PLAYERS, giveplayerid);
- return 1;
- }
- }
- else if(gift == 5) //
- {
- new gift2 = Random(1, 15);
- if(gift2 == 3)
- {
- if(PVIPVoucher > 0)
- {
- PlayerInfo[giveplayerid][pPVIPVoucher]++;
- PVIPVoucher--;
- g_mysql_SaveMOTD();
-
- if(playerid == MAX_PLAYERS)
- {
- format(string, sizeof(string), "AdmCmd: %s(%d) was just gifted by the system and he won a 1 month PVIP Voucher. (%d left)", GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), PVIPVoucher);
- }
- else
- {
- format(string, sizeof(string), "AdmCmd: %s has just gifted %s(%d) and he won a 1 month PVIP Voucher. (%d left)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), GetPlayerSQLId(giveplayerid), PVIPVoucher);
- }
-
- Log("logs/gifts.log", string);
- format(string, sizeof(string), "* %s was just gifted a 1 month PVIP Voucher, enjoy! There are %d 1 month PVIP Vouchers left.", GetPlayerNameEx(giveplayerid), PVIPVoucher);
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- SendClientMessageEx(giveplayerid, COLOR_CYAN, " 1 1 month PVIP Voucher has been added to your account.");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note you may access your voucher(s) with /myvouchers");
-
- SendClientMessageToAll(COLOR_WHITE, string);
- }
- else
- {
- GiftPlayer(MAX_PLAYERS, giveplayerid);
- return 1;
- }
- }
- else
- {
- GiftPlayer(MAX_PLAYERS, giveplayerid);
- return 1;
- }
- }
- else
- {
- GiftPlayer(MAX_PLAYERS, giveplayerid);
- return 1;
- }
- }
- PlayerInfo[giveplayerid][pGiftTime] = 300;
- }
- }
- return 1;
- }
- stock GetDynamicGiftBoxType(value)
- {
- new string[128];
- if(value == 0)
- format(string, sizeof(string), "Less Common");
- else if(value == 1)
- format(string, sizeof(string), "Common");
- else if(value == 2)
- format(string, sizeof(string), "Rare");
- else if(value == 3)
- format(string, sizeof(string), "Super Rare");
- return string;
- }
- stock ShowPlayerDynamicGiftBox(playerid)
- {
- szMiscArray[0] = 0;
- szMiscArray = "{1B7A3C}Giftbox Settings{FFFFFF}";
- if(dgVar[dgMoney][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Money", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Money", szMiscArray);
- if(dgVar[dgRimKit][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Rimkit", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Rimkit", szMiscArray);
- if(dgVar[dgFirework][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Firework", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Firework", szMiscArray);
- if(dgVar[dgGVIP][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}7 Days Gold VIP", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}7 Days Gold VIP", szMiscArray);
- if(dgVar[dgGVIPEx][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}1 Month Gold VIP", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}1 Month Gold VIP", szMiscArray);
- if(dgVar[dgSVIP][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}7 Days Silver VIP", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}7 Days Silver VIP", szMiscArray);
- if(dgVar[dgSVIPEx][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}1 Month Silver VIP", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}1 Month Silver VIP", szMiscArray);
- if(dgVar[dgCarSlot][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Car Slot", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Car Slot", szMiscArray);
- if(dgVar[dgToySlot][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Toy Slot", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Toy Slot", szMiscArray);
- if(dgVar[dgArmor][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Full Armor", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Full Armor", szMiscArray);
- if(dgVar[dgFirstaid][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Firstaid", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Firstaid", szMiscArray);
- if(dgVar[dgDDFlag][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Dynamic Door Flag", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Dynamic Door Flag", szMiscArray);
- if(dgVar[dgGateFlag][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Dynamic Gate Flag", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Dynamic Gate Flag", szMiscArray);
- if(dgVar[dgCredits][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Credits", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Credits", szMiscArray);
- if(dgVar[dgPriorityAd][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Priority Ad", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Priority Ad", szMiscArray);
- if(dgVar[dgHealthNArmor][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Health & Armor", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Health & Armor", szMiscArray);
- if(dgVar[dgGiftReset][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Gift Reset", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Gift Reset", szMiscArray);
- if(dgVar[dgMaterial][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Material", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Material", szMiscArray);
- if(dgVar[dgWarning][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Warning", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Warning", szMiscArray);
- if(dgVar[dgPot][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Pot", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Pot", szMiscArray);
- if(dgVar[dgCrack][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Crack", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Crack", szMiscArray);
- if(dgVar[dgPaintballToken][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Paintball Token", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Paintball Token", szMiscArray);
- if(dgVar[dgVIPToken][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}VIP Token", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}VIP Token", szMiscArray);
- if(dgVar[dgRespectPoint][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Respect Point", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Respect Point", szMiscArray);
- if(dgVar[dgCarVoucher][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Car Voucher", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Car Voucher", szMiscArray);
- if(dgVar[dgBuddyInvite][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Buddy Invite", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Buddy Invite", szMiscArray);
- if(dgVar[dgLaser][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Laser", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Laser", szMiscArray);
- if(dgVar[dgCustomToy][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Custom Toy", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Custom Toy", szMiscArray);
- if(dgVar[dgAdmuteReset][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Advertisement Mute Reset", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Advertisement Mute Reset", szMiscArray);
- if(dgVar[dgNewbieMuteReset][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Newbie Mute Reset", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Newbie Mute Reset", szMiscArray);
- if(dgVar[dgRestrictedCarVoucher][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}Restricted Car Voucher", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}Restricted Car Voucher", szMiscArray);
- if(dgVar[dgPlatinumVIPVoucher][0] == 1)
- format(szMiscArray, sizeof(szMiscArray), "%s\n{00FF61}1 month PVIP Voucher", szMiscArray);
- else
- format(szMiscArray, sizeof(szMiscArray), "%s\n{F2070B}1 month PVIP Voucher", szMiscArray);
-
- return ShowPlayerDialogEx(playerid, DIALOG_GIFTBOX_VIEW, DIALOG_STYLE_LIST, "Dynamic Giftbox", szMiscArray, "Select", "Close");
- }
- CMD:gifts(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(Gifts == 0)
- {
- Gifts = 1;
- format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has enabled the /gift command.", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_LIGHTRED, szMiscArray, 1337 );
- }
- else
- {
- Gifts = 0;
-
- format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has disabled the /gift command.", GetPlayerNameEx(playerid));
- ABroadCast( COLOR_LIGHTRED, szMiscArray, 1337 );
- }
- }
- return 1;
- }
- CMD:vipgifts(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(VIPGifts == 0)
- {
- VIPGifts = 1;
- format(szMiscArray, sizeof(szMiscArray), "%s would like for you to come to Club VIP for free gifts and great times [20 minutes remains]", GetPlayerNameEx(playerid));
- SendVIPMessage(COLOR_LIGHTGREEN, szMiscArray);
- VIPGiftsTimeLeft = 20;
- format(VIPGiftsName, sizeof(VIPGiftsName), "%s", GetPlayerNameEx(playerid));
- }
- else
- {
- VIPGifts = 0;
- format(szMiscArray, sizeof(szMiscArray), "AdmCmd: %s has disabled the /getgift command early", GetPlayerNameEx(playerid));
- ABroadCast( COLOR_LIGHTRED, szMiscArray, 1337 );
- format(szMiscArray, sizeof(szMiscArray), "Club VIP is no longer giving away free gifts. Thanks for coming!", VIPGiftsName, VIPGiftsTimeLeft);
- SendVIPMessage(COLOR_LIGHTGREEN, szMiscArray);
- VIPGiftsTimeLeft = 0;
- }
- }
- return 1;
- }
- CMD:resetgift(playerid, params[])
- {
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /resetgift [player]");
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(PlayerInfo[giveplayerid][pGiftTime] > 0)
- {
- PlayerInfo[giveplayerid][pGiftTime] = 0;
- format(szMiscArray, sizeof(szMiscArray), "%s's gift timer has been reset", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(playerid, COLOR_YELLOW, szMiscArray);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "That players gift timer is already on 0!");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not connected.");
- }
- }
- return 1;
- }
- CMD:giftnear(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- new range;
- if(sscanf(params, "d", range)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /giftnear [range]");
- if(range < 1)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "The range can not be lower than 1.");
- return 1;
- }
- new count;
- foreach(new i: Player)
- {
- if(ProxDetectorS(range, playerid, i))
- {
- if(PlayerInfo[i][pGiftTime] <= 0)
- {
- GiftPlayer(playerid, i);
- count++;
- }
- }
- }
- format(szMiscArray, sizeof(szMiscArray), "You have gifted everyone (%d) nearby.", count);
- SendClientMessageEx(playerid, COLOR_WHITE, szMiscArray);
- }
- return 1;
- }
- CMD:resetgiftall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- format(szMiscArray, sizeof(szMiscArray), "{AA3333}AdmWarning{FFFF00}: %s has reset everyone's gift timer.", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, szMiscArray, 2);
- foreach(new i: Player)
- {
- PlayerInfo[i][pGiftTime] = 0;
- }
- }
- return 1;
- }
- CMD:gift(playerid, params[])
- {
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /gift [player]");
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(Gifts == 1 || PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[giveplayerid][pGiftTime] > 0)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "The person has already got a gift in the last 5 hours !");
- return 1;
- }
- GiftPlayer(playerid, giveplayerid);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not connected.");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "This command is not activated!");
- }
- }
- return 1;
- }
- CMD:giftall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(GiftAllowed || PlayerInfo[playerid][pAdmin] >= 99999)
- {
- format(szMiscArray, sizeof(szMiscArray), "{AA3333}AdmWarning{FFFF00}: %s has just sent a gift to all players.", GetPlayerNameEx(playerid));
- ABroadCast(COLOR_YELLOW, szMiscArray, 2);
- GiftAllowed = 0;
- foreach(new i: Player)
- {
- GiftPlayer(playerid, i);
- }
- }
- else
- {
- return SendClientMessageEx(playerid, COLOR_GRAD2, "This command has already been used, wait until the next paycheck!");
- }
- }
- return 1;
- }
- CMD:giftreset(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command.");
- new giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /giftreset [player]");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
- if(PlayerInfo[giveplayerid][pGiftTime] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "This player is already able to receive a gift.");
- format(szMiscArray, sizeof(szMiscArray), "{AA3333}AdmWarning{FFFF00}: %s has reset %s's gift timer.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, szMiscArray, 2);
- PlayerInfo[giveplayerid][pGiftTime] = 0;
- return 1;
- }
- CMD:setcode(playerid, params[])
- {
- if (PlayerInfo[playerid][pAdmin] >= 99999 || PlayerInfo[playerid][pShopTech] >= 3)
- {
- new code[32], bypass;
- if (sscanf(params, "s[32]d", code, bypass))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Usage: /setcode <code> <bypass 0/1>");
- SendClientMessageEx(playerid, COLOR_GREY, "If code is 'off', the active code will be disabled.");
- return 1;
- }
- format(GiftCode, 32, code);
- GiftCodeBypass = bypass;
- g_mysql_SaveMOTD();
- mysql_tquery(MainPipeline, "UPDATE `accounts` SET `GiftCode` = 0;", "OnQueryFinish", "i", SENDDATA_THREAD);
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pGiftCode] == 1)
- PlayerInfo[i][pGiftCode] = 0;
- }
- if (strcmp(code, "off") == 0)
- {
- format(szMiscArray, sizeof(szMiscArray), "You have disabled the gift code.");
- }
- else
- {
- format(szMiscArray, sizeof(szMiscArray), "You have set the gift code to \"%s\".", code);
- }
- SendClientMessageEx(playerid, COLOR_WHITE, szMiscArray);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
- }
- return 1;
- }
- CMD:giftcode(playerid, params[])
- {
- if (isnull(params))
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "Usage: /giftcode <code>");
- return 1;
- }
- if(PlayerInfo[playerid][pLevel] < 3) {
- SendClientMessageEx(playerid, COLOR_GREY, "You must be at least level 3 to use this command.");
- return 1;
- }
- if (strcmp(GiftCode, "off") == 0)
- {
- SendClientMessageEx(playerid, COLOR_GREY, "No gift codes are currently active.");
- return 1;
- }
- else
- {
- if (strcmp(params, GiftCode) == 0)
- {
- if(GiftCodeBypass > 0)
- {
- if(PlayerInfo[playerid][pGiftCode] == 0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "The code you entered was valid!");
- PlayerInfo[playerid][pGiftCode] = 1;
- GiftPlayer(MAX_PLAYERS, playerid);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have already entered the gift code.");
- }
- }
- else
- {
- if(PlayerInfo[playerid][pGiftTime] == 0)
- {
- if(PlayerInfo[playerid][pGiftCode] == 0)
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "The code you entered was valid!");
- PlayerInfo[playerid][pGiftCode] = 1;
- GiftPlayer(MAX_PLAYERS, playerid);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have already entered the gift code.");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have already received a gift in the last 5 hours.");
- }
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You have entered a invalid gift code.");
- }
- }
- return 1;
- }
- CMD:dynamicgift(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
- return 1;
- }
- new string[128], Float:Position[4];
- if(dynamicgift == 0)
- {
- GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
- GetPlayerFacingAngle(playerid, Position[3]);
- dynamicgift = CreateDynamicObject(19054, Position[0], Position[1], Position[2]-0.4, 0.0, 0.0, Position[3], -1, -1, -1, 200.0);
- dynamicgift3DText = CreateDynamic3DTextLabel("/getgift\nTo reach inside.",COLOR_YELLOW,Position[0], Position[1], Position[2]+0.25,8.0);
- SetPlayerPos(playerid, Position[0], Position[1], Position[2]+3);
- format(string, sizeof(string), "AdmCmd: %s has placed the dynamic gift.", GetPlayerNameEx(playerid));
-
- if(IsDynamicGiftBoxEnabled == true)
- {
- SendClientMessageEx(playerid, COLOR_RED, "Due to the Dynamic Giftbox being enabled, you may view the content inside the giftbox.");
-
- if(PlayerInfo[playerid][pAdmin] == 99999 || PlayerInfo[playerid][pShopTech] >= 3)
- {
- SendClientMessageEx(playerid, COLOR_RED, "Note: You must fill up the giftbox with /dgedit.");
- }
- ShowPlayerDynamicGiftBox(playerid);
- }
- ABroadCast( COLOR_LIGHTRED, string, 1337);
- }
- else
- {
- DestroyDynamicObject(dynamicgift);
- dynamicgift = 0;
- DestroyDynamic3DTextLabel( Text3D:dynamicgift3DText );
- format(string, sizeof(string), "AdmCmd: %s has destroyed the dynamic gift.", GetPlayerNameEx(playerid));
- ABroadCast( COLOR_LIGHTRED, string, 1337);
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
- }
- return 1;
- }
- CMD:nextgift(playerid, params[])
- {
- new string[128];
- if(PlayerInfo[playerid][pGiftTime] < 1)
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "You're now able to receive a gift from the giftbox or the safe.");
- }
- else {
- format(string, sizeof(string), "You will be able to receive a gift in %d minutes.", PlayerInfo[playerid][pGiftTime]);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- CMD:getgift(playerid, params[])
- {
- new string[128], year, month, day;
- getdate(year, month, day);
- if(IsPlayerInRangeOfPoint(playerid, 3.0,2546.680908, 1403.430786, 7699.584472) || IsPlayerInRangeOfPoint(playerid, 3.0,1726.1000, 1370.1000, 1449.9000) || IsPlayerInRangeOfPoint(playerid, 3.0,1763.5000, 1432.5000, 2015.7000) || IsPlayerInRangeOfPoint(playerid, 3.0,772.4000, 1743.2000, 1938.8800))
- {
- if(PlayerInfo[playerid][pDonateRank] >= 1)
- {
- if(VIPGifts == 0 && PlayerInfo[playerid][pDonateRank] < 4)
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "The safe is locked!");
- return 1;
- }
- if(PlayerInfo[playerid][pGiftTime] > 0)
- {
- format(string, sizeof(string),"Item: Reset Gift Timer\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[17][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[17][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_SHOPGIFTRESET, DIALOG_STYLE_MSGBOX, "Reset Gift Timer", string, "Purchase", "Exit" );
- SendClientMessageEx(playerid, COLOR_GRAD2, "You have already received a gift in the last 5 hours!");
- return 1;
- }
- format(string, sizeof(string), "* %s reaches inside the safe with their eyes closed.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GiftPlayer(MAX_PLAYERS, playerid);
- }
- }
- else if(dynamicgift != 0)
- {
- new Float:Position[3];
- GetDynamicObjectPos(dynamicgift, Position[0], Position[1], Position[2]);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, Position[0], Position[1], Position[2]))
- {
- if(PlayerInfo[playerid][pLevel] >= 3)
- {
- if(PlayerInfo[playerid][pGiftTime] > 0 && (IsDynamicGiftBoxEnabled == false || (IsDynamicGiftBoxEnabled == true && !dgGoldToken)))
- {
- format(string, sizeof(string),"Item: Reset Gift Timer\nYour Credits: %s\nCost: {FFD700}%s{A9C4E4}\nCredits Left: %s", number_format(PlayerInfo[playerid][pCredits]), number_format(ShopItems[17][sItemPrice]), number_format(PlayerInfo[playerid][pCredits]-ShopItems[17][sItemPrice]));
- ShowPlayerDialogEx( playerid, DIALOG_SHOPGIFTRESET, DIALOG_STYLE_MSGBOX, "Reset Gift Timer", string, "Purchase", "Exit" );
- SendClientMessageEx(playerid, COLOR_GRAD2, "You have already received a gift in the last 5 hours!");
- return 1;
- }
- if(IsDynamicGiftBoxEnabled == true)
- {
- if(dgGoldToken)
- {
- if(!PlayerInfo[playerid][pGoldBoxTokens]) return SendClientMessageEx(playerid, COLOR_GREY, "You have no Gold Giftbox tokens!");
- PlayerInfo[playerid][pGoldBoxTokens]--;
- }
- GiftPlayer(MAX_PLAYERS, playerid, 1);
- }
- else if(IsDynamicGiftBoxEnabled == false)
- {
- GiftPlayer(MAX_PLAYERS, playerid);
- }
- format(string, sizeof(string), "* %s reaches inside the bag of gifts with their eyes closed.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_WHITE, "* You must be at least level 3 to use this, sorry!");
- }
- }
- }
- return 1;
- }
- // Dynamic Giftbox
- CMD:dgedit(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 99999 && PlayerInfo[playerid][pShopTech] < 3) return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
- new string[128], choice[32], type, amount, var;
- if(strcmp(params, "autoreset", true) == 0)
- {
- DeletePVar(playerid, "dgInputSel");
- format(string, sizeof(string), "Timer: %d min(s)\nAmount: %d\n%s", dgTimerTime, dgAmount, (dgTimer != -1)?("{FF0606}Disable"):("{00ff00}Enable"));
- return ShowPlayerDialogEx(playerid, DIALOG_DGRAUTORESET, DIALOG_STYLE_LIST, "Dynamic Giftbox Auto Reset - Select to modify", string, "Select", "Close");
- }
- if(sscanf(params, "s[32]dD", choice, type, amount))
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Usage: /dgedit [choice] [type] [value]");
- SendClientMessageEx(playerid, COLOR_GRAD1, "Available Choices: Money, RimKit, Firework, 7DayGVIP, 1MonthGVIP, 7DaySVIP, 1MonthSVIP, CarSlot, ToySlot");
- SendClientMessageEx(playerid, COLOR_GRAD1, "Available Choices: FullArmor, Firstaid, DDFlag, GateFlag, Credits, PriorityAd, HealthNArmor, Giftreset, Material");
- SendClientMessageEx(playerid, COLOR_GRAD1, "Available Choices: Warning, Pot, Crack, PaintballToken, VIPToken, RespectPoint, CarVoucher, BuddyInvite, Laser");
- SendClientMessageEx(playerid, COLOR_GRAD1, "Available Choices: CustomToy, AdmuteReset, NewbieMuteReset, RestrictedCarVoucher, PlatVIPVoucher");
- SendClientMessageEx(playerid, COLOR_GRAD1, "Available Choices: AutoReset, UseGoldTokens");
- return SendClientMessageEx(playerid, COLOR_RED, "Available Types: 0 = Enable/Disable | 1 = Quantity available | 2 = Quantity Given | 3 = Category");
- }
- if(type < 0 || type > 3)
- {
- SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid Type!");
- return SendClientMessageEx(playerid, COLOR_RED, "Available Type: 0 = Enable/Disable | 1 = Quantity available | 2 = Quantity Given | 3 = Category");
- }
- if(amount < 0) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot choose an amount below 0!");
- if(strcmp(choice, "money", true) == 0) var = dgMoney;
- else if(strcmp(choice, "rimkit", true) == 0) var = dgRimKit;
- else if(strcmp(choice, "firework", true) == 0) var = dgFirework;
- else if(strcmp(choice, "7daygvip", true) == 0) var = dgGVIP;
- else if(strcmp(choice, "1monthgvip", true) == 0) var = dgGVIPEx;
- else if(strcmp(choice, "7daysvip", true) == 0) var = dgSVIPEx;
- else if(strcmp(choice, "1monthsvip", true) == 0) var = dgSVIP;
- else if(strcmp(choice, "carslot", true) == 0) var = dgCarSlot;
- else if(strcmp(choice, "toyslot", true) == 0) var = dgToySlot;
- else if(strcmp(choice, "fullarmor", true) == 0) var = dgArmor;
- else if(strcmp(choice, "firstaid", true) == 0) var = dgFirstaid;
- else if(strcmp(choice, "ddflag", true) == 0) var = dgDDFlag;
- else if(strcmp(choice, "gateflag", true) == 0) var = dgGateFlag;
- else if(strcmp(choice, "credits", true) == 0) var = dgCredits;
- else if(strcmp(choice, "priorityad", true) == 0) var = dgPriorityAd;
- else if(strcmp(choice, "healthnarmor", true) == 0) var = dgHealthNArmor;
- else if(strcmp(choice, "giftreset", true) == 0) var = dgGiftReset;
- else if(strcmp(choice, "material", true) == 0) var = dgMaterial;
- else if(strcmp(choice, "warning", true) == 0) var = dgWarning;
- else if(strcmp(choice, "pot", true) == 0) var = dgPot;
- else if(strcmp(choice, "crack", true) == 0) var = dgCrack;
- else if(strcmp(choice, "paintballtoken", true) == 0) var = dgPaintballToken;
- else if(strcmp(choice, "viptoken", true) == 0) var = dgVIPToken;
- else if(strcmp(choice, "respectpoint", true) == 0) var = dgRespectPoint;
- else if(strcmp(choice, "carvoucher", true) == 0) var = dgCarVoucher;
- else if(strcmp(choice, "buddyinvite", true) == 0) var = dgBuddyInvite;
- else if(strcmp(choice, "laser", true) == 0) var = dgLaser;
- else if(strcmp(choice, "customtoy", true) == 0) var = dgCustomToy;
- else if(strcmp(choice, "admutereset", true) == 0) var = dgAdmuteReset;
- else if(strcmp(choice, "newbiemutereset", true) == 0) var = dgNewbieMuteReset;
- else if(strcmp(choice, "restrictedcarvoucher", true) == 0) var = dgRestrictedCarVoucher;
- else if(strcmp(choice, "platvipvoucher", true) == 0) var = dgPlatinumVIPVoucher;
- else if(strcmp(choice, "autoreset", true) == 0) return cmd_dgedit(playerid, "autoreset");
- else if(strcmp(choice, "usegoldtokens", true) == 0)
- {
- if(dgGoldToken) dgGoldToken = 0, SendClientMessageEx(playerid, COLOR_WHITE, "You have disabled the use of a Gold Giftbox token to recieve a gift.");
- else dgGoldToken = 1, SendClientMessageEx(playerid, COLOR_WHITE, "You have enabled the use of a Gold Giftbox token to recieve a gift.");
- return 1;
- }
- else return SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid Choice!");
- // Prepare the proper and approriate string
- switch(type)
- {
- case 0:
- {
- // Little check to make sure they're not inserting invalid values
- if(amount < 0 || amount > 1) return SendClientMessage(playerid, COLOR_RED, "0 = Disabled | 1 - Enabled");
- switch(amount)
- {
- case 0: format(string, sizeof(string), "You have disabled the gift.");
- case 1: format(string, sizeof(string), "You have enabled the gift.");
- default: return true;
- }
- }
- case 1:
- {
- format(string, sizeof(string), "You have set the gift quantity to %s.", number_format(amount));
- }
- case 2:
- {
- format(string, sizeof(string), "You have set the gift amount to %s.", number_format(amount));
- }
- case 3:
- {
- if(amount < 0 || amount > 3) return SendClientMessageEx(playerid, COLOR_RED, "0 = Common | 1 = Less Common | 2 = Rare | 3 = Super Rare");
- switch(amount)
- {
- case 0: format(string, sizeof(string), "You have set the category to Common.");
- case 1: format(string, sizeof(string), "You have set the category to Less Common.");
- case 2: format(string, sizeof(string), "You have set the category to Rare.");
- case 3: format(string, sizeof(string), "You have set the category to Super Rare.");
- default: return true;
- }
- }
- default: return true;
- }
- // Set the data to the variable
- dgVar[dgItems:var][type] = amount;
- // Save the GiftBox Stuff
- SaveDynamicGiftBox();
- // Send the client message
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- return true;
- }
- CMD:viewgiftbox(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 99999 || PlayerInfo[playerid][pShopTech] >= 3)
- {
- ShowPlayerDynamicGiftBox(playerid);
- }
- else
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not an Executive Administrator!");
- return true;
- }
- CMD:togdynamicgift(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 99999 || PlayerInfo[playerid][pShopTech] >= 3)
- {
- if(IsDynamicGiftBoxEnabled == false)
- {
- IsDynamicGiftBoxEnabled = true;
- SendClientMessageEx(playerid, COLOR_WHITE, "You have enabled the Dynamic GiftBox, please use /dgedit to modify the giftbox items.");
- }
- else if(IsDynamicGiftBoxEnabled == true)
- {
- IsDynamicGiftBoxEnabled = false;
- SendClientMessageEx(playerid, COLOR_WHITE, "You have disabled the Dynamic Giftbox.");
- }
- }
- else
- return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not an Executive Administrator!");
- return true;
- }
- CMD:giftbox(playerid, params[])
- {
- if(dynamicgift != 0)
- {
- new Float: pos[3];
- SendClientMessageEx(playerid, COLOR_YELLOW, "** There is currently a giftbox placed down and we have set a checkpoint to the location of the giftbox.");
- if(CheckPointCheck(playerid)) cmd_killcheckpoint(playerid, params); //If they have a checkpoint, just remove it
- DisablePlayerCheckpoint(playerid);
- GetDynamicObjectPos(dynamicgift, pos[0], pos[1], pos[2]);
- SetPlayerCheckpoint(playerid, pos[0], pos[1], pos[2], 5);
- SetPVarInt(playerid, "GiftBoxCP", 1);
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_YELLOW, "** There is currently no giftbox placed down.");
- }
- return true;
- }
|