DirkScripts
Docs
Gizmo
βΉοΈ Client Module - FiveM only
#lib.gizmo
Open a 3D manipulation gizmo on an entity. The player can move, rotate, and scale the entity using the gizmo handles.
lualocal handle = lib.gizmo(entity) handle.onLeave(function() print('Gizmo closed') end) -- Or close it programmatically handle.close()
| Parameter | Type | Required | Description |
|---|---|---|---|
| entity | number | yes | Entity handle to manipulate |
#Return Value
Returns a table with:
| Field | Type | Description |
|---|---|---|
onLeave | function(cb) | Register a callback for when the gizmo is closed |
close | function() | Close the gizmo programmatically |
The gizmo supports three modes: translation (move), rotation, and scale. Players can switch between modes using the gizmo controls.
