# API

## isCuffed (server)

```lua
-- returns true or false
local isCuffed = exports['uniq_gang']:isCuffed(source)
print(isCuffed)
```

## isGang (server)

```lua
-- returns true or false
local isgang = exports['uniq_gang']:isGang(source)
print(isgang)
```

## GetGangLevel (server)

```lua
local level = exports['uniq_gang']:GetGangLevel('uniq')
print(level)
```

## DoesGangExist (server)

```lua
local gang = exports['uniq_gang']:DoesGangExist('uniq')

if gang then
    print(json.encode(gang, {indent = true}))
end
```

## AddGangMoney (server)

```lua
RegisterCommand('test', function(source, args, raw)
	local name = args[1]
	local amount = tonumber(2)

	if name then
		local gang = exports['uniq_gang']:DoesGangExist(name)

		if gang then
			exports['uniq_gang']:AddGangMoney(gang.name, amount)
		end
	end
end)
```

## RemoveGangMoney (server)

```lua
RegisterCommand('test', function(source, args, raw)
	local name = args[1]
	local amount = tonumber(2)

	if name then
		local gang = exports['uniq_gang']:DoesGangExist(name)

		if gang then
			exports['uniq_gang']:RemoveGangMoney(gang.name, amount)
		end
	end
end)
```

## SetGangMoney (server)

```lua
RegisterCommand('test', function(source, args, raw)
	local name = args[1]
	local amount = tonumber(2)

	if name then
		local gang = exports['uniq_gang']:DoesGangExist(name)

		if gang then
			exports['uniq_gang']:SetGangMoney(gang.name, amount)
		end
	end
end)
```

## SetGangLevel (server)

```lua
-- min 1
-- max 4
RegisterCommand('test', function(source, args, raw)
	local name = args[1]
	
	if name then
		local gang = exports['uniq_gang']:DoesGangExist(name)

		if gang then
			exports['uniq_gang']:SetGangLevel(gang.name, 1)
		end
	end
end)
```

## GetGangMoney (server)

```lua
exports.uniq_gang:GetGangMoney('uniq')
```
