Custom Framework
Setup
-- editable/shared/config.lua
Config.Framework = "custom"File
Side
Server Stubs
CustomFramework.Server = {}
-- Return a table of online player server IDs.
CustomFramework.Server.GetPlayers = function()
return {}
end
-- Return the player object for the given source, or nil.
CustomFramework.Server.GetPlayer = function(src)
return nil
end
-- Return the unique character/player identifier string.
CustomFramework.Server.GetIdentifier = function(src)
return nil
end
-- Return the display name of the player.
CustomFramework.Server.GetPlayerName = function(src)
return 'Unknown'
end
-- Return the job name and grade level.
-- @return string|nil, number
CustomFramework.Server.GetPlayerJob = function(src)
return nil, 0
end
-- Return the permission group of the player (e.g. "admin", "user").
CustomFramework.Server.GetPlayerGroup = function(src)
return nil
end
-- Return the money amount for the given type ("cash", "bank", "black").
CustomFramework.Server.GetMoney = function(src, mtype)
return 0
end
-- Add money. Return true on success.
CustomFramework.Server.AddMoney = function(src, amount, mtype, reason)
return false
end
-- Remove money. Return true on success.
CustomFramework.Server.RemoveMoney = function(src, amount, mtype, reason)
return false
endClient Stubs
Example (OX Core)
Last updated