Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_USECODE)
- {
- if(!response) return SCM(playerid, COLOR_GREEN, "Ai inchis dialogul!");
- {
- if(!suntcodes(inputtext)) return SCM(playerid, COLOR_WHITE, "{008080}(Error){FFFFFF} Codul introdus este invalid sau a fost deja folosit!");
- format(query, sizeof(query), "SELECT * FROM `luckycodes` WHERE `code`='%s'", inputtext);
- new rand = random(310);
- new won[256];
- if(rand < 270)
- {
- new randmoney = 500000 + random(1000000);
- PlayerInfo[playerid][pCash] += randmoney;
- GivePlayerCash(playerid, randmoney);
- format(won, sizeof(won), "Ai castigat $%s din roll!", FormatNumber(randmoney));
- GiftMoney += randmoney;
- }
- else if(rand >= 270 && rand < 280)
- {
- new randrp = 10 + random(60);
- PlayerInfo[playerid][pPremiumPoints] += randrp;
- Update(playerid, pPremiumPointsx);
- format(won, sizeof(won), "Ai introdus un lucky code si ai castigat %d premium points!", randrp);
- GiftGold += randrp;
- format(string, sizeof(string), "(( AdmBot: %s a introdus un lucky code si a castigat %d premium points! ))", GetName(playerid), randrp);
- SendClientMessageToAll(COLOR_CLIENT, string);
- }
- else if(rand >= 280 && rand < 297)
- {
- new randrp = 1 + random(4);
- PlayerInfo[playerid][pExp] += randrp;
- Update(playerid, pRP);
- format(won, sizeof(won), "Ai castigat %d respect points din roll!", randrp);
- GiftRP += randrp;
- UpdateProgress(playerid, 0);
- }
- else if(rand >= 297 && rand <= 300) {
- if(GiftVehicle < 60) {
- if(GetSlots(playerid) == GetVehicles(playerid)) {
- new randmoney = 1000000 + random(3000000);
- PlayerInfo[playerid][pCash] += randmoney;
- GivePlayerCash(playerid, randmoney);
- format(won, sizeof(won), "Ai introdus un lucky code si ai castigat $%s !", FormatNumber(randmoney));
- GiftMoney += randmoney;
- }
- else {
- LuckyVehicle++;
- format(won, sizeof(won), "Ai introdus un lucky code si ai castigat un vehicul de tip Banshee.");
- GiveVehicle(playerid, 492);
- format(string, sizeof(string), "(( AdmBot: %s a introdus un lucky code si a castigat un Banshee! ))", GetName(playerid));
- SendClientMessageToAll(COLOR_CLIENT, string);
- format(string, sizeof(string), "(( AdmBot: Mai sunt %d vehicule disponibile. ))", 60-LuckyVehicle);
- SendClientMessageToAll(COLOR_CLIENT, string);
- }
- }
- }
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Lucky Codes", won, "Ok", "");
- new str1[200];
- mysql_format(SQL,str1, sizeof(str1), "DELETE FROM `LuckyCodes` WHERE `code`='%s'", inputtext);
- mysql_tquery(SQL,str1,"","");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement