Remove the spawn by the 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: Remove the spawn by the Spawn Button (
/showthread.php?tid=505285)
Remove the spawn by the Spawn Button -
Gilmar - 07.04.2014
I saw some topics talkin' about removing the Spawn Button and someone said that is not possibile so I want just to make them unusable.
This is what happens on my gamemode:
https://www.youtube.com/watch?v=PTcFw_JtG9Q
I want to do that when an user press the spawn button or the arrows nothing happens so the only way to log-in is by using the dialog I create.
I guess is possible because I saw it on a gamemode.
Re: Remove the spawn by the Spawn Button -
Binx - 07.04.2014
TogglePlayerSpectating.
EDIT:
What you could do is
if(!response) return Kick(playerid);
I do that and when they press the buttons, it kicks them.
Re: Remove the spawn by the Spawn Button -
Gilmar - 07.04.2014
Where I have to use that function? On OnPlayerConnect?
Re: Remove the spawn by the Spawn Button -
Binx - 07.04.2014
I edited my above post for an alternate way. However, you TogglePlayerSpectating when they connect. And when they enter the password correct, set their position then take them off spectate and then spawn them.
Re: Remove the spawn by the Spawn Button -
Gilmar - 07.04.2014
Quote:
Originally Posted by Binx
EDIT:
What you could do is
if(!response) return Kick(playerid);
I do that and when they press the buttons, it kicks them.
|
Where I have to put this part of code to do something when an user hit the buttons?
Re: Remove the spawn by the Spawn Button -
Evocator - 07.04.2014
I had this problem, use OnPlayerRequestSpawn, if they pressed the spawn button and their team/class isnt set yet it sends the dialog and returns 0...
Re: Remove the spawn by the Spawn Button -
Gilmar - 07.04.2014
Quote:
Originally Posted by Ralfie
I had this problem, use OnPlayerRequestSpawn, if they pressed the spawn button and their team/class isnt set yet it sends the dialog and returns 0...
|
Thanks! Dunno it was so simple, lol.