What calls this? I think it's OnPlayerRequestClass - Can I remove it fully?
#1

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.
Reply
#2

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.
Reply
#3

Ooooh nice man, thanks alot

You honestly just made alot of things easier to plan out, thanks.
Reply
#4

I'm glad I could be of some assistance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)