Exports

Server Exports πŸ–₯️

➀ AddStress

πŸ“Œ Adds stress to a specific player.

exports["nrg_stress"]:AddStress(source, value)
  • source (number) – Player server ID.

  • value (number) – Amount of stress to add.

βœ… Example:

exports["nrg_stress"]:AddStress(1, 15)

➑️ Adds 15 stress points to player ID 1.


➀ SetStress

πŸ“Œ Sets a specific stress value for a player.

exports["nrg_stress"]:SetStress(source, value)
  • source (number) – Player server ID.

  • value (number) – Exact stress level to assign.

βœ… Example:

exports["nrg_stress"]:SetStress(1, 50)

➑️ Sets the stress level of player ID 1 to 50.


➀ SetStressProof

πŸ“Œ Grants or removes immunity to specific stress sources.

exports["nrg_stress"]:SetStressProof(source, name, value)
  • source (number) – Player server ID.

  • name (string) – Stress type: Shooting, CarCrash, Fight, FastDriving, SeenPedKilled.

  • value (number) – 1 for immune, 0 to disable immunity.

βœ… Example:

exports["nrg_stress"]:SetStressProof(1, "Shooting", 1)

➑️ Grants player ID 1 immunity to stress caused by shooting.


➀ SetTemporaryProof

πŸ“Œ Temporarily reduces incoming stress for a player.

exports["nrg_stress"]:SetTemporaryProof(source, percent, time)
  • source (number) – Player server ID.

  • percent (number) – Percentage reduction (e.g., 50).

  • time (number) – Duration in seconds.

βœ… Example:

exports["nrg_stress"]:SetTemporaryProof(1, 50, 10)

➑️ Reduces stress gain by 50% for 10 seconds for player ID 1.


Client Exports πŸ‘¨πŸ»β€πŸ’Ό

➀ AddStress

πŸ“Œ Adds stress to the local player.

exports["nrg_stress"]:AddStress(value)
  • value (number) – Amount of stress to add.

βœ… Example:

exports["nrg_stress"]:AddStress(10)

➑️ Adds 10 stress points to the local player.


➀ GetStress

πŸ“Œ Retrieves the current stress level of the local player.

local stress = exports["nrg_stress"]:GetStress()

Returns: number – Current stress level.

βœ… Example:

print("Current stress:", exports["nrg_stress"]:GetStress())

➑️ Prints the local player’s stress level to the console.


➀ SetStress

πŸ“Œ Sets the local player’s stress level.

exports["nrg_stress"]:SetStress(value)
  • value (number) – Stress level to assign.

βœ… Example:

exports["nrg_stress"]:SetStress(20)

➑️ Sets the local player's stress level to 20.


➀ SetStressProof

πŸ“Œ Grants or removes immunity to a specific stress source for the local player.

exports["nrg_stress"]:SetStressProof(name, value)
  • name (string) – Shooting, CarCrash, Fight, FastDriving, SeenPedKilled.

  • value (number) – 1 for immune, 0 to disable.

βœ… Example:

exports["nrg_stress"]:SetStressProof("FastDriving", 1)

➑️ Grants immunity to stress from fast driving.


➀ SetTemporaryProof

πŸ“Œ Applies temporary stress reduction to the local player.

exports["nrg_stress"]:SetTemporaryProof(percent, time)
  • percent (number) – Percentage reduction.

  • time (number) – Duration in seconds.

βœ… Example:

exports["nrg_stress"]:SetTemporaryProof(30, 5)

➑️ Reduces stress gain by 30% for 5 seconds.


➀ GetStressProof

πŸ“Œ Returns the current immunity settings for the local player.

local proofTable = exports["nrg_stress"]:GetStressProof()

Returns: table – Immunity flags for each stress type.

βœ… Example:

local proof = exports["nrg_stress"]:GetStressProof()
print(json.encode(proof))

➑️ Displays the player's current immunity configuration.

Last updated