LOGIN /REGISTER Question [REP+]
#1

Hello guys,

I want to say the player if he clicks the ok button after he has register. But only if he not gets the Error Message

This Message:

PHP код:
SendClientMessage(playerid,COLOR_YELLOW,"* Your Account have been successfully registered in the database!"); 
Thats my Code:

PHP код:
    if(dialogid==DIALOG_REGISTER)
    {
        if(
response)
        {
            new 
name[MAX_PLAYER_NAME],query[128],password[35];
            
GetPlayerName(playerid,name,sizeof(name));
            if(
strlen(inputtext)>3)
            {
                
mysql_escape_string(inputtext,password,dbhandle);
                
format(query,sizeof(query),"INSERT INTO user (Username,Password) VALUES ('%s','%s') ",name,password);
                
mysql_function_query(dbhandle,query,false,"","");
            }
            else
            {
                
SendClientMessage(playerid,COLOR_RED,"Your Password needs to be minimum 4 letters!");
                
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Welcome to UltimateFS\n\nPlease enter a Password","OK","Cancel");
            }
        }
        else
        {
            
Kick(playerid);
        }
        return 
1;
    }
    return 
1
Reply
#2

no rply
Reply
#3

pawn Код:
if(dialogid==DIALOG_REGISTER)
    {
        if(response)
        {
            new name[MAX_PLAYER_NAME],query[128],password[35];
            GetPlayerName(playerid,name,sizeof(name));
            if(strlen(inputtext)>3)
            {
                mysql_escape_string(inputtext,password,dbhandle);
                format(query,sizeof(query),"INSERT INTO user (Username,Password) VALUES ('%s','%s') ",name,password);
                mysql_function_query(dbhandle,query,false,"","");
                SendClientMessage(playerid,COLOR_YELLOW,"* Your Account have been successfully registered in the database!");
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"Your Password needs to be minimum 4 letters!");
                ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Register","Welcome to UltimateFS\n\nPlease enter a Password","OK","Cancel");
            }
        }
        else
        {
            Kick(playerid);
        }
        return 1;
    }
    return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)