From 54543b10396d2c41a7f7137f8346b4d7b72aea3c Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Fri, 31 May 2019 20:12:13 +1000 Subject: [PATCH] 10% bonus pay to cop + rhino vulnerable to damage --- gamemodes/irresistible/cnr/features/cop/arrest.pwn | 6 ++++-- gamemodes/sf-cnr.pwn | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index 66879ba..794754a 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -9,6 +9,8 @@ #include < YSI\y_hooks > /* ** Variables ** */ +static const COP_ARREST_PAY_PER_WANTED = 330; +static const COP_DETAIN_PAY_PER_WANTED = 385; /* ** Forwards ** */ forward OnPlayerArrested( playerid, victimid, totalarrests, totalpeople ); @@ -54,7 +56,7 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid ) totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER ); iDetained++; - iCashEarned += ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 350 ); + iCashEarned += ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_DETAIN_PAY_PER_WANTED ); KillTimer( p_CuffAbuseTimer[ victimid ] ); SetPlayerSpecialAction( victimid, SPECIAL_ACTION_NONE ); RemovePlayerAttachedObject( victimid, 2 ); @@ -176,7 +178,7 @@ CMD:arrest( playerid, params[ ] ) if ( IsPlayerInAnyVehicle( victimid ) ) return SendError( playerid, "You cannot arrest a person that is inside a vehicle." ); if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." ); if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." ); - new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( 300 ); + new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_ARREST_PAY_PER_WANTED ); new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER ); GivePlayerScore( playerid, 2 ); GivePlayerExperience( playerid, E_POLICE ); diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index e2cef8e..80bf34e 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -1058,9 +1058,9 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b if ( IsPlayerTazed( playerid ) || IsPlayerCuffed( playerid ) || IsPlayerKidnapped( playerid ) || IsPlayerTied( playerid ) || IsPlayerLoadingObjects( playerid ) || IsPlayerAdminOnDuty( playerid ) || IsPlayerSpawnProtected( playerid ) ) return 0; - // Rhino damage invulnerable - if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 ) - return 0; + // // Rhino damage invulnerable + // if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 ) + // return 0; // Anti RDM and gang member damage if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) && ! IsPlayerInBattleRoyale( playerid ) ) @@ -1297,7 +1297,7 @@ public OnPlayerDeath( playerid, killerid, reason ) if ( p_WantedLevel[ playerid ] > 5 ) { static const killedWords[ ] [ ] = { { "murked" }, { "killed" }, { "ended" }, { "slain" }, { "massacred" }, { "destroyed" }, { "screwed" } }; - new cashEarned = ( p_WantedLevel[ playerid ] < MAX_WANTED_LVL ? p_WantedLevel[ playerid ] : MAX_WANTED_LVL ) * ( reason == 38 || reason == 51 ? 160 : 270 ); + new cashEarned = ( p_WantedLevel[ playerid ] < MAX_WANTED_LVL ? p_WantedLevel[ playerid ] : MAX_WANTED_LVL ) * ( reason == 38 || reason == 51 ? 150 : 300 ); GivePlayerCash( killerid, cashEarned ); GivePlayerScore( killerid, 2 ); GivePlayerExperience( killerid, E_POLICE, 0.5 );