Please Help Me ?
#1

hey guys i got tired of fixing this and no luck when i am getting into the server after the register dialog the login dialog appears behind the login dialog is the class selection area now i can't choose any class because i need to be logged in but when i log in it kicks me instantley so please any solutions for this problem
Reply
#2

Use SetSpawnInfo.
Reply
#3

i think the problem is in my OnDialogResponse code can u guys pls check it here is the code
pawn Код:
if(dialogid == 7001) // Login
    {
        if(response == 0)
        {
        SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have {FF0000}canceled{FFEE00} the authentification process.");
        Kick(playerid);
        return 1;
        }

        if (CanLogin[playerid] == 0 && FirstSpawn[playerid] == 0) return SystemMsg(playerid, "You need to enter the class selection menu before logging on.");

        if (udb_CheckLogin(PlayerName(playerid),inputtext)) {
       
        new tmp4[256];
        new playername[MAX_PLAYER_NAME];

        GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("Money")-GetPlayerMoney(playerid));

        SetPlayerPos(playerid,
        float(dUserINT(PlayerName(playerid)).("X")),
        float(dUserINT(PlayerName(playerid)).("Y")),
        float(dUserINT(PlayerName(playerid)).("Z")));
        SetPlayerInterior(playerid,dUserINT(PlayerName(playerid)).("Interior")-GetPlayerInterior(playerid));
        SetPlayerVirtualWorld(playerid,dUserINT(PlayerName(playerid)).("WorldID")-GetPlayerVirtualWorld(playerid));

        tmp4 = dini_Get(udb_encode(playername), "bank");
        new PLAYERIP[16];
        GetPlayerIp(playerid, PLAYERIP, sizeof(PLAYERIP));
        format(prpstring, sizeof(prpstring), "(SSINFO) (LOGIN) %s (ID:%d) - (IP:%s).", playername, playerid, PLAYERIP);
        SendMessageToStaff_L4S(prpstring);
        TogglePlayerControllable(playerid,1);
        SetPlayerColor(playerid,COLOR_GREY);
        SetCameraBehindPlayer(playerid);
        SpawnPlayer(playerid);
        SetPlayerArmour(playerid,0);
        PLAYERLIST_authed[playerid]=true;
        CanLogin[playerid] = 0;
        SendClientMessage(playerid, COLOR_YELLOW, "(INFO) Welcome to the GEM - GTAEmergencyMods.net server.");
        SendClientMessage(playerid, COLOR_GREY, "To contact Admins, type /report [message].");
        SetPlayerVirtualWorld(playerid, 0);

       return SendClientMessage(playerid,COLOR_YELLOW,"(INFO) You are now logged in.");
    }else{
    SendClientMessage(playerid,COLOR_BRIGHTRED,""#COL_YELLOW"(INFO) "#COL_BRIGHTRED"The password you have submitted is incorrect.");
    format(prpstring, sizeof(prpstring), "{FAFAFA}Username: {FF0000}%s\n{FAFAFA}Enter your {FF0000}password {FAFAFA}below to login", pname);
    ShowPlayerDialog(playerid,7001,DIALOG_STYLE_INPUT,"Login into your account",prpstring,"Login","Leave");
    }
    return true;
 }
   
return 0;
}
Reply
#4

Download this library and include it on your gamemode.
Reply
#5

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Download this library and include it on your gamemode.
the section i provided doesnt return any warning or errors when i compile it but i think it is written badly
Reply
#6

Quote:
Originally Posted by Mr.Fames
Посмотреть сообщение
the section i provided doesnt return any warning or errors when i compile it but i think it is written badly
Just do as I said.
Reply
#7

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Just do as I said.
i did but now it gives me the error that OnPlayerUpdate is already defined
Reply
#8

Quote:
Originally Posted by Mr.Fames
Посмотреть сообщение
i did but now it gives me the error that OnPlayerUpdate is already defined
Search OnPlayerUpdate on your script and remove it excluding the callback public OnPlayerUpdate(playerid).
Reply
#9

guys ToPaz couldn't help me pls i need helpers
Reply
#10

Post OnPlayerConnect and OnPlayerSpawn code.
You are probably making it show the dialog in the wrong public..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)