render
Render related functions
All of this functions must be run on this event for them to work
https://zarzel.gitbook.io/zarscript2/documentation/module/events#on_render_screen
render.rect
Argument
Type
Description
x
Number
X pos
y
Number
Y pos
x1
Number
End X pos
y1
Number
End Y pos
r
Number
Red 0-255
g
Number
Green 0-255
b
Number
Blue 0-255
a
Number
Alpha 0-255
Draws a filled rect on the screen
render.line
Argument
Type
Description
x
Number
X pos
y
Number
Y pos
x1
Number
End X pos
y1
Number
End Y pos
size
Number
Line size
r
Number
Red 0-255
g
Number
Green 0-255
b
Number
Blue 0-255
a
Number
Alpha 0-255
Draws a line on the screen
render.player_head
Argument
Type
Description
x
Number
X pos
y
Number
Y pos
size
Number
Size of the player's head
entity_id
Number
ID of the entity to draw
Draws the player's skin head
render.circle
Argument
Type
Description
x
Number
X pos
y
Number
Y pos
degrees
Number
Degrees of the circle
rotation
Number
Rotation of the circle
diameter
Number
Circle size
r
Number
Red 0-255
g
Number
Green 0-255
b
Number
Blue 0-255
a
Number
Alpha 0-255
Renders a circle on your screen.
render.player
Argument
Type
Description
x
Number
X pos
y
Number
Y pos
size
Number
How big will the player be
yaw
Number
Yaw where the player will be looking
pitch
Number
Pitch where the player will be looking
entity_id
Number
ID of the entity to draw
Renders the full player on the screen
render.string
Argument
Type
Description
text
String
Text to render
x
Number
X pos
y
Number
Y pos
r
Number
Red 0-255
g
Number
Green 0-255
b
Number
Blue 0-255
a
Number
Alpha 0-255
Renders text on your screen
render.string_shadow
Argument
Type
Description
text
String
Text to render
x
Number
X pos
y
Number
Y pos
r
Number
Red 0-255
g
Number
Green 0-255
b
Number
Blue 0-255
a
Number
Alpha 0-255
Renders text with shadow on your screen
render.get_string_width
Argument
Type
Description
text
String
Text
Returns the width of the specified text
render.scale
Argument
Type
Description
scaling
Number
Scale multiplier
Scales the next drawing functions, for example, 2 multiplier will make the drawings twice as big
render.world_to_screen
Argument
Type
Description
x
Number
X position
y
Number
Y position
z
Number
Z position
Returns the screen position of the desired coordinates
render.show_gui
Argument
Type
Description
gui_table
Table
Table containing all the gui functions
This function is similar to the module_manager.register
function, but instead of registering anything, it displays a custom GUI you can make.
Further information for the events here
render.draw_image
Argument
Type
Description
url
String
URL where the image is located
x
Number
X position
y
Number
Y position
width
Number
Width of image display
height
Number
Height of image display
Draws the image thats contained in the URL, for this method to work you must have enabled unsafe script functionality
Last updated
Was this helpful?