Spawn Button Help
#1

hey so I'm working on brand new script and I want to remove this spawn button so what I got is onplayerrequestclass it show him register dialog and when he finish the server show him guide after he finishes the guide I used this

PHP код:
if (dialogid == DIALOG_TUTORIAL7)
    {
        
SpawnPlayer(playerid);
    } 
and on player spawn I have this
PHP код:
public OnPlayerSpawn(playerid)
       {
                
SetPlayerPos(ectect ,ect);
        } 
I got nothing on onplayerrequestclass but still to spawn that player I need to press the spawn button can someone help?
Reply
#2

TogglePlayerSpectating();
This hides the whole HUD for a player, but disables key states.

SpawnPlayer();
TogglePlayerControllable();
SetCameraPos();
You can spawn the player and that will force the player to hide the spawn buttons.

SetPlayerDrunkLevel();
Check it's Wiki, it can hide the GUI and HUD on a high level.
Reply
#3

Quote:
Originally Posted by Meller
Посмотреть сообщение
TogglePlayerSpectating();
This hides the whole HUD for a player, but disables key states.

SpawnPlayer();
TogglePlayerControllable();
SetCameraPos();
You can spawn the player and that will force the player to hide the spawn buttons.

SetPlayerDrunkLevel();
Check it's Wiki, it can hide the GUI and HUD on a high level.
hm where should I add the spectate in the register
dialog?
Reply
#4

Quote:
Originally Posted by Meller
Посмотреть сообщение
TogglePlayerSpectating();
This hides the whole HUD for a player, but disables key states.

SpawnPlayer();
TogglePlayerControllable();
SetCameraPos();
You can spawn the player and that will force the player to hide the spawn buttons.

SetPlayerDrunkLevel();
Check it's Wiki, it can hide the GUI and HUD on a high level.
it didn't work I tried it
PHP код:
TogglePlayerSpectating(playeridtrue);
            
SpawnPlayer(playerid);
            
SetPlayerPos2(playeriddini_Float(AddDirFile(dir_userfilesplayername), "X"), dini_Float(AddDirFile(dir_userfilesplayername), "Y"), dini_Float(AddDirFile(dir_userfilesplayername), "Z"), dini_Float(AddDirFile(dir_userfilesplayername), "A"), dini_Int(AddDirFile(dir_userfilesplayername), "I"), dini_Int(AddDirFile(dir_userfilesplayername), "W"), dini_Int(AddDirFile(dir_userfilesplayername), "skin"));
            
SetCameraBehindPlayer(playerid);
            
TogglePlayerSpectating(playeridfalse); 
setplayerpos2 is working fine but I saw the spawn hud
Reply
#5

I'm not sure but either under OnPlayerRequestClass or DialogResponse, Add SetSpawnInfo() and then in the next line put SpawnPlayer();

Try under both i suggest...
Reply
#6

hm I got an idea that I put onplayerrequestclass return 0;
Reply
#7

still I can see the spawn button
Reply
#8

Found out...

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetSpawnInfo(playerid,1,57,0.0,0.0,0.0,0.0,12,100,13,100,14,100); // those were random teamid, coordinates and weapons
    
SpawnPlayer(playerid);
    return 
0;

Seems to work for me
Reply
#9

didn't work I just added player classes
ill figure out something soon
Reply
#10

Quote:
Originally Posted by Meller
Посмотреть сообщение
TogglePlayerSpectating();
This hides the whole HUD for a player, but disables key states.

SpawnPlayer();
TogglePlayerControllable();
SetCameraPos();
You can spawn the player and that will force the player to hide the spawn buttons.

SetPlayerDrunkLevel();
Check it's Wiki, it can hide the GUI and HUD on a high level.
Quote:
Originally Posted by Primes007
Посмотреть сообщение
Found out...

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetSpawnInfo(playerid,1,57,0.0,0.0,0.0,0.0,12,100,13,100,14,100); // those were random teamid, coordinates and weapons
    
SpawnPlayer(playerid);
    return 
0;

Seems to work for me
YOUR PRO IT WORKED THANKS!!!! ++ REPP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)