Remove "Spawn" Dialog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Remove "Spawn" Dialog (
/showthread.php?tid=397007)
Remove "Spawn" Dialog -
Lz - 02.12.2012
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
Re: Remove "Spawn" Dialog -
iGetty - 02.12.2012
TogglePlayerSpectating
Re: Remove "Spawn" Dialog -
Lz - 02.12.2012
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
Re: Remove "Spawn" Dialog -
iGetty - 02.12.2012
Add this to OnPlayerConnect:
pawn Код:
TogglePlayerSpectating(playerid, 1);
Then when a player logs in, set it to:
pawn Код:
TogglePlayerSpectating(playerid, 0);
Re: Remove "Spawn" Dialog -
Lz - 02.12.2012
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