SA-MP Forums Archive
spectating - 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: spectating (/showthread.php?tid=673940)



spectating - Ertouq - 08.04.2020

Hello,

Is there any way to do that if the spectator is specteing Karl and Karl dies, will he be automatically spectee without using the command again? I know it's with timers, but I don't know the way. Thank you.


Re: spectating - Symon - 08.04.2020

Probably something like this? (OnPlayerDeath)

pawn Code:
if(IsBeingSpeced[playerid] == 1)
{
    /* -- Loop -- */ if(spectatorid[i] == playerid) PlayerSpectatePlayer(i, playerid);
}



Re: spectating - Ertouq - 08.04.2020

Quote:
Originally Posted by Symon
View Post
Probably something like this? (OnPlayerDeath)

pawn Code:
if(IsBeingSpeced[playerid] == 1)
{
    /* -- Loop -- */ if(spectatorid[i] == playerid) PlayerSpectatePlayer(i, playerid);
}
Hello, I didn't understand much, can you explain more specific?

Do I have to put the spectator variable to the one who uses the spec?


Re: spectating - MissMute - 08.04.2020

Quote:
Originally Posted by Ertouq
View Post
Hello,

Is there any way to do that if the spectator is specteing Karl and Karl dies, will he be automatically spectee without using the command again? I know it's with timers, but I don't know the way. Thank you.
https://sampforum.blast.hk/showthread.php?pid=3376297#pid3376297