Help with account saving
#2

First you must check from the database if the player is registered or not.

PHP код:
new DBResult:ResultQuery[1200];
format(Querysizeof(Query),"SELECT PASS FROM USERS WHERE NAME = '%s'"Player[playerid][Name]); //Change by the variables of your database and game mode.
Result db_query(databaseQuery);
if(
db_num_rows(Result))
{
    
Player[playerid][Pass] = db_get_field_int(Result0);
    
Player[playerid][Registered] = true;
    
//show dialog to login
}    
else 
//If the player is not registered.
{
}
db_free_result(Result); 
It's just an example for you to understand better. You must change everything for your variables.
Reply


Messages In This Thread
Help with account saving - by TaligaroW - 09.09.2018, 16:05
Re: Help with account saving - by Undef1ned - 09.09.2018, 16:18
Re: Help with account saving - by TaligaroW - 09.09.2018, 16:29
Re: Help with account saving - by Undef1ned - 09.09.2018, 16:51
Re: Help with account saving - by TaligaroW - 09.09.2018, 17:00

Forum Jump:


Users browsing this thread: 2 Guest(s)