[Ajuda] Erros...
#4

Nгo recomendo vocк usar request class para este caso de "Login" ...

Use desta forma:

pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("LoginPlayer", 3000, false, "d", playerid);
    return 1;
}

forward LoginPlayer(playerid);
public LoginPlayer(playerid)
{
    new string[130], conta[20+24];
    format(conta, sizeof(conta), "/Contas/%s.ini", playernm(playerid));
    TextDrawShowForPlayer(playerid, ImagemEntrada);
    SetPlayerInterior(playerid, 0);
    SetPlayerCameraPos(playerid, 332.5056, -1553.0858, 33.1253);
    SetPlayerCameraLookAt(playerid, 330.9073, -1514.6882, 52.5627);
    if(!DOF2_FileExists(conta))
    {
       format(string, sizeof(string), "{FFFFFF}Seja bem vindo %s.\n{7CFC00}Status: {FF0000}Nгo registrado{FFFFFF}\nDigite uma senha para se registrar.", Nome(playerid));
       ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", string, "Registrar", "Cancelar");
       return 1;
    }
    else if (DOF2_FileExists(conta))
    {
       format(string, sizeof(string), "{FFFFFF}Seja bem vindo %s.\nStatus: {7CFC00}Registrado{FFFFFF}\nDigite sua senha para logar\n\nDica de senha: %s", Nome(playerid), DOF2_GetString(pDiretorio(playerid), "DicaSenha"));
        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Logar", "Cancelar");
    }
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 0;
}

stock playernm(playerid){new nj[MAX_PLAYER_NAME];GetPlayerName(playerid, nj, sizeof(nj));return nj;}
Reply


Messages In This Thread
Erros... - by Ley - 29.09.2012, 16:31
Re: Erros... - by .FuneraL. - 29.09.2012, 16:36
Re: Erros... - by Ley - 29.09.2012, 16:40
Re: Erros... - by dPlaYer_ - 29.09.2012, 16:43
Re: Erros... - by paulor - 29.09.2012, 16:52
Re: Erros... - by dPlaYer_ - 29.09.2012, 16:54
Re: Erros... - by -Don Corleone - 29.09.2012, 16:57
Re: Erros... - by DeViL_GSB - 29.09.2012, 16:57
Re: Erros... - by paulor - 29.09.2012, 17:00
Re: Erros... - by dPlaYer_ - 29.09.2012, 17:05

Forum Jump:


Users browsing this thread: 5 Guest(s)