- 0
Problema
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
HiTman
Nume: HiTman
Problem? întâlnit?: Cand intru pe server nu apare dialog-ul de register doar cel de login nu conteaza chiar daca nu am cont inregistrat , zice sa ma loghez .. bun ma loghez (orice pass) si merge.
Ce am încercat pân? acum: Multe..
Codul sursa/Log/Altele:
//==================================== CallBacks =============================//
public OnPlayerConnect( playerid )
public OnPlayerConnect( playerid ) { gsString[ 0 ] = EOS; new connecting_ip[ 16 ] ; GetPlayerIp( playerid, connecting_ip, 16 ); if ( PlayerInfo[ playerid ][ LoggedIn ] == 0 ) { format( gsString, 512, "{00FF00}Please login into your account, before start playing on {FFFF00}RSE.\n{33CCFF}If you aren't {FF0000}%s{33CCFF}, please click on '{FF0000}New Nick{33CCFF}' and you can change your nick and play !\n\n{00FF00}Put your password what do you use it when you register your account:", PlayerName( playerid ) ); ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login Account", gsString, "Login", "New Nick" ); return 0; } if ( GetNumberOfPlayersOnThisIP( connecting_ip ) > MAX_CONNECTIONS_FROM_IP ) { format( gsString, 144, ">> Server-Security << :: IP Ban player '%s'. {FFFF00}Reason: Too many connections from this IP", PlayerName( playerid ) ); SendClientMessageToAll( COLOR_ULTRARED, gsString ); BanEx( playerid, "Bots Flood" ); return 1; } printf( "Debug Bans 1" ); format( gsQuery, 512, "SELECT * FROM `Banlist` WHERE `IP` = '%s' OR `Name` = '%s'", connecting_ip, PlayerName( playerid ) ); mysql_query( gsQuery, THREAD_CHECK_BANS_LIST, playerid ); printf( "Debug Bans 2" ); return 1; }} case THREAD_CHECK_ACCOUNT_USERNAME: { mysql_store_result( ); if ( !IsPlayerConnected( extraid ) ) return mysql_free_result( ); gsString[ 0 ] = EOS; new pField[ 20 ] ; if ( mysql_num_rows( ) == 0 ) { ShowPlayerDialog( extraid, RegDialog, DIALOG_STYLE_PASSWORD, "{FF0000}#1 {FFFFFF}Type Password", "{FFFFFF}Welcome to {00FF00}Romania {FF0000}Stunt {00FF00}Empire {FFFFFF}server.\n\ Any member of this server needs to create an account to save his stats.\n\n\ {FF0000}Ok, so ... please type your account password, and we can progress.", "Next", "" ); } else { mysql_retrieve_row( ); mysql_get_field( "IP", pField ); if ( !strcmp( GetPlayerIPEx( extraid ), pField, true ) ) { new pName[ 25 ]; GetPlayerName( extraid, pName, 25 ); mysql_real_escape_string( pName, pName ); format( gsQuery, 256, "SELECT * FROM `Accounts` WHERE `Name` = '%s'", pName ); mysql_query( gsQuery, THREAD_PLAYER_ACCOUNT_LOGIN, extraid ); } else { format( gsString, 512, "{00FF00}Please login into your account, before start playing on {FFFF00}RSE.\n{33CCFF}If you aren't {FF0000}%s{33CCFF}, please click on '{FF0000}New Nick{33CCFF}' and you can change your nick and play !\n\n{00FF00}Put your password what do you use it when you register your account:", PlayerName( extraid ) ); ShowPlayerDialog( extraid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login Account", gsString, "Login", "New Nick" ); } } mysql_free_result( ); return 1; }9 answers to this question
Recommended Posts