Client
Functions

Client functions

getPlayer

This returns the player, it only contains player data and no player functions.

returns:

  • player: table
local player = NDCore.getPlayer()

NDCore.getPlayersFromCoords

getPlayersFromCoords

Get the local playerId of the closest player from coords. Limited to players known to the client.

parameters

  • distance: number
  • coords: vector3

returns

  • closestPlayer: number
local closestPlayer = NDCore.getPlayersFromCoords(distance, coords)

notify

Notify on the player, this checks for which notification script is used.

NDCore.notify(...)

createAiPed

Create a static npc that can be interacted with.

parameters

  • info: table
    • model: string | number
    • blip: table
      • sprite: number
      • scale: number
      • color: number
      • label: string
      • groups: table > example: {"swat", "admin"}
    • anim: table
      • dict: string
      • clip: string
    • options: table > ox_target (opens in a new tab) options

returns id: number

NDCore.createAiPed(info)

removeAiPed

Remove a created ai ped.

parameters id: number

NDCore.removeAiPed(id)
example
local id = NDCore.createAiPed(info)
NDCore.removeAiPed(id)