Lua library for RedM which allows to select players around you by clicking on the screen at their position.
local NPlayerSelector = nil
TriggerEvent('mega_nplayerselector:load', function (data)
NPlayerSelector = data
end)
NPlayerSelector:onPlayerSelected(function (data)
-- do stuff...
-- data = { id = ... }
NPlayerSelector:deactivate()
end)
NPlayerSelector:setRange(5)
NPlayerSelector:activate()