Autologin en Sqlite, Ayuda!
#5

oh ya asi

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
Reply


Messages In This Thread
Autologin en Sqlite, Ayuda! - by DangerStoring - 20.09.2013, 18:27
Respuesta: Autologin en Sqlite, Ayuda! - by [DOG]irinel1996 - 20.09.2013, 19:11
Re: Autologin en Sqlite, Ayuda! - by DangerStoring - 20.09.2013, 20:37
Respuesta: Autologin en Sqlite, Ayuda! - by [DOG]irinel1996 - 20.09.2013, 22:36
Re: Autologin en Sqlite, Ayuda! - by DangerStoring - 20.09.2013, 22:42
Respuesta: Autologin en Sqlite, Ayuda! - by [DOG]irinel1996 - 20.09.2013, 22:50
Re: Autologin en Sqlite, Ayuda! - by DangerStoring - 20.09.2013, 23:07
Respuesta: Autologin en Sqlite, Ayuda! - by ForTrezZ - 20.09.2013, 23:08
Respuesta: Autologin en Sqlite, Ayuda! - by [DOG]irinel1996 - 21.09.2013, 00:51
Respuesta: Autologin en Sqlite, Ayuda! - by DesingMyCry - 21.09.2013, 01:24

Forum Jump:


Users browsing this thread: 1 Guest(s)