/spec doesnt work with virtual world even though it changes
#11

So basically you need a delay to make a gap between the changing of the target's variable and the spectator variables it's just a little timer like that
PHP код:
foreach(new Player)
    {
        if(
PlayerInfo[i][pSpectating] == playerid)
        {
            
SetTimerEx("SpectateTimer"500false"ii"iplayerid);
        }
    } 
and its function to be like that..

PHP код:
forward SpectateTimer(playeridtargetid);
public 
SpectateTimer(playeridtargetid)
{
    if(
PlayerInfo[playerid][pSpectating] == targetid)
    {
        
SetPlayerInterior(playeridGetPlayerInterior(targetid));
        
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(targetid));

        if(
IsPlayerInAnyVehicle(targetid))
        {
            
PlayerSpectateVehicle(playeridGetPlayerVehicleID(targetid));
        }
        else
        {
            
PlayerSpectatePlayer(playeridtargetid);
        }
    }

I tested this one and it worked for me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)