01.09.2010, 18:50
Hello,
When a Player connects to my server. The Server Shuts down, But i don't know why:
My OnPlayerConnect:
My CheckPlayerAccount(playerid);
Does Someone know whats Wrong ?
Greetingz,
Gforcez
When a Player connects to my server. The Server Shuts down, But i don't know why:
My OnPlayerConnect:
Код:
public OnPlayerConnect(playerid) { GetPlayerName(playerid, Playername[playerid], MAX_PLAYER_NAME); CheckPlayerAccount(playerid); return 1; }
Код:
public CheckPlayerAccount(playerid) { new EscapedName[MAX_PLAYER_NAME]; new Query[128]; mysql_real_escape_string(Playername[playerid], EscapedName); format(Query, sizeof(Query), "SELECT `id` FROM `%s` WHERE `pName` = '%s'", DB_USER_TABLE, EscapedName); mysql_query(Query); mysql_store_result(); if(mysql_num_rows() >= 1) { PlayerInfo[playerid][pID] = mysql_fetch_int(); mysql_free_result(); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Underground Roleplay - Account Login", "Please Login using your password", "Login", "Quit"); } else { mysql_free_result(); format(Query, 128, "Welcome to Underground Roleplay, %s \n\nPlease enter your password so we can create your account.",Playername[playerid]); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Underground Roleplay - Account Registration", "Welcome, Please type in a password", "Register", "Quit"); return 1; } return 1; }
Greetingz,
Gforcez