Renderer
Note
All the functions bellow must be called from within a render callback
Functions
DrawLine()
Parameters
Parameter |
Type |
Description |
x |
float |
Start X |
y |
float |
Stary Y |
x1 |
float |
End X |
y1 |
float |
End Y |
col |
Color |
Color of the line |
Example
| Cheat.RegisterCallback("render",function()
Renderer:DrawLine(0,0,200,200,Color(255,0,0,255))
end)
|
This code will run every frame and will render red line.
DrawText()
Parameters
Parameter |
Type |
Description |
x |
float |
Start X |
y |
float |
Stary Y |
text |
string |
Text |
col |
Color |
Color of the text |
size |
float |
Size of the font |
centered |
bool |
Whether the text should be centered |
Example
| Cheat.RegisterCallback("render",function()
Renderer:DrawText(200,200,"Hello from lua",Color(255,255,255,255),18,true)
end)
|
This code will run every frame and will render white text that is centered.
DrawFilledRect()
Parameters
Parameter |
Type |
Description |
x |
float |
Start X |
y |
float |
Stary Y |
x1 |
float |
End X |
y1 |
float |
End Y |
col |
Color |
Color of the rectangle |
rounding |
float |
If > 0 then the corners will be rounded |
Example
| Cheat.RegisterCallback("render",function()
renderer:DrawRectFilled(50,50,550,550,Color(50,50,50,200),9)
end)
|
This code will run every frame and will render a transparent black filled rectangle with rounded corners.
DrawRect()
Parameters
Parameter |
Type |
Description |
x |
float |
Start X |
y |
float |
Stary Y |
x1 |
float |
End X |
y1 |
float |
End Y |
col |
Color |
Color of the rectangle |
rounding |
float |
If > 0 then the corners will be rounded |
Example
| Cheat.RegisterCallback("render",function()
renderer:DrawRect(50,50,550,550,Color(50,50,50,200),9)
end)
|
This code will run every frame and will render a transparent black rectangle with rounded corners.