vendredi 25 septembre 2015

Dialog is not showing

The Dialog is not showing when I connect...

PHP Code:

public OnUserCheck(playerid)
{
    new 
num_rowsnum_fields;
    
cache_get_data(num_rowsnum_fieldsdbhandle);
    if(
num_rows == 0)
    {
        
// Register
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Register""Typ a password to register""Register""Leave");
    }
    else
    {
        
// Login
       // ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Fill your password to register", "Login", "Leave");
    
}
    return 
1;



PHP Code:

if(dialogid==DIALOG_REGISTER)
    {
        if(
response)
        {
            new 
pName[MAX_PLAYER_NAME], query[100], password[35];
            
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
            if(
strlen(inputtext) >= 3)
            {
                
mysql_escape_string(inputtextpassworddbhandle);
                
format(querysizeof query"INSERT INTO accounts (username, password) VALUES ('%s', '%s')"pNamepassword);
                
mysql_function_query(dbhandlequeryfalse"""");
            }
            else
            {
                 
SendClientMessage(playeridCOLOR_RED"Error: Minimum password length is 3 characters!");
                   
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Register""Typ a password to register""Register""Leave");
            }
        }
        else
        {
            
Kick(playerid);
        }
    } 



Aucun commentaire:

Enregistrer un commentaire