MySQL R8
#1

When i connect, the dialog register doesn't shows up.
OnPlayerConnect:
Код:
new QUERY [ 128 ];
format ( QUERY, sizeof ( QUERY ), "SELECT id FROM `"MySQL_DataBase"` WHERE Name = '%s' LIMIT 0,1", MySQL_Name( playerid ));
mysql_function_query ( 1, QUERY, true, "MySQL_AccountCheck", "i", playerid );
MySQL_AccountCheck:
Код:
public MySQL_AccountCheck( playerid )
{
    new rows, 
    	collums;

    cache_get_data ( rows, collums );

    if( rows )
    {
    	new Title[ 300 ];

    	format( Title, sizeof( Title ), "{FFFFFF}Welcome back, {0537FF}%s {FFFFFF}!", GetName( playerid ));
    	SPD( playerid, Login, INPUT, Title, "{FFFFFF}You need to type your password below so your account data will be loaded !", "Login", "Exit" );
    } 
    else 
    {
    	new Text[ 300 ];
    	new Title[ 300 ];

    	format( Title, sizeof( Title ), "{FFFFFF}Welcome, {0537FF}%s {FFFFFF}!", GetName( playerid ));
    	format( Text, sizeof( Text ),  "{FFFFFF}Welcome on {0537FF}Stunt Revolution {FFFFFF}!\n\
    									{FFFFFF}First of all, you need to create an account to play !:\n\
    									{FFFFFF}\t- Your password must have between 4 and 24 characters\n\
    									{FFFFFF}\t- Use symbols, so noone can access your account\n\
    									{FFFFFF}\t- And the most important ... {FF0000}HAVE FUN ! ! !" ); 

        SPD( playerid, Register, INPUT, Title, Text, "Register", "Exit" );    
   	}
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)