Hide spawn button -
Mike861 - 13.03.2018
So i've been trying to hide the spawn button out of my login screen.I've found some topics about it but none helped me out.For example, if i do
Код:
TogglePlayerSpectating(playerid, 1);
on OnPlayerRequestClass it does disable Spawn Button but the camera position is above Blueberry, what i wanted to do is to have a default camera (Verona Beach one), i tried removing spectate but spawn button is still there and class selection only appears if i press the left or right buttons on it.
OnPlayerRequestClass:
Код:
SetPlayerClassPosition(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerFacingAngle(playerid,270.0);
PlayerPlaySound(playerid,1186,0.0,0.0,5.0);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if (IsPlayerNPC(playerid)) return 1;
if (isconnected[playerid] == 0)
{
isconnected[playerid] = 1;
TogglePlayerSpectating(playerid, 1);
SetPlayerColor(playerid, COLOR_PLAYER);
SetPlayerVirtualWorld(playerid, 1);
When i remove spectating from OnPlayerRequestClass:
Re: Hide spawn button -
Maximun - 13.03.2018
Did you tried like this?
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 1);
if (IsPlayerNPC(playerid)) return 1;
if (isconnected[playerid] == 0)
{
isconnected[playerid] = 1;
SetPlayerColor(playerid, COLOR_PLAYER);
SetPlayerVirtualWorld(playerid, 1);
Re: Hide spawn button -
Mike861 - 13.03.2018
Quote:
Originally Posted by Maximun
Did you tried like this?
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerSpectating(playerid, 1);
if (IsPlayerNPC(playerid)) return 1;
if (isconnected[playerid] == 0)
{
isconnected[playerid] = 1;
SetPlayerColor(playerid, COLOR_PLAYER);
SetPlayerVirtualWorld(playerid, 1);
|
I did, but camera isn't as on the screenshot its at Blueberry.
Re: Hide spawn button -
Maximun - 13.03.2018
PHP код:
SetPlayerClassPosition(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerFacingAngle(playerid,270.0);
PlayerPlaySound(playerid,1186,0.0,0.0,5.0);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}
Is this 'SetPlayerClassPosition' about Blueberry?
If yes, so did you called it somewhere into function 'OnPlayerRequestClass' ?
Or 'OnPlayerConnect' ?
Re: Hide spawn button -
Mike861 - 13.03.2018
Quote:
Originally Posted by Maximun
PHP код:
SetPlayerClassPosition(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerFacingAngle(playerid,270.0);
PlayerPlaySound(playerid,1186,0.0,0.0,5.0);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}
Is this 'SetPlayerClassPosition' about Blueberry?
If yes, so did you called it somewhere into function 'OnPlayerRequestClass' ?
Or 'OnPlayerConnect' ?
|
No, thats the class selection room where you select skins, the SetPlayerClassPosition is called in OnPlayerRequestClass.
Re: Hide spawn button -
Mike861 - 14.03.2018
Bump, help please.
Re: Hide spawn button -
Maximun - 14.03.2018
You trouble, is that when player arrive to 'OnPlayerRequestClass' , the box of 'Spawn' is hidden without others issues, but the camera is still moving to Blueberry?
Re: Hide spawn button -
Mike861 - 14.03.2018
Quote:
You trouble, is that when player arrive to 'OnPlayerRequestClass' , the box of 'Spawn' is hidden without others issues, but the camera is still moving to Blueberry?
|
When player connects, camera moves to blueberry immediately, with login/register dialog without spawn button.Then when u login/register class selection loads with spawn button.
Re: Hide spawn button -
Maximun - 14.03.2018
Ha, so you have to check your 'OnPlayerConnect'. According to me, the script can't move it automatically without your request
Quote:
Then when u login/register class selection loads with spawn button
|
Is that a problem for you? or, is it good?
Re: Hide spawn button -
Mike861 - 14.03.2018
Quote:
Originally Posted by Maximun
Ha, so you have to check your 'OnPlayerConnect'. According to me, the script can't move it automatically without your request
Is that a problem for you? or, is it good?
|
No, the problem is the login/register camera.