Jump to content

Logi

Member
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Logi

  1. Please help to AH (AntiHack) fix, i don't have this line vehicles = [vehicle player]

    Then search for this line: vehicles = [vehicle player]; Replace it with this: vehicles = vehicles;

     

    Does your AH.sqf file contain this line:

    if (isNil 'vehicles') then {vehicles = [];} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

     

    If so, change it to this and it should work:

    if (isNil 'vehicles') then {vehicles = vehicles;} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};

  2. What you are trying to do is actually very easy, but strangely I have never seen anyone post information about it.

    I have also been on many servers that have re-textured vehicles but none of them had actually modified the vehicles names in the trader menu.

     

    Anyway here is what you need to do:

     

    Get the player_traderMenuConfig.sqf from the dayz_code.pbo and place it somewhere in your mission file.

    Then in your compiles.sqf find this:

     

    call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_traderMenuConfig.sqf";

     

    Change the file path to point to the location where you have just copied the file.

     

    Now open the player_traderMenuConfig.sqf file and find this line:

     

    _index = lbAdd [TraderDialogItemList, format["%1 (%2)", _textPart, _name]];

     

    In the above statement, _textPart is the vehicles class-name and _name is the vehicles display name.

     

    So directly above that line all you need to do is check the vehicles class-name and if it is one of your re-textured vehicles you just alter the display name.

    Here is my example using the SUV_Blue and SUV_White.

    if (_name == "SUV_Blue") then {_textPart = "SUV Custom Texture 1"};
     
    if (_name == "SUV_White") then {_textPart = "SUV Custom Texture 2"};
     
    _index = lbAdd [TraderDialogItemList, format["%1 (%2)", _textPart, _name]];

    EDIT

    So here is an example to match your question:

     

    if (_name == "SUV_Pink_DZE4") then {_textPart = "Hello Kitty SUV"};

     

    This will only change the name that is displayed in the trader menu. 

  3. yop,

     

    I change DZE_ConfigTrader = true; to false in my "EpochConfig.sqf" and I add the line in "description.ext" with the good way but all traders sell nothing.

     

    I give you my file if you have the time to look. 

    https://www.dropbox.com/s/vgroi4lztota536/DayZ_Epoch_11.Chernarus.rar?dl=0

     

    I have just had a quick look at your files and your EpochConfig.sqf still contains this:

     

    //Mission Based Traders
    DZE_ConfigTrader = true;
     
    Remove that or set it to false.
     
    Also in your MissionInit.hpp remove this:
     
    //Traders
    #include "TRADERS\cfgServerTrader.hpp"
  4. I would suggest replacing the player add weapon command because it does not check if the player already has a weapon in the particular weapon slot.

    Instead I would recommend using the BIS function inventory add.

    Information on the command can be found here: http://www.ofpec.com/COMREF/index.php?action=read&id=231#invadd

     

    I would replace: player addWeapon _weapon;

    With: _result = [player,_weapon] call BIS_fnc_invAdd;

     

    Then check if the _result variable equals true or false. If the variable is true then the player got the weapon and you can remove the cash.

    If the _result variable equals false then the players weapon slot must already be occupied, in which case they would not be given the new weapon so you would not remove the cash.

     

     

    Edit

    You could also be nice to the player and do this (Only do this if the _result variable equals true):

    // Make the player select the weapon
    player selectWeapon _weapon;
     
    // Get the array of magazines for the selected weapon
    _magazineArray = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); 
    _magazine = _magazineArray select 0;
     
    // Attempt to add 3 magazines for the selected weapon
    for "_i" from 0 to 2 do {_magResult = [player,_magazine] call BIS_fnc_invAdd;};
     
    // Reloads the current weapon
    reload player;
    

    Basically it attempts to add 3 clips for the new weapon if the player has space in their inventory. If there is not enough space for 3 clips it will add 2 or 1 or none.

    The player will also select their new weapon and reload it.

     

  5. Hey calamity, lots of the files needed for version 2.0 are still not on the github. I think Nox just needs to authorize them and then they should be on there.

    Here is an example of mine anyway to give you an idea.

     

    AdminList = ["76561198134932428","76561198016880311"];
    AdminNameList = ["Logi","D45"];
     
    ModList = ["76561198134932428","76561198016880311","76561168916880111"];
    ModNameList = ["louis","duncan","codz"];
     
    The reason why I added these name lists was to enable users to have multiple privileges using the same PUID.
    For example if I login as Logi, I will be an admin, if I login as louis, I will be a mod and if I login with any other name, I will be a regular player.
    I done this so that I could play on my server as a regular player with no tools, but I can quickly re-log with an admin account if I need the tools for any reason.
     
    I am not sure if this is a feature that other people would want to use?  I just left it in the tool for now to see what people think.
  6. I definitely think filtering the items is a good idea.

    Another control which may be worth considering is a textbox. I have not used textboxes in Arma before but you could try and filter the items based on the string from the textbox.

    That could save a lot of space in the GUI, but may be harder to implement.

    I have just created a quick mock-up with a textbox to see how it may look. It is barely bigger than a debug monitor.

    2015-01-31_00060_zpsj2jcdcb0.jpg

  7.  


    I like yours way more and would much rather have that added to the tool. 

     

    I can probably get some screen shots soon. I haven't been messing with it recent due to being sick for two weeks. It is pretty much the vehicle gui with a few slight button changes, size change, and the not yet implemented categories. If possible I want to have ones like Residential, industrial, farm, and have those subdivide into houses, apartments, pipes, signs, piers. For now this all would depend on how the files lable each item and if I can extract that label. I found it much easier to pull from the tame files than to have each individual item added like it was. I only did that as a test system. Really yours is much better and cleaner.

    I planned to create an overall gui for the entire tool as well for version 2.0 release (the building stuff was the last before version 1.9.3 was ready for release). Yours looks like it would work very well as the overall gui and the vehicle gui so I am considering maybe replacing most of the aspects of mine with a slimmed version of yours for the scroll menu, and then use the one shown above as the overall gui system for the entire tool. My idea is to have a scroll and gui, allowing for the user to choose which to use (either can be switched off in the files or in the scroll/gui at any time). The scroll will have a few guis for parts of it though, because a huge list in the scroll is just impractical, like for the vehicle and building spawns.

     

    I just realized we are way off topic for this thread and we should probably move this to a message or the admin tool thread.

     

     

    Yeah it would have been a better idea to discuss it in this thread.

    It is a lot easier getting all of the items from the config files and it makes the code much cleaner. Two commands which I often find useful for filtering the items are: isKindOf and inheritsFrom. typeOf can be useful as well.

    When I started making the GUI it was a lot smaller, it just got bigger as I added more features. I tired to keep it fairly small by making the spawn menus toggle-able and pre-mapping some scripts to the buttons.

    I like the idea of allowing the user to filter between the different categories of items especially for the buildings menu, there is lots of stuff in there.

    This could also be done for the other spawn menus such as vehicles and weapons.

     

    But there may be lots of different sub-categories for the buildings menu and I think it might not be very practical to create a lot of buttons in the dialog for the different categories.

    You would probably end up having to define a separate dialog for each different spawn menu. It might be better to list the different categories in a single listbox control.

    You could use a single dialog for all of the different spawn menus and just load the data dynamically from the config files like the other items.

    A listbox might also make it easier to show the sub-classes by using indentation or colour formatting.

     

    For example a mini GUI for the scroll menu could be implemented like this:

    2015-01-31_00035_zpsuegodskd.jpg

     

     

     

     

     

     

     

     

     

  8. Hi Nox, the code for the GUI that I created was on one of my test servers in a VM and I deleted it when I formatted my PC a couple of weeks ago.

    I have not really been on Epoch for the last 4 or 5 weeks because I have been very busy with coursework over the Christmas period.

    When I noticed your message, I had a bit of spare time so I was going to re-create the spawn building dialog menu for you, but I got a bit carried away.

     

    I ended up creating a full admin menu with all of the different spawn menus built into it.

    Then I had to modify the majority of the scripts to work with the dialog. I also had to completely re-write a couple of the scripts including all of the map marker scripts.

    I added a few new scripts as well. I modified my vehicle locator script to work remotely by selecting a player from the player list and searching their toolbelt for any vehicle keys.

    All of the tools work at the moment but I have only been developing it for 3 days so there is still a bit of work to do before it will be finished.

    Currently the dialog controls are pre-defined in a hpp file and then populated and modified dynamically in the code. I want to remove the hpp file and create the entire menu in the script.

     

    I don't know what you where planning on doing for a GUI but we could possibly collaborate if you like my GUI that I have built so far.

    The tool is a bit different now though. A lot of scripts have been pre-mapped to buttons, such as the lock/unlock, point to repair, show code and delete item scripts are mapped to buttons.

    The admin scroll menu is toggle-able from the dialog but I have not done many mods to the scroll menu or thought about what tools should be in it.

    I have created a github repository and will upload the code when I am happy with it.

    Here is a couple of screenshots. 

     

    2015-01-30_00034_zps78rebb5b.jpg

     

     

    2015-01-30_00045_zpslc8fkwf9.jpg

     

     

    2015-01-30_00060_zpslynmlic6.jpg

     

     

    2015-01-30_00037_zpsj3qbgc0j.jpg

     

     

    2015-01-30_00029_zpscb62mdgf.jpg

     

     

    2015-01-30_00030_zpsaaxyl6fq.jpg

  9. What I meant was, because our scripts are very similar, if you needed a infistar fix or if you had wanted to provide a version for the masterkey script, you could have got the information from my thread.

    The infistar fix is basically the same for both our scripts. You did not need to wait for ebaydayz to provide a fix you could have just looked at the one that I had provided with my script.

  10. @sandbird he did say he takes no credit for that code and is just trying to help, lets not get so dramatic here.

     

    He may not be taking credit for the code but he did not give any credit to the original author either.

    Nor did he mention where he got the code. Did the original author want this released? Was it stolen from a mission file?

    From the looks of those variable names, I don't think this was intended to be released.

  11. Is the spawned dog also buggy as when you tame a dog the normal way?

    Gone after restart, run around like a chicken without a head etc etc.

     

    Also is the dog gone again when i logout?

    Can i make the dog permanent (until it's killed or dismissed)

     

    I've seen movies on youtube where the guy had a tame dog and the dog even drove around with him in the car etc.

    Would absolutely love somthing like that!

     

    Yeah the dog is a bit buggy. This script is just like taming a standard dog in the game. Except you spawn the dog rather than having to find one and tame it manually.

    The dog will be gone if you log out or get in a car ect just like normal.

    It would be possible to create a script to allow the dog to travel with the player in the back of a pickup truck or something like that.

  12. possible that the dog attack the zombie ?

     

    It is certainly possible to create a script that would make the dog attack zombies within a certain distance. But that is not a standard feature for the dog.

    If I have some spare time I might add some extra features to the dog. But at the moment I am a bit busy with uni coursework.

  13. Open dayz_server.pbo, then go into the folder named "missions", then go into the folder named "DayZ_Epoch_11.Chernarus" and open mission.sqf.

    All of the the trader city items are in that file.

    I am not sure exactly which items are the tents that you want to remove, but it will look something like this:

     

    _vehicle_480 = objNull;
    if (true) then
    {
      _this = createVehicle ["Land_tent_east", [6320.0742, 7797.5137, 0.26026565], [], 0, "CAN_COLLIDE"];
      _vehicle_480 = _this;
      _this setDir 216.2215;
      _this setPos [6320.0742, 7797.5137, 0.26026565];
    };
  14. I didn't say anything about yours being better or worse than anyone elses. I merely mentioned that the only admin tools I have used are from Nox and I didn't like particularly like the infiSTAR layout. That is what originally made me use Nox's tools. 

     

    I don't think he was referring to your comment.

    Better Dead asked weather this tool had any advantages over Nox's admin tool, so I assume the comment was in reply to that question.

  15. With latest infistar not working! Have any working issue to locator? 

    Cheers

     

    I don't use infistar. 

    I did manage to provided a solution for the older version of infistar with some help from infistar users, but if the infistar code has changed, I will not be able to help you unless I know what has changed.

    Have you actually followed the steps that I have previously provided for infistar users, in order to allow the local map markers and fix the vehicles array?

     

    You will need to provide me with a bit more information if you want me to try and provide a solution. 

    Exactly what part of the script is not working? Does the script identify the users vehicle key? Are the map markers being blocked?

  16. I know, thats not what i was talking about.

    I was talking about the possibility to activate the markers on the first time i call the script and delete them by running the script again.

    Toggle the markers on and off in game so users can see they're vehicles and remove the markers when they dont need them anymore, this would also update vehicle positions in case they moved.

    Something like the marker script that marks the player position in macca's right click actions script. Its in the examples folder.

     

    Have you read the original post in this thread? That is exactly what this script already does, if I understand you correctly.

    you just need to put the key in your backpack/safe/shed ect, so that it is not in your toolbelt. Then run the script again and the markers will vanish from the map.

    You could add a simple timer to automatically remove the markers after say 1 minute but at the moment the users decide if they want to remove them by running the script again with no key in their toolbelt.

    If you want to update the vehicle marker after a vehicle has moved, just run the script again.The old marker will be removed and a new marker will be placed at the new location.

  17. Sounds cool! Would you be willing to share the script for the dog barking, when someone near?

     

    I am not sure where I put it, but the script is very basic.

    You can just run a loop while the dog is alive, counting the number of players and the number of zombies within a specified distance. 

    Then while the count is above zero, have the dog bark then add a sleep for 5 seconds or whatever you want. Here are the commands for making the dog perform the bark animation and the bark sound.

    _dog playActionNow "GestureBark";
    [_dog,"dog_bark",0,false] call dayz_zombieSpeak;

     

     

    how to update add price(cashmoney) to tame dog 

     

    It depends how you are planning on spawning the dog. A very easy but unrealistic way would be to spawn the dog by right clicking a gold bar. Then you can add [player, "ItemGoldBar", 1] call BIS_fnc_invRemove;

    That way after the player has clicked the gold bar and spawned a dog, the goldbar will be removed from the players inventory.

    Or you could do what fireplace has done and spawn it using a radio. If you are using the radio, you would first need to check if the player actually has the gold before removing it from their inventory.

     

    You could try to add the dog to a trader but that would be more difficult.

    I was thinking about using the dog kennel in a trader zone and having a scroll menu option appear if the player is within x meters from the dog kennel and the player has above x amount of money ect.

    Or maybe have the dog spawn when a player lays a plot pole, then have it patrol within range of the plot pole.

    I only released this small script so that people could have a bit of fun with the dogs, how you implement the script is entirely up to you, there are many different ways that you could do it.

×
×
  • Create New...