كودك زابط بس المشكلة منك
شوف المثال ذا ع نفس كودك !
هذا خطأ ؟
function closeWindow1 ( wnd )
guiSetVisible ( wnd , false )
end
local Functions = {
[1] = { Button = join , Function = joinJob },
[2] = { Button = ex , Function = closeWindow },
[3] = { Button = leave , Function = leaveJob },
[4] = { Button = ex_1 , Function = closeWindow1 }
}
addEventHandler("onClientGUIClick",resourceRoot,function()
for index = 1 , #Functions do
if ( source == Functions [ index ] [ "Button" ] ) then
Functions [ index ] [ "Function" ] ()
end
end
end
)
أما الصحيح فهذا
function closeWindow1 ( wnd )
guiSetVisible ( wnd , false )
end
local Functions = {
[1] = { Button = join , Function = joinJob },
[2] = { Button = ex , Function = closeWindow },
[3] = { Button = leave , Function = leaveJob },
[4] = { Button = ex_1 , Function = closeWindow1 }
}
addEventHandler("onClientGUIClick",resourceRoot,function()
for index = 1 , #Functions do
if ( source == Functions [ index ] [ "Button" ] ) then
Functions [ index ] [ "Function" ] ( wnd2 )
end
end
end
)