Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case DIALOG_CHOOSECLANNAME: {
- if(response)
- {
- if(strlen(inputtext) >= 3 && strlen(inputtext) <= 20)
- {
- new clanname[25],strings[128];
- mysql_real_escape_string(inputtext, clanname);
- strcpy(ClanInfo[PlayerInfo[playerid][pClan]][cClanName], clanname, sizeof(clanname));
- mysql_format(SQL, string, sizeof(string), "UPDATE clans SET `clanName`='%s' WHERE `clanID`='%d'", clanname, PlayerInfo[playerid][pClan]);
- mysql_tquery(SQL,string,"","");
- format(strings, sizeof(strings), "Clan name: %s.", clanname);
- SendClientMessage(playerid, COLOR_GENANNOUNCE, strings);
- ShowPlayerDialog(playerid, DIALOG_CHOOSECLANTAG, DIALOG_STYLE_INPUT, "Clan tag", "Insert clan tag in the box below:\n(You can't change it after that!)", "Ok", "");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CHOOSECLANNAME, DIALOG_STYLE_INPUT, "Clan name", "Insert clan name in the box below:\nMinimum 3 characters and maximum 20 characters.\n(You can't change it after that!)", "Ok", "");
- return 1;
- }
- }
- }
- case DIALOG_CHOOSECLANTAG: {
- if(response)
- {
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 15)
- {
- new clanname[25],strings[256];
- mysql_real_escape_string(inputtext, clanname);
- strcpy(ClanInfo[PlayerInfo[playerid][pClan]][cClanTag], clanname, sizeof(clanname));
- mysql_format(SQL, strings, sizeof(strings), "UPDATE clans SET `clanTag`='%s' WHERE `clanID`='%d'", clanname, PlayerInfo[playerid][pClan]);
- mysql_tquery(SQL,strings,"","");
- format(strings, sizeof(strings), "Clan tag: %s.", clanname);
- SendClientMessage(playerid, COLOR_GENANNOUNCE, strings);
- mysql_format(SQL, strings, sizeof(strings), "SELECT * FROM `clans`");
- mysql_tquery(SQL, strings, "LoadClanInfo", "");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CHOOSECLANTAG, DIALOG_STYLE_INPUT, "Clan tag", "Insert clan tag in the box below:\nMinimum 2 characters and maximum 15 characters.\n(You can't change it after that!)", "Ok", "");
- return 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement