Helló!
Hogyan lehetne megcsinálni azt, hogyha reloadolják a scriptet, és a játékos fent van, akkor elõhozza a Login dialogot?
OnPlayerConnect:
public OnPlayerConnect(playerid)
{
pCount++;
format(maxplayers, sizeof(maxplayers), \"Játékosok: %i / 30\", pCount );
TextDrawSetString(mps, maxplayers);
TextDrawColor(mps, 0xFF0000AA);
TextDrawShowForPlayer(playerid, mps);
new string[71];
format(string, sizeof(string), \"SELECT `IP` FROM `banned` WHERE `IP` = \'%s\'\", PlayerIP(playerid));
mysql_query(string);
mysql_store_result();
if(mysql_num_rows())
{
new BannedUsername[24], Bannedby[24], BannedReason[128];
mysql_fetch_field(\"Username\", BannedUsername, Connection);
mysql_fetch_field(\"Banner\", Bannedby, Connection);
mysql_fetch_field(\"Reason\", BannedReason, Connection);
new mysqlString[412];
format(mysqlString, sizeof(mysqlString), \"\\n{FFFFFF}Ha azt gondolod, hogy a bannolás jogtalan, akkor látogass el a {FF0000}%s {FFFFFF}oldalra, és csinálj unbann témát! \\n\\n\\n\\n{267F00}Bannolt Név: \\t{BA1400}%s \\n{267F00}Bannolt: \\t{BA1400}%s \\n{267F00}Indok: \\t{BA1400}%s\", SERVER_WEBSITE, BannedUsername, Bannedby, BannedReason);
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, \"{FF0000}Te bannolva vagy a szerverrõl!\", mysqlString, \"Bezár\", \"\");
Kick(playerid);
}
else
{
format(string, sizeof(string), \"SELECT * FROM `accounts` WHERE `Username` = \'%s\'\", PlayerName(playerid));
mysql_query(string);
mysql_store_result();
if(mysql_num_rows())
{
LoginDialog(playerid);
}
else RegisterDialog(playerid);
mysql_free_result();
AdminSeged[playerid] = 0;
}
mysql_free_result();
return true;
}