SA-MP Forums Archive
How to remove spawn button? - 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: How to remove spawn button? (/showthread.php?tid=529535)



How to remove spawn button? - SHoCK44 - 02.08.2014

its ok


Re: How to remove spawn button? - GeekSiMo - 02.08.2014

No! You can't but you can skip the class slection.


Re: How to remove spawn button? - [XST]O_x - 02.08.2014

TogglePlayerSpectating.


Re: How to remove spawn button? - SHoCK44 - 02.08.2014

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
No! You can't but you can skip the class slection.
Tell me how, please.

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
TogglePlayerSpectating.
It doesn't work.


Re: How to remove spawn button? - GeekSiMo - 02.08.2014

add in OnplayerRequestSpawn: SpawnPlayer(playerid);


Re: How to remove spawn button? - McBan - 02.08.2014

Yes it does.

Код:
TogglePlayerSpectating(playerid, 1);
If you are unsure about how to implement that in your code, Try making a "stock" function which will manually read from your INI file and load up the users data that way, In which case, You basically skip the Spawn Class.


Re: How to remove spawn button? - SHoCK44 - 02.08.2014

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
add in OnplayerRequestSpawn: SpawnPlayer(playerid);
I've just tried in this way and it doesn't work. I'd like to remember you I have a system which saves all positions after logout.


Re: How to remove spawn button? - SHoCK44 - 02.08.2014

Quote:
Originally Posted by McBan
Посмотреть сообщение
Yes it does.

Код:
TogglePlayerSpectating(playerid, 1);
If you are unsure about how to implement that in your code, Try making a "stock" function which will manually read from your INI file and load up the users data that way, In which case, You basically skip the Spawn Class.
Could you show me how? Just an example, that's it.


Re: How to remove spawn button? - Snipa - 02.08.2014

Under OnPlayerConnect, use TogglePlayerSpectating. Then use SetSpawnInfo to allow automatic spawning under OnPlayerRequestClass. When you want them to spawn, simply set their spectating to false.

https://sampwiki.blast.hk/wiki/SetSpawnInfo


Re: How to remove spawn button? - SHoCK44 - 02.08.2014

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Under OnPlayerConnect, use TogglePlayerSpectating. Then use SetSpawnInfo to allow automatic spawning under OnPlayerRequestClass. When you want them to spawn, simply set their spectating to false.

https://sampwiki.blast.hk/wiki/SetSpawnInfo
Thank you, but I'm using this:
PHP код:
 if(PlayerInfo[playerid][NewReg] == 0// Checking if the player is a new registrator. 
    

        
//SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]); // Sets the player skin. 
        
SetPlayerPos(playeridPlayerInfo[playerid][Xpos], PlayerInfo[playerid][Ypos], PlayerInfo[playerid][Zpos]+0.3); 
        
    }