cloud-boltEvents

⚑ Events

You can use these events to integrate Space Addictions with other scripts, such as your inventory or notification systems.


πŸ“‘ Client Events

1. πŸ’Š space_addictions:data Description: Receives the player's current addiction data from the server. Updates the UI.

Parameters:

  • data (table): Keys are drug names, values are remaining time (minutes) before withdrawal begins

TriggerClientEvent('space_addictions:data', source, addiction_data)

2. ⚑ space_addictions:setStrength Description: Sets the player's current drug toxicity level (immunity).

Parameters:

  • strength (number): Current toxicity value

TriggerClientEvent('space_addictions:setStrength', source, drug_strength_data)

3. πŸ’‰ space_addictions:useDrug Description: Triggered when a player uses a drug. Initiates all client-side effects (visuals, animations, etc.).

Parameters:

  • drugName (string): Item name of the drug used

  • gotAddicted (boolean): True if addiction occurred

  • purity (number): Purity level of the drug (if system enabled)


4. πŸ’Š space_addictions:useMedication Description: Triggered when a player uses an item that cures addiction.


5. πŸ’Š space_addictions:useRemedy Description: Triggered when a player uses an item that recovers immunity (reduces toxicity).

Parameters:

  • itemName (string): Item name of the remedy used


6. 🧹 space_addictions:notifyClean Description: Fired when a player's addictions and toxicity have been cleared (e.g., via admin command).


πŸ–₯️ Server Events

1. ⚑ space_addictions:server:updateStrength Description: Sent from the client to the server to update and save the player's toxicity level.

Parameters:

  • newStrength (number): New toxicity value to be saved

Last updated