diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index 319f09d..c52a442 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -271,12 +271,12 @@ CMD:uncuff( playerid, params[ ] ) CMD:detain( playerid, params[ ] ) { - new victimid; + new victimid = GetClosestPlayer( playerid ); if ( p_Class[ playerid ] != CLASS_POLICE ) return SendError( playerid, "This is restricted to police only." ); else if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this command since you're jailed." ); else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." ); - else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/detain [PLAYER_ID]" ); - else if ( victimid == playerid ) return SendError( playerid, "You cannot detain yourself." ); + //else if ( sscanf( params, "u", victimid ) ) return SendUsage( playerid, "/detain [PLAYER_ID]" ); + //else if ( victimid == playerid ) return SendError( playerid, "You cannot detain yourself." ); else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) ) { if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player you're close to is in your team." ); diff --git a/gamemodes/irresistible/cnr/features/cop/jail.pwn b/gamemodes/irresistible/cnr/features/cop/jail.pwn index 8ff6a60..c95b9f0 100644 --- a/gamemodes/irresistible/cnr/features/cop/jail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/jail.pwn @@ -51,7 +51,7 @@ hook OnScriptInit( ) } hook OnPlayerEnterDynamicCP( playerid, checkpointid ) { - if ( IsPlayerJailed( playerid ) ) { + if ( IsPlayerJailed( playerid ) && !IsPlayerDetained( playerid ) ) { return SendError( playerid, "You're jailed, and you accessed a checkpoint. I smell a cheater." ), KickPlayerTimed( playerid ), Y_HOOKS_BREAK_RETURN_1; } return 1; @@ -250,20 +250,20 @@ stock JailPlayer( playerid, seconds, admin = 0 ) PlayerTextDrawSetString ( playerid, p_JailTimeTD[ playerid ], "_" ); PlayerTextDrawShow ( playerid, p_JailTimeTD[ playerid ] ); - // External Variables to Jail (resetting) - p_Cuffed { playerid } = false; - p_InfectedHIV { playerid } = false; - //p_Detained { playerid } = false; - //Delete3DTextLabel ( p_DetainedLabel[ playerid ] ); - //p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID; - //p_DetainedBy [ playerid ] = INVALID_PLAYER_ID; - // Primary Jail Variables p_Jailed { playerid } = true; p_JailTime [ playerid ] = seconds; p_AdminJailed { playerid } = admin; p_JailTimer [ playerid ] = SetTimerEx( "Unjail", 950, true, "d", playerid ); + // External Variables to Jail (resetting) + p_Cuffed { playerid } = false; + p_InfectedHIV { playerid } = false; + p_Detained { playerid } = false; + Delete3DTextLabel ( p_DetainedLabel[ playerid ] ); + p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID; + p_DetainedBy [ playerid ] = INVALID_PLAYER_ID; + CancelEdit ( playerid ); RemovePlayerStolensFromHands( playerid ); StopPlayerUsingSlotMachine ( playerid ); diff --git a/gamemodes/irresistible/cnr/features/damage_feed.pwn b/gamemodes/irresistible/cnr/features/damage_feed.pwn index d45080d..320dcb4 100644 --- a/gamemodes/irresistible/cnr/features/damage_feed.pwn +++ b/gamemodes/irresistible/cnr/features/damage_feed.pwn @@ -556,6 +556,9 @@ CMD:sync( playerid, params[ ] ) if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this feature while you are jailed." ); + if ( IsPlayerDetained( playerid ) ) + return SendError( playerid, "You cannot use this feature while you are detained." ); + if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot synchronize yourself in a vehicle." ); diff --git a/scriptfiles/changelogs/cnr/_changelogs.cfg b/scriptfiles/changelogs/cnr/_changelogs.cfg index 8e2a31c..a79cf5c 100644 --- a/scriptfiles/changelogs/cnr/_changelogs.cfg +++ b/scriptfiles/changelogs/cnr/_changelogs.cfg @@ -1,4 +1,4 @@ -v11.55.172 +v11.55.174 v11.55.168 v11.54.157 v11.53.154 diff --git a/scriptfiles/changelogs/cnr/v11.55.172.txt b/scriptfiles/changelogs/cnr/v11.55.172.txt deleted file mode 100644 index 3ece462..0000000 --- a/scriptfiles/changelogs/cnr/v11.55.172.txt +++ /dev/null @@ -1,4 +0,0 @@ -(+) /detain and it's dropoff points are now active. -(/) City Harpoints have been adjusted to only fit the inner-city limits. -(/) XP Market and /perks are now based off Deathmatch and Robbery XP. -(*) Fixes the ID requirement for /taze, /cuff, and /arrest \ No newline at end of file diff --git a/scriptfiles/changelogs/cnr/v11.55.174.txt b/scriptfiles/changelogs/cnr/v11.55.174.txt new file mode 100644 index 0000000..4a862df --- /dev/null +++ b/scriptfiles/changelogs/cnr/v11.55.174.txt @@ -0,0 +1,6 @@ +(+) /detain and it's dropoff points are now active. +(/) City Harpoints have been adjusted to only fit the inner-city limits. +(/) XP Market and /perks are now based off Deathmatch and Robbery XP. +(*) Fixes the ID requirement for /taze, /cuff, and /arrest +(*) Detain no longer requires an ID to be put into the parameters. +(*) The server no longer thinks a player being detained is a cheating individual. \ No newline at end of file