DirkScripts
Register a task that can be started by the group leader from the server. When the server calls lib.startGroupTask, the execute callback runs on every group member's client.
lualib.registerGroupTask(id, data)
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique task identifier (must match the server-side task ID) |
| data | table | yes | Task definition |
| Field | Type | Description |
|---|---|---|
execute | function(args) | Called when the task starts on this client. Receives the args passed from startGroupTask |
kill | function(args) | Called when the task is ended via endGroupTask |
lualib.registerGroupTask('clean_cars', { execute = function(args) -- Runs on every group member's client print('Task started at zone:', args.zone) end, kill = function(args) -- Cleanup when task ends print('Task ended') end, })

Powered by
All you need for your FiveM server
Copyright Β© 2026 DirkScripts.
Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment providerβs exchange rate.
Daily dig available!
Hey you, you have free digs waiting