Jump to content

Draay

Member
  • Posts

    38
  • Joined

  • Last visited

Posts posted by Draay

  1. Hey guys,

     

    Just need some information from those of you that are more experienced than i am.

    If i wanted to change my server from one map to another, eg: Chernarus to Napf, how would i go about it while using the same mission files (by making changes of course).

    What files would need tweaking and would it be too much work?

     

    Cheers

  2. @illclint: Yeah that's what i have right now, i appreciate you putting effort into your posts. What i was looking for was to make the "trade metals" option trade metals for coins and the other way around. Instead of metals for metals.

    It's a useless option because we're running the coin system now, and it saves me adding metal-to-coin traders since trade metals is implemented to every trader.

  3. Yeah i suppose i could do that, it's just adding it to every single trader, but it's easier than placing more traders down.

    Thanks anyhow :D

     

    I wanted to edit the "trade_metals.sqf" file to convert bars to coins intead of what it currently does:
     

    private ["_buy","_metals_conversion","_cancel"];
     
    if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; };
     
    DZE_ActionInProgress = true;
     
    {player removeAction _x} forEach s_player_parts;s_player_parts = [];
     
    s_player_parts_crtl = 1;
     
    _metals_conversion = [ 
     
    ["ItemTinBar","ItemAluminumBar",1,2,"buy","Aluminum","Tin",108], 
    ["ItemAluminumBar","ItemTinBar",2,1,"buy","Tin","Aluminum",107],
    ["ItemCopperBar","ItemTinBar",1,2,"buy","Tin","Copper",106],
    ["ItemTinBar","ItemCopperBar",2,1,"buy","Copper","Tin",105],
    ["ItemSilverBar","ItemCopperBar10oz",1,3,"buy","10oz Copper","Silver",104],
    ["ItemCopperBar10oz","ItemSilverBar",3,1,"buy","Silver","10oz Copper",103],
    ["ItemGoldBar","ItemSilverBar10oz",1,3,"buy","10oz Silver","Gold",102],
    ["ItemSilverBar10oz","ItemGoldBar",3,1,"buy","Gold","10oz Silver",101],
    ["ItemBriefcase100oz","ItemGoldBar10oz",1,12,"buy","10oz Gold","Full Briefcase",99]
     
    ];
     
    {
     
    _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""];
    s_player_parts set [count s_player_parts,_buy];
     
    } forEach _metals_conversion;
     
    _cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
     
    s_player_parts set [count s_player_parts,_cancel];
     
    DZE_ActionInProgress = false;
    
  4. Wow, that is CRAZY.

    When you bought the server, did the host give you a default password?
    If so change it to something more secure. Some hosts give you really unsecure passwords but it's down to you to change it.
    If there is a pattern with these passwords and they know about it, they may be able to break in.

     

    Other than that, no idea. But i would talk to the host about 30 min backups or something.

  5. Found a bit of code from the infistar antihack (backpack steal prevention), that should do it. I'll report back.

     

    EDIT i used:

    _playernearby = count nearestentities [player, ["CaManBase"], 15];

     

    if ((_playernearby) > 1) exitWith {
    cutText [format["You cannot gather weed while other players are around you. (Dupe prevention)"], "PLAIN DOWN"];
    }; 
     
    Thanks anyway
  6. I need to restrict an action if a player is nearby but i can't seem to find the piece of code anywhere.

    Could someone help out here?

    Thanks in advance!


    What i want doing is basically:
    If player is nearby, it will not allow me to harvest weed.
    I'm doing that to stop duping. Player are able to harvest the same plants and get multiple kilos of hemp.

     

  7. Hope this helps you out.

    This is how i fixed my issue.

     

    I have a buildings folder where i keep all my building sqfs, this is in the PBO, not the MPmission folder.

    In the buildings folder i created a "load.sqf" where i call all the buildings, keeps it tidy.

     

    My current "load.sqf":

    // Events
    [] execVM "\z\addons\dayz_server\buildings\events.sqf";
     
     
    //Cherno
    [] execVM "\z\addons\dayz_server\buildings\cherno.sqf";
     
    // Stary
    [] execVM "\z\addons\dayz_server\buildings\stary.sqf";
     
    // Berenzino
    [] execVM "\z\addons\dayz_server\buildings\berenzino.sqf";
     
    // Balota
    [] execVM "\z\addons\dayz_server\buildings\balota.sqf";
     
    // Base Preview
    [] execVM "\z\addons\dayz_server\buildings\basepreview.sqf";
     
    // Solnichnie
    [] execVM "\z\addons\dayz_server\buildings\solnich.sqf";
     
    // Weed farms
    //[] execVM "\z\addons\dayz_server\buildings\weed.sqf";

     

     

    ----

     

     

    Now inside my init.sqf in my MPmissions folders, i load the "load.sqf" file from inside the "if (isServer) then {" section, like so:

     

    if (isServer) then {
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
    //Compile vehicle configs
     
    // Add trader citys
    _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
    _serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf";
     
    //Add DZAI
    [] call compile preprocessFileLineNumbers "DZAI\init\dzai_initserver.sqf";
     
    //Load custom mapping
    execVM "\z\addons\dayz_server\buildings\load.sqf";
    };
     

  8. Thanks Gr8, testing it now.

    Will edit my post.

     

    EDIT:

    Ok i've tried that and it hasn't worked.

     

    I've also tried the following:

    if !(canbuild) exitWith {
    titleText ["You Cannot call a carepackage in a safezone","PLAIN DOWN"];
    } else {
    if (_hasBriefs >= _cost) then {
    

    And adding a }; at the end.

     

    Neither have worked.

    It completely breaks it, it won't spawn one or give me errors. Checked RPT but no errors either.

  9. Hey guys,

     

    I've tried several way of restricting the carepackage script from not running inside a safezone.

    Any help would be helpful. I know roughly that i need something in the first "if" section of the code, but i dont know what it is.

    I've tried everything i could think of.

     

    So what i want:
    If _hasbriefs and is NOT in a safezone.

     

    Thanks in advance!

     

    http://pastebin.com/CtFHNjYf

  10. Upon further investigation, it's not EVERY vehicle that explodes, just random ones? I got into one and it exploded. Next time, I managed to get into and drive three a short distance before the third one exploded.

    Never heard of the issue before, strange as hell.

    Try changing the objects to something else temporarily to test if it's the objects?

  11. Yes it should be fairly easy. Place a barrel under it. Click drag to select both. Make sure you only select them both. Now when you move/rotate the barrel, it will rotate the circle too. After you have the rotation correct, save and load again. When you rotate it moves it somewhere else. After you rotate, move it, save and load to double check the position.

  12. This was so much fun on my server. I unfortunately had to remove it for several reasons. From lag, so fresh spawns being bit by the 50cals. Have clear instructions on the OP, so people know where to put the files and how to load them. The issue I had was that all the objects and crates were spawning in up to 3x. So for every castle wall there would be 2-3x as many. I didn't realise the issue until I started to put my own mapping onto my server and saw that there were several doors on buildings. I was loading them from the wro g place. Anyway, great work. If it didn't kill fresh spawns (not always) I would definitely have this in. It took us hours to complete.

  13. Here use this part from

     

    REMOVING

    For your players to be able to remove the custom buildables they make you will need to do the following.

    Go into your custom variables again and find this line.

    dayz_allowedObjects =

    just below this line

    WG_OwnerRemove =[];

    and insert any of the class names of items you want in the custom build system.

    Go back into your fn_selfActions.sqf and find

    _isModular = _cursorTarget isKindOf "ModularItems";

    and change it to this

    _isModular = (_cursorTarget isKindOf "ModularItems") or ((typeOf _cursorTarget) in WG_OwnerRemove); you must remember to add your custom items to the "dayz_allowedObjects" and "DZE_maintainClasses" sections in your variables.sqf any object you add to "DZE_isRemovable" will be removable by anyone!

     

    Thanks for your time and effort to find this for me, i will try this later tonight on my test server and i will report back with my findings.

     

    Edit: The fix above didn't do the trick but i found it!

    For anyone that needs it, this is what i did. I'm not a scripter. Please use at your own risk, i added this myself and it works for me.

     

     

    Open your fn_selfActions.sqf

    Change:

     

    //Allow player to delete objects
    if(_isDestructable  or _isWreck or _isRemovable or _isWreckBuilding) then {
    if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
    _player_deleteBuild = true;
    };
    };
    to
    //Allow player to delete objects
    if((_isDestructable && _ownerID == dayz_characterID) or _isWreck or _isRemovable or _isWreckBuilding) then {
    if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
    _player_deleteBuild = true;
    };
    };

     

    I found:

    _isDestructable = _cursorTarget isKindOf "BuiltItems";

    and after i found what "BuiltItems" were, it clicked in my head.

    For anyone wanting to know what BuiltItems is:

    http://epochmod.gamepedia.com/Category:Built_Items

  14. Basically, i would like to make sandbags/fuelpumps/wirefences/tank traps not removable unless you have placed them down yourself.

    Right now, players landing on bases and stealing them as long as they have an e-tool.

     

    I'm using plot management and  is meant to fix an issue im having from plot management where players cant remove their items, this fixed it).

     

    In the variables.sqf i have this (only part of it):

    http://pastebin.com/xiDrMPBH

     

     

    Any help would be great, thanks!

×
×
  • Create New...