Habe versucht eine comboBox zu erstellen und dann die werte die man auswählt ab zu fragen aber irgendwie geht das nicht verstehe das nicht .
(menu geht nicht auf wenn ich das script da zu scripte)
Lua
comboBox = guiCreateComboBox(20, 30, 288, 200, "Fraktion", false, MenuAdmin)
local LSPD = guiComboBoxAddItem(comboBox,"LSPD")
local Army = guiComboBoxAddItem(comboBox,"Army")
addEventHandler("onClientGUIClick", frak, function(button)
if button == "left" then
local ftarget = guiGridListGetItemText(aGrid,guiGridListGetSelectedItem(aGrid),1)
local item = guiComboBoxGetSelected ( comboBox )
local text = tostring ( guiComboBoxGetItemText ( comboBox , item ) )
if not ftarget then return end
if item == LSPD then
outputChatBox ( "LSPD" )
elseif item == Army then
outputChatBox ( "Army" )
if not fraki then return end
if not tonumber(fraki) then return end
fraki = tonumber(fraki)
triggerServerEvent("makeleader",lp,lp,ftarget,fraki)
end
end,false)
Alles anzeigen
-------------------------------------Dank an alle im Vorraus -------------------------------------