From c98b6e6f57e067c8d0a4a5d4773b665b09e8e32e Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sun, 9 Jun 2019 20:14:33 +0300 Subject: [PATCH] Fixes coleader occupied slots Gang coleader spot is now emptied upon offline kicking the coleader. --- gamemodes/irresistible/cnr/features/gangs/gangs.pwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/gangs/gangs.pwn b/gamemodes/irresistible/cnr/features/gangs/gangs.pwn index a54fd5a..9503ba3 100644 --- a/gamemodes/irresistible/cnr/features/gangs/gangs.pwn +++ b/gamemodes/irresistible/cnr/features/gangs/gangs.pwn @@ -771,6 +771,10 @@ thread OnGangKickOffline( playerid, gangid ) mysql_single_query( sprintf( "DELETE FROM `GANG_COLEADERS` WHERE `USER_ID`=%d", player_accid ) ); mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE `ID`=%d", player_accid ) ); + for ( new i = 0; i < MAX_COLEADERS; i++ ) if ( g_gangData[ gangid ] [ E_COLEADER ] [ i ] == player_accid ) { + g_gangData[ gangid ] [ E_COLEADER ] [ i ] = 0; + } + SendClientMessageToGang( static_gangid, g_gangData[ static_gangid ] [ E_COLOR ], "[GANG]{FFFFFF} %s has left the gang (KICKED)", player_name ); } else