Andrej
-
Posts
13 -
Joined
-
Last visited
Content Type
Profiles
Forums
Articles
Posts posted by Andrej
-
-
Ok never mind it was bug, devs have fixed it . Fix will be release in next epoch version.
-
anyone have anti combat log script for 1.0.6?
-
I have notice that few vehicles that are not in epoch 1.0.6 they doesn't have radar at gunner seat. Anyone know how to add radar to gunners seats?
I'm referring to arma 2 wasteland tanks. -
Does it works CHILD:999 and CHILD:998 in newer version of epoch 1.0.6, having trouble calling custom columns from database.
-
On 10/2/2014 at 3:40 PM, Rocu said:
Should be pretty straight forward. For humanity I grabbed the first snipped I could find from the existing Epoch files and got something like this:
_characterID = player getVariable ["CharacterID",0]; _key = format["CHILD:102:%1:",_characterID]; _primary = _key call server_hiveReadWrite; if (count _primary > 0) then { if ((_primary select 0) == "ERROR") exitWith { //Could not get data }; }; _humanity = _primary select 5;
No idea if it works or not though, you're going to have to test it out. This particular call (102) also grabs data such as medical status, stats, state, worldspace etc. So I guess there's probably a more discrete way of doing this, but this should work just as fine.
Though I don't see why you need to grab it straight from the database. Most basic info is available through variables:
_humanity = player getVariable ["humanity",0];
Do you know how to read custom column for database 1.0.6 epoch?
-
23 hours ago, juandayz said:
you can use the time to prevent a second use. but cuz is a client side script, if player disconect and relog again they can use the started box one more time.
any way:
starterbox.sqf (mpmissions\your instance\custom\ )
private ["_LastUsedTime","_Time","_distance","]; _LastUsedTime = 3600; _Time = time - lastuse; if(_Time < _LastUsedTime) exitWith { cutText [format["wait %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; }else{ //CREATE THE BOX box = { _crate = createVehicle ["USBasicWeapons_EP1",getpos player,[], 0, ""]; _crate setpos (player modelToWorld [0,6,0]); _crate setDir ([_crate, player] call BIS_fnc_dirTo); clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; // add weapons _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; _crate addWeaponCargoGlobal ["Binocular_Vector", 2]; _crate addWeaponCargoGlobal ["ItemGPS", 2]; _crate addWeaponCargoGlobal ["ItemHatchet", 2]; _crate addWeaponCargoGlobal ["ItemKnife", 2]; _crate addWeaponCargoGlobal ["ItemMap", 2]; _crate addWeaponCargoGlobal ["ItemMatchbox", 2]; _crate addWeaponCargoGlobal ["ItemWatch", 2]; _crate addWeaponCargoGlobal ["NVGoggles", 2]; _crate addWeaponCargoGlobal ["ItemCrowbar", 2]; _crate addWeaponCargoGlobal ["ItemMachete", 2]; _crate addWeaponCargoGlobal ["ItemFishingPole", 2]; _crate addWeaponCargoGlobal ["ItemShovel", 2]; _crate addWeaponCargoGlobal ["ItemSledge", 2]; _crate addWeaponCargoGlobal ["ChainSaw", 1]; _crate addWeaponCargoGlobal ["M4A1_HWS_GL_SD_Camo", 2]; // add items _crate addMagazineCargoGlobal ["ItemBriefcase100oz", 12]; _crate addMagazineCargoGlobal ["PartWoodPlywood", 26]; _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["CinderBlocks", 104]; _crate addMagazineCargoGlobal ["MortarBucket", 26]; _crate addMagazineCargoGlobal ["plot_pole_kit", 2]; _crate addMagazineCargoGlobal ["ItemPole", 16]; _crate addMagazineCargoGlobal ["ItemTankTrap", 16]; _crate addMagazineCargoGlobal ["ItemComboLock", 2]; _crate addMagazineCargoGlobal ["ItemVault", 2]; _crate addMagazineCargoGlobal ["ItemAntibiotic", 5]; _crate addMagazineCargoGlobal ["ItemBandage", 10]; _crate addMagazineCargoGlobal ["ItemBloodbag", 10]; _crate addMagazineCargoGlobal ["ItemMorphine", 10]; _crate addMagazineCargoGlobal ["ItemPainkiller", 10]; _crate addMagazineCargoGlobal ["ItemLightBulb", 10]; _crate addMagazineCargoGlobal ["ItemLockbox", 2]; _crate addMagazineCargoGlobal ["ItemMixOil", 10]; _crate addMagazineCargoGlobal ["ItemJerrycan", 10]; _crate addMagazineCargoGlobal ["PartEngine", 5]; _crate addMagazineCargoGlobal ["PartVRotor", 5]; _crate addMagazineCargoGlobal ["PartWheel", 24]; _crate addMagazineCargoGlobal ["PartGlass", 24]; _crate addMagazineCargoGlobal ["PartFueltank", 4]; _crate addMagazineCargoGlobal ["PartGeneric", 100]; _crate addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 50]; _crate addMagazineCargoGlobal ["ItemSodaPepsi", 10]; _crate addMagazineCargoGlobal ["ItemSandbag", 20]; _crate addMagazineCargoGlobal ["ItemCorrugated", 10]; _crate addMagazineCargoGlobal ["ItemWoodFloor", 20]; _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; _crate addMagazineCargoGlobal ["ItemGenerator", 10]; _crate addMagazineCargoGlobal ["PartWoodLumber", 20]; }; call box; _distance = 100; waitUntil {(player distance _crate) > _distance}; deleteVehicle _crate; titleText ["started box was deleted","PLAIN DOWN"]; titleFadeOut 4; };
init_starterbox.sqf
waituntil {!isnull (finddisplay 46)}; sleep 15; startedbox = player addaction [("<t color=""#6599FF"">" + ("StarterBox") +"</t>"),"custom\starterbox.sqf","",5,false,true,"",""];
At bottom of init.sqf
[] ExecVM "custom\init_starterbox.sqf";
but remember the better way is try to do it throug server side...i guess
@juandayz Do you may know how to solve this problem if you have time.
-
I'm struggling with database how can i get value from custom column.
I have create a custom column "Start" inside "character_data" with:
ALTER TABLE `Character_DATA` ADD `Start` INT(1) NOT NULL DEFAULT '1';
I have tried with:
_key = format["CHILD:999:SELECT `Start` FROM `charater_data`"]; _data = _key call server_hiveReadWrite;
I need that INT from "Start" "1" to select don't know how
and i need update it don't know how i tried with_key = format["CHILD:998:UPDATE `character_data` SET `Start`= 2"]; _result = _key call server_hiveReadWrite;
Please someone help cant make this working.
Thank youIt is epoch 1.0.6
-
5 hours ago, juandayz said:
using a server side script you can try a quick adaptation of admin events to see if works.
1-open your server_functions.sqf
find: server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf"; add below: //stbox server_stbox = compile preprocessFileLineNumbers "\z\addons\dayz_server\stbox\server_stbox.sqf";
2-open your init.sqf
A_change the path for publicEH.sqf by this
call compile preprocessFileLineNumbers "custom\publicEH.sqf";
b- at very bottom add:
[] execVM "clientstbox\init_stbox.sqf";
4-Drop your publicEH.sqf ( Located in: \@DayZ_Epoch\addons\dayz_code\init\ )
into mpmissions\your instance\custom\
5. open the custom publicEH.sqf
find: "PVDZE_maintainArea" addPublicVariableEventHandler {(_this select 1) spawn server_maintainArea}; below paste: "PVDZE_stbox" addPublicVariableEventHandler {(_this select 1) spawn server_stbox};
6-Create sqfs
server_stbox.sqf (\@DayZ_Epoch_Server\addons\dayz_server\stbox\)
private ["_date","_key","_result","_outcome","_datestr","_stbox"]; diag_log("STARTERBOX INIT"); _stbox = _this select 0; _key = "CHILD:307:"; _result = _key call server_hiveReadWrite; _outcome = _result select 0; if(_outcome == "PASS") then { _date = _result select 1; _datestr = str(_date); diag_log ("STARTER BOX EXECUTED: " + (_stbox) + " on " + _datestr); [] execVM "\z\addons\dayz_server\stbox\" + (_stbox) + ".sqf"; };
init_stbox.sqf (mpmissions\your instance\clientstbox\)
waituntil {!isnull (finddisplay 46)}; sleep 15; executeevents = player addaction [("<t color=""#F7D708"">" + ("StarterBox") +"</t>"),"clientstbox\execute_stbox.sqf","",5,false,true,"",""];
execute_stbox.sqf (mpmissions\your instance\clientstbox\)
stbox = [ ["",true], ["Starter_Box", [2], "", -5, [["expression", '["stbox"] call STARTERBOX']], "1", "1"], ["", [-1], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; showCommandingMenu "#USER:stbox"; STARTERBOX = { fn_doit = { PVDZE_stbox = [_this select 0]; publicVariableServer "PVDZE_stbox"; }; call fn_doit; };
stbox.sqf (\@DayZ_Epoch_Server\addons\dayz_server\stbox\)
private ["_crate"]; if(isNil "script_in_progress")then{ script_in_progress = false; }; if(script_in_progress)exitwith{ systemChat "This script is only useable once (untill restart)!"; }; box = { script_in_progress = true; _crate = createVehicle ["USBasicWeapons_EP1",getpos player,[], 0, ""]; _crate setpos (player modelToWorld [0,6,0]); _crate setDir ([_crate, player] call BIS_fnc_dirTo); clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; // add weapons _crate addWeaponCargoGlobal ["ItemToolbox", 2]; _crate addWeaponCargoGlobal ["ItemEtool", 2]; _crate addWeaponCargoGlobal ["ItemCompass", 2]; _crate addWeaponCargoGlobal ["Binocular", 2]; _crate addWeaponCargoGlobal ["Binocular_Vector", 2]; _crate addWeaponCargoGlobal ["ItemGPS", 2]; _crate addWeaponCargoGlobal ["ItemHatchet", 2]; _crate addWeaponCargoGlobal ["ItemKnife", 2]; _crate addWeaponCargoGlobal ["ItemMap", 2]; _crate addWeaponCargoGlobal ["ItemMatchbox", 2]; _crate addWeaponCargoGlobal ["ItemWatch", 2]; _crate addWeaponCargoGlobal ["NVGoggles", 2]; _crate addWeaponCargoGlobal ["ItemCrowbar", 2]; _crate addWeaponCargoGlobal ["ItemMachete", 2]; _crate addWeaponCargoGlobal ["ItemFishingPole", 2]; _crate addWeaponCargoGlobal ["ItemShovel", 2]; _crate addWeaponCargoGlobal ["ItemSledge", 2]; _crate addWeaponCargoGlobal ["ChainSaw", 1]; _crate addWeaponCargoGlobal ["M4A1_HWS_GL_SD_Camo", 2]; // add items _crate addMagazineCargoGlobal ["ItemBriefcase100oz", 12]; _crate addMagazineCargoGlobal ["PartWoodPlywood", 26]; _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["CinderBlocks", 104]; _crate addMagazineCargoGlobal ["MortarBucket", 26]; _crate addMagazineCargoGlobal ["plot_pole_kit", 2]; _crate addMagazineCargoGlobal ["ItemPole", 16]; _crate addMagazineCargoGlobal ["ItemTankTrap", 16]; _crate addMagazineCargoGlobal ["ItemComboLock", 2]; _crate addMagazineCargoGlobal ["ItemVault", 2]; _crate addMagazineCargoGlobal ["ItemAntibiotic", 5]; _crate addMagazineCargoGlobal ["ItemBandage", 10]; _crate addMagazineCargoGlobal ["ItemBloodbag", 10]; _crate addMagazineCargoGlobal ["ItemMorphine", 10]; _crate addMagazineCargoGlobal ["ItemPainkiller", 10]; _crate addMagazineCargoGlobal ["ItemLightBulb", 10]; _crate addMagazineCargoGlobal ["ItemLockbox", 2]; _crate addMagazineCargoGlobal ["ItemMixOil", 10]; _crate addMagazineCargoGlobal ["ItemJerrycan", 10]; _crate addMagazineCargoGlobal ["PartEngine", 5]; _crate addMagazineCargoGlobal ["PartVRotor", 5]; _crate addMagazineCargoGlobal ["PartWheel", 24]; _crate addMagazineCargoGlobal ["PartGlass", 24]; _crate addMagazineCargoGlobal ["PartFueltank", 4]; _crate addMagazineCargoGlobal ["PartGeneric", 100]; _crate addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 50]; _crate addMagazineCargoGlobal ["ItemSodaPepsi", 10]; _crate addMagazineCargoGlobal ["ItemSandbag", 20]; _crate addMagazineCargoGlobal ["ItemCorrugated", 10]; _crate addMagazineCargoGlobal ["ItemWoodFloor", 20]; _crate addMagazineCargoGlobal ["metal_floor_kit", 20]; _crate addMagazineCargoGlobal ["FoodCanSardines", 10]; _crate addMagazineCargoGlobal ["ItemEpinephrine", 10]; _crate addMagazineCargoGlobal ["ItemGenerator", 10]; _crate addMagazineCargoGlobal ["PartWoodLumber", 20]; }; call box; sleep 90; deleteVehicle _crate; titleText ["crate was deleted","PLAIN DOWN"]; titleFadeOut 4;
Man thank you a lot, much love <3
-
Can you help me about this one?
-
-
I need help about starter box, how to make script that it checks if started box is used more then once, if it used more then once doesn't show in action menu.
Thank you.
Remote Control Vehicle help
in Scripting
Posted
Can someone help me get working this script it does not 'remote control vehicle'
https://community.bistudio.com/wiki/remoteControl
Thank you