Character
nss_libs - Character
How to use
Client
Server
local name_of_admin_group = 'admin'
local example_player_id = 99 -- The server player id of a joined player
---@type NssLibsCharacterApi
character_api = exports.nss_libs:getCharacterApi(GetCurrentResourceName(), name_of_admin_group)
-- Add some money
character_api:addMoney(example_player_id, 1000)
-- Remove some money
character_api:subMoney(example_player_id, 999)
-- Check for money
if character_api:hasMoney(example_player_id, 1) then
print('Player has at least 1 money')
end
-- Get some information
print(character_api:getDiscordProfileUrl(example_player_id))
print(character_api:getSteamId(example_player_id))
print(character_api:getRedmCharacterName(example_player_id))TODO
Last updated
Was this helpful?