SA-MP Forums Archive
Problem with loading accounts from MySql - 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: Problem with loading accounts from MySql (/showthread.php?tid=657842)



Problem with loading accounts from MySql - akib - 16.08.2018

I am having problem in login registration :/

Code :
PHP Code:
public OnUserCheck(playerid)
{
    new 
num_rows,num_fields;
    
cache_get_data(num_rows,num_fields,dbhandle);
    if(
num_rows==0)
    {
        
//Register
        
new f[256];
        
format(f,sizeof(f),"None");
        
sInfo[playerid][money] = 10000;
        
sInfo[playerid][level] = 1;
        
sInfo[playerid][f_name] = f;
        
sInfo[playerid][f_rank] = 0;
          
sInfo[playerid][s_posx] = 2814.9570;
        
sInfo[playerid][s_posy] = 1313.2760;
        
sInfo[playerid][s_posz] = 10.7500;
        
sInfo[playerid][s_angle] = 91.6887;
        
sInfo[playerid][alevel] = 0;
        
sInfo[playerid][vlevel] = 0;
        
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Your account is not registred, PLease Register.\nEnter Password:","Register","");
    }
    else
    {
        
//Login
        
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Please enter password to login:","Login","Quit");
    }
    return 
1;

Everytime i enter, it shows me register window

MySql Table ss :