Jump to content

Cherdenko

Member
  • Posts

    191
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Cherdenko

  1. 9 hours ago, juandayz said:

    open your arma2oa   in main menu press alt + E   (this open arma2oa 3d editor)

    Create a Center   (blufor) (dsnt matters where u put it)

    Create a Group. (dsnt matters where u put it)

    Create an unit. (any kind of unit)

    Choose "Vehicles"

    put 1 , 2 10 buildings... whatever do you want.

    Save it ass  "example"

    Go to your OS  and find C:\Users\Usuario\Documents\ArmA 2 Other Profiles\your player name\missions\example\mission.sqf

    open it.

    at very top add:

    if (isServer) then {

    now delete all about center, group and units at very top

    at very bottom delete it:

    processInitCommands;
    runInitScript;
    finishMissionInit;

    and add another

    };

    example;

      Reveal hidden contents

    if (isServer) then {

    _vehicle_4 = objNull;
    if (true) then
    {
      _this = createVehicle ["Land_fort_artillery_nest", [11985.525, 12523.547, -0.9355098], [], 0, "CAN_COLLIDE"];
      _vehicle_4 = _this;
      _this setDir -120.22166;
      _this setPos [11985.525, 12523.547, -0.9355098];
    };

    _vehicle_5 = objNull;
    if (true) then
    {
      _this = createVehicle ["Land_fort_artillery_nest", [11999.33, 12532.612, -0.71417201], [], 0, "CAN_COLLIDE"];
      _vehicle_5 = _this;
      _this setDir 53.419064;
      _this setPos [11999.33, 12532.612, -0.71417201];
    };

    _vehicle_6 = objNull;
    if (true) then
    {
      _this = createVehicle ["Land_fort_artillery_nest", [12111.081, 12569.385, -0.67476666], [], 0, "CAN_COLLIDE"];
      _vehicle_6 = _this;
      _this setPos [12111.081, 12569.385, -0.67476666];
    };

    };

    now if u wants buildings with loot.  id names for buildings into this file must be for example

    Land_tent

    without loot  Map_tent

    save as example.sqf into  yourServerRoot/Mpmissions/Yur instance can be instance_11.chernarus\ custom\maps\

    open your init.sqf paste at very bottom:

    [] execVM "custom\maps\example.sqf";

     

     

    I already explained that to him the last day @juandayz ;)

  2. so the big house now works flawless, but i think it´s removing the coins too soon in the script.

    Because if you don´t have all the crafting stuff you need, but have the coins in the inventory it will remove the coins, but still show you that there are some parts missing... is it possible to make the remove coins thing at the end of the script?

    But after all: Still awesome work @juandayz :D

  3. so i discovered some bugs on your mod:

    First of all the items were no being removed from my inventory, after i placed  down the houses. second of all, what if we changed the range of the Plotpole? Does it sstill check 30 meters?

    3rd: For me no buildings/ houses can be removed.

    4th i can´t place down the large house...

    I hope i could help you improve the script...(gonna post a vid of it later duh)

    Edit: Maybe a little Promo? :D

     

    One last edit:

    If you are using deploy anything edit your overwrites Config so it looks like this:

    Spoiler
    
    //  DZE_CLICK_ACTIONS
    //      This is where you register your right-click actions
    //  FORMAT -- (no comma after last array entry)
    //      [_classname,_text,_execute,_condition],
    //  PARAMETERS
    //  _classname  : the name of the class to click on 
    //                  (example = "ItemBloodbag")
    //  _text       : the text for the option that is displayed when right clicking on the item 
    //                  (example = "Self Transfuse")
    //  _execute    : compiled code to execute when the option is selected 
    //                  (example = "execVM 'my\scripts\self_transfuse.sqf';")
    //  _condition  : compiled code evaluated to determine whether or not the option is displayed
    //                  (example = {true})
    //  EXAMPLE -- see below for some simple examples
    DZE_CLICK_ACTIONS = [
        ["ItemGPS","Scan Nearby","if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]); DZE_CLICK_ACTIONS_MAN_COUNT = count ((position player) nearEntities ['CAManBase',DZE_CLICK_ACTIONS_GPS_RANGE]);cutText[format['Within %1 Meters: %2 AI/players, %3 zombies, %4 vehicles',DZE_CLICK_ACTIONS_GPS_RANGE,DZE_CLICK_ACTIONS_MAN_COUNT - DZE_CLICK_ACTIONS_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',DZE_CLICK_ACTIONS_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',DZE_CLICK_ACTIONS_GPS_RANGE]) - DZE_CLICK_ACTIONS_MAN_COUNT],'PLAIN DOWN'];","true"],
        ["ItemGPS","Range Up"   ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE + 100) min 2500; cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
        ["ItemGPS","Range Down" ,"if(isNil 'DZE_CLICK_ACTIONS_GPS_RANGE') then {DZE_CLICK_ACTIONS_GPS_RANGE = 1500;};DZE_CLICK_ACTIONS_GPS_RANGE = (DZE_CLICK_ACTIONS_GPS_RANGE - 100) max 1000;  cutText[format['GPS RANGE: %1',DZE_CLICK_ACTIONS_GPS_RANGE],'PLAIN DOWN'];","true"],
        ["ItemGPS","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"],
        ["ItemMap","Toggle Map Marker","execVM 'overwrites\click_actions\examples\marker.sqf';","true"], // <- Dont forget to add a comma here or else it won´t work
      /////////// Here starts the segment for the houses
    	["ItemEtool","Small House","execVM 'custom\scripts\house\smallhouse.sqf';","true"],
    	["ItemEtool","Medium Houses","execVM 'custom\scripts\house\mediumhouse.sqf';","true"],
    	["ItemEtool","Large Houses","execVM 'custom\scripts\house\largehouse.sqf';","true"],
    	["ItemEtool","Hero House","execVM 'custom\scripts\house\herohouse.sqf';","true"] // also be sure that there´s no comma after this line, else script will be broken
    ];

     

     

  4. On 2.6.2016 at 1:51 AM, lifegoesongaming said:

    im aslo getting an issue where players can only deposit 999,999 at a time any fixes for that? i have the most current version of the script

    I think thats the point of the 999 hive.

    Like Zupa said in his original post of SC it´s a bad solution, but it´s a solution :)

     

    And for the persons where the money doesn´t save to the Database, here is the fix that worked for me

     

  5. Just now, juandayz said:

    yep is very diferent of mine....    are u taken this updateObjets.sqf from other mod?

    well see this lines in red are the whole code for your updateobjets.sqf... (black lines are your lines)

      Hide contents

    // TODO ----------------------
    _object_position = {
        private["_position","_worldspace","_fuel","_key"];
            _position = getPosATL _object;
        _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace;
            _fuel = 0;
            if (_object isKindOf "AllVehicles") then {
                _fuel = fuel _object;
            };
            _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
    };

    _object_position = {
        private["_position","_worldspace","_fuel","_key","_colour","_colour2"];
            _position = getPosATL _object;
            if (_object isKindOf "AllVehicles") then {
                _colour = _object getVariable ["Colour","0"];
                _colour2 = _object getVariable ["Colour2","0"];
                _worldspace = [
                    round(direction _object),
                    _position,
                    _colour,
                    _colour2
                ];
                _fuel = fuel _object;
            } else {
                _worldspace = [
                    round(direction _object),
                    _position
                ];
                _fuel = 0;
            };
            _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        };

    _object_damage = {
        private["_hitpoints","_array","_hit","_selection","_key","_damage"];
            _hitpoints = _object call vehicle_getHitpoints;
            _damage = damage _object;
            _array = [];
            {

     

    im using the one which was with the soul hive version of single currency

  6. 5 hours ago, juandayz said:
      Hide contents

    _object_inventory = {
        private["_inventory","_previous","_key"];

            if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
        _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item

    } else {
            _inventory = [
                getWeaponCargo _object,
                getMagazineCargo _object,
                getBackpackCargo _object

                /*ZSC*/
                , _object getVariable["bankMoney",0]
                /*ZSC*/

            ];
            };

    find this lines around Line 65.

    *in red: original lines from server_updateobjet.sqf

    *in blue: plotmanagement lines.

    *Orange: ZSC lines.

    Nothing of that is in my sqf file

    not even:

            _inventory = [
                getWeaponCargo _object,
                getMagazineCargo _object,
                getBackpackCargo _object
    ]

     

    Below is my server_updateObject.sqf

    Spoiler

    ^

    /*
    [_object,_type] spawn server_updateObject;
    */
    private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk","_parachuteWest","_firstTime","_object_killed","_object_repair","_isbuildable"];

    _object =     _this select 0;

    if(isNull(_object)) exitWith {
        diag_log format["Skipping Null Object: %1", _object];
    };

    _type =     _this select 1;
    _parachuteWest = ((typeOf _object == "ParachuteWest") || (typeOf _object == "ParachuteC"));
    _isbuildable = (typeOf _object) in dayz_allowedObjects;
    _isNotOk = false;
    _firstTime = false;

    _objectID =    _object getVariable ["ObjectID","0"];
    _uid =         _object getVariable ["ObjectUID","0"];


    if ((typeName _objectID != "string") || (typeName _uid != "string")) then
    {
        diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
        //force fail
        _objectID = "0";
        _uid = "0";
    };
    if (!_parachuteWest && !(locked _object)) then {
        if (_objectID == "0" && _uid == "0") then
        {
            _object_position = getPosATL _object;
            _isNotOk = true;
        };
    };


    // do not update if buildable && not ok
    if (_isNotOk && _isbuildable) exitWith {  };

    // delete if still not ok
    if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); };


    _lastUpdate = _object getVariable ["lastUpdate",time];
    _needUpdate = _object in needUpdate_objects;

    // TODO ----------------------
    _object_position = {
        private["_position","_worldspace","_fuel","_key"];
            _position = getPosATL _object;
        _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace;
            _fuel = 0;
            if (_object isKindOf "AllVehicles") then {
                _fuel = fuel _object;
            };
            _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
    };

    _object_position = {
        private["_position","_worldspace","_fuel","_key","_colour","_colour2"];
            _position = getPosATL _object;
            if (_object isKindOf "AllVehicles") then {
                _colour = _object getVariable ["Colour","0"];
                _colour2 = _object getVariable ["Colour2","0"];
                _worldspace = [
                    round(direction _object),
                    _position,
                    _colour,
                    _colour2
                ];
                _fuel = fuel _object;
            } else {
                _worldspace = [
                    round(direction _object),
                    _position
                ];
                _fuel = 0;
            };
            _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        };

    _object_damage = {
        private["_hitpoints","_array","_hit","_selection","_key","_damage"];
            _hitpoints = _object call vehicle_getHitpoints;
            _damage = damage _object;
            _array = [];
            {
                _hit = [_object,_x] call object_getHit;
                _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
                if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
                _object setHit ["_selection", _hit];
            } count _hitpoints;
        
            _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        _object setVariable ["needUpdate",false,true];
        };

    _object_killed = {
        private["_hitpoints","_array","_hit","_selection","_key","_damage"];
        _hitpoints = _object call vehicle_getHitpoints;
        //_damage = damage _object;
        _damage = 1;
        _array = [];
        {
            _hit = [_object,_x] call object_getHit;
            _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
            if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
            _hit = 1;
            _object setHit ["_selection", _hit];
        } count _hitpoints;
        
        if (_objectID == "0") then {
            _key = format["CHILD:306:%1:%2:%3:",_uid,_array,_damage];
        } else {
            _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
        };
        //diag_log ("HIVE: WRITE: "+ str(_key));
        _key call server_hiveWrite;
        _object setVariable ["needUpdate",false,true];
        if ((count _this) > 2) then {
            _killer = _this select 2;
            _charID = _object getVariable ['CharacterID','0'];
            _objID     = _object getVariable['ObjectID','0'];
            _objUID    = _object getVariable['ObjectUID','0'];
            _worldSpace = getPosATL _object;
            if (getPlayerUID _killer != "") then {
                _name = if (alive _killer) then { name _killer; } else { format["OBJECT %1", _killer]; };
                diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6, Killer: %7 (UID: %8)", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace, _name, (getPlayerUID _killer)];
            } else {
                diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace];
            };
        };
    };

    _object_repair = {
        private["_hitpoints","_array","_hit","_selection","_key","_damage"];
        _hitpoints = _object call vehicle_getHitpoints;
        _damage = damage _object;
        _array = [];
        {
            _hit = [_object,_x] call object_getHit;
            _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
            if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
            _object setHit ["_selection", _hit];
        } count _hitpoints;
        
        _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
        //diag_log ("HIVE: WRITE: "+ str(_key));
        _key call server_hiveWrite;
        _object setVariable ["needUpdate",false,true];
    };

    // TODO ----------------------

    _object setVariable ["lastUpdate",time,true];
    switch (_type) do {
        case "all": {
            call _object_position;
            call _object_inventory;
            call _object_damage;
            };
        case "position": {
            if (!(_object in needUpdate_objects)) then {
                //diag_log format["DEBUG Position: Added to NeedUpdate=%1",_object];
                needUpdate_objects set [count needUpdate_objects, _object];
            };
        };
        case "gear": {
            call _object_inventory;
                };
        case "damage": {
            if ( (time - _lastUpdate) > 5) then {
                call _object_damage;
            } else {
                if (!(_object in needUpdate_objects)) then {
                    //diag_log format["DEBUG Damage: Added to NeedUpdate=%1",_object];
                    needUpdate_objects set [count needUpdate_objects, _object];
                };
            };
        };
        case "killed": {
            call _object_killed;
        };
        case "repair": {
            call _object_damage;
        };
    };

     

     

  7. 1 minute ago, juandayz said:

    well thers a restriction time, like u show in your video... but yes,, its  a problem if pplayer use it, disconect and relog to use again... let me think a possible solution for it.

    and you got some idea where that appearing and dissapearing of the button comes from?

    if you´re online right now and if you want you could come to my teamspeak.

  8. 1 hour ago, juandayz said:

    player removeAction s_player_studybody;
    s_player_studybody = -1;

    add bellow:

    player removeAction s_player_shower;
    s_player_shower = -1;

    Allright ty. that worked for me. But i still got a problem with the option flickering like in the video shown below.

    Also: what pretends players from relogging and doing the same hing again?

    is there anyway to make this script server side?

     

  9. 46 minutes ago, juandayz said:

    nop, its not important. im using coins too.. but this only add humanity and infection chances, nothing about coins or gold.

    Do u have a fn_SelfActions.sqf intoi custom folder?   do you have the call for it from  compiles.sqf or init.sqf?

    Well yeah i tried the fn_selfactions from zupas coin script and also called my own in the init, but neither of these worked :/

×
×
  • Create New...