Naif Posted September 23, 2015 Share Posted September 23, 2015 سلام عليكم فيه خطأ ذأ الكود ؟ addEventHandler('onClientClick',root, function ( button , state ) if ( button == 'left' and state == 'up' ) then if ( isMouseInPosition ( 395, 168, 97, 29 ) ) then if ( guiGetText(time1) ~= '' and guiGridListGetSelectedItem ( grid ) ~= -1 ) then triggerServerEvent('onTake',localPlayer,guiGridListGetItemText(grid,guiGridListGetSelectedItem ( grid ),1),guiGetText(time1)) else outputChatBox('خطأ !!',0,255,0,true) end end end end ) Link to comment
GraveDigger. Posted September 23, 2015 Share Posted September 23, 2015 اعتقد انك لازم تستخدم الفنكشن المفيد في اول الكود function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end كدة يكون احسن addEventHandler('onClientClick',root, function ( button , state ) if ( button == 'left' and state == 'up' ) then if ( isMouseInPosition ( 395, 168, 97, 29 ) ) then if ( guiGetText(time1) ~= '' and guiGridListGetSelectedItem ( grid ) ~= -1 ) then local csel = guiGridListGetItemText(grid,guiGridListGetSelectedItem ( grid ),1) local cser = guiGetText(time1) triggerServerEvent ( "onTake",getLocalPlayer(),csel,cser) else outputChatBox('خطأ !!',0,255,0,true) end end end end ) Link to comment
Naif Posted September 23, 2015 Author Share Posted September 23, 2015 ماظبط لاحقي ولا حقك Link to comment
iMr.SFA7 Posted September 23, 2015 Share Posted September 23, 2015 غالباً ما تكون المشكلة من الأحداثيات ذذذ Link to comment
Naif Posted September 23, 2015 Author Share Posted September 23, 2015 يوم حطيته زر GUI ممخفي , ظبط ! وانا مابيه زر مخفي ! Link to comment
iMr.SFA7 Posted September 23, 2015 Share Posted September 23, 2015 يوم حطيته زر GUI ممخفي , ظبط ! وانا مابيه زر مخفي ! غالباً ما تكون المشكلة من الأحداثيات !! راجع الأحداثيات الي حاطها ! Link to comment
Naif Posted September 23, 2015 Author Share Posted September 23, 2015 متأكد , حطيت الزر المخفي نفس الاحداثيات وماظبط up up Link to comment
LoOs Posted September 23, 2015 Share Posted September 23, 2015 متأكد , حطيت الزر المخفي نفس الاحداثيات وماظبط up up اول شيء تاكد انك حاط الكود اعلى المود , ثاني شيء يقولك شيء بالديبوق ؟ , Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now