Jump to content
Sign in to follow this  
Filip5

Vehicle marker

Recommended Posts

hey guys,this time i need help with a simple command.However,my computer is not running so i need a little help. I am looking for a script or whatever it is, to make vehicles markers visible on map. You can see it in domination,and I want to do something like this into mission. Thank you for any posts...

Share this post


Link to post
Share on other sites

Hi, for someone who doesn't play domination gets difficult to know what you mean, can you elaborate a little?

_neo_

Share this post


Link to post
Share on other sites

I use A great script from SHK see below, that attaches a marker to a vehicle and also shows damage by changing colour

// nul = [this] execvm "SHK_vehicleMarker.sqf";

// nul = [Vehicle,MarkerIconType,MarkerColor,WreckTimer] execvm "SHK_vehicleMarker.sqf";

if !isdedicated then {

if (isnil "SHK_fnc_VehMrk_showHint") then {

SHK_fnc_VehMrk_showHint = {

hint parseText format["<t align='center'>Vehicle Lost</t><br/><br/><t color='#3366FF'><img size='4' image='%2'/></t><br/><t color='#FFCC33'>%1</t>",

getText (configFile >> "cfgVehicles" >> typeOf _this >> "displayName"),

getText (configFile >> "cfgVehicles" >> typeOf _this >> "picture")

];

};

};

if (isnil "SHK_eh_VehMrk_showHint") then {

SHK_eh_VehMrk_showHint = "";

"SHK_eh_VehMrk_showHint" addpublicvariableeventhandler {

(_this select 1) call SHK_fnc_VehMrk_showHint;

};

};

};

if !isserver exitwith {};

private ["_veh","_typ","_col","_tmr","_pos","_txt","_str","_mrk","_dmg","_crw","_man","_wrc","_tim"];

_veh = _this select 0;

_typ = if (count _this > 1) then {_this select 1} else {"mil_dot"};

_col = if (count _this > 2) then {_this select 2} else {"ColorOrange"};

_tmr = if (count _this > 3) then {_this select 3} else {180};

_veh setvariable ["SHK_VehMrkWrecked",false];

_pos = getpos _veh;

_str = format ["SHK_VehicleMarker_%1%2%3",typeof _veh,(_pos select 0),(_pos select 1)];

_mrk = createmarker [_str,_pos];

_mrk setmarkeralpha 0;

_mrk setmarkershape "ICON";

_mrk setmarkertype _typ;

_mrk setmarkercolor _col;

while {sleep 2.345; true} do {

if (isnull _veh) exitwith {};

if (count crew _veh > 0) exitwith {};

if (damage _veh > 0.8) exitwith {};

};

while {sleep 0.567; !isnull _veh} do {

_mrk setmarkerpos (getpos _veh);

_dmg = damage _veh;

_crw = crew _veh;

if (count _crw > 0) then {

_man = _crw select (count _crw - 1);

_txt = _man getvariable ["SHK_VehMrkGrp",str group _man];

} else {

_txt = "";

};

if (_dmg <= 0.2) then { _mrk setmarkeralpha 1 };

if (_dmg > 0.2) then { _mrk setmarkeralpha 0.5 };

if (_dmg > 0.8) then {

_mrk setmarkercolor "ColorBlack";

_txt = format ["%1 (Wrecked)",_txt];

_wrc = _veh getvariable ["SHK_VehMrkWrecked",false];

if _wrc then {

_tim = _tmr - (time - (_veh getvariable "SHK_VehMrkWreckTime"));

private ["_h","_m","_s"];

_h = floor(_tim / 3600);

_m = floor((_tim/60)-(_h*60));

_s = floor(_tim mod 60);

_txt = format ["%1 %2:%3:%4",_txt,

if (_h < 10) then {format ["0%1",_h]} else {_h},

if (_m < 10) then {format ["0%1",_m]} else {_m},

if (_s < 10) then {format ["0%1",_s]} else {_s}

];

} else {

_veh setvariable ["SHK_VehMrkWrecked",true];

_veh setvariable ["SHK_VehMrkWreckTime",time];

SHK_eh_VehMrk_showHint = _veh;

publicvariable "SHK_eh_VehMrk_showHint";

if !isdedicated then {

_veh call SHK_fnc_VehMrk_showHint;

};

};

};

_mrk setmarkertext _txt;

};

deletemarker _mrk;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×