السلام عليكم ورحمة الله وبركاتة
انا عندي كود الي هو اذا ضغط زر يحط اسم الاعب بالكلام الي مكتوب بالادت وللحين م عرفت الخطأ
Client Side ~#
addEventHandler("onClientResourceStart", resourceRoot,
function()
wnd = guiCreateWindow(271, 227, 476, 395, "", false)
guiWindowSetSizable(wnd, false)
naim = guiCreateButton(32, 40, 409, 158, "Set Your Name", false, GUIEditor.window[1])
button = guiCreateButton(124, 260, 218, 60, "", false, GUIEditor.window[1])
edbox = guiCreateEdit(93, 203, 299, 43, "", false, GUIEditor.window[1])
showCruser( true )
end
)
addEventHandler("onClientGUIClick",naim,
function () -- الفنكش
local Ebox = guiGetText ( edbox )
if Ebox == "" then return outputChatBox("Set Your Name",math.random(0, 255), math.random(0, 255), math.random(0, 255),true) end
triggerServerEvent("SetName",localPlayer,Ebox)
playSoundFrontEnd(38)
guiSetVisible(Wnd,false)
showCursor(false)
end,false)
Server Side ~#
addEvent("SetName",true)
addEventHandler("SetName",root,
function (Ebox)
setPlayerName ( source , Ebox )
ver = getPlayerName
outputChatBox (""..ver.." Has Changed His Nick")
end
)
عطوني الاخطاء بالله