*** Terrible Title Removed
#3

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate != 2) NOPTrigger[playerid] = 0;
    if(IsPlayerNPC(playerid))
    {
        if(newstate == PLAYER_STATE_SPECTATING)
        {
            TogglePlayerSpectating(playerid, false);
        }
        return 1;
    }
    if(GettingSpectated[playerid] != 999)
    {
        new spectator = GettingSpectated[playerid];
        if(!IsPlayerConnected(spectator))
        {
            GettingSpectated[playerid] = 999;
            Spectate[spectator] = 999;
        }

        if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[spectator][pAdmin] >= 2 || newstate == PLAYER_STATE_PASSENGER && PlayerInfo[spectator][pAdmin] >= 2)
        {
            TogglePlayerSpectating(spectator, true);
            new carid = GetPlayerVehicleID( playerid );
            PlayerSpectateVehicle( spectator, carid );
            SetPVarInt(spectator, "SpecState", newstate);
        }
        else if(newstate == PLAYER_STATE_ONFOOT && PlayerInfo[spectator][pAdmin] >= 2)
        {
            TogglePlayerSpectating(spectator, true);
            PlayerSpectatePlayer( spectator, playerid );
            SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
            SetPVarInt(spectator, "SpecState", newstate);
        }
    }
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(Audio_IsClientConnected(playerid))
        {
            Audio_Stop(playerid, stationidp[playerid]);
            stationidp[playerid] = 0;
        }
This is a big part of it
Reply


Messages In This Thread
*** Terrible Title Removed - by Red_Dragon. - 13.10.2012, 20:19
Re: Server log errors ! - by Kirollos - 13.10.2012, 20:48
Re: Server log errors ! - by Red_Dragon. - 14.10.2012, 18:45
Re: Server log errors ! - by Red_Dragon. - 17.10.2012, 18:49
Re : Server log errors ! - by yusei - 17.10.2012, 21:01
Re: Server log errors ! - by Red_Dragon. - 18.10.2012, 12:36
Re: Server log errors ! - by Roel - 18.10.2012, 12:38
Re: Server log errors ! - by Red_Dragon. - 18.10.2012, 12:47
Re: Server log errors ! - by Roel - 18.10.2012, 12:48
Re: Server log errors ! - by Red_Dragon. - 18.10.2012, 13:01

Forum Jump:


Users browsing this thread: 2 Guest(s)