Exports
All available client and server exports for use.
Client
openPerksUi
This function openthe perk related user interface (UI) elements on the player's screen.
This function does not require any parameters.
Usage Example:
exports['zat-perks']:openPerksUi()
In this example:
The perks UI elements is displayed on the player's screen.
HasPerk
This function checks if the player has a specified perk or not
exports['zat-perks']:HasPerk(id)
id
(string)The perk ID to check.
Returns:
boolean
Returns
true
if the player has the perk,false
otherwise.
Usage Example:
local hasPerk = exports['zat-perks']:HasPerk('rv-chimist')
if hasPerk then
print("The player has the perk RV Chimist")
else
print("The player does not have the perk RV Chimist")
end
AddReputationPoints
This function adds reputation points to the player
exports['zat-perks']:AddReputationPoints(amount)
amount
(number)The Amount to add to the players' reputation
Usage Example:
exports['zat-perks']:AddReputationPoints(3)
Server
HasPerk
This function checks if the player has a specified perk or not
exports['zat-perks']:HasPerk(source, id)
id
(string)The perk ID to check.
Returns:
boolean
Returns
true
if the player has the perk,false
otherwise.
Usage Example:
local hasPerk = exports['zat-perks']:HasPerk(source, 'rv-chimist')
if hasPerk then
print("The player has the perk RV Chimist")
else
print("The player does not have the perk RV Chimist")
end
AddReputationPoints
This function adds reputation points to the player
exports['zat-perks']:AddReputationPoints(source, amount)
amount
(number)The Amount to add to the players' reputation
Usage Example:
exports['zat-perks']:AddReputationPoints(source, 3)
Last updated