21.12.2014, 14:25
Quote:
|
Are you sure? be cause i use it in my saving system.
Can you show me the callback which you used to call player to check if he's registered or not, like "OnAccountCheck" as many people use it. |
pawn Code:
public OnAccountCheck(playerid)
{
new str[200];
new rows, fields;
cache_get_data(rows, fields, mysql);
if(rows)
{
cache_get_field_content(0, "PASS", pData[playerid][Password], mysql, 129);
pData[playerid][ID] = cache_get_field_content_int(0, "ID");
format(str, sizeof(str), "Welcome back to Reindience Roleplay, %s! \nLooks like your account is registered, please enter your password below:", GPName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_PASSWORD, "Welcome back to Reindience Roleplay!", str, "Login", "Quit");
}
else
{
format(str, sizeof(str), "Welcome to Reindience Roleplay, %s! \nLooks like your account is not registered, please enter a password below:", GPName(playerid));
ShowPlayerDialog(playerid, DIALOG_REG, DIALOG_STYLE_PASSWORD, "Welcome to Reindience Roleplay!", str, "Register", "Quit");
}
return 1;
}

