SA-MP Forums Archive
OnPlayerRequestClass - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerRequestClass (/showthread.php?tid=96103)



OnPlayerRequestClass - dre$tA - 06.09.2009

You can't disable OnPlayerRequestClass GUI by returning false anymore. Hence making you able to spawn unlogged in for ex. RP modes. If there is an another way to disable it please inform me.


Re: OnPlayerRequestClass - -Davee- - 06.09.2009

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    // Your code
    return 1;
}



Re: OnPlayerRequestClass - dre$tA - 06.09.2009

I thought about that either, but it still wont disable the GUI which I don't want to show up when a player connects.


Re: OnPlayerRequestClass - Calgon - 06.09.2009

You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?


Re: OnPlayerRequestClass - MaTrIx4057 - 06.09.2009

You can disable it by doing TogglePlayerSpectating and then ForceClassSelection


Re: OnPlayerRequestClass - dre$tA - 06.09.2009

Quote:
Originally Posted by TheMaTrIx4057
You can disable it by doing TogglePlayerSpectating and then ForceClassSelection
Thank you, that'll do the job!!!

Quote:
Originally Posted by Calgon
You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?
Returning false under OnPlayerRequestClass did disable it for me always, fully. You couldn't spawn by pressing SHIFT but it didnt work anymore in 0.3 beta.




Re: OnPlayerRequestClass - ded - 06.09.2009

Quote:
Originally Posted by dre$tA
Quote:
Originally Posted by TheMaTrIx4057
You can disable it by doing TogglePlayerSpectating and then ForceClassSelection
Thank you, that'll do the job!!!

Quote:
Originally Posted by Calgon
You're unable to disable the GUI, you never could before, people pressed 'shift' and it would return a message or something. If you're really consistent to inform your players maybe you could shove a text draw over it or send a client message saying that they must first login before attempting to spawn, and if they attempt to spawn return 0 and give them like three attempts before auto-kick?
Returning false under OnPlayerRequestClass did disable it for me always, fully. You couldn't spawn by pressing SHIFT but it didnt work anymore in 0.3 beta.

Returning false always bugged my server up. EWvery time you spawned you'd be in grove street with a bottle of beer or a cigarette O.o


Re: OnPlayerRequestClass - Joe Staff - 06.09.2009

I would use ForceClassSelection and SpawnPlayer


Re: OnPlayerRequestClass - Coicatak - 20.09.2009

Is OnPlayerRequestClasse still called twice in RC6? I can't test it atm


Re: OnPlayerRequestClass - On_Top_Non_Stop - 20.09.2009

It's called when you die for the first time after connecting to the server.