20.09.2013, 22:42
oh ya asi
Si guardo los dato cuando se desconecta el usuario, y no te preocupes no requiero del script solo nesecito entender esto
pawn Код:
public OnPlayerConnect(playerid)
{
new Query[256],name[MAX_PLAYER_NAME],ip[32],DBResult: Result;
GetPlayerIp(playerid, ip, sizeof(ip));
GetPlayerName(playerid,name,sizeof(name));
format(Query,sizeof(Query),"SELECT * FROM `USERS` WHERE `IP` = '%s' AND `NAME` = '%s LIMIT 1'", DB_Escape(ip), DB_Escape(name));
Result = db_query(Database, Query);
if(db_num_rows(Result))
{
format(Query, sizeof(Query), "{FFFFFF}Welcome "COL_BLUE"%s(%d){FFFFFF} to the server, you're registered\n\nPlease log in by inputting your password.", name, playerid);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{FFFFFF}Register System", Query, "Login", "Leave");
}
else
{
format(Query, sizeof(Query), "{FFFFFF}Welcome "COL_BLUE"%s(%d){FFFFFF} to the server, you're "COL_RED"not{FFFFFF} registered\n\nPlease log in by inputting your password.", name, playerid);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "{FFFFFF}Register System", Query, "Register", "Leave");
}
db_free_result(Result);
return 1;
}
Si guardo los dato cuando se desconecta el usuario, y no te preocupes no requiero del script solo nesecito entender esto