É bem simples o funcionamento. Coloque no init.sqf o seguinte código:
nul = [] execVM "scripts\jogadorferido.sqf";Crie um arquivo com o nome "jogadorferido.sqf" e coloque em uma pasta scripts na pasta da sua missão, cole o seguinte código no arquivo sqf:
//Script by armastudio.blogspot.com[] spawn{while {true} do{waituntil {! isnil "jogadorferido"};titleText [format ["%1 foi ferido gravemente e necessita de ajuda.", jogadorferido], "PLAIN DOWN", 0];jogadorferido = nil;sleep 10;};};if (isServer) then{{_asd = round (random 1000);_string1 = tostring [_asd,_asd,_asd];_marker = createMarker [_string1, position _x];_string1 setMarkerShape "icon";_string1 setMarkerType "dot";_string1 setmarkeralpha 0;while {true} do{if (isplayer _x) then{_nome = name _x;_string1 setmarkertext format ["%1", _nome];_string1 setmarkerpos getpos _x;_jogadorferido = _x getVariable "ace_w_state";if (_jogadorferido > 800) then{_string1 setmarkeralpha 1;jogadorferido = _nome;publicvariable "jogadorferido";waituntil {(_x getVariable "ace_w_state") == 0};_string1 setmarkeralpha 0;} else {_string1 setmarkeralpha 0};} else {_string1 setmarkeralpha 0};sleep 10;};} foreach playableunits;};
Código atualizado e melhorado.
ResponderExcluir