Jump to content

ZeroK00L

Member
  • Posts

    168
  • Joined

  • Last visited

Posts posted by ZeroK00L

  1. Player setVariable ["humanity",yourvaluehere,true];

    Then put a sensor and run the script that changes the humanity when activated ;)

    So, something like this....

     

     

    class Item1

            {

                position[]={13425.835,5.1528473,2792.9233};

                a=200;

                b=200;

                activationBy="WEST";

                interruptable=1;

                age="UNKNOWN";

                name="militaryhq";

                expCond="(player distance militaryhq) < 200;";

                expActiv="TitleText[""You Have Tripped A Silent Alarm!"",""PLAIN DOWN""]; execVM "custom\humanity.sqf";";

                expDesactiv="TitleText[""You are now an enemy of the state!"",""PLAIN DOWN""];";

                class Effects

                {

     

    and then my humanity.sqf....

     

     

    Player setVariable ["humanity",-30000,true];

     

    Thanks so much for your help Peipo!!!

  2. Raymix,

     

     Got a question. I added some castle pieces to the exterior section of the script and ran into 2 problems. 1.) The items are soooo big they spawn nearly on top of the player. I tried adjusting the _offset in the spawn.sqf from 3.5 to 4.5 but it didn't seem to make much difference. how far out can I adjust this offset before it becomes a problem with the other, smaller objects? 2.) When I remove the castle pieces using the fn_selfactions method, they blow up or turn into rubble and sometimes kill the player. lol. Any thoughts on this and a way around it? Wondering if you came across this in your testing.

     

    I am thinking I may just have to leave the castle pieces out for now but my player base is really wanting it. Im also going to look for another way to spawn them as I heard you can do it using ingredients like building other buildables. Thanks for your time!

     

    Zero

  3. Well that's good to hear, the fact of the matter is that I'm just getting "waiting for host" every time I install this script, I have followed this thread from the beginning, trying all the "fixes" that users have posted and I'm still getting "waiting for host" whenever I boot the server. I've also checked the RPT file for errors but there is nothing. The installation for this script is pretty simple and I have installed many more complex scripts on my server with no problems at all, this is the first script to give me problems, I simply can't see what the problem is... Any ideas ?

    Most likely your defines are conflicting, if you have other scripts that have .hpp files, check those verses the one for this script and remove any duplicates from the defines.hpp for this script. Also check your description.ext file because that has Class defines in it too!

     

    Zero

  4. Excellent tip Zero! I'll update the tutorial with this info:)

    Does that work in any database navigation tool? I use Navicat

     

    As far as I know yes! Please try and let me know but as long as it is a SQL database then shouldn't matter.....but do try before you update the tutorial. Ive used PHPMyadmin and Navicat and I remember it doing so for both but I could be wrong :)

  5. Heres a cool trick I learned...

     

    When INSERT a new row into any table, if you leave the ID blank, the database will find the last row ID and increase by 1. :)

     

    2. Open your server's database and navigate to the server_traders table. Verify that there isn't already an entry with ID 700. If there is, ensure that you change all instances of 700 in this tutorial with whatever ID you choose to use. Create a new entry and insert the following into the appropriate fields:

    700, RU_Villager1, 13, neutral, ,Tavi Mining Company

     

     

    So for this part of the TUT if you leave the 700 out it will find and place the next highest ID. :) I hope I explained this well and it makes sense. Great TUT. And so everyone knows you can use this TUT to create any kind of trader you like!

     

    Zero

     

    EDIT: You can also add the custom buildings and new trader Server side. I find this keeps the Mission file light and is cleaner. If you are interested in how to do this let me know and I will write a quick tutorial. :)

  6. Well we got a problem we did everything as said in instructions aand our server is down now. giving out error

     

     

    Hello and thanks for the script. I installed this script and followed the directions given closely but still I have no luck. I am quite new at scripting and learning a lot as I go long but could you please help me. I currently have a couple of other MODS already installed which I got to work but this script does not work for me and I am wondering if it is because the other scripts I have installed. I have so far installed Epoch Admin Tools, DZAI, and I think I may have read something in another forum that I can no longer find that was saying something about Admin Tools not working with Snap Build, Is this true? I have done alot of research and can not find anything that answers my question. Thanks :)

     

    Please both post your RPT's to see if there are any errors :)

     

    P,s, Admin tools works just fine with Snap Building!

  7.  

         1. extract ui_selectSlot.sqf from dayz_code.pbo to scripts\

         2. extract compiles.sqf from dayz_code.pbo to scripts\

         3. change in init.sqf:

     

    ​this:

    ​call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

    change to:

    call compile preprocessFileLineNumbers "scripts\compiles.sqf"; //Compile regular functions

         4. in compiles.sqf:

     

    this:

    player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";

    change to:

    player_selectSlot = compile preprocessFileLineNumbers "scripts\ui_selectSlot.sqf";

         5. in  ui_selectSlot.sqf:

     

    add this:

           // Add extra context menus
    _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
            _erc_numActions = (count _erc_cfgActions);
            if (isClass _erc_cfgActions) then {
                    for "_j" from 0 to (_erc_numActions - 1) do 
                            {
                            _menu =  _parent displayCtrl (1600 + _j + _numActions);
                            _menu ctrlShow true;
                            _config =  (_erc_cfgActions select _j);
                            _text =  getText (_config >> "text");
                            _script =  getText (_config >> "script");
                            _height = _height + (0.025 * safezoneH);
    _compile =  format["_id = '%2' %1;",_script,_item];
                            uiNamespace setVariable ['uiControl', _control];
    
    
                            _menu ctrlSetText _text;
    _menu ctrlSetTextColor [1,0.25,0.25,1];
                            _menu ctrlSetEventHandler ["ButtonClick",_script];
    
    
                    };
            };

    after this:

    _menu ctrlSetText format[_type,_name];
    _menu ctrlSetEventHandler ["ButtonClick",_compile];};

         6. add this very buttom in description.ext:

    #include "scripts\extra_rc.hpp"

     

    I followed this method when I did mine....

  8. Hi, Zero, thanks for kind words

     

    1) There are 2 solutions to that problem:

         a] if trusted only:

    if((_isEmeraldItem and (player distance cursorTarget <= 2) and (getPlayerUID player) in ["123456789","987654321"]) and _canDo) then {
    

        b] add plotpole check to fn_selfActions, borrow code from remove.sqf so only objects near plotpole can be removed:

    _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30];
    _findNearestPole = [];
    {if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles;
    
    _IsNearPlot = count (_findNearestPole);
    
    if((_isEmeraldItem and (player distance cursorTarget <= 2) and (_IsNearPlot >= 1) and _canDo) then {
    

    Haven't tested, but you get the idea.

     

    2) Thank you

    3) It's easy. Go into 3D editor and spawn ton of items on ground you want to add. Save mission file and open it in my documents > arma 2 > your name > missions > mission.sqf for classnames

    To add extra menu, you need to edit dialogs and extra_rc

    To add to existing menus you need to edit, items.sqf and dayz_allowedObjects. Dont forget fn_Selfactions, too to be able to remove them

     

    Raymix,

     

     This worked perfectly! Only thing needs to be changed is there was a bracket missing! Like this..

     

    _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30];

    _findNearestPole = [];

    {if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} foreach _findNearestPoles;

    _IsNearPlot = count (_findNearestPole);

    if((_isEmeraldItem and (player distance cursorTarget <= 2) and (_IsNearPlot >= 1) and _canDo)) then {

     

                                                                                                                                                         ^There

  9. Well  i dont believe you cant do 3 loading screens sequenced together. But what you can do is have your loading screen(no one really reads the rules),

    -List your server name

    -List your rules

    -Server Owner

    -Server Co-owner(if there is one)

    -Head Admins

    -Junior Admins

     

    Then install a simple credits scripts such as

     

    http://www.opendayz.net/threads/dayz-welcome-message-credits-style.13071/

     

    or

     

    http://opendayz.net/threads/new-spawn-server-info-board-and-welcome-message-intro.18847/

     

    or simply have them both.

     

    You can easily put in tips & tricks in the second link.

     

    Awesome man! Thanks!!!

     

    P.s. Hahaha thats true, no one reads the rules. More concerned with tips and tricks, like how to use snap building, or zombie camo etc. Just so players are informed.

  10. Maybe if I clarify what I am trying to do I might get help :)

     

    I want to provide information to my players easily. Stuff like rules, tips, etc.

     

    I thought about a scroll wheel menu but not sure I like that option although if someone has an idea on how to do it that way I would appreciate a link or advice on how to do it.

     

    Any suggestions? How do you do it on your server?

     

    Thanks for any help! I appreciate it!

     

    Zero

  11. From what I can tell, it looks good. Sure is a lot of load outs :) Can you give more information? What is buggy about it? When is it buggy? Etc.

     

    P.s. You might want to remove the Player UID's from this post. Just to be safe :)

     

    Zero

×
×
  • Create New...