Exports
GetSlots(playerId)
Use it to retrieve the current character slots from a player.
parameters:
playerId
number
: The player server ID
returns:
slots
number
local slots = exports['av_multicharacter']:GetSlots(playerId)
print(slots)
AddSlot(playerId, amount, temp)
Adds an extra slot to the designed player ID.
parameters:
playerId
number
: The player server ID.slots
number
: The amount of slots to add.temp?
boolean:
If true, this extra slot will be temporal and will be available until next server restart.
returns:
added
boolean
local added = exports['av_multicharacter']:AddSlot(playerId, amount, temp)
RemoveSlot(playerId, amount)
Removes X character slot(s) from the desired player.
parameters:
playerId
number
: The player server ID.slots
number
: The amount of slots to remove
returns:
slots
number:
Current player slots
local currentSlots = exports['av_multicharacter']:GetSlots(playerId)
print(currentSlots) -- extra slots = 5
local newSlots = exports['av_multicharacter']:RemoveSlot(playerId, 1)
print(newSlots) -- extra slots = 4
Last updated