From abe07e8be3ba8c4fe1d7175e60f5667eab303adc Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 23 Dec 2018 00:47:10 +1100 Subject: [PATCH] passive players with vehicles, can't do damage to others (stev) --- gamemodes/sf-cnr.pwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 02af665..3aff3b1 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -1467,6 +1467,10 @@ public OnPlayerTakePlayerDamage( playerid, issuerid, &Float: amount, weaponid, b if ( p_Class[ playerid ] == CLASS_POLICE && IsPlayerInAnyVehicle( playerid ) && GetVehicleModel( GetPlayerVehicleID( playerid ) ) == 432 ) return 0; + // Passive players cannot damage with vehicles + if ( IsPlayerPassive( issuerid ) && IsPlayerInAnyVehicle( issuerid ) ) + return 0; + // Anti RDM and gang member damage if ( ! IsPlayerInEvent( playerid ) && ! IsPlayerInPaintBall( playerid ) && ! IsPlayerBoxing( playerid ) && ! IsPlayerDueling( playerid ) ) {