TogglePlayerSpectating - 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: TogglePlayerSpectating (
/showthread.php?tid=617968)
TogglePlayerSpectating -
MerryDeer - 29.09.2016
Hi,
If i off TogglePlayerSpectating and on in one moment onplayerspawn will by called or no?
Re: TogglePlayerSpectating -
Tass007 - 29.09.2016
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.
Re: TogglePlayerSpectating -
SickAttack - 29.09.2016
If the player spawns, then yes.
Re: TogglePlayerSpectating -
Threshold - 29.09.2016
https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
Re: TogglePlayerSpectating -
MerryDeer - 29.09.2016
My code looks like that:
Код:
OnPlayerStateChange
if(newstate == PLAYER_STATE_ONFOOT )
{
TogglePlayerSpectating(playerid, 0);
TogglePlayerSpectating(playerid, 1);
}
So this can run onplayerspawn?
Re: TogglePlayerSpectating -
Stinged - 29.09.2016
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);