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:
β‘οΈ Sets the stress level of player ID 1 to 50.
β€ SetStressProof
π Grants or removes immunity to specific stress sources.
source(number) β Player server ID.name(string) β Stress type:Shooting,CarCrash,Fight,FastDriving,SeenPedKilled.value(number) β1for immune,0to disable immunity.
β Example:
β‘οΈ Grants player ID 1 immunity to stress caused by shooting.
β€ SetTemporaryProof
π Temporarily reduces incoming stress for a player.
source(number) β Player server ID.percent(number) β Percentage reduction (e.g., 50).time(number) β Duration in seconds.
β Example:
β‘οΈ Reduces stress gain by 50% for 10 seconds for player ID 1.
Client Exports π¨π»βπΌ
β€ AddStress
π Adds stress to the local player.
value(number) β Amount of stress to add.
β Example:
β‘οΈ Adds 10 stress points to the local player.
β€ GetStress
π Retrieves the current stress level of the local player.
Returns: number β Current stress level.
β Example:
β‘οΈ Prints the local playerβs stress level to the console.
β€ SetStress
π Sets the local playerβs stress level.
value(number) β Stress level to assign.
β Example:
β‘οΈ Sets the local player's stress level to 20.
β€ SetStressProof
π Grants or removes immunity to a specific stress source for the local player.
name(string) βShooting,CarCrash,Fight,FastDriving,SeenPedKilled.value(number) β1for immune,0to disable.
β Example:
β‘οΈ Grants immunity to stress from fast driving.
β€ SetTemporaryProof
π Applies temporary stress reduction to the local player.
percent(number) β Percentage reduction.time(number) β Duration in seconds.
β Example:
β‘οΈ Reduces stress gain by 30% for 5 seconds.
β€ GetStressProof
π Returns the current immunity settings for the local player.
Returns: table β Immunity flags for each stress type.
β Example:
β‘οΈ Displays the player's current immunity configuration.
Last updated