Advertisement
Guest User

Untitled

a guest
Dec 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. //init.sqf: [] execvm "crew.sqf";
  2. if (isServer || isDedicated || !hasInterFace) exitWith {Diag_log "I was kicked from the crew.sqf I am not a true client";};
  3.  
  4. Private ["_name","_vehicle","_vehname","_weapname","_weap","_target","_picture","_vehtarget","_azimuth","_wepdir","_hudnames","_ui"];
  5.  
  6. disableSerialization;
  7. while {true} do
  8. {
  9.  
  10. 1000 cutRsc ["HudNames","PLAIN"];
  11. _ui = uiNameSpace getVariable "HudNames";
  12. _HudNames = _ui displayCtrl 99999;
  13.  
  14.  
  15. if(player != vehicle player) then
  16. {
  17. _name = "";
  18. _vehicle = assignedVehicle player;
  19. _vehname= getText (configFile >> "CfgVehicles" >> (typeOf vehicle player) >> "DisplayName");
  20. _weapname = getarray (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "Turrets" >> "MainTurret" >> "weapons");
  21. _weap = _weapname select 0;
  22. _name = format ["<t size='1.25' color='#FFCC00' shadow='1'>%1</t><br/>", _vehname];
  23.  
  24. {
  25. if((driver _vehicle == _x) || (gunner _vehicle == _x) || (commander _vehicle == _x)) then
  26. {
  27. if(driver _vehicle == _x) then
  28. {
  29. _name = format ["%1<img size='0.8' color='#CCFF66' shadow='1' image='a3\ui_f\data\IGUI\Cfg\Actions\getindriver_ca.paa'/> <t size='0.85' color='#FFFFFF' shadow='1'>%2</t><br/>", _name, (name _x)];
  30. };
  31. if(commander _vehicle == _x) then
  32. {
  33. _name = format ["%1<img size='0.8' color='#CCFF66' shadow='1' image='a3\ui_f\data\IGUI\Cfg\Actions\getincommander_ca.paa'/> <t size='0.85' color='#FFFFFF' shadow='1'>%2</t><br/>", _name, (name _x)];
  34. };
  35. if(gunner _vehicle == _x) then
  36. {
  37. _name = format ["%1<img size='0.8' color='#CCFF66' shadow='1' image='a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa'/> <t size='0.85' color='#FFFFFF' shadow='1'>%2</t><br/>", _name, (name _x)];
  38. };
  39. }
  40. else
  41. {
  42. //--- Fluit: Check if unit is second gunner
  43. if (_vehicle turretUnit [2] == _x) then {
  44. _name = format ["%1<img size='0.8' color='#CCFF66' shadow='1' image='a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa'/> <t size='0.85' color='#FFFFFF' shadow='1'>%2</t><br/>", _name, (name _x)];
  45. } else {
  46. _name = format ["%1<img size='0.8' color='#CCFF66' shadow='1' image='a3\ui_f\data\IGUI\Cfg\Actions\getincargo_ca.paa'/> <t size='0.85' color='#FFFFFF' shadow='1'>%2</t><br/>", _name, (name _x)];
  47. };
  48. };
  49.  
  50. } forEach crew _vehicle;
  51.  
  52. _HudNames ctrlSetStructuredText parseText _name;
  53. _HudNames ctrlCommit 0;
  54.  
  55.  
  56. };
  57. sleep 1;
  58. //--- BL1P Leave script if player is not in vehicle
  59. if(player == vehicle player) exitwith {diag_log "Leaving Crew.sqf";};
  60. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement