Why the dialog doesn't spawn me?
#1

When I finish the dialog,it doesn't spawn me. Why ?
This is the code
PHP код:
    if(dialogid == DIALOG_LOGIN)
    {
          if(!
response)
        {
            
Kick(playerid);
            return 
1;
        }
        else if(
response// Pressed ENTER or clicked 'Login' button
        
{
            if(
udb_hash(inputtext) == PlayerInfo[playerid][pPass])
            {
                
TextDrawHideForPlayer(playeridTextdrawConectare0[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare1[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare2[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare4[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare16[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare17[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare18[playerid]);
                
TextDrawHideForPlayer(playeridTextdrawConectare19[playerid]);
                
CancelSelectTextDraw(playerid);
                
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
                
PlayerLogged[playerid] = true;
                
SetTimerEx("TutorialDone"100false"i"playerid);
                
SpawnPlayer(playerid);
                
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                
LoadFightingStyle(playerid);
                   
FadeColorForPlayer(playerid,0,0,0,255,0,0,0,0,15,0);
                
SCM(playeridCOLOR_WHITE"You have successfully logged in.");
                
TogglePlayerSpectating(playeridfalse);
                
PlayerLogged[playerid] = true;
                
SetPlayerScore(playeridPlayerInfo[playerid][pLevel]);
                  new 
playername[24];
                
GetPlayerName(playeridplayernamesizeof(playername));
                
PlayerInfo[playerid][pName] = playername;
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteString(File"Name"PlayerInfo[playerid][pName]);
                
INI_Close(File);
                
sInfo[playerid][Misc] = 0;
                
sInfo[playerid][Head] = 0;
                
sInfo[playerid][Chest] = 0;
                
sInfo[playerid][Crotch] = 0;
                
sInfo[playerid][LArm] = 0;
                
sInfo[playerid][RArm] = 0;
                
sInfo[playerid][LLeg] = 0;
                
sInfo[playerid][RLeg] = 0;
                
//if(PlayerInfo[playerid][pTutorialDone] == 0) return SetTimerEx("AgeSetup", 1000, false, "i", playerid);
                   
if(PlayerInfo[playerid][pBanned] == 1)
                {
                    
SCM(playeridCOLOR_LIGHTRED"AdmCmd: You have been banned for logging into a banned account.");
                    
SetTimerEx("UnsetBan"5000"i"playerid);
                }
            }
            else
            {
                
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\n""Type your password below to login.","Login","Quit");
            }
            return 
1;
        }
    } 
I will rep who help me
Reply
#2

This depends on a lot more than just this dialog.
Reply
#3

Can you explain me more please?
Reply
#4

SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1713.6101,-1912.2190,13.5669,85.9081, 0, 0, 0, 0, 0, 0);
Reply
#5

Quote:
Originally Posted by Deny1
Посмотреть сообщение
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1713.6101,-1912.2190,13.5669,85.9081, 0, 0, 0, 0, 0, 0);
I added to callback OnPlayerRequestClass(playerid)
Reply
#6

Quote:
Originally Posted by Crayder
Посмотреть сообщение
This depends on a lot more than just this dialog.
Can you tell me please?
Reply
#7

Use setspawninfo before calling SpawnPlayer, delete it from OnPlayerRequestClass, TogglePlayerSpectating right before player spawns, and then SetCameraBehindPlayer. It should look like this;

pawn Код:
SetSpawnInfo
TogglePlayerSpectating
SpawnPlayer
SetCameraBehindPlayer
This should work.
Reply
#8

Quote:
Originally Posted by Rufio
Посмотреть сообщение
Use setspawninfo before calling SpawnPlayer, delete it from OnPlayerRequestClass, TogglePlayerSpectating right before player spawns, and then SetCameraBehindPlayer. It should look like this;

pawn Код:
SetSpawnInfo
TogglePlayerSpectating
SpawnPlayer
SetCameraBehindPlayer
This should work.
I will try and thx
Reply
#9

Quote:
Originally Posted by Rufio
Посмотреть сообщение
Use setspawninfo before calling SpawnPlayer, delete it from OnPlayerRequestClass, TogglePlayerSpectating right before player spawns, and then SetCameraBehindPlayer. It should look like this;

pawn Код:
SetSpawnInfo
TogglePlayerSpectating
SpawnPlayer
SetCameraBehindPlayer
This should work.
still doesn't work..
Reply
#10

try to do the
Quote:

TogglePlayerSpectating(playerid, false);

before the
Quote:

spawnplayer();

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)