16.03.2015, 16:51
I think you could do that
And
Код:
CMD:createclan(playerid, params[]) { new cName[80]; if(PlayerInfo[playerid][ClanID] != 0) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"You're already in a clan/gang!"); if(sscanf(params, "s[80]", cName)) ShowPlayerDialog(playerid, DIALOG_CREATECLAN, DIALOG_STYLE_INPUT, "CREATE CLAN", "INFO: Before creating a clan, you need to have 2,000 score and it will cost you one-time fee of $2,500,000!", "Create", "Cancel"); return 1; }
Код:
if (dialogid == DIALOG_CREATECLAN && response) { new query[256], cName[80]; if(GetPlayerScore(playerid) < 2000 || GetPlayerMoney(playerid) < 2500000) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"You need $2,500,000 and 2,500 score to create a clan!"); mysql_format(MySQL, query, sizeof query, "SELECT * FROM `"Clans_Table"` WHERE cName = '%e' LIMIT 1", GetName(playerid)); mysql_tquery(MySQL, query, "FetchClanInfo", "is", playerid, cName); return 1; }