so how does this really work so if i had something link to it like f2 to be my phone that pops up how could i make it work with this action menu that it will pop up once u hit that buttom can u make an example plz im just trying to fingure this out
Decon made example with handsup, follow that
You put an extra â>â should be:
<button onclick="ResetMenu()">Home</button>
Good Catch, I must have typed that out manually. I fixed it in my original post.
Could someone help me or join my discord? I have the stuff good for the names. But when I click on them it doesnât do what it says⌠How do you make it do the action? And what do you need? Thanks again for making this.
This is everything that I believe is relivent.
bruh u need to assign functtions to those differren buttons at the moment they dont do anything
Ok thanks. Iâll look up there.
So like this?
RegisterNUICallback( "ButtonClick", function( data, cb )
if ( data == "button1" ) then
chatPrint( "Button 1 pressed!" )
handsUp()
drawNotification("Button 1 just fired!")
elseif ( data == "button2" ) then
chatPrint( "Button 2 pressed!" )
elseif ( data == "button3" ) then
chatPrint( "Button 3 pressed!" )
elseif ( data == "button4" ) then
chatPrint( "Button 4 pressed!" )
elseif ( data == "exit" ) then
-- We toggle the ActionMenu and return here, otherwise the function
-- call below would be executed too, which would just open the menu again
ToggleActionMenu()
return
end
end -- you forgot this end ;)
Cause I did that and the handsup didnât workâŚ
You need to make the function. You canât just put a function in there which does not do anything,
RegisterNUICallback( "ButtonClick", function( data, cb )
if ( data == "button1" ) then
handsUp()
elseif ( data == "button2" ) then
chatPrint( "Button 2 pressed!" )
elseif ( data == "button3" ) then
chatPrint( "Button 3 pressed!" )
elseif ( data == "button4" ) then
chatPrint( "Button 4 pressed!" )
elseif ( data == "exit" ) then
-- We toggle the ActionMenu and return here, otherwise the function
-- call below would be executed too, which would just open the menu again
ToggleActionMenu()
return
end
end -- you forgot to end the function ;)
Thatâs right ^^^^
local handsup = false
function handsUp()
local dict = "missminuteman_1ig_2"
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Citizen.Wait(0)
end
if not handsup then
TaskPlayAnim(GetPlayerPed(-1), dict, "handsup_enter", 8.0, 8.0, -1, 50, 0, false, false, false)
handsup = true
else
handsup = false
ClearPedTasks(GetPlayerPed(-1))
end
end
Put this at the bottom of your code ^^
Could you just join my discord?? Iâm not good at scripting anywaysâŚ
If you still need help with this just send me a PM.
Send me your discord link.
Been able to get a few buttons to work but i cant get my hands up and kneel to work. Here is code from cl_action and ui.html
https://pastebin.com/XNZQpm8x
Also does anyone know a source to find functions easily, for like windows, doors, fix, etc.
Youâre trying to call a function but it is an event, you should be calling TriggerEvent( 'KneelHU' )
Thank you gonna try it out
That worked! Thank you. Would you happen to be able to release any functions? If not i understand.
Most functions are on here, what are you looking for in particular?
Windows, doors, trunk, the fix command, etc. just simple things like that. I have tried the windows from acl but couldnt get that event to work. Not sure why.
Edit: Also anything on a back button yet?
Try this:
<button onclick="ResetMenu()">Home</button>