# Server Side

{% hint style="warning" %}
If you're looking for Other Data then listed Here and in Client-Side Exports - Feel free to contact us on our [Discord Server](https://discord.gg/otherplanet)!
{% endhint %}

## getOrganisationsList

***

Return object

* identifier: `number`
* label: `string`

```lua
exports['op-crime']:getOrganisationsList()
```

## isTurfZoneInRivalry

***

Return false or true.

```lua
exports['op-crime']:isTurfZoneInRivalry(turfId)
```

## isPlayerTurfOwner

***

Return false or true.

```lua
exports['op-crime']:isPlayerTurfOwner(playerId, turfId)
```

## getPlayerTurfZone

***

Return index of player turf zone or nil. Useful for drugs selling script integrations.

```lua
exports['op-crime']:getPlayerTurfZone(source)
```

## getPlayerOrganisation

***

Return player organisation data object.

```lua
exports['op-crime']:getPlayerOrganisation(identifier)
```

* identifier: `string`<br>

Data Object:

* orgIndex: `number`
* player: `table`
  * identifier: `string`
  * totalTime: `string`
  * rank: `string`
  * status: `string`
* orgData: `table`

## getOrganisation

***

Return organisation object.

```lua
exports['op-crime']:getOrganisation(id)
```

* id: `number`

***

## Server Side Events:

Add Organisation EXP

```lua
op-crime:addOrganisationEXP
```

Data:

* `orgId`: number;
* `amount`: number;

Example usage:

```lua
TriggerEvent('op-crime:addOrganisationEXP', 5, 250)
```

***

Add Organisation Money

```
op-crime:addOrganisationMoney
```

Data:

* `orgId`: number;
* `amount`: number;
* `account`: string; (balance/dirtymoney)

Example usage:

```lua
TriggerEvent('op-crime:addOrganisationMoney', 5, 100000, "dirtymoney")
```

***

Remove Organisation Money

```
op-crime:removeOrganisationMoney
```

Data:

* `orgId`: number;
* `amount`: number;
* `account`: string; (balance/dirtymoney)

Example usage:

```lua
TriggerEvent('op-crime:removeOrganisationMoney', 5, 50000, "balance")
```

***

Add Organisation Missions Done

```
op-crime:addOrgMissionsDone
```

Data:

* `orgId`: number;
* `amount`: number;

Example usage:

```lua
TriggerEvent('op-crime:addOrgMissionsDone', 5, 15)
```

***

Add Organisation Zones Captured

```
op-crime:addZonesCaptured
```

Data:

* `orgId`: number;
* `amount`: number;

Example usage:

```lua
TriggerEvent('op-crime:addZonesCaptured', 5, 8)
```

***

## Zone Captured Event

`AddEventHandler('op-crime:zoneCaptured', newOrgId, oldOrgId, ZoneConfig)`

This is server-side event which is called when PVP zone is properly captured.

## decreaseSelected

***

Decrease Selected gang loyality in selected turf zone

```lua
exports['op-crime']:decreaseSelected(jobId, decreaseAmount, turfIndex)
```

* jobId: `string`
* decreaseAmount: `number`
* turfIndex: `string`<br>

## increaseSelected

***

Increase Selected gang loyality in selected turf zone

```lua
exports['op-crime']:increaseSelected(jobId, amount, turfIndex)
```

* jobId: `string`
* amount: `number`
* turfIndex: `string`<br>

## increaseZoneLoyality

***

Increase Selected gang loyality in selected turf zone and decrease every other gang loyality in this zone

```lua
exports['op-crime']:increaseZoneLoyality(jobId, amount, turfIndex, decreaseAmount)
```

* jobId: `string`
* amount: `number`
* turfIndex: `string`
* decreaseAmount: `number`<br>
