Thank you very much!
Thank you, I thought about that and I think it will depend on how responsive the UI is if you init/destroy the menu every time to support multiple keys and menus. I have some other changes I’m working on for more configuration and sound feedback for clicks so I’ll see what I can do.
edit: The resource should handle all the paths correctly so you can also just have multiple copies with different resource names for each button as a quick and dirty solution.
Where should I be looking if I want to change the colour scheme?
Actually that was my first idea, cheap and dirty copy, but I think the javascript close/open of the wheel was conflicting and the clone was toggle rather than a hold.
Will take another look when I get home. Again, really nice release, my community love it. I added walk styles and some more animations to it.
Could it be used to display the inventory?
thank you for this awesome script but I have a problem and I just test >>
It is conflect with [RELEASE][ESX] KASHacters Multi Character for some reason I don’t know why if you could help me …
thank you …
I use KASHacters, no conflicts.
that’s weird when im on chra selection the pointer won’t show up to chose the char :S
I get this error. Why I get this error. Have an any idea?
Did you change resource’s name? It has to stay original
Resource name = ‘radialmenu’
Exactly, If player in any car then I want show another menu.
Code
Citizen.Wait(0)
if IsPedInAnyVehicle(playerPed, false) then
if menuConfig.wheels[1].name == "wheelInner" then
menuConfig.wheels = {
{
name = "inCar",
navAngle = 270,
minRadiusPercent = 0.3,
maxRadiusPercent = 0.6,
labels = {"CANCEL", "NO"},
commands = {"e cancel", "e no"}
}
}
SendNUIMessage({
type = 'init',
data = menuConfig,
resourceName = GetCurrentResourceName()
})
end
elseif menuConfig.wheels[1].name == "inCar" then
menuConfig.wheels = {
{
name = "wheelInner",
navAngle = 270,
minRadiusPercent = 0.3,
maxRadiusPercent = 0.6,
labels = {"CANCEL", "NO", "CHEER", "CLAP", "FOLDARMS", "LEAN"},
commands = {"e cancel", "e no", "e cheer", "e slowclap", "e foldarms", "e leanwall"}
},
{
name = "wheelOuter",
navAngle = 285,
minRadiusPercent = 0.6,
maxRadiusPercent = 0.9,
labels = {"SALUTE", "FINGER", "PEACE", "FACEPALM", "DAMN", "FAIL", "DEAD", "GANG1", "GANG2", "COP", "HOLSTER", "CROWDS"},
commands = {"e salute", "e finger", "e peace", "e palm", "e damn", "e fail", "e dead", "e gang1", "e gang2", "e copidle", "e holster", "e copcrowd2"}
}
}
SendNUIMessage({
type = 'init',
data = menuConfig,
resourceName = GetCurrentResourceName()
})
end
-- When F6 key is pressed toggle UI
if IsControlPressed(0, keybindControl) then
-- Show UI
showMenu = true
SetCursorLocation(0.5, 0.5)
SendNUIMessage({
type = 'show'
})
SetNuiFocus(true, true)
-- Bootleg way to prevent menu from showing again until key is released
while showMenu == true do Citizen.Wait(100) end
Citizen.Wait(100)
while IsControlPressed(0, keybindControl) do Citizen.Wait(100) end
end
end
Updated the release with a ton of new features based on feedback, if you see any issues please let me know
- Moved configuration options to separate config.lua file
- Changed menu to use init/destroy on the fly to support multiple menus
- Changed Javascript to auto-center menu in the middle of the screen
- Added config function to enable/disable menu based on player context
- Added sound effects for opening and clicking menu
Good to hear, I updated the release with a bunch of changes to support multiple menus, easier customization and ability to enable/disable menus based on player context (e.g. only show when in a vehicle). The example config shows you how to add multiple menus as well as how you can put multiple menus on the same key using the enableMenu function.
See the latest release and above info, should be what you’re looking for (just so happened to already be working on it )
hello ma friend , i download your script today , But im facing a problem , the MENU works but i dont get any animations , http://prntscr.com/nv4oey Do you have any solution for this problem ?
Do i need any other animation script or something like that?
thanks
Yes, from the main post:
Looks really good. Are you planning to add something like this down the road? (forgot where this is from)
The cancel button does not seem to work for me.
I even tried registering my own command and still nothing. Am I doing something wrong.
Other then this its a great script. The community Im with loves it we just cant seem to fix this.
RegisterNetEvent("cancelemote")
AddEventHandler("cancelemote", function()
ClearPedTasksImmediately(PlayerPedId())
end
end)
RegisterCommand("cancel", function(source, args, raw)
TriggerEvent("cancelemote")
end, false)
Edit: Also does not seem to work for multiple people. Gets stuck on loading.
press again the button that starts the animation, it works fine
Awesome release! anyway to stop the animations from doing a loop instead of clicking the animation again? Also would love a smoke cigarette emote rather than just having one in the mouth is that at all possible as well. Again thanks for the sick resource !
Anyone else getting stuck with the wheel open and no emotes playing ?