31.03.2015, 05:43
Well i make this code, but i have one problem; when user created the clan, the server doesnґt make him leader.
i'dnot know how to get the ID of the new clan.
i don't know if i could get the id through the name of the clan with MySql
i'dnot know how to get the ID of the new clan.
PHP код:
else if(dialogid == DIALOG_CREARBANDA)
{
new string [250];
new string2 [250];
if(strlen(inputtext) > 5 && strlen(inputtext) <= 20)
{
if(!FamilyExists(inputtext))
{
format(string, sizeof(string), "INSERT INTO `families` (`Name`) VALUES ('%s')",inputtext);
mysql_query_ex(string);
LoadFamilies();
format(string2, sizeof(string2), "Has creado la banda %s.",inputtext);
SendClientMessage(playerid, COLOR_ROL, string2);
}
else
{
SendClientMessage(playerid, COLOR_ROL, "Ya existe una banda con ese nombre.");
}
}
else
{
SendClientMessage(playerid,0xFFFFFFAA,"El nombre debe estar entre 5 y 20 caracteres.");
}
}