Wiki

Clone wiki

EFLC-MP LUA / drawRect

Description

Draws a 2D rectangle on the player screen.

Positions and sizes used by this function are relative to the screen size. Where 0.0 is 0, 0.5 is half and 1.0 is full

Parameters

Int playerid, Int drawClassId, Float x, Float y, Float sx, Float sy, Int rgba
Int playerid: player ID

Int drawClassId: Give this any number so you remove the rectangle later

Float x: screen pos x

Float y: screen pos y

Float sx: rectangle size x

Float sy: rectangle size y

Int rgba: RGBA hex

Return values


Example

(https://bitbucket.org/Suge/eflc-mp-lua/src/master/filterscripts/screenDrawing.lua)

Updated