Gamemode Compatibility
How to add a compatibility with your gamemode.
You can modify this function into the file advanced_accessories/shared/sh_functions.lua
function PLAYER:AASGetMoney()
if DarkRP then -- This is the table of your gamemode
return self:getDarkRPVar("money") -- This is the function for get the money
elseif MyGamemode then
return self:getMyGamemodeMoney()
end
return 0
end
You can modify this function into the advanced_accessories/server/sv_functions.lua
function PLAYER:AASAddMoney(price)
if DarkRP then
self:addMoney(price)
elseif ix then
if self:GetCharacter() != nil then
local money = self:AASGetMoney()
self:GetCharacter():SetMoney(money + price)
end
elseif nut then
if self:getChar() != nil then
local money = self:AASGetMoney()
self:getChar():setMoney(money + price)
end
end
end
Last updated
Was this helpful?