Jump to content

* تمت الافآده من قبل ذا كلير


' A F .

Recommended Posts

السسلام عليكم ورحمة الله وبركاته ..

كيف حألكممء ي شباب ..

انا الان حأب أطلب فنكشنآت

يعني رآح آسوي 2 Edit box --

يعني الاول يحط فيه الاختصار

و الثاني يحط فيه رقم الاختصار

واذا ظغط زر يجي الاختصار

و السلام عليكم ورحمةة الله وبركاته

Edited by Guest
Link to comment

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

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

م عليش م كنت متأكد

لاكن الان يجي الاختصار بس لما آكتب بـ الايديت الاول [ لا اله الا الله ] ء

و الايديت الثاني مثلا [ 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

يب صحيح خطأ بسيط مني , جرب الحين

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

مشكور ي طويل العمر والله م قصرت

بسس شوف جربته يقولي الدي بوق باد ارقمنت لما اظغط الرقم

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

من وين جبت

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...