Create Clan---> Make Leader
#1

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) > && strlen(inputtext) <= 20)
        {
            if(!
FamilyExists(inputtext))
            {
                  
format(stringsizeof(string), "INSERT INTO `families` (`Name`) VALUES ('%s')",inputtext);
                
mysql_query_ex(string);
                
LoadFamilies();
                
format(string2sizeof(string2), "Has creado la banda %s.",inputtext);
                
SendClientMessage(playeridCOLOR_ROLstring2);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)