20.12.2013, 08:53
it is:
With MAX_PLAYER_NAME
Not MAX_PLAYERS_NAME
wish helped
pawn Код:
public OnPlayerConnect(playerid)
{
new query[126], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(query, sizeof(query), "SELECT * FROM acc WHERE name = '%s'", pName);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "That username is registered!");
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Login", "Please login", "Login", "Cancel");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "That username is not registered, please register");
}
return 1;
}
Not MAX_PLAYERS_NAME
wish helped