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

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
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.
I appreciate this a lot but it seems like a very inefficient way to do it like this.. Nobody has it like that from the stuff I could find on ******, why doesn't my code work when it's pretty much the same?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 7 Guest(s)