> For the complete documentation index, see [llms.txt](https://kobralost.gitbook.io/advanced-accessory-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kobralost.gitbook.io/advanced-accessory-system/tutorials/gamemode-compatibility.md).

# Gamemode Compatibility

How to add a compatibility with your gamemode.

​

{% hint style="info" %}
You can modify this function into the file **advanced\_*****accessories/shared/sh\_functions.lua***
{% endhint %}

```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
```

{% hint style="info" %}
You can modify this function into the **advanced\_accessories/server/sv\_functions.lua**
{% endhint %}

```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
```
