💡 player's nickname
Show prompt as player's nickname under the cursor.I brought the cursor to the player - and there was his nickname Video shows all
Cursor_Main =
{
if (isNil 'Cursor_Toggle') then
{
Cursor_Toggle = 0;
};
if (Cursor_Toggle == 0) then
{
Cursor_Toggle = 1;
systemchat "Necromancy: Cursor Target ESP Activated";
while {Cursor_Toggle == 1} do
{
_CursorPos = screenToWorld [0.5,0.5];
_CursorTarget = nearestObjects [_CursorPos, ["SurvivorBase"], 20];
{
if (_x != player) then
{
[_x] spawn Cursor_Draw_Player;
sleep 0.25;
};
} forEach _CursorTarget;
sleep 5;
};
}
else
{
Cursor_Toggle = 0;
systemchat "Necromancy: Cursor Target ESP Deactivated";
};
};
Cursor_Draw_Player =
{
disableSerialization;
if (isNil 'Cursor_Draw') then {Cursor_Draw = 2733;};
Cursor_Draw cutRsc ['rscDynamicText', 'PLAIN'];
Cursor_Draw = Cursor_Draw + 1;
_TargetDrawCtrl = ((uiNamespace getvariable 'BIS_dynamicText') displayctrl 9999);
_TargetDrawCtrl ctrlShow true; _TargetDrawCtrl ctrlEnable true; _TargetDrawCtrl ctrlSetFade 0;
_TargetUnit = _this select 0;
_CursorTargetName = name _CursorTarget;
while {alive _TargetUnit} do
{
if (Cursor_Toggle == 0) exitWith {_TargetDrawCtrl ctrlShow false; _TargetDrawCtrl ctrlEnable false;};
_TargetPos = [(getPosATL _TargetUnit) select 0, (getPosATL _TargetUnit) select 1, ((getPosATL _TargetUnit) select 2) + 1];
_TargetPos2D = WorldToScreen _TargetPos;
if (count _TargetPos2D > 0) then
{
_TargetDrawCtrl ctrlSetPosition [(_TargetPos2D select 0) - (safezoneW / 2), (_TargetPos2D select 1), safezoneW, safezoneH];
_Hicks_text = parseText format ['<t size=''0.4'' color=''#8DFF00''>%1 </t><t size=''0.4'' color=''#A40000''>%2m</t>', _CursorTargetName, round (player distance _TargetUnit)];
_TargetDrawCtrl ctrlSetStructuredText _Hicks_text;
_TargetDrawCtrl ctrlCommit 0;
};
sleep 0.05;
};
_TargetDrawCtrl ctrlShow false;
_TargetDrawCtrl ctrlEnable false;
};
[] spawn Cursor_Main;