Help with MYSQL
#4

try this for staff command

PHP код:
CMD:staff(playerid)
{
    new 
message[2500], sql[200], value[100][50];
    if(
playerData[playerid][playerScore] >= 50)
    {
        
format(sqlsizeof(sql), "SELECT * FROM `playerdata` WHERE playerLevel  >= 1");
        
mysql_query(sql);
        
mysql_store_result();
        while(
mysql_retrieve_row())
        {
            
mysql_fetch_row(value[5], "playerLevel");
            
mysql_fetch_row(value[0], "playerName");
            
format(messagesizeof(message), "%s{0000BB}%s\tLevel: %s"messagevalue[0], value[5]);
        }
        
mysql_free_result();
        
ShowPlayerDialog(playerid10000DIALOG_STYLE_MSGBOX"Staff List"message"Close""");
    }
    else
    {
        
SendClientMessage(playerid, -1"{FF0000}[ERROR] {FF0000}You must have 50 score in order to view the stafflist.");
    }
    return 
1;

Reply


Messages In This Thread
Help with MYSQL - by mmostafa - 09.06.2018, 04:48
Re: Help with MYSQL - by mmostafa - 11.06.2018, 14:55
Re: Help with MYSQL - by SubGames - 11.06.2018, 23:22
Re: Help with MYSQL - by LevelT - 12.06.2018, 04:49
Re: Help with MYSQL - by GTLS - 12.06.2018, 06:07
Re: Help with MYSQL - by mmostafa - 12.06.2018, 08:21
Re: Help with MYSQL - by mmostafa - 12.06.2018, 08:38
Re: Help with MYSQL - by mmostafa - 13.06.2018, 02:58
Re: Help with MYSQL - by Slawi - 13.06.2018, 03:03
Re: Help with MYSQL - by mmostafa - 13.06.2018, 03:05

Forum Jump:


Users browsing this thread: 1 Guest(s)