# Server

## isPlayerNew

Check if the Player is whitelisted or not.

<mark style="color:red;">**Parameters**</mark>\
**playerId** - `number` - The ServerId of the player

<mark style="color:green;">**Returns**</mark>\
**isWhitelisted** - `boolean` - whether the player is whitelistet or not

```lua
local isWhitelisted = exports.msk_whitelist:isPlayerNew(playerId)
```

## whitelistPlayer

Whitelist a Player.

<mark style="color:red;">**Parameters**</mark>\
**playerId** - `number` - The ServerId of the player who whitelist someone - ***Optional***\
**targetData** - `table` - PlayerData of the player who was whitelisted

```lua
exports.msk_whitelist:whitelistPlayer(playerId, targetData)

-- If Server whitelisted the player
exports.msk_whitelist:whitelistPlayer(nil, targetData)

-- targetData
{source = targetId}
{identifier = targetIdentifier}

-- Examples
exports.msk_whitelist:whitelistPlayer(playerId, {source = 1}) 
exports.msk_whitelist:whitelistPlayer(playerId, {identifier = 'char1:83556bdis9d7sj3'})
```
