30.05.2010, 23:03
I need help with this now.. doesn't seem to work and i added a username called "Coole" in database
Код:
public OnPlayerConnect(playerid)
{
new string[128];
format(string,sizeof(string),"SELECT * FROM `users` WHERE `Name` = '%s'",GetName(playerid));
mysql_query(string,Connection);
mysql_store_result(Connection);
if(mysql_num_rows(Connection) > 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Enter your password below","Login","Exit");
}
else
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register","Enter your password below","Register","Exit");
}
mysql_free_result(Connection);
return 1;
}

