Remove "Spawn" Dialog
#1

So when connecting to my server you must type your password, You are automatically logged in, but then you have to click spawn to spawn.. How can i make it so as soon as you login you are automatically spawned without having to click spawn?

Thanks in advance
Reply
#2

TogglePlayerSpectating
Reply
#3

Quote:
Originally Posted by iGetty
Посмотреть сообщение
TogglePlayerSpectating
Thanks, Do i add TogglePlayerSpectating(playerid, 0);
to my OnGamemodeInit??

Edit -
Код:
C:\Users\Scripting.Ash-PC\Desktop\Roleplay\gamemodes\roleplay.pwn(71) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
If added to OnGamemodeInit
Reply
#4

Add this to OnPlayerConnect:

pawn Код:
TogglePlayerSpectating(playerid, 1);
Then when a player logs in, set it to:

pawn Код:
TogglePlayerSpectating(playerid, 0);
Reply
#5

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Add this to OnPlayerConnect:

pawn Код:
TogglePlayerSpectating(playerid, 1);
Then when a player logs in, set it to:

pawn Код:
TogglePlayerSpectating(playerid, 0);
pawn Код:
case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                new HashPass[129];
                WP_Hash(HashPass, sizeof(HashPass), inputtext);
                if(strcmp(HashPass, PlayerInfo[playerid][pPass]) == 0)
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                    TogglePlayerSpectating(playerid, 0);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
    }
    return 1;
}
I added it here but it seems to have not changed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)