Inspired by Use DisplayOnscreenKeyboard properly
fxserver-Confirm
Confirm script for FXServer
Github
[DEPENDENCIES]
Threads
Scaleforms
[INSTALLATION-1]
start confirm
[EXAMPLE-1]
TriggerEvent('CreateConfirm',title,button1,button2,function(selection)
if selection == 1 then
print('yes')
elseif selection == 2 then
print('no')
else
print('cancel')
end
end )
[INSTALLATION-2]
your script’s fxmanifest.lua :
client_scripts {
'@threads/threads.lua',
'@scaleforms/scaleforms.lua',
'@confirm/confirm.lua'
}
[EXAMPLE-2]
Confirm.Create(title,button1,button2,function(selection)
if selection == 1 then
print('yes')
elseif selection == 2 then
print('no')
else
print('cancel')
end
end )
[KEYBOARD + CONTROLLER + MOUSE SUPPORTED]
press UP/DOWN to show / hide selection dialog
press BACKSPACE/MOUSE RIGHT CLICK to cancel selection