ers",8]; _members = [(_group getVariable "gang_members")] call DB_fnc_mresArray; _owner = _group getVariable ["gang_owner",""]; if(_owner == "") exitWith {}; _query = format["UPDATE gangs SET bank='%1', maxmembers='%2', owner='%3' WHERE id='%4'",_bank,_maxMembers,_owner,_groupID]; }; case 1: { _query = format["UPDATE gangs SET bank='%1' WHERE id='%2'",([(_group getVariable ["gang_bank",0])] call DB_fnc_numberSafe),_groupID]; }; case 2: { _query = format["UPDATE gangs SET maxmembers='%1' WHERE id='%2'",(_group getVariable ["gang_maxMembers",8]),_groupID]; }; case 3: { _owner = _group getVariable["gang_owner",""]; if(_owner == "") exitWith {}; _query = format["UPDATE gangs SET owner='%1' WHERE id='%2'",_owner,_groupID]; }; case 4: { _members = _group getVariable "gang_members"; if(count _members > (_group getVariable ["gang_maxMembers",8])) then { _membersFinal = []; for "_i" from 0 to _maxMembers -1 do { _membersFinal pushBack (_members select _i); }; }; _membersFinal = [(_group getVariable "gang_members")] call DB_fnc_mresArray; _query = format["UPDATE gangs SET members='%1' WHERE id='%2'",_membersFinal,_groupID]; }; }; if(!isNil "_query") then { waitUntil{!DB_Async_Active}; [_query,1] call DB_fnc_asyncCall; }; /* Author: Bryan "Tonic" Boardwine Description: Queries to see if the player belongs to any gang. */ private["_query","_queryResult"]; _query = format["SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active='1' AND members LIKE '%2%1%2'",_this,"%"]; waitUntil{!DB_Async_Active}; _queryResult = [_query,2] call DB_fnc_asyncCall; if(count _queryResult != 0) then { _tmp = [_queryResult select 5] call DB_fnc_mresToArray; if(typeName _tmp == "STRING") then {_tmp = call compile format["%1",_tmp];}; _queryResult set[5, _t