TogglePlayerSpectating
#1

Hi,

If i off TogglePlayerSpectating and on in one moment onplayerspawn will by called or no?
Reply
#2

Hi. I don't understand your question.

If TogglePlayerSpectating is true and you try to call OnPlayerSpawn. No it will not work. You have to TogglePlayerSpectating to false.

If you're asking if TogglePlayerSpectating equal to true can be set by onplayerspawn. Yes that's true. But you'd have to set it to false somewhere in order for players to walk around.

If you're asking if TogglePlayerSpectating equal to false can be set onplayerspawn. I don't believe so. You have to set it to something else because when in spectating mode you can't select spawn. Therefore you can't spawn.

Hope this has answered your question.
Reply
#3

If the player spawns, then yes.
Reply
#4

https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
Reply
#5

My code looks like that:

Код:
OnPlayerStateChange

if(newstate == PLAYER_STATE_ONFOOT )
{
TogglePlayerSpectating(playerid, 0);
TogglePlayerSpectating(playerid, 1);
}
So this can run onplayerspawn?
Reply
#6

I really don't get what you're trying to do.

Do you want the player to respawn?
https://sampwiki.blast.hk/wiki/SpawnPlayer

Do you want OnPlayerSpawn to be called, without respawning?
Код:
OnPlayerSpawn(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)