[Ajuda] ladmin4v2
#1

Eae tranks? bom to com o mesmo problema de um cara aqui no fуrum que fez um tуpico e ninguйm respondeu.

Entгo eu resolvi postar aqui pra ver se vcs me ajudam.

Quando eu inicio o meu Server e entro aparece a tela de se registrar
eu digito minha senha dai o dialog some e eu clicko em spawn e aparece:

REGISTRE-SE ANTES!
Registro:
pawn Код:
if(dialogid == 542) //REGISTRAR
{
    if(USARDIALOGOS != 1) return 1;
    if(!response){
    if(DGTRY[playerid] > 3){
    new kstring[128],kPlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, kPlayerName, MAX_PLAYER_NAME);
    format(kstring, sizeof(kstring), "%s foi kickado. (Nгo registrou-se)", kPlayerName);
    SendClientMessageToAll(grey, kstring);
    SpawnPlayer(playerid);
    SetPlayerInterior(playerid,0);
    GameTextForPlayer(playerid,"  ",4000,3);
    SendClientMessage(playerid, red, "");
    SendClientMessage(playerid, red, "VOCК FOI KICKADO POR NГO REGISTRAR-SE");
    SendClientMessage(playerid, red, "");
    Kick(playerid);}
    RegisterDialog(playerid);
    DGTRY[playerid]++;
    GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~r~SE NAO REGISTRAR SERA KICKADO!",4000,3);
    return 1;}
   
   
   
    format(params, sizeof(params), "%s", inputtext);
   
    if (strlen(params) < 4 || strlen(params) > 20) {
    SendClientMessage(playerid,red,"CONTA: A senha deve ser maior que 3 caracteres");
    RegisterDialog(playerid);
    return 1;}

    if (udb_Create(PlayerName2(playerid),params))
    {
        new file[256],name[MAX_PLAYER_NAME], tmp3[100];
        new strdate[20], year,month,day;    getdate(year, month, day);
        GetPlayerName(playerid,name,sizeof(name)); format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(name));
        GetPlayerIp(playerid,tmp3,100); dini_Set(file,"ip",tmp3);
//      dini_Set(file,"password",params);
        dUserSetINT(PlayerName2(playerid)).("registered",1);
        format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
        dini_Set(file,"RegisteredDate",strdate);
       
        dUserSetINT(PlayerName2(playerid)).("loggedin",1);
        dUserSetINT(PlayerName2(playerid)).("banned",0);
        dUserSetINT(PlayerName2(playerid)).("level",0);
        dUserSetINT(PlayerName2(playerid)).("LastOn",0);
        dUserSetINT(PlayerName2(playerid)).("money",0);
        dUserSetINT(PlayerName2(playerid)).("kills",0);
        dUserSetINT(PlayerName2(playerid)).("deaths",0);
        dUserSetINT(PlayerName2(playerid)).("hours",0);
        dUserSetINT(PlayerName2(playerid)).("minutes",0);
        dUserSetINT(PlayerName2(playerid)).("seconds",0);
        dUserSetINT(PlayerName2(playerid)).("PlayerColor",0);
        dUserSetINT(PlayerName2(playerid)).("PlayerSkin",0);
        dUserSetINT(PlayerName2(playerid)).("score",0);
        dUserSetINT(PlayerName2(playerid)).("CS",0);
        dUserSetINT(PlayerName2(playerid)).("CS_X",0);
        dUserSetINT(PlayerName2(playerid)).("CS_Y",0);
        dUserSetINT(PlayerName2(playerid)).("CS_Z",0);
        dUserSetINT(PlayerName2(playerid)).("CS_F",0);
        dUserSetINT(PlayerName2(playerid)).("CS_I",0);
        dUserSetINT(PlayerName2(playerid)).("LastRojoes",0);
        dUserSetINT(PlayerName2(playerid)).("WantedLevel",0);
       
        PlayerInfo[playerid][LoggedIn] = 1;
        PlayerInfo[playerid][Registered] = 1;
        SendClientMessage(playerid, green, "CONTA: Voce esta registrado, e foi logado automaticamente");
        PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        return 1;
    }

}
Textdraw REGISTRE-SE ANTES:
pawn Код:
if(PlayerInfo[playerid][Registered] != 1 && USARDIALOGOS == 1)
{
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~r~REGISTRE-SE ANTES!",4000,3);
RegisterDialog(playerid);
return 0;
}
Tуpico da outra pessoa com a mesma dъvida:
https://sampforum.blast.hk/showthread.php?pid=3071535#pid3071535

Peзo que se sua resposta for certa,ajude o cara do outro tуpico ai por favor.
Reply


Messages In This Thread
ladmin4v2 - by CloneZPlays - 07.07.2014, 21:32
Re: ladmin4v2 - by MultiKill - 07.07.2014, 23:06
Re: ladmin4v2 - by CloneZPlays - 08.07.2014, 17:49
Re: ladmin4v2 - by MultiKill - 08.07.2014, 21:41
Re: ladmin4v2 - by CloneZPlays - 09.07.2014, 15:49
Re: ladmin4v2 - by iD4N0N3_.x[X]x - 09.07.2014, 18:05

Forum Jump:


Users browsing this thread: 2 Guest(s)