"Server menu" script for DayZ. Interested?

I do not know why but my thread about the server menu just does not get allowed for some weird reason.
I am sorry for you guys, I wish they allowed so even more people could enjoy my script.
That's the reason why I posted in in the first place....
 
Got to get it working for 50% now! haha
somehow the display server rules and the credits dont work. while tips and server info does work
any idea? :)

Greetings.
 
Got to get it working for 50% now! haha
somehow the display server rules and the credits dont work. while tips and server info does work
any idea? :)

Greetings.
My guess is a typo in the files that do not work.
Check your local RPT for errors:
C:\users\yourusername\appdata\local\ArmA2 OA\arma2oa.RPT
 
How do I shorten the amount of time that the information is displayed on the screen, or can I make it so when a player moves, the information (Rules, Tips, etc) disappear?
 
Code:
,safezoneX+0.30,safezoneY+0.1,35,0.1,0,3034] spawn BIS_fnc_dynamicText;
35 is the amount of seconds it will stay on screen.

And it is possible to make the text dissapear when player moves but it would be too much trouble for a useless feature.
 
After an initial herp derp moment (forgot to package the server_menu folder), got this working and it's great. 2 cans of beans for you :cool:
 
Very nice! problem I am having is that I have a lot of text, and it is being cut off. Can we change the size of the frame that the text is in, or add a scrolling feature?
 
Thanks for the great script.

I've tried it out today but only have the Server Menu option pop up and nothing else can be operated. If I click on the SM option, nothing else happens. I already had a custom selfActions file and above the Flare section I have a chunk of code to operate global sirens & lights on certain cars. Could this be an issue? I've tried placing your code both above and below the sirens code.
 
Very nice! problem I am having is that I have a lot of text, and it is being cut off. Can we change the size of the frame that the text is in, or add a scrolling feature?
Thanks :)
If you want to make it wider you gotta change the XYZ values.
One problem you will get when you change the width is that the text will move right.
That way, you also need to change the X value to correct it.

Good luck!
 
Thanks for the great script.

I've tried it out today but only have the Server Menu option pop up and nothing else can be operated. If I click on the SM option, nothing else happens. I already had a custom selfActions file and above the Flare section I have a chunk of code to operate global sirens & lights on certain cars. Could this be an issue? I've tried placing your code both above and below the sirens code.
I am sure either your other mods are conflicting or you did not implement correctly.
Try looking at the code really carefully and see if you made mistakes.
 
I haven't used this yet but I am going to. I hate all the custom actions all over and have thought of this. There is no reason why anyone can't put all their suicide ,base building ,deploy bike actions in here also for a nice tidy package.

If the dynamic text is not enough space , I put together a dialog that is full screen for a help display. You could edit that and use this menu to call the dialog.

+1
 
I tried installing this. I've gone over it 3 times. I've entered all the code correctly however when I activate it I get no scroll options at all, not even the standard dayz (epoch) options like unlock or lock a vehicle.
 
Then you have probably misplaced the code in your fn_selfactions.sqf file.
It was working in this file but I commented it out until I figure out exactly what I am going to do with it. At the very least you should get a 'server menu' option at all times. Here is the top part of a working fn_selfactions.sqf. Copy into a new file in notepad++ and compare it to yours.
If you have no menu options, did you maybe hose up your compiles.sqf where it says
fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";
of course it needs to have the correct path to your selfactions file.



Code:
scriptName "Functions\misc\fn_selfActions.sqf";
/***********************************************************
    ADD ACTIONS FOR SELF
    - Function
    - [] call fnc_usec_selfActions;
************************************************************/
private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE","_hasHotwireKit","_player_SurrenderedGear","_isSurrendered","_isModular","_ownerKeyName","_temp_keys_names","_hasAttached","_allowTow","_liftHeli","_found","_posL","_posC","_height","_liftHelis","_attached"];

if (DZE_ActionInProgress) exitWith {}; // Do not allow if any script is running.

_vehicle = vehicle player;
_isPZombie = player isKindOf "PZombie_VB";
_inVehicle = (_vehicle != player);

_onLadder =        (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);

// ---------------------------------------Krixes Self Bloodbag Start------------------------------------
    _mags = magazines player;
    // Krixes Self Bloodbag
    if ("ItemBloodbag" in _mags) then {
        hasBagItem = true;
    } else { hasBagItem = false;};
    if((speed player <= 1) && hasBagItem && _canDo) then {
        if (s_player_selfBloodbag < 0) then {
            s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self BloodBag") +"</t>"),"Scripts\Self BloodBag\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };
// ---------------------------------------Krixes Self Bloodbag End------------------------------------

// ---------------------------------------- Deploy Bike Start -----------------------------------------

_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];

if ("ItemToolbox" in _weapons) then {
        hasBikeItem = true;
    } else { hasBikeItem = false;};
    if((speed player <= 1) && hasBikeItem && _canDo) then {
        if (s_player_deploybike < 0) then {
            s_player_deploybike = player addaction[("<t color=""#007ab7"">" + ("Deploy Bike") +"</t>"),"Scripts\Deploy Bikes\deploy.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_deploybike;
        s_player_deploybike = -1;
};

if((_isBike) and _canDo) then {
if (s_player_deploybike2 < 0) then {
        s_player_deploybike2 = player addaction[("<t color=""#007ab7"">" + ("Re-Pack Bike") +"</t>"),"Scripts\Deploy Bikes\pack.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_deploybike2;
    s_player_deploybike2 = -1;
};

// ---------------------------------------- Deploy Bike End -------------------------------------------

// ---------------------------------------- Crafting Items Start --------------------------------------

_isCraft = cursorTarget isKindOf "WorkBench_DZ";
_insight = (count ((position player) nearObjects ["WorkBench_DZ", 5]));
_isnear = _insight > 0;
if ((speed player <= 1) && _isCraft && _isnear && _canDo) then {
    if (s_player_craftBullet < 0) then {
s_player_craftBullet = player addAction ["Crafting Menu","Scripts\items\excute.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_craftBullet;
s_player_craftBullet = -1;
};

// ---------------------------------------- Crafting Items End ----------------------------------------

// ------------------------------------- Server Menu Script ------------------------------------------

// s_player_servermenu,s_player_servermenu1,s_player_servermenu2,s_player_servermenu3,s_player_servermenu4,s_player_servermenuCancel,   

   // IT07's Server Menu script
    if((speed player <= 1) && _canDo) then {
        if (s_player_servermenu < 0) then {
            s_player_servermenu = player addAction [("<t color=""#FFFFFF"">" + ("Server Menu") +"</t>"),"Scripts\server_menu\server_menu.sqf","",-1,false,false,"", ""];
        };
    } else {
        player removeAction s_player_servermenu;
        s_player_servermenu = -1;
        player removeAction s_player_servermenu1;
        player removeAction s_player_servermenu2;
        player removeAction s_player_servermenu3;
        player removeAction s_player_servermenu4;
        player removeAction s_player_servermenuCancel;
    };

// ---------------------- Server Menu Script End ----------------------------------------------------

_nearLight =     nearestObject [player,"LitObject"];
_canPickLight = false;
if (!isNull _nearLight) then {
    if (_nearLight distance player < 4) then {
        _canPickLight = isNull (_nearLight getVariable ["owner",objNull]);
    };
};
 
You should always pull it out of the client files :)
Agreed. If you are going to edit your server files, get a folder to keep your server and mission pbos then copy the dayz_code.pbo from your @dayz folder (or whatever mod you are using). Unpack it and keep it there just to copy files into your mission folder and to use as a reference when you fn_selfactions.sqf doesn't work anymore. :D
AND ... in the Notepad++ PLUGINS MENU, click on manage plugins and install the compare plugin. Then you can put yours and the original, click compare, and it will show you all the differences. Makes things a lot easier when you THINK the files are the same but there is that one extra comma in an array.
 
Server Menu script now updated to a newer version: V1.5.1
It's now even faster, more compact and easier to edit.

Enjoy!
 
Back
Top