[Ajuda] LADMIN4v2
#1

galera estou com um problema com o sistema de registro do ladmin,quando um player sem tag ou com sobrenome entra no servidor ele nгo consegue se registrar,apenas os players com tag no nome conseguem se registrar.

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;
    }

}
quando ele digita a senha a dialog some e quando ele clica em spawn aparece 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;
}
'-' help-me.
Reply


Messages In This Thread
LADMIN4v2 - by D3M0LISH3R - 09.06.2014, 20:42
Re: LADMIN4v2 - by matheuszikaooooo - 15.11.2017, 21:50
Re: LADMIN4v2 - by MediaCL - 15.11.2017, 21:55
Re: LADMIN4v2 - by Marllun - 16.11.2017, 00:26
Re: LADMIN4v2 - by Gguiz - 16.11.2017, 00:29
Re: LADMIN4v2 - by Marllun - 16.11.2017, 00:34

Forum Jump:


Users browsing this thread: 1 Guest(s)