{"id":24906084,"url":"https://github.com/mikepea1993/frsk_utils","last_synced_at":"2025-07-07T13:34:56.996Z","repository":{"id":268454178,"uuid":"904416743","full_name":"MikePea1993/Frsk_Utils","owner":"MikePea1993","description":"Frsk_Utils is a Redm Script that allows you to create dynamic and reusable Prompts and notifications","archived":false,"fork":false,"pushed_at":"2024-12-16T22:37:03.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T00:37:45.354Z","etag":null,"topics":["css","html","html-css-javascript","js","lua","lua-script","reddeadredemption2","redm"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikePea1993.png","metadata":{"files":{"readme":"readME.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-16T21:08:21.000Z","updated_at":"2025-01-05T16:10:12.000Z","dependencies_parsed_at":"2024-12-16T22:03:14.600Z","dependency_job_id":null,"html_url":"https://github.com/MikePea1993/Frsk_Utils","commit_stats":null,"previous_names":["mikepea1993/frsk_utils"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikePea1993%2FFrsk_Utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikePea1993%2FFrsk_Utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikePea1993%2FFrsk_Utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikePea1993%2FFrsk_Utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikePea1993","download_url":"https://codeload.github.com/MikePea1993/Frsk_Utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245932242,"owners_count":20696020,"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":["css","html","html-css-javascript","js","lua","lua-script","reddeadredemption2","redm"],"created_at":"2025-02-02T00:38:17.578Z","updated_at":"2025-03-27T22:21:55.002Z","avatar_url":"https://github.com/MikePea1993.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FRSK Utils\n\nA utility script for RedM that provides dynamic prompt creation and notification systems.\n\n## Features\n\n- Easy-to-use prompt creation system\n- Modern notification system\n- Automatic update checker via GitHub releases\n- Clean, modern UI design\n- Event-based prompt activation handling\n\n## Installation\n\n1. Copy the `frsk_utils` folder to your resources directory\n2. Add `ensure frsk_utils` to your server.cfg\n3. Make sure to load this resource before any resources that depend on it\n\n## Usage\n\n### Prompt System\n\n#### Creating a Prompt\n\n```lua\nexports[\"frsk_utils\"]:CreatePrompt(name, key, text, group, action)\n```\n\nParameters:\n\n- `name`: Unique identifier for the prompt\n- `key`: Key to press (must be defined in Config.Keys)\n- `text`: Text to display on the prompt\n- `group`: Optional prompt group\n- `action`: Action identifier for when prompt is activated\n\n#### Showing/Hiding Prompts\n\n```lua\nexports[\"frsk_utils\"]:ShowPrompt(name)\nexports[\"frsk_utils\"]:HidePrompt(name)\n```\n\n#### Removing Prompts\n\n```lua\nexports[\"frsk_utils\"]:RemovePrompt(name)\n```\n\n#### Handling Prompt Activation\n\n```lua\nAddEventHandler('frsk_utils:promptActivated', function(name, action)\n    -- Handle prompt activation\nend)\n```\n\n### Notification System\n\n#### Showing Notifications\n\n```lua\nexports[\"frsk_utils\"]:ShowNotification(message, type, duration)\n```\n\nParameters:\n\n- `message`: Text to display in the notification\n- `type`: (Optional) Type of notification (default: 'info')\n- `duration`: (Optional) How long to show the notification in ms (default: 5000)\n\n## Example Usage\n\n### Basic Prompt Example\n\n```lua\n-- Create a prompt\nexports[\"frsk_utils\"]:CreatePrompt('interaction', 'G', 'USE', nil, 'INTERACT')\n\n-- Show prompt when player is near interaction point\nCitizen.CreateThread(function()\n    while true do\n        Citizen.Wait(0)\n        local coords = GetEntityCoords(PlayerPedId())\n        local dist = #(coords - vector3(0.0, 0.0, 0.0))\n\n        if dist \u003c 2.0 then\n            exports[\"frsk_utils\"]:ShowPrompt('interaction')\n        else\n            exports[\"frsk_utils\"]:HidePrompt('interaction')\n        end\n    end\nend)\n\n-- Handle prompt activation\nAddEventHandler('frsk_utils:promptActivated', function(name, action)\n    if action == 'INTERACT' then\n        -- Do something when prompt is activated\n    end\nend)\n```\n\n### Basic Notification Example\n\n```lua\n-- Show a simple notification\nexports[\"frsk_utils\"]:ShowNotification('Hello World!')\n\n-- Show a notification with custom duration (7 seconds)\nexports[\"frsk_utils\"]:ShowNotification('Custom duration notification', nil, 7000)\n\n-- Show multiple notifications\nexports[\"frsk_utils\"]:ShowNotification('First notification')\nCitizen.SetTimeout(2000, function()\n    exports[\"frsk_utils\"]:ShowNotification('Second notification')\nend)\n```\n\n## Adding to Your Resource\n\n1. Add the dependency to your fxmanifest.lua:\n\n```lua\ndependencies {\n    'frsk_utils'\n}\n```\n\n2. Use the exports in your scripts as shown in the examples above\n\n## Update System\n\n- The script automatically checks for updates when started\n- Updates are checked against the latest GitHub release\n- Server owners will be notified in the console if an update is available\n\n## Support\n\nIf you need help or want to report bugs, join our Discord: [Your Discord Link]\n\n## License\n\nThis project is licensed under [Your License Choice]\n\n## Credits\n\nCreated by FRSK Development\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikepea1993%2Ffrsk_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikepea1993%2Ffrsk_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikepea1993%2Ffrsk_utils/lists"}