@@ -28,6 +28,30 @@ MSK.HelpNotification = function(text)
28
28
DisplayHelpTextFromStringLabel (0 , 0 , 1 , - 1 )
29
29
end
30
30
31
+ MSK .Draw3DText = function (coords , text , size , font )
32
+ local coords = type (coords ) == " vector3" and coords or vec (coords .x , coords .y , coords .z )
33
+ local camCoords = GetGameplayCamCoords ()
34
+ local distance = # (coords - camCoords )
35
+
36
+ if not size then size = 1 end
37
+ if not font then font = 0 end
38
+
39
+ local scale = (size / distance ) * 2
40
+ local fov = (1 / GetGameplayCamFov ()) * 100
41
+ scale = scale * fov
42
+
43
+ SetTextScale (0.0 , scale * 0.5 )
44
+ SetTextFont (font )
45
+ SetTextProportional (1 )
46
+ SetTextColour (255 , 255 , 255 , 255 )
47
+ BeginTextCommandDisplayText (' STRING' )
48
+ SetTextCentre (true )
49
+ AddTextComponentSubstringPlayerName (text )
50
+ SetDrawOrigin (coords .xyz , 0 )
51
+ EndTextCommandDisplayText (0.0 , 0.0 )
52
+ ClearDrawOrigin ()
53
+ end
54
+
31
55
MSK .Table_Contains = function (table , value )
32
56
if type (value ) == ' table' then
33
57
for k , v in pairs (table ) do
@@ -115,11 +139,6 @@ AddEventHandler("msk_core:notification", function(text)
115
139
MSK .Notification (text )
116
140
end )
117
141
118
- RegisterNetEvent (" msk_core:helpNotification" )
119
- AddEventHandler (" msk_core:helpNotification" , function (text )
120
- MSK .HelpNotification (text )
121
- end )
122
-
123
142
CreateThread (function ()
124
143
while true do
125
144
local sleep = 100
0 commit comments