-
Content Count
10 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout ATGSS
-
Rank
Private
-
Save gear on mission temporal database
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks you very much 7erra, i put the code on the module with TER_fnc_handleLoadout , also, i did a test object if EntityRespawned dont work, with this : this addAction ["Save Gear",{ ["save", _this] remoteExec ["TER_fnc_handleLoadout", 2]; }]; this addAction ["Load Gear",{ ["load", _this] remoteExec ["TER_fnc_handleLoadout", 2]; }]; When i reconnect , dont work, and if i use the test code all work correct, maybe the HandleDisconnect is not working??? -
Save gear on mission temporal database
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is any way to use this on HandleDisconnect and Playerconected function? -
Save gear on mission temporal database
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, thanks for your response,I left this for impossible and i did another post for this question, i get another script for this, but not work, Thanks! -
Reconnect with the same gear and position
ATGSS posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, i am looking for save the last position and gear before disconnect .(DC or CRASH) I tried this and work , but only save the last position, the gear not working. I tried more script from the forums, but nothing work, Can anyone help me pls? Tanks you very much!!! Init.sqf [] execVM "PlayerEvents.sqf"; PlayerEvents.sqf TAG_fnc_loadClientData = { _this params ["_loadoutStr", "_positionASL", "_dir"]; call compile _loadoutStr; player setDir _dir; player setPosASL _positionASL; }; if(isServer) then { addMissionEventHandler [ "HandleDisconnect", { params ["_body", "_id", "_uid", "_name"]; if(!isNull _body) then { //Init storage var if(isNil "TAG_disconnectedLoadouts") then { TAG_disconnectedLoadouts = []; }; //Save loadout as script for easy broadcast private _loadoutStr = [player, "script", false] call BIS_fnc_exportInventory; { private _index = _loadoutStr find _x; if(_index > -1) then { private _strArray = toArray _loadoutStr; _strArray deleteRange [_index, count _x]; _loadoutStr = toString _strArray; }; } forEach ["// Remove existing items","// Add containers","// Add weapons", "// Add items", "// Set identity"]; //Find in storage private _uidIndex = TAG_disconnectedLoadouts find _uid; if(_uidIndex > -1) then { //Found -> update private _loadoutIndex = _uidIndex + 1; TAG_disconnectedLoadouts set [_loadoutIndex, _loadoutStr]; } else { //Not found -> Add new TAG_disconnectedLoadouts pushBack _uid; TAG_disconnectedLoadouts pushBack [_loadoutStr, getPosASL _body, getDir _body]; }; }; false } ]; addMissionEventHandler [ "PlayerConnected", { params ["_id", "_uid", "_name", "_jip", "_owner"]; if(_jip) then { private _clientData = missionNamespace getVariable ["TAG_disconnectedLoadouts", []]; private _uidIndex = _clientData find _uid; if(_uidIndex > -1) then { private _loadoutIndex = _uidIndex + 1; (_clientData select _loadoutIndex) remoteExec ["TAG_fnc_loadClientData", _owner]; }; }; } ]; }; -
Save gear on mission temporal database
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I got this script, and dont work correct if a player got DC or Crash.... but if i use a addaction "this addAction ["Save loadout", "server_onPlayerDisconnect.sqf"]" the script is working...... Any ideas what was wrong???? Thank you! init.sqf server_onPlayerDisconnect = compile preprocessFileLineNumbers "server_onPlayerDisconnect.sqf"; server_onPlayerDisconnect.sqf _caja = C; _principal = primaryWeapon player; _cargadorPrincipal = primaryWeaponMagazine player; _accesoriosPrimaria = primaryWeaponItems player; _lanzador = secondaryWeapon player; _cargadorLanzador = secondaryWeaponMagazine player; _accesoriosLanzador = secondaryWeaponItems player; _secundaria = handgunWeapon player; _cargadorSecundaria = handgunMagazine player; _accesoriosSecundaria = handgunItems player; _items = (vestitems player + uniformitems player + backpackitems player); if (_principal != "") then{ _caja addWeaponCargoGlobal [_principal, 1]; _caja addItemCargoGlobal [_cargadorPrincipal select 0, 1]; }; if (_lanzador != "") then{ _caja addWeaponCargoGlobal [_lanzador, 1]; _caja addItemCargoGlobal [_cargadorLanzador select 0, 1]; }; if (_secundaria != "") then{ _caja addWeaponCargoGlobal [_secundaria, 1]; _caja addItemCargoGlobal [_cargadorSecundaria select 0, 1]; }; _contarItems = _items call BIS_fnc_consolidateArray; for "_i" from 0 to count _contarItems -1 do { _elemento = _contarItems select _i; _objeto = _elemento select 0; _contar = _elemento select 1; _caja addItemCargoGlobal [_objeto, _contar]; }; _totalAccesorios = (_accesoriosPrimaria + _accesoriosSecundaria + _accesoriosLanzador); for "_i" from 0 to count _totalAccesorios -1 do { _objeto = _totalAccesorios select _i; if (_objeto != "") then{ _caja addItemCargoGlobal [_objeto, 1]; }; }; -
Save gear on mission temporal database
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you very much!!!!!!! It work perfect!... Only a question, is possible modifing this code, for do another . : If the player got DC or Crash, spawn a crate at the last position with the actual gear before DC or crash??? Thank you very much again,!!!!!!! -
Hi all, first sorry for my bad english.... I want a script for do this : In a Coop Mission on the server, a option with Addaction to save a gear in a crate or object, then, if the player got DC or crash , he can join again and in the crate or objetc select "load gear" to get the same gear he had saved. I cant use a arsenal, because i have a limit number of gear (the rol of the mission), This is only for play 1 time, i dont need save permanently after server restart. I am looking for that, but no luck, i tried some tutorial but dont work withow database. ¿Can anyone help me pls? Thank you very much!!
-
Run a script with addaction only one time
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, thanks very much for the explanation!! . I started recently with the scripts and i'm still learning. I want this script for a coop mission on my clan, (40 players), no pause for you if you go to toilet 😁 . At the beginning , there is a water dispenser to ""hydrate "",ajajajajajaj, then go to combat, and after few minuts , they will feel bad. Normally nobody drinks 2 times. -
Run a script with addaction only one time
ATGSS replied to ATGSS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you very much for your response, at ende , yesterday i was looking for this, and got this code from another post. It is exactly that i need. Thank you very much again! this addAction [ "<t color='#ff9900'>Beber agua!</t>", { execVM "agua.sqf"; (_this select 0) setVariable ["Aguasucia",false]; uiSleep 950; (_this select 0) setVariable ["Aguasucia",true] }, [],1,false,true,"", "_this distance _target < 2 && sunOrMoon > 0.5 && _target getVariable ['Aguasucia',true]" ]; -
ATGSS changed their profile photo
-
ATGSS started following Run a script with addaction only one time
-
Run a script with addaction only one time
ATGSS posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, sry for my bad english, i have a script with a effect on players in multiplayer ,it is loaded with a Addaction, but i want run again the same script only if the effect is over. I have a water dispenser, then you can drink water, and got a long effect, but if you drink 3 times , you got 3 times the effect at the same time. I want only drink 1 time , and only can drink again if the effect is over, for example, if you try drink again before the effect is over, you got a hint, " you drank recently", or the AddAction "drink water", ist not available , dissapear or something. ¿Can anyone help me pls?, thank you very much. Here is the script if you need more information : titleText ["Ya estas hidratado y listo para el combate, tu aguante durara ahora mas tiempo.","PLAIN DOWN"]; titleFadeOut 15; sleep 400; titleText ["Estas empezando a sentirte mal.","PLAIN DOWN"]; titleFadeOut 15; sleep 200; titleText ["El agua que bebiste antes estaba adulterada con algun tipo de sustancia. No te encuentras bien.","PLAIN DOWN"]; titleFadeOut 15; sleep 6; addCamShake [10, 200, 50] ; //Activate ppEffects we need "chromAberration" ppEffectEnable true; "radialBlur" ppEffectEnable true; "DynamicBlur" ppEffectEnable true; //Let's go for 45secs of effetcs for "_i" from 0 to 126 do { "chromAberration" ppEffectAdjust [random 0.04,random 0.04,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.01,0.01]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.1]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 126 to 228 do { "chromAberration" ppEffectAdjust [random 1,random 1,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.02,random 0.02,0.15,0.15]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.6]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 228 to 410 do { "chromAberration" ppEffectAdjust [random 0.20,random 0.20,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.02,0.10,0.10]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.4]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 410 to 510 do { "chromAberration" ppEffectAdjust [random 0.10,random 0.10,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.07,0.06]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.3]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 510 to 720 do { "chromAberration" ppEffectAdjust [random 0.06,random 0.06,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.04,0.03]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.2]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 720 to 860 do { "chromAberration" ppEffectAdjust [random 0.04,random 0.04,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.01,0.01]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.1]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; for "_i" from 860 to 990 do { "chromAberration" ppEffectAdjust [random 0.04,random 0.04,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.01,random 0.01,0.01,0.01]; "radialBlur" ppEffectCommit 1; "DynamicBlur" ppEffectAdjust [random 0.1]; "DynamicBlur" ppEffectCommit 1; sleep 1; }; //Stop effects "chromAberration" ppEffectAdjust [0,0,true]; "chromAberration" ppEffectCommit 5; "radialBlur" ppEffectAdjust [0,0,0,0]; "radialBlur" ppEffectCommit 5; "DynamicBlur" ppEffectAdjust [0]; "DynamicBlur" ppEffectCommit 5; sleep 6; //Deactivate ppEffects "chromAberration" ppEffectEnable false; "radialBlur" ppEffectEnable false; "DynamicBlur" ppEffectEnable false;