Bahoma Posted August 6, 2012 Share Posted August 6, 2012 أريد أن أغير كيفية ظهور لوحة السجن ، يعني ليس عند كتابة الكومند فالشات ، أريد أن تظهر لي عند الضغط على زر في لوحة أخرى https://community.multitheftauto.com/index.php?p= ... ls&id=3251 function guiToggleVisible ( ) if ( guiGetVisible ( b1 ) == true ) then guiSetVisible ( b1, false ) showCursor(false) else guiSetVisible ( b1, true ) showCursor(true) end end b1 = guiCreateButton ( 0.4, 0.4, 0.2, 0.1, "Clique me", true ) guiSetVisible ( b1, false ) bindKey ( "F1", "down", guiToggleVisible ) هذا مثال عن الزر ، عند الضغط الزر ، أريد أن تظهر لي لوحة السجن ، شكرا Link to comment
hassan.k.s.a Posted August 6, 2012 Share Posted August 6, 2012 (edited) امسح الكومند وضع هذا bindKey ( "F1" , "down" , function() if ( guiGetVisible ( اسم النافذه ) == true ) then guiSetVisible ( اسم النافذه ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( اسم النافذه ) == false ) then guiSetVisible ( اسم النافذه ,true ) showCursor (false ) guiSetInputEnabled(true) end end ) Edited August 7, 2012 by Guest Link to comment
Bahoma Posted August 6, 2012 Author Share Posted August 6, 2012 أعتقد أنك لم تفهمني المشكل إنو في سكريبت السجن commandhandler is in server side , and if i want to merge it with the button , i must move it to client side جربة عدة طرق لكن لم أجد الحل عند الضغط على الزر يجب أن تظهر لوحة السجن شكرا على المساعدة Link to comment
3NAD Posted August 6, 2012 Share Posted August 6, 2012 -- Server Side bindKey("F2","up", function() triggerClientEvent(source,"open",source) end ) -- Client Side addEvent("open",true) addEventHandler("open",root, function() if guiGetVisible( theWindow ) == false then guiSetVisible( theWindow , true ) showCursor( true ) else guiSetVisible( theWindow , false ) showCursor( false ) end end ) Link to comment
Bahoma Posted August 6, 2012 Author Share Posted August 6, 2012 -- Server Side bindKey("F2","up", function() triggerClientEvent(source,"open",source) end ) -- Client Side addEvent("open",true) addEventHandler("open",root, function() if guiGetVisible( theWindow ) == false then guiSetVisible( theWindow , true ) showCursor( true ) else guiSetVisible( theWindow , false ) showCursor( false ) end end ) شكرا يا أخ ، جزاك الله خيرا ، لكن أنت أيضا لم تفهمني ، إممم يمكن إذا أوضح لكم بالإنجليزي سوف تفهمون طلبي I have the jail script ( this one https://community.multitheftauto.com/index.php?p= ... ls&id=3251 ) i want to modife it , i want that jail panel will not be called when you type (/jail ) , i want to merge it with a button ( onClientGUIClick) , so when i clique on the button , the jail panel will be shown المعذرة لكن عند استعمالي اللغة الانجليزية أعتقد انكم ستفهمون ، شكرا مرة أخرى Link to comment
3NAD Posted August 6, 2012 Share Posted August 6, 2012 addEventHandler("onClientGUIClick",root, function() if source == theButton then guiSetVisible( theWindow , true) showCursor( true ) end end ) Link to comment
Bahoma Posted August 6, 2012 Author Share Posted August 6, 2012 addEventHandler("onClientGUIClick",root, function() if source == theButton then guiSetVisible( theWindow , true) showCursor( true ) end end ) سوف اشرح لك بالنجليزي مرة أخرى look its simple , the jail panel made by Al3grab (https://community.multitheftauto.com/index.php?p= ... ls&id=3251) work when you use /jail , i want to change this , i want to add Button called jail , and when you press this button , the jail panel will be appeared . يرحم والديك يا أخي على المساعدة Link to comment
TAPL Posted August 6, 2012 Share Posted August 6, 2012 قصدك زر لفتح النافذة؟ -- Client Side -- bindKey("F2", "down", "jail") Link to comment
Bahoma Posted August 6, 2012 Author Share Posted August 6, 2012 قصدك زر لفتح النافذة؟-- Client Side -- bindKey("F2", "down", "jail") لا ، قصدي دمج سكريبت السجن مع البوتون Link to comment
TAPL Posted August 6, 2012 Share Posted August 6, 2012 اها addEventHandler("onClientGUIClick",root, function() if source == theButton then executeCommandHandler("jail") end end ) Link to comment
Bahoma Posted August 6, 2012 Author Share Posted August 6, 2012 اها addEventHandler("onClientGUIClick",root, function() if source == theButton then executeCommandHandler("jail") end end ) وشو أعمل مع هذا ؟ https://community.multitheftauto.com/index.php?p= ... ls&id=3251 Link to comment
TAPL Posted August 6, 2012 Share Posted August 6, 2012 i want to add Button called jail theButton = guiCreateButton(0.5, 0.5, 0.2, 0.1, "jail", true) =========================================================================== and when you press this button , the jail panel will be appeared . addEventHandler("onClientGUIClick",root, function() if source == theButton then executeCommandHandler("jail") end end ) 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