From fe089953c4191915e1c820be7e1d1573b29511e9 Mon Sep 17 00:00:00 2001 From: Damen Date: Tue, 14 May 2019 12:39:58 -0400 Subject: [PATCH] removes testgang, adds test msg --- .../irresistible/cnr/features/gangs/turfs.pwn | 42 +++++-------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/gangs/turfs.pwn b/gamemodes/irresistible/cnr/features/gangs/turfs.pwn index 96e057f..488a08a 100644 --- a/gamemodes/irresistible/cnr/features/gangs/turfs.pwn +++ b/gamemodes/irresistible/cnr/features/gangs/turfs.pwn @@ -225,6 +225,7 @@ hook OnServerGameDayEnd( ) { foreach(new g : gangs) { + new afk_members, online_members = GetOnlineGangMembers( g, .afk_members = afk_members ); @@ -249,6 +250,15 @@ hook OnServerGameDayEnd( ) SaveGangData( g ); SendClientMessageToGang( g, g_gangData[ g ] [ E_COLOR ], "[GANG] "COL_GOLD"%s"COL_WHITE" has been earned from territories and deposited in the gang bank account.", cash_format( profit ) ); } + + foreach( new p : Player ) + { + if ( IsPlayerAdmin( p ) ) + { + format( szNormalString, sizeof( szNormalString ), "Gang ID: %i - Online Active Members: %i - Profit: %i", g, online_members, profit ); + SendClientMessage( p, -1, szNormalString ); + } + } } } @@ -584,36 +594,4 @@ CMD:takeover( playerid, params[ ] ) } } return SendError( playerid, "You are not in any gangzone." ); -} - -CMD:testgang( playerid, params[] ) -{ - foreach(new g : gangs) - { - new - afk_members, online_members = GetOnlineGangMembers( g, .afk_members = afk_members ); - - if ( online_members >= TAKEOVER_NEEDED_PEOPLE ) - { - new - profit = 0; - - foreach( new zoneid : turfs ) if ( g_gangTurfData[ zoneid ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ zoneid ] [ E_OWNER ] == g ) - { - // facilities will not pay out respect - if ( g_gangTurfData[ zoneid ] [ E_FACILITY_GANG ] == INVALID_GANG_ID ) { - g_gangData[ g ] [ E_RESPECT ] ++; - } - - // accumulate profit - profit += Turf_GetProfitability( zoneid, online_members - afk_members ); - } - - if ( profit > 0 ) { - GiveGangCash( g, profit ); - SaveGangData( g ); - SendClientMessageToGang( g, g_gangData[ g ] [ E_COLOR ], "[GANG] "COL_GOLD"%s"COL_WHITE" has been earned from territories and deposited in the gang bank account.", cash_format( profit ) ); - } - } - } } \ No newline at end of file