SA-MP Forums Archive
Spawn Bar. - 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: Spawn Bar. (/showthread.php?tid=433461)



Spawn Bar. - dorperez - 27.04.2013

How can I disable the spawn bar without putting the player on spec? because I want to do that when the player is enter the server I will put a picture of LS buildngs and if I use spec I can't do it ..


Re: Spawn Bar. - zDivine - 27.04.2013

Under OnPlayerRequestClass():
pawn Код:
SpawnPlayer(playerid);
Then you can set their camera look at:
pawn Код:
SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, cut = CAMERA_CUT);
Then under OnPlayerSpawn():
pawn Код:
// Put where you want them to spawn, and set their camera params.



Re: Spawn Bar. - dorperez - 27.04.2013

Didn't worked bro ..

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(RegistrationStep[playerid] == 0)
    {
             if(PlayerInfo[playerid][pReg] == 1)
             {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Welcome.Please log-in.",""ALB"Type your password here to log-in","Log-in","Quit");
             }
             if(PlayerInfo[playerid][pReg] == 0)
             {

                ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,""ALB"Please register!",""ALB"Type your password here to register.","Register","Quit");
             }
    SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
    SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
    SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
    }
    else SpawnPlayer(playerid);
    return 1;
}



Re: Spawn Bar. - zDivine - 27.04.2013

Quote:
Originally Posted by dorperez
Посмотреть сообщение
Didn't worked bro ..

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(RegistrationStep[playerid] == 0)
    {
             if(PlayerInfo[playerid][pReg] == 1)
             {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Welcome.Please log-in.",""ALB"Type your password here to log-in","Log-in","Quit");
             }
             if(PlayerInfo[playerid][pReg] == 0)
             {

                ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,""ALB"Please register!",""ALB"Type your password here to register.","Register","Quit");
             }
    SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
    SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
    SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
    }
    else SpawnPlayer(playerid);
    return 1;
}
* FACEPALM * - Because you have it set to register first. Also, all that needs to be put under OnPlayerConnect, not OnPlayerRequestClass.

If you would like me to do this for you, add my Skype: mercenary.lf


Re: Spawn Bar. - dorperez - 27.04.2013

Someone else please ?


Re: Spawn Bar. - Lordzy - 27.04.2013

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid); //To avoid spawn class and redirect to spawn location.
    if(RegistrationStep[playerid] == 0)
    {
             if(PlayerInfo[playerid][pReg] == 1)
             {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,""ALB"Welcome.Please log-in.",""ALB"Type your password here to log-in","Log-in","Quit");
             }
             if(PlayerInfo[playerid][pReg] == 0)
             {

                ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,""ALB"Please register!",""ALB"Type your password here to register.","Register","Quit");
             }
    SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
    SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
    SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
    }
   }
    return 1;
}



Re: Spawn Bar. - MP2 - 27.04.2013

Or use my camera include: https://sampforum.blast.hk/showthread.php?pid=2362690#pid2362690


Re: Spawn Bar. - dorperez - 27.04.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
I get 3 errors when I am putting your include bro:
pawn Код:
C:\Program Files\GTA - San Andreas\Server\gamemodes\Untitled.pwn(43) : error 025: function heading differs from prototype
C:\Program Files\GTA - San Andreas\Server\gamemodes\Untitled.pwn(390) : error 025: function heading differs from prototype
C:\Program Files\GTA - San Andreas\Server\gamemodes\Untitled.pwn(449) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Line 43:
pawn Код:
forward OnPlayerLogin(playerid,password[]);
Line 390:
pawn Код:
public OnPlayerLogin(playerid,password[])
Line 449:
pawn Код:
OnPlayerLogin(playerid, inputtext);



Re: Spawn Bar. - MP2 - 27.04.2013

That's nothing to do with my include, clearly.


Re: Spawn Bar. - dorperez - 27.04.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
That's nothing to do with my include, clearly.
But when I remove your include I get no errors..