Development
You can develop your own Data Provider if the default ones do not match your requirements. You could create a provider that interacts with a web service, for example.
PROVIDER.Fallback
Required: Yes
Type: String
Description: Sets the Data Provider to fall back to should this provider fail.
PROVIDER.Fallback = 'pdata'
PROVIDER:GetData(ply, callback)
Required: Yes
Arguments: Player ply, Function callback
Realm: Server
Description: Called when PointShop requests data for a player that has joined.
function PROVIDER:GetData(ply, callback)
callback(10, {}) -- returns 10 points and no items
end
PROVIDER:SetData(ply, points, items)
Required: Yes
Arguments: Player ply, Number points, Table items
Realm: Server
Description: Called when PointShop requests that data is saved.
function PROVIDER:SetData(ply, points, items)
MsgN('Saving data for player', ply:Nick(), points, util.TableToJSON(items)) -- Outputs the data to the console.
end