Exports
This section is aimed at developers. Basic scripting knowledge will help you get the most out of it.
crm-core provides built-in Notify and TextUI exports that you can use in any script, not just CoreM scripts.
These exports allow you to show interaction prompts and notifications consistently across your server.
showInteract
Displays an interaction prompt on the screen.
exports["crm-core"]:showInteract({
crm_key = "E",
crm_icon = "fa-solid fa-globe",
crm_text = "Open my menu",
})Parameters
crm_key(string) – Key to display (e.g. “E”, “F”)crm_icon(string) – FontAwesome icon classcrm_text(string) – Text message displayed to the player
hideInteract
Hides the current interaction prompt.
exports['crm-core']:hideInteract({
crm_fade = true
})Parameters
crm_fade(boolean) –true= fade out animation,false= hide immediately
notify
Displays a notification on the screen.
exports['crm-core']:notify({
crm_type = "crm-primary",
crm_msg = "Test notification",
crm_pos = "top",
crm_time = 5000,
})Parameters
crm_type(string) – Notification style. Options:"crm-primary","crm-danger","crm-success","crm-warning"crm_msg(string) – Message to displaycrm_pos(string) – Position:"top-left","top","top-right","center-left","center","center-right","bottom-left","bottom","bottom-right"crm_time(number) – Display duration in milliseconds (e.g.5000)