{"id":19436722,"url":"https://github.com/ardelan869/fivem-statebag-eventsystem","last_synced_at":"2025-04-24T21:31:31.257Z","repository":{"id":249453558,"uuid":"831538913","full_name":"ardelan869/fivem-statebag-eventsystem","owner":"ardelan869","description":"Uses FiveM's built-in StateBags to route events.","archived":false,"fork":false,"pushed_at":"2024-07-22T15:12:19.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-23T00:38:27.511Z","etag":null,"topics":["cfx-resource","fivem","fivem-lua","fivem-script","lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardelan869.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-20T21:26:10.000Z","updated_at":"2024-07-22T15:12:24.000Z","dependencies_parsed_at":"2024-07-21T00:25:15.019Z","dependency_job_id":"4e161c6d-d650-44df-9657-17e850632346","html_url":"https://github.com/ardelan869/fivem-statebag-eventsystem","commit_stats":null,"previous_names":["ardelan869/fivem-statebag-eventsystem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardelan869%2Ffivem-statebag-eventsystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardelan869%2Ffivem-statebag-eventsystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardelan869%2Ffivem-statebag-eventsystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardelan869%2Ffivem-statebag-eventsystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardelan869","download_url":"https://codeload.github.com/ardelan869/fivem-statebag-eventsystem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223968268,"owners_count":17233445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfx-resource","fivem","fivem-lua","fivem-script","lua"],"created_at":"2024-11-10T15:12:26.874Z","updated_at":"2024-11-10T15:12:27.427Z","avatar_url":"https://github.com/ardelan869.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]  \n\u003e It has been tested, but it still could be unreliable or buggy. Use it at your own risk.\n\n\u003e [!NOTE]\n\u003eThis is just a fun little project I whipped up in about 10-20 minutes.\\\n\u003eIt might be safer than the normal event system, but I do not promise anything.\\\n\u003eExecutors like Eulen or RedEngine should still be able to trigger the \"StateBag-Events\" if the user knows the structure.\n\n# fivem-statebag-eventsystem\n\nUses FiveM's built-in StateBags to route events.\\\n\\\nThis script/file overwrites `RegisterNetEvent`, `AddEventHandler`, `TriggerEvent`, `TriggerServerEvent`, `TriggerClientEvent`.\\\nYou can use everything like you did before, the only difference is that it \"*uses a different routing*\".\n\n# Usage\n\nAdd the file `@resourceName/import.lua` into the `shared_scripts` section of your desired `fxmanifest.lua`.\\\n`@resourceName` refers to the name of the resource, name the resource as you desire.\n\n## Example\n\n- fxmanifest.lua\n```lua\nfx_version 'cerulean'\ngame 'gta5'\nlua54 'yes'\n\nshared_script '@fivem-statebag-eventsystem/import.lua'\nclient_script 'client.lua'\n```\n\n- client.lua\n```lua\nRegisterNetEvent('test', function(value1, value2)\n  print('value1', value1)\n  print('value2', value2)\nend)\n\nRegisterCommand('test', function()\n  TriggerEvent('test', '🐈', '🗣️')\nend)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardelan869%2Ffivem-statebag-eventsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardelan869%2Ffivem-statebag-eventsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardelan869%2Ffivem-statebag-eventsystem/lists"}