Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 2.69 KB

File metadata and controls

94 lines (63 loc) · 2.69 KB
description
You can see some utils functions

Utils

AAS.LoadFonts()

Load addon fonts

AAS.BreakText(text, max)

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.

AAS.ConvertVector(pos, offset, ang)

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

AAS.ConvertAngle(ang, offset)

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

AAS.GetTableById(uniqueId)

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)