2 Questions, Didn't find them on ******.
#8

pawn Код:
new
    Float: Save_Position[ MAX_PLAYERS ][ 4 ],
    bool: InSpectate[ MAX_PLAYERS char ]
;

// OnPlayerConnect:
Save_Position[ playerid ][ 0 ] = 0.0;
Save_Position[ playerid ][ 1 ] = 0.0;
Save_Position[ playerid ][ 2 ] = 0.0;
Save_Position[ playerid ][ 3 ] = 0.0;

InSpectate{ playerid } = false;

// OnPlayerSpawn:
if( InSpectate{ playerid } )
{
    SetPlayerPos( playerid, Save_Position[ playerid ][ 0 ], Save_Position[ playerid ][ 1 ], Save_Position[ playerid ][ 2 ] );
    SetPlayerFacingAngle( playerid, Save_Position[ playerid ][ 3 ] );
    InSpectate{ playerid } = false;
}

// Command /spec
GetPlayerPos( playerid, Save_Position[ playerid ][ 0 ], Save_Position[ playerid ][ 1 ], Save_Position[ playerid ][ 2 ] );
GetPlayerFacingAngle( playerid, Save_Position[ playerid ][ 3 ] );
InSpectate{ playerid } = true;
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)