fixes getting wanted while spectating a player in alcatraz
This commit is contained in:
parent
9c15082b3b
commit
4c6b0e9aef
@ -655,6 +655,7 @@ CMD:specoff( playerid, params[ ] )
|
||||
p_beingSpectated[ p_whomSpectating[ playerid ] ] = false;
|
||||
p_whomSpectating[ playerid ] = INVALID_PLAYER_ID;
|
||||
}
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
p_Spectating{ playerid } = false;
|
||||
SendServerMessage( playerid, "Spectation has been closed." );
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ hook OnPlayerUpdateEx( playerid )
|
||||
if ( IsPlayerAFK( playerid ) )
|
||||
p_AlcatrazEscapeTS[ playerid ] = g_iTime + ALCATRAZ_TIME_PAUSE; // Money farmers?
|
||||
|
||||
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) )
|
||||
if ( IsPlayerInDynamicArea( playerid, g_AlcatrazArea ) && g_iTime > p_AlcatrazSpec[ playerid ] )
|
||||
{
|
||||
if ( !IsPlayerJailed( playerid ) && p_Class[ playerid ] != CLASS_POLICE && !IsPlayerDetained( playerid ) )
|
||||
{
|
||||
|
@ -172,6 +172,7 @@ new
|
||||
p_AntiExportCarSpam [ MAX_PLAYERS ],
|
||||
p_AntiMechFlipSpam [ MAX_PLAYERS ],
|
||||
bool: p_inAlcatraz [ MAX_PLAYERS char ],
|
||||
p_AlcatrazSpec [ MAX_PLAYERS ],
|
||||
Text3D: p_TiedLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... },
|
||||
p_TiedBy [ MAX_PLAYERS ],
|
||||
p_BlowjobPrice [ MAX_PLAYERS ],
|
||||
|
@ -483,6 +483,7 @@ public OnPlayerDisconnect( playerid, reason )
|
||||
p_Kidnapped { playerid } = false;
|
||||
p_Wood [ playerid ] = 0;
|
||||
p_inAlcatraz { playerid } = false;
|
||||
p_AlcatrazSpec [ playerid ] = 0;
|
||||
p_Ropes [ playerid ] = 0;
|
||||
p_Scissors [ playerid ] = 0;
|
||||
p_Fires [ playerid ] = 0;
|
||||
@ -4355,6 +4356,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( IsPlayerConnected( i ) && IsPlayerSpawned( i ) && !p_Spectating{ i } && i != playerid )
|
||||
{
|
||||
ForceSpectateOnPlayer( playerid, i );
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4366,6 +4368,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( IsPlayerConnected( i ) && IsPlayerSpawned( i ) && !p_Spectating{ i } && i != playerid )
|
||||
{
|
||||
ForceSpectateOnPlayer( playerid, i );
|
||||
p_AlcatrazSpec[ playerid ] = g_iTime + 10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user