16.03.2015, 16:29
Try this:
PHP код:
if(dialogid == DIALOG_CREATECLAN)
{
if(response == 1) // If you pressed accept.
{
new query[256], cName[80];
if(PlayerInfo[playerid][ClanID] != 0) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"You're already in a clan/gang!");
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);
}
else
{
// If you pressed cancel.
}