naong
Member-
Content Count
9 -
Joined
-
Last visited
-
Medals
Community Reputation
1 NeutralAbout naong
-
Rank
Private
-
EPM RCon Tool (Beta) Changelog and Information
naong replied to cortez471's topic in ARMA 3 - SERVERS & ADMINISTRATION
It is a great tool. Is it possible to support unicode character set? -
maximun slots server exceed and server stops
naong replied to unidad2pete's topic in ARMA 3 - SERVERS & ADMINISTRATION
It was trial and error for me. -
maximun slots server exceed and server stops
naong replied to unidad2pete's topic in ARMA 3 - SERVERS & ADMINISTRATION
Open 'mission.sqm' file from your mission. Check "briefingName". It cannot be exceeded 50 characters. If it exceed 50 chracters, the server can't control players limit. -
Virtual Ammobox System (VAS)
naong replied to tonic-_-'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes. You're right. But please test it once. 'call' command wait until a result is returned. It not need waitUntil. And it will show better performance in load process. Thanks. -
Virtual Ammobox System (VAS)
naong replied to tonic-_-'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
hi Tonic-_-, I have a suggestion for improve script performance. Currently you are using 'spawn' command rather than 'call' command. If you not use time critical loop script, I recommend use 'call' command. It's faster than 'spawn' command. For example in 'fn_loadGear.sqf' file //Original Code /* {_handle = [_x,true,nil,nil,nil] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach _items; {_handle = [_x,true,nil,nil,true] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_uitems); {_handle = [_x,true,nil,nil,true] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_vitems); {_handle = [_x,true,true,nil,nil] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_bitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_primitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_secitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_handgunitems); */ // Modified Code {[_x,true,nil,nil,nil] call VAS_fnc_handleItem;} foreach _items; {[_x,true,nil,nil,true] call VAS_fnc_handleItem;} foreach (_uitems); {[_x,true,nil,nil,true] call VAS_fnc_handleItem;} foreach (_vitems); {[_x,true,true,nil,nil] call VAS_fnc_handleItem;} foreach (_bitems); {[_x,true,nil,true,nil] call VAS_fnc_handleItem;} foreach (_primitems); {[_x,true,nil,true,nil] call VAS_fnc_handleItem;} foreach (_secitems); {[_x,true,nil,true,nil] call VAS_fnc_handleItem;} foreach (_handgunitems); You can also use this command in 'fn_handleItem.sqf', 'fn_mainDisplay.sqf', 'load_onrespawn.sqf', 'fn_removeGear.sqf', 'fn_saveGear.sqf', 'fn_SaveLoad.sqf', 'misc_functions.sqf', 'add_gear.sqf' and 'fn_deleteGear.sqf' file. It will improve VAS performance. -
Virtual Ammobox System (VAS)
naong replied to tonic-_-'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
I found a bug. If you click [Load] button continuously in Load dialog, all of itmes are duplicated. And I have a suggestion in fn_loadoutInfo.sqf file. Following code will display items quantity in Save or Load dialog. Display items quantity in Save or Load dialog. #include "macro.sqf" /* @version: 1.1 @file_name: fn_loadoutInfo.sqf @file_author: TAW_Tonic @file_edit: 5/27/2013 @file_description: Pulls up the selected saved slots loadout. */ private["_control","_slot","_type","_loadout"]; _type = _this select 0; disableSerialization; switch (_type) do { case 0: {_control = VAS_getControl(VAS_save_Display,VAS_save_fetch); _slot = lbCurSel VAS_save_list;}; case 1: {_control = VAS_getControl(VAS_load_Display,VAS_load_fetch); _slot = lbCurSel VAS_load_list}; }; lbClear _control; if(_slot == -1) exitWith {hint "You didn't select a slot!";}; //No slot selected if(vas_disableLoadSave) then { _loadout = missionNamespace getVariable format["vas_gear_new_%1",_slot]; } else { _loadout = profileNamespace getVariable format["vas_gear_new_%1",_slot]; }; if(isNil {_loadout}) exitWith {(VAS_getControl(VAS_save_Display,VAS_save_text)) ctrlSetText "Custom Loadout Name";}; //No information in this slot. if(_type == 0) then { (VAS_getControl(VAS_save_Display,VAS_save_text)) ctrlSetText (_loadout select 0); }; // Original Code /* { switch(typeName _x) do { case "STRING": { _details = [_x] call VAS_fnc_fetchCfgDetails; if(count _details > 0) then { _control lbAdd format["%1", (_details select 1)]; _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; }; }; case "ARRAY": { { _details = [_x] call VAS_fnc_fetchCfgDetails; if(count _details > 0) then { _control lbAdd format["%1", (_details select 1)]; _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; }; } foreach _x; }; }; } foreach _loadout; */ // Modified Code private ["_listItems","_loadout_array","_className","_name"]; _loadout_array = []; { switch(typeName _x) do { case "STRING": { _loadout_array = _loadout_array + [_x]; }; case "ARRAY": { { _loadout_array = _loadout_array + [_x]; } forEach _x; }; }; } forEach _loadout; _listItems = []; { _className = _x; _details = [_x] call VAS_fnc_fetchCfgDetails; if(count _details > 0) then { _name = (_details select 1); if (_listItems find _name < 1) then { _control lbAdd format["[%1] %2",({_x == _className} count _loadout_array),_name]; _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; _listItems = _listItems + [_name]; }; }; } forEach _loadout_array; Solution for the duplicating bug. #include "macro.sqf" /* @version: 1.1 @file_name: fn_loadGear.sqf @file_author: TAW_Tonic @file_edit: 5/27/2013 @file_description: Load saved gear in old VAS format. */ private["_slot","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle"]; _slot = if(isNil {_this select 0}) then {lbCurSel VAS_load_list} else {_this select 0}; if(_slot == -1) exitWith {hint "You didn't select a slot to load!";}; // Added by naong scopeName "main"; if (isNil "vas_nowLoading") then { vas_nowLoading = true; } else { if (vas_nowLoading) then { breakOut "main"; } else { vas_nowLoading = true; }; }; ///////////////// if(vas_disableLoadSave) then { _loadout = missionNamespace getVariable format["vas_gear_new_%1",_slot]; } else { _loadout = profileNamespace getVariable format["vas_gear_new_%1",_slot]; }; if(isNil {_loadout}) exitWith {}; //Slot data doesn't exist _primary = _loadout select 1; _launcher = _loadout select 2; _handgun = _loadout select 3; _magazines = _loadout select 4; _uniform = _loadout select 5; _vest = _loadout select 6; _backpack = _loadout select 7; _items = _loadout select 8; _primitems = _loadout select 9; _secitems = _loadout select 10; _handgunitems = _loadout select 11; _uitems = _loadout select 12; _vitems = _loadout select 13; _bitems = _loadout select 14; //Strip the unit down RemoveAllWeapons player; {player removeMagazine _x;} foreach (magazines player); removeUniform player; removeVest player; removeBackpack player; removeGoggles player; removeHeadGear player; { player unassignItem _x; player removeItem _x; } foreach (assignedItems player); //Add the gear if(_uniform != "") then {[_uniform,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; if(_vest != "") then {[_vest,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; if(_backpack != "") then {[_backpack,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; { _handle = [_x,true,nil,nil,nil] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle}; } foreach _magazines; if(_primary != "") then {[_primary,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; if(_launcher != "") then {[_launcher,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; if(_handgun != "") then {[_handgun,true,nil,nil,nil] spawn VAS_fnc_handleItem;}; {_handle = [_x,true,nil,nil,nil] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach _items; {_handle = [_x,true,nil,nil,true] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_uitems); {_handle = [_x,true,nil,nil,true] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_vitems); {_handle = [_x,true,true,nil,nil] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach (_bitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_primitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_secitems); {[_x,true,nil,true,nil] spawn VAS_fnc_handleItem;} foreach (_handgunitems); if(primaryWeapon player != "") then { player selectWeapon (primaryWeapon player); }; // Added by naong vas_nowLoading = false; ///////////////// -
Simple Vehicle Respawn Script [Arma3]
naong replied to tophe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I modified script and tested in 0.56 stable. If you you want to set the INIT field of the respawned vehicle, first set all other values, then set init commands. Those must be inside quotations. Like this: veh = [this, 15, 10, 5, TRUE, FALSE, "_this setDamage 0.5;"] execVM "vehicle.sqf" not 'this' but '_this' /////////////////////////////////// // Simple Vehicle Respawn Script v1.81 for Arma 3 // by Tophe of Östgöta Ops [OOPS] if (!isServer) exitWith {}; // Define variables _unit = _this select 0; _delay = if (count _this > 1) then {_this select 1} else {30}; _deserted = if (count _this > 2) then {_this select 2} else {120}; _respawns = if (count _this > 3) then {_this select 3} else {0}; _explode = if (count _this > 4) then {_this select 4} else {false}; _dynamic = if (count _this > 5) then {_this select 5} else {false}; _unitinit = if (count _this > 6) then {_this select 6} else {}; _haveinit = if (count _this > 6) then {true} else {false}; _hasname = false; _unitname = vehicleVarName _unit; if (isNil _unitname) then {_hasname = false;} else {_hasname = true;}; _noend = true; _run = true; _rounds = 0; if (_delay < 0) then {_delay = 0}; if (_deserted < 0) then {_deserted = 0}; if (_respawns <= 0) then {_respawns= 0; _noend = true;}; if (_respawns > 0) then {_noend = false}; _dir = getDir _unit; _position = getPosASL _unit; _type = typeOf _unit; _dead = false; _nodelay = false; // Start monitoring the vehicle while {_run} do { sleep (2 + random 10); if ((getDammage _unit > 0.8) and ({alive _x} count crew _unit == 0)) then {_dead = true}; // Check if the vehicle is deserted. if (_deserted > 0) then { if ((getPosASL _unit distance _position > 10) and ({alive _x} count crew _unit == 0) and (getDammage _unit < 0.8)) then { _timeout = time + _deserted; sleep 0.1; waitUntil {_timeout < time or !alive _unit or {alive _x} count crew _unit > 0}; if ({alive _x} count crew _unit > 0) then {_dead = false}; if ({alive _x} count crew _unit == 0) then {_dead = true; _nodelay =true}; if !(alive _unit) then {_dead = true; _nodelay = false}; }; }; // Respawn vehicle if (_dead) then { if (_nodelay) then {sleep 0.1; _nodelay = false;} else {sleep _delay;}; if (_dynamic) then {_position = getPosASL _unit; _dir = getDir _unit;}; if (_explode) then {_effect = "M_AT" createVehicle getPosASL _unit; _effect setPosASL getPosASL _unit;}; sleep 0.1; deleteVehicle _unit; sleep 2; _unit = _type createVehicle _position; _unit setPosASL _position; _unit setDir _dir; // Modified by naong if (_haveinit) then { //_unit setVehicleInit format ["%1;", _unitinit]; //processInitCommands; private ["_sTempText", "_sCommand"]; _sTempText = "call compile format['%1',"; _sCommand = format["[{(objectFromNetID '%1') %2 '%3'];}]", netID _unit, _sTempText, _unitinit]; [call compile format["%1",_sCommand], "BIS_fnc_spawn", true, true] spawn BIS_fnc_MP; }; if (_hasname) then { //_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname]; //processInitCommands; private "_sCommand"; _sCommand = format["[{(objectFromNetID '%1') setVehicleVarName '%2';}]", netID _unit, _unitname]; [call compile format["%1",_sCommand],"BIS_fnc_spawn", true, true] spawn BIS_fnc_MP; _unit call compile format ["%1=_This; PublicVariable '%1'",_unitname]; }; _dead = false; //////////////////// // Check respawn amount if !(_noend) then {_rounds = _rounds + 1}; if ((_rounds == _respawns) and !(_noend)) then {_run = false;}; }; }; -
Same here. I added following code in Xeno's Domination! 2.99d init.sqf file. But my server have been hacked. "BIS_fnc_MP_packet" addPublicVariableEventHandler {}; BIS_fnc_MP = {};
-
Dedicated Server with 2500 Ping - why?
naong replied to sn4ke's topic in ARMA 3 - SERVERS & ADMINISTRATION
Thanks. I ran the client as admin and problem solved.