Jump to content

Updating Epoch Event


Guest

Recommended Posts

Hello,

is it possible to make an "Event" where moving players(choosen by the admin) are marked on the map, so everyone could try to kill them and get the loot?

Thanks 
Exo

Link to comment
Share on other sites

I have had this same idea. Every x minutes one person is selected by the server to be the hunted, and his position is marked on the map every 2 minutes. Haven't got round to writing anything for this though. Would be a major security problem I'd imagine btw, the map updates.

Link to comment
Share on other sites

I have had this same idea. Every x minutes one person is selected by the server to be the hunted, and his position is marked on the map every 2 minutes. Haven't got round to writing anything for this though. Would be a major security problem I'd imagine btw, the map updates.

Link to comment
Share on other sites

private ["_unit","_marker"];
_unit = playableUnits select floor(random count playableUnits);_marker = createMarker ["Player", position _unit];
_marker setMarkerType "mil_destroy";
_marker setMarkerSize [1.25, 1.25];
_marker setMarkerColor "ColorRed";
_marker setMarkerText "Hunted";
while {alive _unit} do {
_marker setMarkerPos (position _unit);
sleep 120;
};

Not tested but could work

Link to comment
Share on other sites

private ["_unit","_marker"];
_unit = playableUnits select floor(random count playableUnits);_marker = createMarker ["Player", position _unit];
_marker setMarkerType "mil_destroy";
_marker setMarkerSize [1.25, 1.25];
_marker setMarkerColor "ColorRed";
_marker setMarkerText "Hunted";
while {alive _unit} do {
_marker setMarkerPos (position _unit);
sleep 120;
};

Not tested but could work

 

Going to test it. Where do i have to place it ?

And how do i define witch player is the hunted on? Do i have to use the UID ? Or just the ingame name?

Thanks !!!

Link to comment
Share on other sites

this script will randomly choose a player

EDIT: Thanks !

Could you give me the code if I (With my UID) wanted to be the hunted?

For example that i could choose a player to be the hunted.

Link to comment
Share on other sites

script works

open ah.sqf in dayz_server.pbo

add this 

adminadd = adminadd + ["  Hunted Player",huntedPlayer,"0","0","0","1",[0,0.8,1,1]];

after

 

SuperAdmin_MENU =
{
adminadd = adminadd + ["  Teleport Player To Me",admint2me,"0","0","0","1",[0,0.8,1,1]];
adminadd = adminadd + ["  Teleport To Player",admintele,"0","0","0","1",[0,0.8,1,1]];

and this

 

huntedPlayer =
{
{
if (name _x == _this select 0) then
{
[_x] spawn playerMark;
hint format ["%1 marked on Map",name _x];
cutText [format["%1 marked on Map",name _x], "PLAIN"];


_savelog = format["%1 Marked %2 on map",name player,_this select 0];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
};
} forEach playableUnits;
};

after 

 

admintele =
{
{
if (name _x == _this select 0) then
{
_pos = getPosATL (vehicle _x);
_dir = direction (vehicle _x);
_distance = -1;
if (player != vehicle player) then {_distance = -8;};
_pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
(vehicle player) setPosATL _pos;
(vehicle player) setDir _dir;
hint format ["Moving to %1",name _x];
cutText [format["Moving to %1",name _x], "PLAIN"];


_savelog = format["%1 Moving to %2",name player,_this select 0];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
};
} forEach playableUnits;
};

then create a custom compiles.sqf in your mission folder

 

and add this 

playerMark = compile preprocessFileLineNumbers "custom\huntedPlayer.sqf";

after

onPreloadFinished  "dayz_preloadFinished = true;";

and then create a folder named custom in mission folder and create huntedPlayer.sqf with this content

 

private ["_marker","_player","_getPosPlayer"];
_player = _this select 0;
_getPosPlayer = getPos _player;
_marker = createMarker ["Player", _getPosPlayer];
_marker setMarkerType "mil_destroy";
_marker setMarkerSize [1.25, 1.25];
_marker setMarkerColor "ColorRed";
_marker setMarkerText "Hunted";
while {alive _player} do {
_getPosPlayer = getPos _player;
_marker setMarkerPos (_getPosPlayer);
sleep 120;
};
Link to comment
Share on other sites

private ["_unit","_marker"];
_unit = playableUnits select floor(random count playableUnits);_marker = createMarker ["Player", position _unit];
_marker setMarkerType "mil_destroy";
_marker setMarkerSize [1.25, 1.25];
_marker setMarkerColor "ColorRed";
_marker setMarkerText "Hunted";
while {alive _unit} do {
_marker setMarkerPos (position _unit);
sleep 120;
};

Not tested but could work

 

 

Wouldn't this place a marker on a random different player every two minutes?

Link to comment
Share on other sites

 

script works

open ah.sqf in dayz_server.pbo

add this 

adminadd = adminadd + ["  Hunted Player",huntedPlayer,"0","0","0","1",[0,0.8,1,1]];

after

 

SuperAdmin_MENU =
{
adminadd = adminadd + ["  Teleport Player To Me",admint2me,"0","0","0","1",[0,0.8,1,1]];
adminadd = adminadd + ["  Teleport To Player",admintele,"0","0","0","1",[0,0.8,1,1]];

and this

 

huntedPlayer =
{
{
if (name _x == _this select 0) then
{
[_x] spawn playerMark;
hint format ["%1 marked on Map",name _x];
cutText [format["%1 marked on Map",name _x], "PLAIN"];


_savelog = format["%1 Marked %2 on map",name player,_this select 0];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
};
} forEach playableUnits;
};

after 

 

admintele =
{
{
if (name _x == _this select 0) then
{
_pos = getPosATL (vehicle _x);
_dir = direction (vehicle _x);
_distance = -1;
if (player != vehicle player) then {_distance = -8;};
_pos = [(_pos select 0)+_distance*sin(_dir),(_pos select 1)+_distance*cos(_dir),(_pos select 2)];
(vehicle player) setPosATL _pos;
(vehicle player) setDir _dir;
hint format ["Moving to %1",name _x];
cutText [format["Moving to %1",name _x], "PLAIN"];


_savelog = format["%1 Moving to %2",name player,_this select 0];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
};
} forEach playableUnits;
};

then create a custom compiles.sqf in your mission folder

 

and add this 

playerMark = compile preprocessFileLineNumbers "custom\huntedPlayer.sqf";

after

onPreloadFinished  "dayz_preloadFinished = true;";

and then create a folder named custom in mission folder and create huntedPlayer.sqf with this content

 

private ["_marker","_player","_getPosPlayer"];
_player = _this select 0;
_getPosPlayer = getPos _player;
_marker = createMarker ["Player", _getPosPlayer];
_marker setMarkerType "mil_destroy";
_marker setMarkerSize [1.25, 1.25];
_marker setMarkerColor "ColorRed";
_marker setMarkerText "Hunted";
while {alive _player} do {
_getPosPlayer = getPos _player;
_marker setMarkerPos (_getPosPlayer);
sleep 120;
};

 

Thank you very much! 

i am going to test it today.

Can you povide a way to select the player yourself?

This would be my dream.

 

Thanks!

Link to comment
Share on other sites

Thank you very much! 

i am going to test it today.

Can you povide a way to select the player yourself?

This would be my dream.

 

Thanks!

this way would select the player by the admin using the AH. Same as selecting a player to be healed or teleported to

Link to comment
Share on other sites

this way would select the player by the admin using the AH. Same as selecting a player to be healed or teleported to

So i would have to choose a player from the list and hen klick the hunted menue right?

This would be so cool if this works!

Link to comment
Share on other sites

Yes, let me know if it works for you!

Ok i will.

One last question. Would it be possible to unselect the player? So if no one kills the hunted, that he survived and is free to go.

Link to comment
Share on other sites

No idea, but I'd imagine targeting an new player would null the effect. Not sure though

Yeah that would be quit good.

I will test the script later this day.

I´m goign to let you know if it works.

 

Special thanks to 

avdieking
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
  • Advertisement
  • Discord

×
×
  • Create New...