Jump to content

- [مشكله ] - sفي كود


Recommended Posts

ياخي ذي مشكلتك انت غيرت مسار الموضوع بمشكله ثانيه وتخليت عن مشكلتك الأولى ..

ملف كلينت عدل مستقبل التريقر كذا :

addEvent("chat1", true) 
addEventHandler("chat1", root, 
    function (message , name) 
    outputChatBox ( "You've new pm message from : "..name) 
    local text = trim( guiGetText ( GUIEditor.memo [ 2 ] ) ) ~= '' and guiGetText(GUIEditor.memo[2]).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message or name:gsub("#%x%x%x%x%x%x", "").." : "..message 
    guiSetText(GUIEditor.memo[ 2 ], text  ) 
end ) 

وجرب ارسل لخويك وشوف يجيه كلام بالشات او لا؟

Link to comment
ياخي ذي مشكلتك انت غيرت مسار الموضوع بمشكله ثانيه وتخليت عن مشكلتك الأولى ..

ملف كلينت عدل مستقبل التريقر كذا :

addEvent("chat1", true) 
addEventHandler("chat1", root, 
    function (message , name) 
    outputChatBox ( "You've new pm message from : "..name) 
    local text = trim( guiGetText ( GUIEditor.memo [ 2 ] ) ) ~= '' and guiGetText(GUIEditor.memo[2]).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message or name:gsub("#%x%x%x%x%x%x", "").." : "..message 
    guiSetText(GUIEditor.memo[ 2 ], text  ) 
end ) 

وجرب ارسل لخويك وشوف يجيه كلام بالشات او لا؟

يجي الكلام بي الشات لكن ماتروح له الرساله

Link to comment
طيب هو اصلاً ضغط على اسمك بالجريد ليست وفتح النافذه حق الرساله؟

الان انا ضربت على اسمه و رسلت له المفروض تظهر له لوحة الدردشه عنده مو لزم يحدد علي لان انا الي رسلت له موب هو صح؟

ولا لا

Link to comment
addEventHandler ( "onClientGUIClick", root, 
function() 
    if ( source == GUIEditor.button[2] ) then             
        if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1 then 
            local player = guiGridListGetItemText(GUIEditor.gridlist[1], guiGridListGetSelectedItem(GUIEditor.gridlist[1]), 1) 
                local message = guiGetText(GUIEditor.edit[2]) 
                 
                    if trim(message) ~= "" then 
    outputChatBox ( "You've new pm message from : ".. getPlayerName ( localPlayer )) 
    local text = trim( guiGetText ( GUIEditor.memo [ 2 ] ) ) ~= '' and guiGetText(GUIEditor.memo[2]).."\n".. getPlayerName ( localPlayer ):gsub("#%x%x%x%x%x%x", "").." : "..message or  getPlayerName ( localPlayer ):gsub("#%x%x%x%x%x%x", "").." : "..message 
    guiSetText(GUIEditor.memo[ 2 ], text  ) 
     guiSetVisible ( GUIEditor.window[2], true ) 
                     
                        triggerServerEvent("chat", localPlayer, message, player) 
            end 
        end 
    elseif ( source == GUIEditor.gridlist [ 1 ] ) then 
        if guiGridListGetSelectedItem(GUIEditor.gridlist[1]) ~= -1 then 
            guiSetVisible ( GUIEditor.window[2], true ) 
        end 
    end 
end ) 
  
function trim(s) -- from [url=http://lua-users.org/wiki/StringTrim]http://lua-users.org/wiki/StringTrim[/url] 
    return s:match "^%s*(.-)%s*$" 
end 
  
addEvent("chat1", true) 
addEventHandler("chat1", root, 
    function (message , name) 
    outputChatBox ( "You've new pm message from : "..name) 
    local text = trim( guiGetText ( GUIEditor.memo [ 2 ] ) ) ~= '' and guiGetText(GUIEditor.memo[2]).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message or name:gsub("#%x%x%x%x%x%x", "").." : "..message 
    guiSetText(GUIEditor.memo[ 2 ], text  ) 
     guiSetVisible  

كذا

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...