SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   spectating (https://forum.sa-mp.com/showthread.php?t=673940)

Ertouq 08/04/2020 05:50 PM

spectating
 
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.

Symon 08/04/2020 07:49 PM

Re: spectating
 
Probably something like this? (OnPlayerDeath)

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

Ertouq 08/04/2020 08:17 PM

Re: spectating
 
Quote:

Originally Posted by Symon (Post 4138431)
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?

MissMute 08/04/2020 11:22 PM

Re: spectating
 
Quote:

Originally Posted by Ertouq (Post 4138416)
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://forum.sa-mp.com/showthread.php?p=3376297


All times are GMT. The time now is 10:12 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.