Fixes K/D in event

Kills and deaths are no longer affected in events.
This commit is contained in:
Cloudy 2019-06-08 20:35:34 +03:00 committed by GitHub
parent 3ee4bc05dc
commit 4ca2bd524c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1291,7 +1291,7 @@ public OnPlayerDeath( playerid, killerid, reason )
//DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has killed %s(%d) - %s!*", ReturnPlayerName( killerid ), killerid, ReturnPlayerName( playerid ), playerid, ReturnWeaponName( reason ) ); //DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has killed %s(%d) - %s!*", ReturnPlayerName( killerid ), killerid, ReturnPlayerName( playerid ), playerid, ReturnWeaponName( reason ) );
if ( !IsPlayerAdminOnDuty( killerid ) ) if ( !IsPlayerAdminOnDuty( killerid ) && ! IsPlayerInEvent( killerid ) )
{ {
new new
killerGangId = p_GangID[ killerid ]; killerGangId = p_GangID[ killerid ];
@ -1439,7 +1439,7 @@ public OnPlayerDeath( playerid, killerid, reason )
DeletePVar( playerid, "used_cmd_kill" ); DeletePVar( playerid, "used_cmd_kill" );
} }
if ( ! IsPlayerInPaintBall( playerid ) && !p_LeftPaintball{ playerid } && !IsPlayerAdminOnDuty( playerid ) ) if ( ! IsPlayerInPaintBall( playerid ) && !p_LeftPaintball{ playerid } && ! IsPlayerAdminOnDuty( playerid ) && ! IsPlayerInEvent( playerid ) )
{ {
if ( playerGangId != INVALID_GANG_ID ) if ( playerGangId != INVALID_GANG_ID )
SaveGangData( playerGangId ), g_gangData[ playerGangId ] [ E_DEATHS ]++; SaveGangData( playerGangId ), g_gangData[ playerGangId ] [ E_DEATHS ]++;