Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(listitem == 11)
- {
- new i,stringyy[500];
- if(PlayerInfo[playerid][pPremiumPoints] >= 100)
- {
- if(PlayerInfo[playerid][pClan] == 0)
- {
- PlayerInfo[playerid][pPremiumPoints] -= 100;
- format(stringyy, sizeof(stringyy), "You have bought a clan! (-100 premium points)");
- SendClientMessage(playerid, COLOR_YELLOW, stringyy);
- PlayerInfo[playerid][pCRank] = 7;
- new Cache: resultoccc = mysql_query(SQL, "INSERT INTO `clans` (`clanName`) VALUES('New Clan')");
- print("Trece de primul query");
- i = cache_insert_id();
- cache_delete(resultoccc);
- ClanInfo[i][cClanExpire] = gettime() + (90*86400);
- PlayerInfo[playerid][pClan] = i;
- mysql_format(SQL, stringyy, sizeof(stringyy), "UPDATE `clans` SET `clanExpire`='%d' WHERE `clanID`='%d'",ClanInfo[i][cClanExpire],i);
- mysql_tquery(SQL, stringyy, "", "");
- print("Trece de al 2-lea query");
- mysql_format(SQL, stringyy, sizeof(stringyy), "UPDATE users SET `CRank`='7',`Clan`='%d',`PremiumPoints`='%d',`ClanJoin`='%d' WHERE `name`='%s'", PlayerInfo[playerid][pClan], PlayerInfo[playerid][pPremiumPoints], gettime(), PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL,stringyy,"","");
- print("Trece de al 3-lea query");
- mysql_format(SQL, stringyy, sizeof(stringyy), "UPDATE `clans` SET `clanSlots`='25' WHERE `clanID`='%d'",i);
- mysql_tquery(SQL, stringyy, "", "");
- print("Trece de al 4-lea query");
- new strings[200];
- format(strings, sizeof(strings), "/shop: %s created a new clan.", GetName(playerid));
- ABroadCast(COLOR_YELLOW, strings, 6);
- ShowPlayerDialog(playerid, DIALOG_CHOOSECLANNAME, DIALOG_STYLE_INPUT, "Clan name", "Insert clan name in the box below:\n(You can't change it after that!)", "Ok", "");
- }
- else return SCM(playerid,COLOR_WHITE,"You already are in a clan! Use /quitclan first.");
- }
- else return ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement