RevoLand

Floating player names/icons (group only/all)

12 posts in this topic

Here is an updated script for playerNames which adds distance to names if preferred.

 

Group only:

add to top of initPlayerLocal.sqf:

[15000 // maximum distance to show name
,true // show distance to player? (false = dont show)
] execVM "addons\scripts\playerNames.sqf";

playerNames.sqf:

nameDistance = _this select 0;
showDistance = _this select 1;

while {true} do
{
	waitUntil {
		count units (group player) > 1;
	};
	
	ShowGroupMemberNames = addMissionEventHandler ["Draw3D",
	{
		_members = units (group player);
		{
			if (!(isNull _x) && (isPlayer _x) && (_x != player)) then
			{
				_distance = cameraOn distance _x;
				_alpha = (1-(_distance/nameDistance));
				_clr = [1, 1, 1, _alpha];
				_crew = crew (vehicle _x);
				_name = '';
				{
					if (_x != player) then
					{
						_name = format ['%3%1%2', ['', format ['%1, ', _name]] select (_name != ''), name _x, ['', format ['[%1] ', round(player distance _x)]] select (showDistance)];
					};
				} forEach _crew;
				_veh = vehicle _x;
				_bbr = boundingBoxReal _veh;
				_p1 = _bbr select 0;
				_p2 = _bbr select 1;
				_maxHeight = (abs ((_p2 select 2) - (_p1 select 2))) * 1.25; 
				_pos = visiblePosition _veh;
				_pos set[2,(_pos select 2) + _maxHeight];
				
				drawIcon3D['', _clr, _pos, 0, 0, 0, _name, 1, 0.03];
				// texture (null), color (_clr), position (_pos), width (0), height (0), angle (0), text (_name), shadow (1), textSize (0.03), font, textAlign, drawSideArrows
			};
		} forEach _members;
	}];

	_memberCount = count units (group player);
	waitUntil {
		count (units (group player)) != _memberCount;
	};
	
	removeMissionEventHandler ["Draw3D",ShowGroupMemberNames];
	
	sleep 1;
};

Show to all players:

add to top of initPlayerLocal.sqf:

[15000 // maximum distance to show name
,true // show distance to player? (false = dont show)
] execVM "addons\scripts\playerNames.sqf";

playerNames.sqf:

nameDistance = _this select 0;
showDistance = _this select 1;

while {true} do
{
	_currentPlayerCount = count allPlayers;
	waitUntil {
		_currentPlayerCount > 1;
	};
	
	ShowPlayerNames = addMissionEventHandler ["Draw3D",
	{
		_players = allPlayers;
		{
			if (!(isNull _x) && (isPlayer _x) && (_x != player)) then
			{
				_distance = cameraOn distance _x;
				_alpha = (1-(_distance/nameDistance));
				_clr = [1, 1, 1, _alpha];
				_crew = crew (vehicle _x);
				_name = '';
				{
					if (_x != player) then
					{
						_name = format ['%3%1%2', ['', format ['%1, ', _name]] select (_name != ''), name _x, ['', format ['[%1] ', round(player distance _x)]] select (showDistance)];
					};
				} forEach _crew;
				_veh = vehicle _x;
				_bbr = boundingBoxReal _veh;
				_p1 = _bbr select 0;
				_p2 = _bbr select 1;
				_maxHeight = (abs ((_p2 select 2) - (_p1 select 2))) * 1.25; 
				_pos = visiblePosition _veh;
				_pos set[2,(_pos select 2) + _maxHeight];
				
				drawIcon3D['', _clr, _pos, 0, 0, 0, _name, 1, 0.03];
				// texture (null), color (_clr), position (_pos), width (0), height (0), angle (0), text (_name), shadow (1), textSize (0.03), font, textAlign, drawSideArrows
			};
		} forEach _players;
	}];

	_currentPlayerCount = count allPlayers;
	waitUntil {
		_currentPlayerCount != count allPlayers;
	};
	
	removeMissionEventHandler ["Draw3D", ShowPlayerNames];
	
	sleep 1;
};


 

Script for all players is not tested yet, if anyone test and report me the status i will be very happy.

Every improvements are welcome. Free to edit & distribute as you want. :)

Edited by RevoLand

Share this post


Link to post
Share on other sites

Here is an updated script for playerNames which adds distance to names if preferred.

 

Group only:

Hidden Content

Show to all players:

Hidden Content

 

Script for all players is not tested yet, if anyone test and report me the status i will be very happy.

Every improvements are welcome. Free to edit & distribute as you want. :)

This is great man! I noticed one thing so far.. When you are up on a roof or high up the name and distance markers are below the player on the ground. Otherwise this is awesome!

Share this post


Link to post
Share on other sites
Advertisement

I've loaded this into my mission and only my Zeus slot could see players' info.   Any thoughts on why that might be?  I'm just trying to have players visible to each other while doing a basic mission I'm creating in the Eden Editor.

Share this post


Link to post
Share on other sites

This works great.  Thank you.

 

Would there be a way to hide admin?  Or just specific UIDs?  Out PK problem is going to be greatly helped on out PVE servers but now the players all know where the admin are hiding/

Share this post


Link to post
Share on other sites

This script has worked very well on my PVE server. While I'm not concerned about players knowing where admins are, I am trying to work out how to identify admins by changing the color of the admin's name. I've tried a couple things and it seems to break the script without error and names don't show up at all.

I replaced:

				_clr = [0, 0, 1, _alpha];

With:

				if ((getPlayerUID _x) in ["UID1","UID1","UID1","UID1","UID1"]) then
				{
					_clr = [0, 1, 0, _alpha];
				}
				else
				{
					_clr = [0, 0, 1, _alpha];
				};

I used similar code with a map markers script and it worked perfectly. I'm stumped as to why it's not working with the names. Any suggestions?

Share this post


Link to post
Share on other sites
12 hours ago, Slider said:

Would also like to have color of the admins name, Was this ever possible?

I got wrapped up in some other things and never went back to figure it out. Nobody else chimed in, so I am guessing nobody else worked it out.

Share this post


Link to post
Share on other sites

For people who want a "admin" tag and a red name: 
 

nameDistance = _this select 0;
showDistance = _this select 1;
while {true} do
{
	_currentPlayerCount = count allPlayers;
	waitUntil {
		_currentPlayerCount > 1;
	};
	
	ShowPlayerNames = addMissionEventHandler ["Draw3D",
	{
		_players = allPlayers;
		{
			if (!(isNull _x) && (isPlayer _x) && (_x != player)) then
			{
				_distance = cameraOn distance _x;
				_alpha = (1-(_distance/nameDistance));
				_crew = crew (vehicle _x);
				_name = '';
				_name1 = '';
				_clr = [1, 1, 1, _alpha];				
				{
					if (_x != player) then
					{
						_name = format ['%3%1%2', ['', format ['%1, ', _name]] select (_name != ''), name _x, ['', format ['[%1] ', round(player distance _x)]] select (showDistance)];
					};
				} forEach _crew;
				if ((getPlayerUID _x) in ["REPLACE WITH ADMIN UID"]) then {
					_name = format["ADMIN %1",_name];
					_clr = [1, 0, 0, _alpha];
				};
				_veh = vehicle _x;
				_bbr = boundingBoxReal _veh;
				_p1 = _bbr select 0;
				_p2 = _bbr select 1;
				_maxHeight = (abs ((_p2 select 2) - (_p1 select 2))) * 1.25; 
				_pos = visiblePosition _veh;
				_pos set[2,(_pos select 2) + _maxHeight];
				drawIcon3D['', _clr, _pos, 0, 0, 0, _name, 1, 0.03];
			};
		} forEach _players;
	}];

	_currentPlayerCount = count allPlayers;
	waitUntil {
		_currentPlayerCount != count allPlayers;
	};
	
	removeMissionEventHandler ["Draw3D", ShowPlayerNames];
	
	sleep 1;
};



If else statements dont work within this script, so only use a "if" statement. 

Due to what that is i don't know. 

Maybe @kuplion can tell me why ?

Share this post


Link to post
Share on other sites

Further question; Im having a very odd issue where the players on my server can see the player names, but I can not. Anyone have any idea why this might be? Here are my relevant files 

Spoiler

initPlayerLocal.sqf

[2000 // maximum distance to show name
,true // show distance to player? (false = dont show)
] execVM "addons\scripts\playerNames.sqf";
missionNamespace setVariable ["ExileClientXM8IsPowerOn",true];

///////////////////////////////////////////////////////////////////////////////
// Static Objects
///////////////////////////////////////////////////////////////////////////////

// Taken away for now
//#include "initServer.sqf"

if (!hasInterface || isServer) exitWith {};

///////////////////////////////////////////////////////////////////////////
// Hardware Trader
///////////////////////////////////////////////////////////////////////////
_workBench = "Land_Workbench_01_F" createVehicleLocal [0,0,0];
_workBench setDir 45.4546;
_workBench setPosATL [14587.8, 16758.7, 0.0938587];

_trader = 
[
    "Exile_Trader_Hardware",
    "Exile_Trader_Hardware",
    "WhiteHead_17",
    ["InBaseMoves_sitHighUp1"],
    [0, 0, -0.5],
    170,
    _workBench
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Fast Food Trader
///////////////////////////////////////////////////////////////////////////
_cashDesk = "Land_CashDesk_F" createVehicleLocal [0,0,0];
_cashDesk setDir 131.818;
_cashDesk setPosATL [14589.8, 16778.2, -0.0701294];

_microwave = "Land_Microwave_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _microwave;         
_microwave disableCollisionWith _cashDesk; 
_microwave attachTo [_cashDesk, [-0.6, 0.2, 1.1]];

_ketchup = "Land_Ketchup_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _ketchup;         
_ketchup disableCollisionWith _cashDesk; 
_ketchup attachTo [_cashDesk, [-0.6, 0, 1.1]];

_mustard = "Land_Mustard_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _mustard;         
_mustard disableCollisionWith _cashDesk; 
_mustard attachTo [_cashDesk, [-0.5, -0.05, 1.1]];

_trader = 
[
    "Exile_Trader_Food",
    "Exile_Trader_Food",
    "GreekHead_A3_01",
    ["InBaseMoves_table1"],
    [0.1, 0.5, 0.2],
    170,
    _cashDesk
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Armory Trader
///////////////////////////////////////////////////////////////////////////
_chair = "Land_CampingChair_V2_F" createVehicleLocal [0,0,0];
_chair setDir 208.182;    
_chair setPosATL [14568.1, 16764.3, 0.084837];

_trader = 
[
    "Exile_Trader_Armory",
    "Exile_Trader_Armory",
    "PersianHead_A3_02",
    ["InBaseMoves_SittingRifle1"],
    [0, -0.15, -0.45],
    180,
    _chair
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Equipment Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_Equipment",
    "Exile_Trader_Equipment",
    "WhiteHead_19",
    ["InBaseMoves_Lean1"],
    [14571.5, 16759.1, 0.126438],
    0
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Specops Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_SpecialOperations",
    "Exile_Trader_SpecialOperations",
    "AfricanHead_02",
    ["HubStanding_idle1", "HubStanding_idle2", "HubStanding_idle3"],
    [14566.3, 16773.2, 0.126438],
    140
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Office Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_Office",
    "Exile_Trader_Office",
    "GreekHead_A3_04",
    ["HubBriefing_scratch", "HubBriefing_stretch", "HubBriefing_think", "HubBriefing_lookAround1", "HubBriefing_lookAround2"],
    [14599.6, 16774.6, 5.12644],
    220
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Waste Dump Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_WasteDump",
    "Exile_Trader_WasteDump",
    "GreekHead_A3_01",
    ["HubStandingUA_move1", "HubStandingUA_move2", "HubStandingUA_idle1", "HubStandingUA_idle2", "HubStandingUA_idle3"],
    [14608.4, 16901.3, 0],
    270
]
call ExileClient_object_trader_create;


///////////////////////////////////////////////////////////////////////////
// Aircraft Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_Aircraft",
    "Exile_Trader_Aircraft",
    "WhiteHead_17",
    ["LHD_krajPaluby"],
    [14596.5, 16752.9, 0.12644],
    133
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Aircraft Customs Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_AircraftCustoms",
    "Exile_Trader_AircraftCustoms",
    "GreekHead_A3_07",
    ["HubStandingUC_idle1", "HubStandingUC_idle2", "HubStandingUC_idle3", "HubStandingUC_move1", "HubStandingUC_move2"],
    [14635, 16790.3, 0],
    156.294
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Vehicle Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Vehicle",
    "Exile_Trader_Vehicle",
    "WhiteHead_11",
    ["InBaseMoves_repairVehicleKnl", "InBaseMoves_repairVehiclePne"],
    [14603.7, 16877.3, 0.00143433],
    90
]
call ExileClient_object_trader_create;

_carWreck = "Land_Wreck_CarDismantled_F" createVehicleLocal [0,0,0];
_carWreck setDir 355.455;
_carWreck setPosATL [14605.6, 16877.3, 0.0208359];

///////////////////////////////////////////////////////////////////////////
// Vehicle Customs Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_VehicleCustoms",
    "Exile_Trader_VehicleCustoms",
    "WhiteHead_11",
    ["AidlPercMstpSnonWnonDnon_G01", "AidlPercMstpSnonWnonDnon_G02", "AidlPercMstpSnonWnonDnon_G03", "AidlPercMstpSnonWnonDnon_G04", "AidlPercMstpSnonWnonDnon_G05", "AidlPercMstpSnonWnonDnon_G06"],
    [14617.2, 16888.4, 0],
    269.96
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Guard 01
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Guard_01",
    "",
    "WhiteHead_17",
    ["InBaseMoves_patrolling1"],
    [14564.9,16923.4,0.00146294],
    323.53
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Guard 02
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Guard_02",
    "",
    "WhiteHead_03",
    ["InBaseMoves_patrolling2"],
    [14626.3,16834.6,4.72644],
    326.455
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Guard 03
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Guard_03",
    "",
    "AfricanHead_03",
    ["InBaseMoves_patrolling1"],
    [14577.1,16793.1,3.75118],
    313.349
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Guard 01
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Guard_02",
    "",
    "WhiteHead_03",
    ["InBaseMoves_patrolling2"],
    [2950.52,18195.3,4.93399],
    179.092
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Boat Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Boat",
    "Exile_Trader_Boat",
    "WhiteHead_17",
    ["AidlPercMstpSnonWnonDnon_G01", "AidlPercMstpSnonWnonDnon_G02", "AidlPercMstpSnonWnonDnon_G03", "AidlPercMstpSnonWnonDnon_G04", "AidlPercMstpSnonWnonDnon_G05", "AidlPercMstpSnonWnonDnon_G06"],
    [2914.35,18192.9,8.51858],
    88.3346
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Vehicle Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Vehicle",
    "Exile_Trader_Vehicle",
    "WhiteHead_11",
    ["InBaseMoves_repairVehicleKnl", "InBaseMoves_repairVehiclePne"],
    [2980.19,18146.2,1.06391],
    222.352
]
call ExileClient_object_trader_create;

_carWreck = "Land_Wreck_CarDismantled_F" createVehicleLocal [0,0,0];
_carWreck setDir 130.966;    
_carWreck setPosATL [2978.76,18144.5,1.13293];

///////////////////////////////////////////////////////////////////////////
// Western Waste Dump Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_WasteDump",
    "Exile_Trader_WasteDump",
    "GreekHead_A3_01",
    ["HubStandingUA_move1", "HubStandingUA_move2", "HubStandingUA_idle1", "HubStandingUA_idle2", "HubStandingUA_idle3"],
    [2984.05,18133.4,0.00107765],
    29.3856
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Fast Food Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Food",
    "Exile_Trader_Food",
    "GreekHead_A3_01",
    ["AidlPercMstpSnonWnonDnon_G01", "AidlPercMstpSnonWnonDnon_G02", "AidlPercMstpSnonWnonDnon_G03", "AidlPercMstpSnonWnonDnon_G04", "AidlPercMstpSnonWnonDnon_G05", "AidlPercMstpSnonWnonDnon_G06"],
    [2979.87,18184.9,2.55185],
    89.2952
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Equipment Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Equipment",
    "Exile_Trader_Equipment",
    "WhiteHead_19",
    ["HubStanding_idle1", "HubStanding_idle2", "HubStanding_idle3"],
    [2980.7,18192.9,2.49853],
    130.535
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Armory Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Armory",
    "Exile_Trader_Armory",
    "PersianHead_A3_02",
    ["HubStanding_idle1", "HubStanding_idle2", "HubStanding_idle3"],
    [2986.43,18178.5,1.66267],
    296.855
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Western Guard 02
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Guard_03",
    "",
    "AfricanHead_03",
    ["InBaseMoves_patrolling1"],
    [2993.2,18167,0.353821],
    109.888
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Fast Food Trader
///////////////////////////////////////////////////////////////////////////
_cashDesk = "Land_CashDesk_F" createVehicleLocal [0,0,0];
_cashDesk setDir 222.727;
_cashDesk setPosATL [23353.1, 24168, 0.16585];

_microwave = "Land_Microwave_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _microwave;         
_microwave disableCollisionWith _cashDesk; 
_microwave attachTo [_cashDesk, [-0.6, 0.2, 1.1]];

_ketchup = "Land_Ketchup_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _ketchup;         
_ketchup disableCollisionWith _cashDesk; 
_ketchup attachTo [_cashDesk, [-0.6, 0, 1.1]];

_mustard = "Land_Mustard_01_F" createVehicleLocal [0,0,0];
_cashDesk disableCollisionWith _mustard;         
_mustard disableCollisionWith _cashDesk; 
_mustard attachTo [_cashDesk, [-0.5, -0.05, 1.1]];

_trader = 
[
    "Exile_Trader_Food",
    "Exile_Trader_Food",
    "GreekHead_A3_01",
    ["InBaseMoves_table1"],
    [0.1, 0.5, 0.2],
    170,
    _cashDesk
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Boat Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Boat",
    "Exile_Trader_Boat",
    "WhiteHead_17",
    ["AidlPercMstpSnonWnonDnon_G01", "AidlPercMstpSnonWnonDnon_G02", "AidlPercMstpSnonWnonDnon_G03", "AidlPercMstpSnonWnonDnon_G04", "AidlPercMstpSnonWnonDnon_G05", "AidlPercMstpSnonWnonDnon_G06"],
    [23296.6,24189.8,5.61213],
    96
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Vehicle Trader
///////////////////////////////////////////////////////////////////////////

_trader = 
[
    "Exile_Trader_Vehicle",
    "Exile_Trader_Vehicle",
    "WhiteHead_11",
    ["InBaseMoves_repairVehicleKnl", "InBaseMoves_repairVehiclePne"],
    [23385.6,24191.6,0.00136566],
    123
]
call ExileClient_object_trader_create;

_carWreck = "Land_Wreck_CarDismantled_F" createVehicleLocal [0,0,0];
_carWreck setDir 47.2728;    
_carWreck setPosATL [23387.3, 24190.3, 0.05];

///////////////////////////////////////////////////////////////////////////
// Eastern Hardware Trader
///////////////////////////////////////////////////////////////////////////
_workBench = "Land_Workbench_01_F" createVehicleLocal [0,0,0];
_workBench setDir 279.545;
_workBench setPosATL [23371.6, 24188, 0.89873];

_trader = 
[
    "Exile_Trader_Hardware",
    "Exile_Trader_Hardware",
    "WhiteHead_17",
    ["InBaseMoves_sitHighUp1"],
    [0, 0, -0.5],
    170,
    _workBench
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Equipment Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_Equipment",
    "Exile_Trader_Equipment",
    "WhiteHead_19",
    ["HubStanding_idle1", "HubStanding_idle2", "HubStanding_idle3"],
    [23379.9, 24169.3, 0.199955],
    206
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Armory Trader
///////////////////////////////////////////////////////////////////////////
_chair = "Land_CampingChair_V2_F" createVehicleLocal [0,0,0];
_chair setDir 12.7272;
_chair setPosATL [23379.6, 24169.3, 4.56662];

_trader = 
[
    "Exile_Trader_Armory",
    "Exile_Trader_Armory",
    "PersianHead_A3_02",
    ["InBaseMoves_SittingRifle1"],
    [0, -0.15, -0.45],
    180,
    _chair
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Eastern Waste Dump Trader
///////////////////////////////////////////////////////////////////////////
_trader = 
[
    "Exile_Trader_WasteDump",
    "Exile_Trader_WasteDump",
    "GreekHead_A3_01",
    ["HubStandingUA_move1", "HubStandingUA_move2", "HubStandingUA_idle1", "HubStandingUA_idle2", "HubStandingUA_idle3"],
    [23336.6,24214.4,0.00115061],
    346
]
call ExileClient_object_trader_create;

///////////////////////////////////////////////////////////////////////////
// Russian Roulette
///////////////////////////////////////////////////////////////////////////
[
    "Exile_Trader_RussianRoulette",
    "",
    "GreekHead_A3_01",
    ["HubStandingUA_move1", "HubStandingUA_move2", "HubStandingUA_idle1", "HubStandingUA_idle2", "HubStandingUA_idle3"],
    [14622.6, 16820.1, 0.126],
    187.428
]
call ExileClient_object_trader_create;

// Load Status Bar
[] execVM "Custom\StatusBar\statusBar_init.sqf";

Spoiler

playerNames.sqf which is located in exile.altis/addons/scripts 

 

nameDistance = _this select 0;
showDistance = _this select 1;

while {true} do
{
    _currentPlayerCount = count allPlayers;
    waitUntil {
        _currentPlayerCount > 1;
    };
    
    ShowPlayerNames = addMissionEventHandler ["Draw3D",
    {
        _players = allPlayers;
        {
            if (!(isNull _x) && (isPlayer _x) && (_x != player)) then
            {
                _distance = cameraOn distance _x;
                _alpha = (1-(_distance/nameDistance));
                _clr = [1, 1, 1, _alpha];
                _crew = crew (vehicle _x);
                _name = '';
                {
                    if (_x != player) then
                    {
                        _name = format ['%3%1%2', ['', format ['%1, ', _name]] select (_name != ''), name _x, ['', format ['[%1] ', round(player distance _x)]] select (showDistance)];
                    };
                } forEach _crew;
                _veh = vehicle _x;
                _bbr = boundingBoxReal _veh;
                _p1 = _bbr select 0;
                _p2 = _bbr select 1;
                _maxHeight = (abs ((_p2 select 2) - (_p1 select 2))) * 1.25; 
                _pos = visiblePosition _veh;
                _pos set[2,(_pos select 2) + _maxHeight];
                
                drawIcon3D['', _clr, _pos, 0, 0, 0, _name, 1, 0.03];
                // texture (null), color (_clr), position (_pos), width (0), height (0), angle (0), text (_name), shadow (1), textSize (0.03), font, textAlign, drawSideArrows
            };
        } forEach _players;
    }];

    _currentPlayerCount = count allPlayers;
    waitUntil {
        _currentPlayerCount != count allPlayers;
    };
    
    removeMissionEventHandler ["Draw3D", ShowPlayerNames];
    
    sleep 1;
};

 

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.