What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? - 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: What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? (
/showthread.php?tid=426157)
What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? -
EiresJason - 28.03.2013
Sup, I was just wondering what actually calls these?(See imgur link below)
http://imgur.com/FamQBHr
Im sure it's OnPlayerRequestClass but i want to make sure
And also, how would i remove that from appearing when you die?
Like is there anyway to fully remove it, it seems when I remove it; my screen gets brighter and brighter until I can't see it anymore.
If i was to remove it; would i just stick "SpawnPlayer" under "OnPlayerConnect" after i check if the player has logged in?
EG:
pawn Код:
if(pLoggedIn == true) return SpawnPlayer(playerid);
Would that work?
Thanks for any help.
Re: What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? -
Scenario - 28.03.2013
https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
^^ the only function you can use to prevent this from happening. Generally, servers that don't use the regular way to select a "class" will use TogglePlayerSpectating() under OnPlayerConnect and then use it again [to disable it] when the player registers/authenticates.
When a player dies, it might be a good idea to set a 1-2 second timer that enables TogglePlayerSpectating() so you can do what you need. And then obviously, when you're ready to spawn them again, just disable TogglePlayerSpectating and set their position.
Re: What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? -
EiresJason - 28.03.2013
Ooooh nice man, thanks alot
You honestly just made alot of things easier to plan out, thanks.
Re: What calls this? I think it's OnPlayerRequestClass - Can I remove it fully? -
Scenario - 28.03.2013
I'm glad I could be of some assistance.