Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case DIALOG_CLAN: {
- if(!response) return ShowShop(playerid);
- if(ExistaNumeClan(inputtext)) return SCM(playerid, COLOR_WARNING, "Exista deja un clan inregistrat cu acest nume!");
- if(strlen(inputtext) < 2 || strlen(inputtext) > 20) {
- SendClientMessage(playerid, COLOR_GREY, "Numele clanului trebuie sa aiba intre 3 si 20 caractere.");
- if(sSlot[playerid] == 10) {
- ShowPlayerDialog(playerid, DIALOG_CLAN, DIALOG_STYLE_INPUT, "Shop:", "Esti pe cale sa-ti creezi un clan cu 10 locuri disponibile.\nTot ce trebuie sa faci in acest moment,\
- este sa-ti alegi numele clanului.\nNumele clanului trebuie sa contina intre 3 si 10 caractere.", "Ok", "Back");
- }
- else if(sSlot[playerid] == 20) {
- ShowPlayerDialog(playerid, DIALOG_CLAN, DIALOG_STYLE_INPUT, "Shop:", "Esti pe cale sa-ti creezi un clan cu 20 locuri disponibile.\nTot ce trebuie sa faci in acest moment,\
- este sa-ti alegi numele clanului.\nNumele clanului trebuie sa contina intre 3 si 10 caractere.", "Ok", "Back");
- }
- else if(sSlot[playerid] == 40) {
- ShowPlayerDialog(playerid, DIALOG_CLAN, DIALOG_STYLE_INPUT, "Shop:", "Esti pe cale sa-ti creezi un clan cu 40 locuri disponibile.\nTot ce trebuie sa faci in acest moment,\
- este sa-ti alegi numele clanului.\nNumele clanului trebuie sa contina intre 3 si 10 caractere.", "Ok", "Back");
- }
- return 1;
- }
- switch(sSlot[playerid]) {
- case 10: {
- if(PlayerInfo[playerid][pPremiumPoints] < 2000) return SCM(playerid, -1, "Nu ai destule Diamonds.");
- else {
- PlayerInfo[playerid][pPremiumPoints] -= 2000;
- Update(playerid, pPremiumPointsx);
- }
- }
- case 20: {
- if(PlayerInfo[playerid][pPremiumPoints] < 3000)return SCM(playerid, -1, "Nu ai destule Diamonds.");
- else {
- PlayerInfo[playerid][pPremiumPoints] -= 3000;
- Update(playerid, pPremiumPointsx);
- }
- }
- case 40: {
- if(PlayerInfo[playerid][pPremiumPoints] < 4000)return SCM(playerid, -1, "Nu ai destule Diamonds.");
- else {
- PlayerInfo[playerid][pPremiumPoints] -= 4000;
- Update(playerid, pPremiumPointsx);
- }
- }
- }
- new
- szDate[180],
- Year, Month, Day, Hour, Minute, Second;
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- format(szDate, sizeof(szDate), "%02d/%02d/%d - %02d:%02d:%02d", Day, Month, Year, Hour, Minute, Second);
- mysql_format(SQL, query, sizeof(query), "INSERT INTO `clans` (`Name`, `Owner`, `OwnerSQL`, `RegisterDate`, `Color`, `Slots`) VALUES ('%e', '%e', '%d', '%e', 'FFFFFF', '%d')", inputtext, PlayerInfo[playerid][pUsername], PlayerInfo[playerid][pSQLID], szDate, sSlot[playerid]);
- new Cache: result = mysql_query(SQL, query);
- new i = cache_insert_id();
- cache_delete(result);
- ClanInfo[i][clSlots] = sSlot[playerid];
- format(ClanInfo[i][clName], 64, inputtext);
- format(ClanInfo[i][clOwner], 256, PlayerInfo[playerid][pUsername]);
- format(ClanInfo[i][clRegisterDate], 256, szDate);
- format(ClanInfo[i][clColor], 256, "FFFFFF");
- ClanMembers[i] ++;
- PlayerInfo[playerid][pClan] = i;
- PlayerInfo[playerid][pClanRank] = 6;
- ClanInfo[i][clDays] = 60;
- new szText[180];
- format(szText, sizeof(szText), "Numele ales de tine este: %s.\nCel de-al doilea pas, este de a alege tagul clanului.\nTagul clanului trebuie sa contina intre 3 si 6 caractere.", inputtext);
- ShowPlayerDialog(playerid, DIALOG_CLAN2, DIALOG_STYLE_INPUT, "Shop:", szText, "Ok", "");
- format(query, sizeof(query), "UPDATE `users` SET `Clan`='%d', `ClanRank`='%d' WHERE `Name`='%s'", PlayerInfo[playerid][pClan], PlayerInfo[playerid][pClanRank], PlayerInfo[playerid][pUsername]);
- mysql_query(SQL, query);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement