on this code.
Код:
public OnPlayerConnect(playerid)
{
new query[126], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 1)
{
new string[256];
format(string, sizeof(string), "Welcome to MaxZone RPG server.\n\nPlease enter your password to login.");
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_PASSWORD, "MaxZone - Login", string, "Login", "Cancel");
}
else
{
new string2[256];
format(string2, sizeof(string2), "Welcome to MaxZone RPG server.\n\nPlease register your password.");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "MaxZone - Register", string2, "Register", "Cancel");
}
return 1;
}
But for some reason i get the error "error 035: argument type mismatch (argument 1)".
Try using mysql_tquery.