-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Players / Deregister #1
Comments
Hey, About the deregister, there's an export called |
If you want to add an interaction on a player with server id of 2 exports['interactionMenu']:create {
player = 2,
offset = vec3(0, 0, 0),
maxDistance = 1.0,
options = {
{
label = 'Just On Player Id: 2',
icon = 'fa fa-person',
action = {
type = 'sync',
func = function(data)
Util.print_table(data)
end
}
}
}
} If you want to have a global interaction with all player peds exports['interactionMenu']:createGlobal {
type = 'players',
offset = vec3(0, 0, 0),
maxDistance = 1.0,
options = {
{
label = '[Debug] On All Players',
icon = 'fa fa-person',
action = {
type = 'sync',
func = function(data)
if not data.player then return end
local player = data.player
Util.print_table(player)
end
}
}
}
} |
Ah okay, is there a way to deregister as well? So when done using it, i can disable it straight away? |
Ah okay hopefully it's something that will be sorted soon, since it's with out doubt going to be usefull. |
It's already there and you can use it. However, garbage collection is missing which means it doesn't clean up the memory it just disables the menu. exports['interactionMenu']:remove(id) |
Hey,
Love the idea you got going here.
Noticed you can target ped's wich is a very general term, what about specific players insted, so it could be used together with something like ox_inventory for give actions.
And a deregister, cant find any info so fare on how to deregister something you registred.
The text was updated successfully, but these errors were encountered: