SA-MP Forums Archive
Spectating Issue - 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 Issue (/showthread.php?tid=393326)



Spectating Issue - Kyle - 17.11.2012

Hi, When a player enters a checkpoint to go inside a store I use my custom function where it sets their pos, interior etc to be able to let the spectating admin spec them again.

But for some reason it doesn't work:

This is my code: http://puu.sh/1rlBb

Video to issue: [ame]http://www.youtube.com/watch?v=5YSsCzlK0NA[/ame]

Thanks -

I've tried setting them to spec every 1 second instead but then it causes this issue: http://www.youtube.com/watch?v=kmZZeQPSFaA


Re: Spectating Issue - Bicentric - 17.11.2012

I may be horribly wrong, but try this:

pawn Код:
foreach(Player, i)
{
    if(UserInfo[i][AdminLevel] >= 1 && GetPlayerState(i) == PLAYER_STATE_SPECTATING && AdminSave[i][SpectatingID] != -1 && i != playerid)
    {
        AdminSaves[i][SpectatingID] = playerid;
        /*TogglePlayerSpectating(i, 1);
        PlayerSpectatePlayer(i, playerid);*/

        TogglePlayerSpectating(i, 0);

        UserInfo[i][CurrentInterior] = interior;

        SetPlayerInterior(i, interior);
        SetPlayerVirtualWorld(i, virtualworld);
        TogglePlayerSpectating(i, 1);
        PlayerSpectatePlayer(i, playerid);
    }
}



Re: Spectating Issue - Kyle - 17.11.2012

Nope...