10% bonus pay to cop + rhino vulnerable to damage

This commit is contained in:
Lorenc Pekaj 2019-05-31 20:12:13 +10:00
parent bd69f60120
commit 54543b1039
2 changed files with 8 additions and 6 deletions

View File

@ -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 );

View File

@ -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 );