' A F . Posted December 25, 2014 Share Posted December 25, 2014 (edited) السسلام عليكم ورحمة الله وبركاته .. كيف حألكممء ي شباب .. انا الان حأب أطلب فنكشنآت يعني رآح آسوي 2 Edit box -- يعني الاول يحط فيه الاختصار و الثاني يحط فيه رقم الاختصار واذا ظغط زر يجي الاختصار و السلام عليكم ورحمةة الله وبركاته Edited December 26, 2014 by Guest Link to comment
' A F . Posted December 25, 2014 Author Share Posted December 25, 2014 ياليت توضح اكثر ! زي هاذا السكربت Link to comment
The Killer Posted December 25, 2014 Share Posted December 25, 2014 Event # 'onClientGUIClick' function # guiGetText bindKey triggerServerEvent -- للكلام -- Server side outputChatBox Link to comment
' A F . Posted December 25, 2014 Author Share Posted December 25, 2014 Client Side * addEventHandler("onClientGUIClick",root, function Game () if source == GUIEditor.button[1] then return end local Text = guiGetText(edit) local Bind = guiGetText(edit_b) bindKey ( source, Bind, "down", Game ) triggerServerEvent("Out",localPlayer, Text, Bind) end) Server Side * addEvent("Out",true) addEventHandler("Out",root, function ( thePlayer ) outputChatBox("..Text..",thePlayer,255,255,0,true) end ) Link to comment
The Killer Posted December 25, 2014 Share Posted December 25, 2014 addEventHandler ("onClientGUIClick", root, function () if (source == btn and getElementData (localPlayer, "bind") ~= true ) then local bind = guiGetText (bin) local txt = guiGetText (text) bindKey (bind, "down", function (txt) triggerServerEvent ("Out", localPlayer, txt) end) setElementData (localPlayer, "bind", true) end end ) addEvent("Out",true) addEventHandler("Out",root, function ( Text ) local txt = { Text } local message = table.concat(txt, " ") outputChatBox(message, root, 255, 255, 0, true) end) Link to comment
' A F . Posted December 25, 2014 Author Share Posted December 25, 2014 مششكور ذا كلير لاكن لما اسوي الاختصار يجي بـ الدي بوق بأد آرقمن لـ guiGetText and bindKey Link to comment
The Killer Posted December 25, 2014 Share Posted December 25, 2014 تأكد من اسماء الايديت Link to comment
' A F . Posted December 25, 2014 Author Share Posted December 25, 2014 م عليش م كنت متأكد لاكن الان يجي الاختصار بس لما آكتب بـ الايديت الاول [ لا اله الا الله ] ء و الايديت الثاني مثلا [ 4 ] ءء واظغط رقم 4 يطلع بـ الشات 4 [ 4 مرات ] ء يتكرر Client GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(251,209,416,211,"# Create Chat Bind System",false) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) GUIEditor_Label[1] = guiCreateLabel(12,37,38,15,"Text :",false,GUIEditor_Window[1]) edit = guiCreateEdit(54,30,285,32,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(12,87,38,15,"Bind :",false,GUIEditor_Window[1]) edit_b = guiCreateEdit(54,80,285,32,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(12,135,157,33,"* Create ",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(230,135,157,33,"* Close",false,GUIEditor_Window[1]) addEventHandler ("onClientGUIClick", root, function () if (source == GUIEditor_Button[1]) then local bind = guiGetText (edit_b) local txt = guiGetText (edit) bindKey (bind, "down", function (txt) triggerServerEvent ("Out", localPlayer, txt) end) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor_Button[3] then guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) end end ) Server addEvent("Out",true) addEventHandler("Out",root, function ( Text ) local txt = { Text } local message = table.concat(txt, " ") outputChatBox(message, root, 255, 255, 0, true) end) Link to comment
The Killer Posted December 26, 2014 Share Posted December 26, 2014 يب صحيح خطأ بسيط مني , جرب الحين addEventHandler ("onClientGUIClick", root, function () if (source == GUIEditor_Button[1]) then local bind = guiGetText (edit_b) local txt = guiGetText (edit) bindKey (bind, "down", function () triggerServerEvent ("Out", localPlayer, txt) end) end end ) Link to comment
' A F . Posted December 26, 2014 Author Share Posted December 26, 2014 مششكور يعطيك العأفيهةء بسس ممكن فنكشنآت اذا يبي يحذف الاختصار يكتب رقم الاختصار بس Link to comment
The Killer Posted December 26, 2014 Share Posted December 26, 2014 حياك الله , ----- انصحك بالداتا عشان تتحق من انه ضغط الزر وعشان تقدر تحذف الزر setElementData getElementData unbindKey Link to comment
' A F . Posted December 26, 2014 Author Share Posted December 26, 2014 مشكور ي طويل العمر والله م قصرت بسس شوف جربته يقولي الدي بوق باد ارقمنت لما اظغط الرقم Client addEventHandler ("onClientGUIClick", root, function ( thePlayer, txt ) if (source == GUIEditor_Button[1]) then local bind = guiGetText (edit_b) local txt = guiGetText (edit) bindKey (bind, "down", function () setElementData(thePlayer,"Delete_cut",txt) getElementData(thePlayer,"Delete_cut") unbindKey(thePlayer,"down",txt) triggerServerEvent ("Out", localPlayer, txt) end) end end ) Server addEvent("Out",true) addEventHandler("Out",root, function ( Text ) local txt = { Text } local message = table.concat(txt, " ") outputChatBox(message, root, 255, 255, 0, true) end) Link to comment
The Killer Posted December 26, 2014 Share Posted December 26, 2014 من وين جبت thePlayer > وفاهم ال setElementData getElementData غلط ----------- ملاحظه: ضيف زر جديد في اللوحه وايديت جديد وتأكد من انك تحط اسم الزر واسم الايديت نفس الي في الكود ذا: addEventHandler ("onClientGUIClick", resourceRoot, function ( ) if (source == GUIEditor_Button[1]) then local bind = guiGetText (edit_b) local txt = guiGetText (edit) if (txt ~= "" and bind ~= "") then setElementData(localPlayer, "Delete_cut", bind) function TheKey () triggerServerEvent ("Out", localPlayer, txt) end bindKey (bind, "down", TheKey) end end if (source == unbind) then -- اسم الزر الجديد local key = guiGetText (unbin) -- اسم الايديت الجديد if (key and key ~= "") then if (key == getElementData (localPlayer, "Delete_cut")) then unbindKey (getElementData (localPlayer, "Delete_cut"), "down", TheKey) end end 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