Create Clan---> Make Leader - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Create Clan---> Make Leader (
/showthread.php?tid=569496)
Create Clan---> Make Leader -
CoR3 - 31.03.2015
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.
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.");
}
}
i don't know if i could get the id through the name of the clan with MySql