#How can I override the PlayerData template?
1 messages · Page 1 of 1 (latest)
return function(Vargs)
local server = Vargs.Server
local service = Vargs.Service
local Settings = server.Settings
local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps =
server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps
Core.DefaultPlayerData = function(p)
return {
Custom = {
Test = "..."
},
Donor = {
Cape = {
Image = "0";
Color = "White";
Material = "Neon";
};
Enabled = false;
};
Banned = false;
TimeBan = false;
AdminNotes = {};
Keybinds = {};
Aliases = {};
Client = {};
Warnings = {};
}
end;
end
works
I'd suggest function hooking like so, you don't have to change it in case Adonis decides to add new values if you do it this way
local oldFunc = Core.DefaultPlayerData
Core.DefaultPlayerData = function(p)
local ret = oldFunc(p) --// This calls what the function is in standard adonis
ret.Custom = { --// You can add your custom properties here now and don't have to worry about updating it when adonis adds new values
test = "..."
}
return ret
end
Ok, thanks