AddPlayer
AddPlayer
This export does the equivalent of AddGlobalPlayer
Arguments
Argument
Description
identifier
The unique string identifier of this target, in-case you want to remove it later
options
The options for the target (see Options Formatting)
Usage
exports['nyx2_target']:AddPlayer(identifier, options)
Example
exports['nyx2_target']:AddPlayer('debug_global_player', {
{
title = 'Escort Player',
icon = 'fas fa-user',
action = function(player)
ExecuteCommand('escort '..player)
end,
canInteract = function(player)
return true
end,
job = {'police', 'ambulance'},
gang = nil,
citizenid = nil,
item = nil,
}
})
RemovePlayer
This export removes a player target that you have created.
Arguments
Argument
Description
identifier
The unique string identifier of the target you want to remove
Example
exports['nyx2_target']:RemovePlayer('debug_global_player')
Last updated