player state spectating
#1

Hi,

Is there possible player state can change to state spectating without i set this with command? because i want to make protection there is command player can go out spectating state, and nobody see him. So i could do if player state is spectating but not with command, check variabe then do kick, but important that player naturally can't get this state from server.
Reply
#2

You can use Playerstates along with GetPlayerState to check if the player is spectating. You can then create a Boolean and set it to true when the player uses a command that allows them to spectate, and false when they're not spectating. Then if their state is spectating and the Boolean is false they must of not used the commands set by your script and you can kick them.

I assume this is the information you wanted?

EDIT: With a quick ****** search it seems there are CLEO mods that allow you spectate another player. However, I do not know whether they call the TogglePlayerSpectating function or not.
Reply
#3

But it's possible that server automatic set sometimes spectating state, or it's never happin, just when i use function and cheaters?
Reply
#4

As far as I know it's only called when the function is used. I'm not sure whether or not cheaters call that function directly however, I would assume that the state of spectating is the same whether they cheat or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)