addEventHandler( "onClientKey", root, function(button,key)
if button == "F1" then
cancelEvent()
if ( source == Button5 ) then
؟؟؟؟
end
end
end )
الجزء الغلط
هو
if ( source == Button5 ) then
؟؟؟؟
end
+ المفروض تستعمل مكان
If
تستعمل
elseif
لانك لو راح تستعمل if
لازم تنهي الشرط الاول
+ استعمل الداتا اسهل لك
تصحيح كودك
addEventHandler( "onClientKey", root, function(button,key)
if button == "F1" then
if getElementData(localPlayer, "PressF1") == true then return end
cancelEvent()
end
end
end )
الحين خلنا نستعمل زرك في حدث مشان يفعل اف1
addEventHandle("onClientGUIClick", root,
function ()
if source == button5 then
setElementData(localPlayer, "PressF1", true)
end
end
)
الحين هو لو ضغط علي الزر راح يحط له الداتا ترو
و لو ضغط اف1
لو الداتا مانها ترو ما راح يشتغل و اتمني اني افدتك
اي استفسار تعال سكايب
silver4791