From 7a3d082a4b2d5efefced60e18a3c9279e8404018 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 24 Feb 2019 20:41:06 +1100 Subject: [PATCH] fixes more battle royale bugs --- .../cnr/features/battleroyale/battleroyale.pwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn b/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn index b15e93f..674773e 100644 --- a/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn +++ b/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn @@ -314,7 +314,7 @@ hook SetPlayerRandomSpawn( playerid ) SetPlayerPos( playerid, X, Y, Z - 2.0 ); SetPlayerVirtualWorld( playerid, BR_GetWorld( lobbyid ) ); - ResetPlayerPassiveMode( playerid ); + ResetPlayerPassiveMode( playerid, true ); DisablePlayerSpawnProtection( playerid, .default_health = br_lobbyData[ lobbyid ] [ E_HEALTH ] ); SetPlayerHealth( playerid, br_lobbyData[ lobbyid ] [ E_HEALTH ] ); @@ -459,7 +459,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) else if ( listitem == 6 ) // select walking weapon mode { br_lobbyData[ lobbyid ] [ E_WALK_WEP ] = ! br_lobbyData[ lobbyid ] [ E_WALK_WEP ]; - BattleRoyale_SendMessage( lobbyid, "%s has set only running weapons to %s.", ReturnPlayerName( playerid ), bool_to_string( ! br_lobbyData[ lobbyid ] [ E_WALK_WEP ] ) ); + BattleRoyale_SendMessage( lobbyid, "%s has set allow running weapons to %s.", ReturnPlayerName( playerid ), bool_to_string( ! br_lobbyData[ lobbyid ] [ E_WALK_WEP ] ) ); return BattleRoyale_EditLobby( playerid, lobbyid ); } else if ( listitem == 7 ) // select cac mode @@ -480,6 +480,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( ! BattleRoyale_StartGame( lobbyid ) ) { SendError( playerid, "This lobby has already started." ); } + return 1; } return BattleRoyale_EditLobby( playerid, lobbyid ); } @@ -669,7 +670,7 @@ CMD:battleroyale( playerid, params[ ] ) GivePlayerCash( playerid, -amount ); br_lobbyData[ lobbyid ] [ E_PRIZE_POOL ] += amount; - if ( amount >= 100000 ) { + if ( amount >= 50000 ) { BattleRoyale_SendMessageAll( ""COL_GREY"%s(%d) has contributed %s to %s (total %s).", ReturnPlayerName( playerid ), playerid, cash_format( amount ), br_lobbyData[ lobbyid ] [ E_NAME ], cash_format( br_lobbyData[ lobbyid ] [ E_PRIZE_POOL ] ) ); } else { BattleRoyale_SendMessage( lobbyid, "%s(%d) has contributed %s to the lobby (total %s).", ReturnPlayerName( playerid ), playerid, cash_format( amount ), cash_format( br_lobbyData[ lobbyid ] [ E_PRIZE_POOL ] ) ); @@ -1004,7 +1005,7 @@ function BattleRoyale_GameUpdate( lobbyid ) } // hurt players outside the zone - if ( IsPlayerSpawned( x ) && ! IsPlayerInArea( x, br_lobbyData[ lobbyid ] [ E_B_MIN_X ], br_lobbyData[ lobbyid ] [ E_B_MAX_X ], br_lobbyData[ lobbyid ] [ E_B_MIN_Y ], br_lobbyData[ lobbyid ] [ E_B_MAX_Y ] ) ) + if ( p_battleRoyaleSpawned{ x } && ! IsPlayerInArea( x, br_lobbyData[ lobbyid ] [ E_B_MIN_X ], br_lobbyData[ lobbyid ] [ E_B_MAX_X ], br_lobbyData[ lobbyid ] [ E_B_MIN_Y ], br_lobbyData[ lobbyid ] [ E_B_MAX_Y ] ) ) { // force kill afk player out of zone if ( IsPlayerAFK( x ) )