Hide spawn button
#1

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:
Reply
#2

Did you tried like this?

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
TogglePlayerSpectating(playerid1);
    if (
IsPlayerNPC(playerid)) return 1;
    if (
isconnected[playerid] == 0)
    {
        
isconnected[playerid] = 1;
        
SetPlayerColor(playeridCOLOR_PLAYER);
        
SetPlayerVirtualWorld(playerid1); 
Reply
#3

Quote:
Originally Posted by Maximun
Посмотреть сообщение
Did you tried like this?

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
TogglePlayerSpectating(playerid1);
    if (
IsPlayerNPC(playerid)) return 1;
    if (
isconnected[playerid] == 0)
    {
        
isconnected[playerid] = 1;
        
SetPlayerColor(playeridCOLOR_PLAYER);
        
SetPlayerVirtualWorld(playerid1); 
I did, but camera isn't as on the screenshot its at Blueberry.
Reply
#4

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' ?
Reply
#5

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.
Reply
#6

Bump, help please.
Reply
#7

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?
Reply
#8

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.
Reply
#9

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?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)