Jump to content

[Release] Custom Action Menu v1.0.4


Recommended Posts

Is there a way to make it so the action menu is not the first thing on the scroll list?

 

In the activate there is a line that determines this. In that line there is a number that dictates its position. The higher it is, the higher it appears on the menu (typical number is 0-6)

 

_idx = (vehicle player) addaction [("<t color="#FE9A2E"">" + ("Action Menu") + "</t>"),"actions\Actions_Menu.sqf","",6,false,true,"","];

Link to comment
Share on other sites

  • 4 weeks later...

hello, the vehicles are dissapearing after about 10 seconds for me also, ive double checked the server pbo part and its defiantly correct.

   _objectID = "0";
    _uid = "0";
};
if (_object getVariable "MalSar" == 1) exitWith {};
if (!_parachuteWest && !(locked _object)) then {
	if (_objectID == "0" && _uid == "0") then
	{
		_object_position = getPosATL _object;
    	_isNotOk = true;
	};
if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
	DZE_DYN_HackerCheck = true;
	{
	if (!((isNil "_x") || {(isNull _x)})) then {
		    if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["MalSar",0] !=1)) then {
			diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
			(vehicle _x) setDamage 1;
			_x setDamage 1;
			sleep 0.25;
		};
	};
		sleep 0.001;
	} count allUnits;

Any ideas please?

 

Overpoch cherno btw :)

 

 

Cheers

 

 

Robbie

Link to comment
Share on other sites

Would be interresting to add the SeaGull, Hawk, DragonFly, Butterfly, HouseFly, HoneyBee, Mosquito animals. But i don't realy know if these work as Player Model, because normaly they are used with "camCreate". They also don't seem to offer a DriverSeat so that you could spawn them and then do "player moveInDriver _animal"...

 

Maybe you will find a way =)

 

 

Any ideas please?

 

You need to add the Vehicles to "DZE_safeVehicle" or _veh setVariable ["MalSar",1,true];

i also would recommend:

_veh setVariable ["ObjectID", "1", true];
_veh setVariable ["ObjectUID", "1", true];
Link to comment
Share on other sites

Hi, thanks for the reply on this, I think its infistar deleting them

10:19:46 "CLEANUP: Deleted 27 Loot Piles out of 123"
10:20:17 "infiSTAR.de PVAH_WriteLog: [B 1-1-B:1 (Mike Admin) REMOTE,"Mike Admin G_o_d ON"]"
10:20:32 "infiSTAR.de Log: Mike Admin (76561198144120874) | DELETED Vehicle with Invalid ID(0): Old_bike_TK_CIV_EP1 @120026"
10:20:46 "CLEANUP: Deleted 33 Loot Piles out of 101"

Do you know whereabouts I can edit to fix this please?

 

 

Many thanks

 

 

Robbie

Link to comment
Share on other sites

My ah.config BTW

/* ********************************************************************************* */
/*  ALLOWED CMDMenus are only used if you have _BCM = false; which I would not recommend.  */
/*  ALLOWED CMDMenus      */ _cMenu =
[
	"","RscMainMenu","RscMoveHigh","#WATCH","#WATCH0",
	"RscWatchDir","RscDisplayClassSelecter","RscDisplayGenderSelect",
	"RscDisplaySpawnSelecter","RscWatchMoreDir","#GETIN","RscStatus",
	"RscCombatMode","RscFormations","RscTeam","RscSelectTeam","RscReply",
	"RscCallSupport","#ACTION","#CUSTOM_RADIO","RscRadio","RscGroupRootMenu",
	"BTC_Hud",'#USER:ActionMenu','#USER:ActionsMenu','#USER:VehicleMenu','#USER:FunMenu','#USER:MovementMenu','#USER:TransformAnimalMenu','#USER:DamiSpawn'
];
/* ********************************************************************************* */
BLOCK ALL CMDMenus    */ _BCM = false;	/* true or false */	/* recommended:  true */	/* we don't need commandingMenus. so have this true. */

I changed bcm = to true and it still happened

 

Many thanks

 

Robbie

Link to comment
Share on other sites

Try changing _UVW to true

 

Hi, tried that dude, same thing :(

9:52:15 "infiSTAR.de PVAH_WriteLog: [B 1-1-B:1 (Mike Admin) REMOTE,"Mike Admin Teleport to [4845.54,2434.14,0](@048129)"]"
 9:54:33 "infiSTAR.de Log: Mike Admin (76561198144120874) | DELETED Vehicle with Invalid ID(0): Old_bike_TK_CIV_EP1 @048129"

Am I the only one with this problem do you know mate?

 

Cheers

 

 

Robbie

Link to comment
Share on other sites

9:52:15 "infiSTAR.de PVAH_WriteLog: [B 1-1-B:1 (Mike Admin) REMOTE,"Mike Admin Teleport to [4845.54,2434.14,0](@048129)"]"
 9:54:33 "infiSTAR.de Log: Mike Admin (76561198144120874) | DELETED Vehicle with Invalid ID(0): Old_bike_TK_CIV_EP1 @048129"

I guess the Vehicle gets deletes, because the ID is 0 (or unset). Did you try to set the ID as i recommended?

 

After this lines in deploy_bike.sqf:

_veh = createVehicle [_vehtospawn, _pos, [], 0, "CAN_COLLIDE"];
_veh setVariable ["MalSar",1,true];

add:

_veh setVariable ["ObjectID", "1", true];
_veh setVariable ["ObjectUID", "1", true];
Link to comment
Share on other sites

Hello, so it should look like this?

_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),0];
		_worldspace = [_dir,_pos]; 
		_location = _pos;
		_veh = createVehicle [_vehtospawn, _pos, [], 0, "CAN_COLLIDE"];
		_veh setVariable ["MalSar",1,true];
		_veh setVariable ["ObjectID", "1", true];
		_veh setVariable ["ObjectUID", "1", true];
		
		clearMagazineCargoGlobal _veh;
		clearWeaponCargoGlobal _veh;

Cheers

 

Robbie

Link to comment
Share on other sites

Hello again

 

If I was to change the deploy_bike sqf from

if (hasBikeItem && _canDo && (dayz_combat !=1)) then {
	DZE_ActionInProgress = true;
	player removeMagazine "PartGeneric";
	player removeMagazine "PartWheel";
	player removeMagazine "PartWheel";

to

if (hasBikeItem && _canDo && (dayz_combat !=1)) then {
	DZE_ActionInProgress = true;
	player removeMagazine "ItemToolbox";

Would that change the requirement to a toolbox and remove the toolbox after spawn?

 

 

Cheers

 

 

Robbie

Link to comment
Share on other sites

This is a cleaner way to do it:

 

private ["_mags","_wheelNumber","_canDo","_onLadder","_finished","_finishedTime","_veh","_location","_vehtospawn","_dir","_pos","_dist","_location","_worldspace","_charID"];

_mags = weapons player;
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder && !_inVehicle);


if("ItemToolbox" in _mags) then {
	hasBikeItem = true;
} else { 
	hasBikeItem = false;
	cutText ["\n\nNeed: one toolbox", "PLAIN DOWN"];
};

if (hasBikeItem && _canDo && dayz_combat == 1) then {
    cutText ["You are in Combat and cannot build a bike.", "PLAIN DOWN"];
};

if (hasBikeItem && _canDo && (dayz_combat !=1)) then {
	DZE_ActionInProgress = true;
	player removeWeapon "ItemToolbox";

	player playActionNow "Medic";
	[player,"repair",0,false,10] call dayz_zombieSpeak;
	[player,10,true,(getPosATL player)] spawn player_alertZombies;

	r_interrupt = false;
	r_doLoop = true;

	_finished = false;
	_finishedTime = diag_tickTime+10;

	while {r_doLoop} do {
		if (diag_tickTime >= _finishedTime) then {
			r_doLoop = false;
			_finished = true;
		};
		if (r_interrupt) then {
			r_doLoop = false;
		};
		sleep 0.1;
	};

	if (_finished) then {
		_vehtospawn = "Old_bike_TK_CIV_EP1";
		_dist = 6;
		_charID = dayz_characterID;
		_dir = getDir vehicle player;
		_pos = getPosATL vehicle player;
		_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),0];
		_worldspace = [_dir,_pos]; 
		_location = _pos;
		_veh = createVehicle [_vehtospawn, _pos, [], 0, "CAN_COLLIDE"];
		_veh setVariable ["MalSar",1,true];
		
		clearMagazineCargoGlobal _veh;
		clearWeaponCargoGlobal _veh;

		cutText ["You have built a bike!", "PLAIN DOWN"];
		DZE_ActionInProgress = false;
		sleep 10;
		cutText ["Warning: Spawned bikes DO NOT SAVE after server restart!", "PLAIN DOWN"];
	} else {
		r_interrupt = false;
		player switchMove "";
		player playActionNow "stop";
		player addWeapon "ItemToolbox";

		DZE_ActionInProgress = false;
		cutText ["\n\nCanceled building a bike!", "PLAIN DOWN"];
	};
} else {
	if(!_canDo) then {
		cutText ["You are in a vehicle or already performing an action","PLAIN DOWN"];
	};
};

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

How would you make it so that when building the bike, you would not need any items?

 

Basically a free bike.

 

A version that requires only a tool box is posted on a previous page. I suggest using something like that (or requiring 1 scrap) because players will spam build them in traders and on roads. I have seen this in a server before and I wasn't able to drive into the trader area because of it.

Link to comment
Share on other sites

Nox I find I'm using all three of your mods. always excellent work.

 

I did change the morph.sqf to add a warning about losing all your gear. It seems to work but wanted to share in case I've messed something up.

 

I copied the suicide check. does this look ok?

 

private["_animal"];
_animal = _this select 0;
_Secondary = currentWeapon player;
_onLadder =    (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder);
suicide_answer=nil;
if(_canDo) then {
    DamiSpawn =
    [
        ["Morph Confirmation",true],
        ["You will lose all gear. Are you sure?", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["", [-1], "", -5,         [["expression", ""]], "1", "0"],
        ["No", [2], "", -5,     [["expression", "suicide_answer=false;"]], "1", "1"],
        ["Yes", [3], "", -5,     [["expression", "suicide_answer=true;"]], "1", "1"],
        ["", [-1], "", -5,         [["expression", ""]], "1", "0"],
        ["Exit", [-1], "", -3,     [["expression", "suicide_answer=false;"]], "1", "1"]
    ];
    showCommandingMenu "#USER:DamiSpawn";
    waitUntil {((!isNil 'suicide_answer')||(commandingMenu == ""))};
    if (isNil 'suicide_answer') then {suicide_answer=false;};
    if (suicide_answer) then
{
removeBackpack (vehicle player);
removeAllWeapons (vehicle player);
removeAllItems (vehicle player);
[dayz_playerUID,dayz_characterID,_animal]spawn player_humanityMorph;
};
} else {
    cutText ["You are already performing an action","PLAIN DOWN"];
};

Link to comment
Share on other sites

Nox I find I'm using all three of your mods. always excellent work.

 

I did change the morph.sqf to add a warning about losing all your gear. It seems to work but wanted to share in case I've messed something up.

 

I copied the suicide check. does this look ok?

 

private["_animal"];

_animal = _this select 0;

_Secondary = currentWeapon player;

_onLadder =    (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;

_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder);

suicide_answer=nil;

if(_canDo) then {

    DamiSpawn =

    [

        ["Morph Confirmation",true],

        ["You will lose all gear. Are you sure?", [-1], "", -5, [["expression", ""]], "1", "0"],

        ["", [-1], "", -5,         [["expression", ""]], "1", "0"],

        ["No", [2], "", -5,     [["expression", "suicide_answer=false;"]], "1", "1"],

        ["Yes", [3], "", -5,     [["expression", "suicide_answer=true;"]], "1", "1"],

        ["", [-1], "", -5,         [["expression", ""]], "1", "0"],

        ["Exit", [-1], "", -3,     [["expression", "suicide_answer=false;"]], "1", "1"]

    ];

    showCommandingMenu "#USER:DamiSpawn";

    waitUntil {((!isNil 'suicide_answer')||(commandingMenu == ""))};

    if (isNil 'suicide_answer') then {suicide_answer=false;};

    if (suicide_answer) then

{

removeBackpack (vehicle player);

removeAllWeapons (vehicle player);

removeAllItems (vehicle player);

[dayz_playerUID,dayz_characterID,_animal]spawn player_humanityMorph;

};

} else {

    cutText ["You are already performing an action","PLAIN DOWN"];

};

 

I will take a good look at this soon.

 

I will have an update for the menu with some nice changes and removal of self blood bag (epoch has that natively now) soon. My main priority is to get 1.9.1 admin tools released, then I will finish up work on my new edits to this, then fix up my debug release some more. After that its on to 1.9.2 (where this action menu will be integrated INTO the admin tools because a new special feature is coming that the players need to interact with).

Link to comment
Share on other sites

is there any way to just grab the server rules only?

Maybe try this

init.sqf  end of file 

[] execVM "RULES\activate.sqf";

Make folder RULES and inside make file activate.sqf with code inside:

[]spawn
{
wardrobe = -1;
private["_veh"];

while {(alive player)} do
{
	if (wardrobe == -1) then
	{
		wardrobe = (vehicle player) addaction [("<t color=""#00FFFF"">" + ("Rules") +"</t>"),"RULES\menu.sqf","",5,false,true,"",""];
		_veh = vehicle player;
	};
	if (_veh != vehicle player) then
	{
		_veh removeAction wardrobe;
		wardrobe = -1;      
	};
	Sleep 2;
};
};

Same folder create file menu.sqf with code inside:

pathtoscripts = "RULES\";
EXECscript1 = 'player execVM "'+pathtoscripts+'%1"';
if (!isDedicated) then {
Actionmenu =
[
	["",true],
		["Server Rules", [2],  "", -5, [["expression", format[EXECscript1,"RULES.sqf"]]], "1", "1"],
		["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];} else {
ActionMenu =
[
	["",true],
		["", [-1], "", -5, [["expression", ""]], "1", "0"],
			["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};
showCommandingMenu "#USER:ActionMenu";

And same there make file RULES.sqf with code inside:

private["_separator1","_txt"];
cutText ["", "PLAIN DOWN"];
sleep 1;
"SERVER RULES" hintC [


															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text",	
															"* text"															
															];

im not sute is this work, need to test!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...