Livedeath 10 Posted December 30, 2013 (edited) Hey. I'm trying to implement the VAS System to VTS 4.0. After i'm getting it to work i'll post the Combo as Scriptpackage and Do-it-yourself-Manual. Any Suggestions? Actual Problem: I implemented the this addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"]; in /mods/custom_functions.sqf as vts_customfunctions= [ "[vts_this] addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"];" ]; But it won't work. Any Hints for me? Edited January 1, 2014 by Livedeath Share this post Link to post Share on other sites
kremator 1065 Posted December 30, 2013 I would have place this into the VTS thread, however here goes. You probably have to add it to player.init Remember VTS comes with it's own ammo system like VAS. You can attach VTS_isshop to any item. Share this post Link to post Share on other sites
Livedeath 10 Posted January 1, 2014 (edited) Yeah i could but i can choose only one object as VAS-Item and must have a sight of line to spawn it. So i want to include it into the Script List in the computer view. But if i use custom_functions the script list will be flushed empty at next start and i can't select even the standard commands. Any Ideas? --- I tried a second variant a script that needs to be executed. But however it won't work. I reused the wrecks spawning script. Any Ideas? disableSerialization; _gmable=player getVariable "GMABLE";If !( [player] call vts_getisGM) then {if (isnil "_gmable") then {killscript=true;breakclic=0;};}; if (killscript) exitwith {killscript=false;}; //Début de script OnmapClick if (breakclic <= 1 ) then { clic1 = false; _display = finddisplay 8000; _txt = _display displayctrl 200; _txt CtrlSetText "Left click on the map"; _txt CtrlSetTextColor [0.9,0.9,0.9,1]; Ctrlshow [200,true];sleep 0.2; CtrlShow [200,false];sleep 0.2;Ctrlshow [200,true]; //Récuperation des coordonnées de la carte onMapSingleClick "local_spawn_x = _pos select 0; local_spawn_y = _pos select 1; local_spawn_z = _pos select 2; clic1 = true; onMapSingleClick """";"; for "_j" from 10 to 0 step -1 do { format["Click On Map %1, or wait for cancellation",_j] spawn vts_gmmessage; sleep 1; //hint "pause"; //if (_clic1) exitWith {}; if (clic1) then { "" spawn vts_gmmessage; _j=0; clic1 = false; _posclick = [local_spawn_x,local_spawn_y,local_spawn_z]; _marker_Take = createMarkerLocal ["Nmarker",_posclick]; _marker_Take setMarkerShapeLocal "ELLIPSE"; // _marker_Take setMarkerTypeLocal "mil_Dot"; _marker_Take setMarkerSizeLocal [local_radius, local_radius]; _marker_Take setMarkerDirLocal 0; _marker_Take setMarkerColorLocal "Colororange"; //****************************** //***** Code come here ********* //****************************** hint "Spawning VAS"; //Spawning wreck on roads _pos=[local_spawn_x,local_spawn_y,local_spawn_z]; _wreckstospawn=[ "Box_NATO_Ammo_F", ]; _checkwrecks=[]; {if (isclass (configfile >> "cfgvehicles" >>_x)) then {_checkwrecks set [count _checkwrecks,_x];}; } foreach _wreckstospawn; _wreckstospawn=_checkwrecks; _wrecksnum=count _wreckstospawn; _numofwreckstospawn=1; for "_x" from 1 to _numofwreckstospawn do { _vehicle= _wreckstospawn select _wrecksnum createVehicle _pos; _vehicle= addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"]; //Random direction on the road _dir=round(random 360); _vehicle setDir (direction _road)+_dir; if !(isnil "vts_createbbmarker") then { [_vehicle,(str (position _vehicle))+(str(direction _vehicle))] call vts_createbbmarker; }; _vehicle setvariable ["vts_object",true,true]; }; hint format["%1 VAS Ammo Crate has been spawned within an area of %2 meters",_numofwreckstospawn,local_radius]; //****************************** sleep 0.5; deletemarker "Nmarker"; //clean marker }; clic1 = false; }; sleep 0.5; "" spawn vts_gmmessage; breakclic = 0; // waitUntil {(clic1)}; }; If (true) ExitWith {}; Edited January 1, 2014 by Livedeath Share this post Link to post Share on other sites