Guest Posted March 24, 2014 Report Share Posted March 24, 2014 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 More sharing options...
insertcoins Posted March 24, 2014 Report Share Posted March 24, 2014 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 More sharing options...
insertcoins Posted March 24, 2014 Report Share Posted March 24, 2014 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 More sharing options...
avdieking Posted March 24, 2014 Report Share Posted March 24, 2014 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 ryker 1 Link to comment Share on other sites More sharing options...
Guest Posted March 25, 2014 Report Share Posted March 25, 2014 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 More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 this script will randomly choose a player Link to comment Share on other sites More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 Server_functions.sqf at the very bottom [] execVM "\z\addons\dayz_server\custom\huntPlayer.sqf"; Link to comment Share on other sites More sharing options...
Guest Posted March 25, 2014 Report Share Posted March 25, 2014 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 More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 do you have antihack installed on your server Link to comment Share on other sites More sharing options...
Guest Posted March 25, 2014 Report Share Posted March 25, 2014 do you have antihack installed on your server Yes i have the paid version of infistar Link to comment Share on other sites More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 trying to make an menu point for antihack then i make an tutorial Link to comment Share on other sites More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 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 More sharing options...
insertcoins Posted March 25, 2014 Report Share Posted March 25, 2014 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 More sharing options...
avdieking Posted March 25, 2014 Report Share Posted March 25, 2014 no becuase it checks the _unit that was set before the while and the while will run so long till the player is dead Link to comment Share on other sites More sharing options...
insertcoins Posted March 25, 2014 Report Share Posted March 25, 2014 thanks! Link to comment Share on other sites More sharing options...
insertcoins Posted March 26, 2014 Report Share Posted March 26, 2014 I tried this with the AH but it's not working. I get the message that the marker is placed, but no marker ever appears. Any ideas? Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
insertcoins Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
Guest Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
insertcoins Posted March 26, 2014 Report Share Posted March 26, 2014 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! Yes, let me know if it works for you! Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
insertcoins Posted March 26, 2014 Report Share Posted March 26, 2014 No idea, but I'd imagine targeting an new player would null the effect. Not sure though Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2014 Report Share Posted March 26, 2014 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 More sharing options...
avdieking Posted March 26, 2014 Report Share Posted March 26, 2014 i could write a script to deselect the player Link to comment Share on other sites More sharing options...
insertcoins Posted March 26, 2014 Report Share Posted March 26, 2014 I'll test it out later again and reduce the cycle time for the marker to 3 seconds, see if that helps. Might be too small to see on the map I just thought, too. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now