| description |
|---|
You can see some utils functions |
Load addon fonts
Break with \n the text after x characters in the line
{% hint style="warning" %} You need to use the function in the draw.DrawText function {% endhint %}
| Types | Arguments | Descriptions | Optional |
|---|---|---|---|
| string | text | The text to break | |
| number | max | The max of characters by line |
Return :
| Types | Parameters | Descriptions |
|---|---|---|
| string | newText | The broken text |
Example:
local text = "Lorem ipsum dolor sit amet, consectetur."
local breakText = AAS.BreakText(text, 25) -- Return a text with max 25 characters by lines
hook.Add("HUDPaint", "AAS:Documentation:BreakText", function()
print(breakText)
draw.DrawText(breakText, "DermaDefault", ScrW()/2, 50, Color(255, 255, 255), TEXT_ALIGN_CENTER)
end)Output:
Lorem ipsum dolor sit\n
amet, consectetur.Convert the Vector with the offset
| Types | Arguments | Descriptions | Optional |
|---|---|---|---|
| Vector | pos | The vector to convert | ❌ |
| Vector | offset | The offset | ❌ |
| Angle | ang | The angle | ❌ |
Return :
| Types | Parameters | Descriptions |
|---|---|---|
| Vector | newVector | The converted vector |
Convert the Angle with the offset
| Types | Arguments | Descriptions | Optional |
|---|---|---|---|
| Angle | ang | The angle to convert | ❌ |
| Vector | offset | The offset | ❌ |
Return :
| Types | Parameters | Descriptions |
|---|---|---|
| Angle | newAng | The converted angle |
Get the item table from the uniqueId
| Types | Arguments | Descriptions | Optional |
|---|---|---|---|
| number | uniqueId | The uniqueId where you want to get the item table | ❌ |
Return :
| Types | Parameters | Descriptions |
|---|---|---|
| itemTable | itemTable | The item table (or {} if not found) |