You copying the wiki syntax
it's already won't work because it's Client-only function and your script is server side, you need trigger and much work.
i don't understand why you have huge spaces in your code
when i saw your code i was think to not read it because of the huge spaces.
in future please try to remove these spaces that does not have any benefit.
أكوادك لحسه
يعني ذا الـ 18 سطر كله ممكن يكون في 5 أسطر
bindKey ( "F2" , "down" , function()
if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then
guiSetVisible ( thewindow ,false )
showCursor (true )
guiSetInputEnabled(false)
elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then
guiSetVisible ( GUIEditor_Window[1] ,true )
guiSetInputEnabled(true)
end
end
)
كله بـ 5 أسطر فقط
bindKey("F2", "down", function()
guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1]))
showCursor(guiGetVisible(GUIEditor_Window[1]))
guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1]))
end)
addEventHandler("onClientGUIClick",root,
function()
if source == theButton then -- theButton أسم الزر أو المربع
executeCommandHandler("الأمر هنا")
end
end
)
i guess you put it client side in meta, it's server side not client side.
And:
remove this Casual Jeanjacket
function pedLoad ( Casual Jeanjacket )
to be
function pedLoad ()
غير الأفنت
addEventHandler("onClientGUIChanged",root,function()
إلى
addEventHandler("onClientGUIClick",root,function()
أضافة إلى أن عندك متغيرين بنفس الأسم
أحتمال يصير تعارض
name = guiGridListAddColumn(gridlist,"buy car",0.9)
name = guiCreateEdit(200, 313, 201, 20, "", false, GUIEditor_Window[2])
الأفضل تغير الأسم
function playerfire(player)
setPedOnFire(player, true)
if isPedOnFire(player) then
setTimer(function(player)
setElementHealth(player, getElementHealth(player) + 5)
end, 2000, 0, player)
end
end
addCommandHandler("fire", playerfire)