Character Slots
You can change the default slots a player can own in config/_config.lua
-- Character slots config
Config.Slots = {
default = 5, -- The default character slots a player can own by default
max = 5, -- Max slots a player can own, no matter if he bought them or is using VIP or whatever, X is the limit
}
Add Slots
To give extra slots to a specific player you have the following options:
1) Run your own code in server/editable/_main.lua > line 71
-- Retrieve the player slots
lib.callback.register('av_multicharacter:getSlots', function(source)
dbug("getSlots()")
local default = Config.Slots and Config.Slots['default'] or 3
local extra = GetSlots(source) or 0
dbug("slots:", default + extra)
-- You can run your own check here, this is just an EXAMPLE using av_vip
-- If player is VIP we will add an extra slot
local isVIP = exports['av_vip']:isVIP(source)
if isVIP then
extra += 1 -- Add 1 extra slot if player is VIP
end
-- Returns the sum from default slots a player can own + any extra slot we add
return (default + extra)
end)
2) Use export AddSlot(playerId, amount, temp) from your own script, this script can be an admin menu or a shop script, is on you to add it where you want and make it work. AV VIP already includes a shop where you can buy an extra character slot.
All exports detailed info can be found here: Exports
Last updated