12.09.2011, 20:42
(
Последний раз редактировалось External-Life; 13.09.2011 в 19:33.
)
Код:
if(RPName(PlayerName(playerid),first,last)) { new Query[128], Name[MAX_PLAYER_NAME], EscapedName[MAX_PLAYER_NAME];// field[3][3]; GetPlayerName(playerid, Name, sizeof(Name)); mysql_real_escape_string(Name, EscapedName); format(Query, sizeof(Query), "SELECT `dbid` FROM `users` WHERE `username` = '%s'", EscapedName); mysql_query(Query); mysql_store_result(); if( mysql_num_rows() >= 1 ) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login","Your user is registered! Please login with your password below!","Login","Cancel"); //Shows our login dialog :). PlayerInfo[playerid][pRegistered] = 1; } else { ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Welcome to External Life Roleplay","To play in this server you must agree to our rules,\n you can read these on http://rp.external-life.net/ \n To create an account you must register on our forum,\n and create an account there, \nthis is to show that you are serious about roleplaying with us. Thank You","Close",""); } }
Код:
[15:21:40] --------------------------- [15:21:40] MySQL Debugging activated (09/12/11) [15:21:40] --------------------------- [15:21:40] [15:21:40] >> mysql_connect( ) [15:21:40] CMySQLHandler::CMySQLHandler() - constructor called. [15:21:40] CMySQLHandler::CMySQLHandler() - Connecting to "127.0.0.1" | DB: "elrp" | Username: "root" ... [15:21:40] CMySQLHandler::Connect() - Connection was successful. [15:21:40] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [15:22:11] >> mysql_real_escape_string( Connection handle: 0 ) [15:22:11] >> mysql_real_escape_string() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1). [15:22:11] >> mysql_query( Connection handle: 0 ) [15:22:11] >> mysql_query() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1). [15:22:11] >> mysql_store_result( Connection handle: 0 ) [15:22:11] >> mysql_store_result() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1). [15:22:11] >> mysql_num_rows( Connection handle: 0 ) [15:22:11] >> mysql_num_rows() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).