Showing dynamic ShowPlayerDialog MySQL
#1

Hello. I'm trying to make a command /factions which will show user all the factions in my database.
However, It doesn't seem to work for me.
PHP код:
CMD:factions(playerid,params[])
{
    
mysql_tquery(mysql"SELECT * FROM `Factions` LIMIT "#MAX_FACTIONS"", "LoadFactionsIG", "");
    
return 1;
}
forward LoadFactionsIG();
public 
LoadFactionsIG()
{
    new 
userstring[250];
    
    new 
count cache_get_row_count();
    for (new 
icounti++)
    {
        
format(userstringsizeof(userstring), "%s  \n",cache_get_field_content(i"Name"Factions[i][Name]));
        
ShowPlayerDialog(i10DIALOG_STYLE_MSGBOX"Factions"userstring"OK","");
    }
    
    
printf("> %d factions have been loaded from the database."count); // Prints out the information of how many factions created
    
return 1;

Do I have to use callback for such thing isn't there a simpler way to achieve what I want.
Reply


Messages In This Thread
Showing dynamic ShowPlayerDialog MySQL - by DavidLuango - 31.07.2016, 07:06
Re: Showing dynamic ShowPlayerDialog MySQL - by Stuntff - 31.07.2016, 07:12
Re: Showing dynamic ShowPlayerDialog MySQL - by DavidLuango - 31.07.2016, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)