iMr ~ MnHmAr Posted August 22, 2016 Author Share Posted August 22, 2016 جرب السطر ذا , guiSetText ( memo, Chat ) غير اسم الميمو الي الميمو تبعك غيرت كل شيء مازبط Link to comment
Adham Posted August 22, 2016 Share Posted August 22, 2016 غيرت اسم الايديت في اول اسطار؟ Link to comment
iMr ~ MnHmAr Posted August 22, 2016 Author Share Posted August 22, 2016 غيرت اسم الايديت في اول اسطار؟ يب يب و البوتن كمان ترى انا مسوي قريد ليست لما اضري على لاعب تطلع لوحه حقت دردشه فيه ايدت و بوتن و ميمو Link to comment
N3xT Posted August 22, 2016 Share Posted August 22, 2016 ججرب كذا addEventHandler ( "onClientGUIClick",root, function ( ) if source == buton then local Chat = guiGetText ( edit ) if Chat ~= "" then triggerServerEvent( "Pm", localPlayer, Chat ) end end end ) addEvent ( "pm1", true ) addEventHandler ( "pm1",root, function ( Chat, Player ) guiSetText ( GUIEditor.memo[2]," "..Chat.." " ) end ) -- Server addEvent( "Pm", true ) addEventHandler( "pm",root , function ( player, chat ) triggerClientEvent ( root, "pm1",getPlayerFromName( chat )) end ) ممكن تقولي من وين إخترعت player بالسيرفر سايد؟, عموماً صاحب الموضوع جرب كذا كلنت : addEventHandler ( "onClientGUIClick", root, function() if ( source == GUIEditor.button[2] ) then local selceted = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local player = guiGridListGetItemText(GUIEditor.gridlist[1], selceted, 1) local message = guiGetText(GUIEditor.edit[2]) if ( message ~= "" and player and player ~= "" ) then triggerServerEvent("chat", localPlayer, message, player) end end end ) addEvent("chat1", true) addEventHandler("chat1", root, function (message , name) guiSetText(GUIEditor.memo[2], name..": "..message.."/n" ) end ) سيرفر : addEvent("chat", true) addEventHandler("chat", root, function (message, player) local playerName = getPlayerFromName(player) local sourceName = getPlayerName(source) triggerServerEvent(playerName,"chat1",playerName, message, sourceName) end ) Link to comment
</Mr.Tn6eL> Posted August 22, 2016 Share Posted August 22, 2016 Client function trim(s) -- from [url=http://lua-users.org/wiki/StringTrim]http://lua-users.org/wiki/StringTrim[/url] return s:match "^%s*(.-)%s*$" end addEventHandler("onClientGUIClick", resourceRoot, function( ) if source == button then local text = guiGetText(edit) if trim(text) ~= "" then triggerServerEvent("onPlayerSendMessage", localPlayer, text) else outputChatBox("Please Fill out the message field", 255, 0, 0) end end end) addEvent("onClientSendMessage", true) addEventHandler("onClientSendMessage", root, function(name, message) guiSetText(memo, guiGetText(memo).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message) end) Server addEvent("onPlayerSendMessage", true) addEventHandler("onPlayerSendMessage", root, function(message) if client == source then triggerServerEvent("onClientSendMessage", root, getPlayerName(client), message) end end) Link to comment
N3xT Posted August 22, 2016 Share Posted August 22, 2016 ^ فيه شيء بكودك مجنني, كيف جبت اللاعب اللي حدده عشان ترسل له ؟ Link to comment
فاّرس Posted August 22, 2016 Share Posted August 22, 2016 ^ !مابتكون للاعب محدد root حسب كوده هو حاطها Link to comment
N3xT Posted August 22, 2016 Share Posted August 22, 2016 ^ يب عشان كذا أنا مستغرب, لأن صاحب الموضوع يبيها بين شخصين مب للكل Link to comment
iMr ~ MnHmAr Posted August 23, 2016 Author Share Posted August 23, 2016 ميرسل + بدي كود لما احد يحدد لاعب من قريد ليست تطلع له لوحه Link to comment
</Mr.Tn6eL> Posted August 23, 2016 Share Posted August 23, 2016 ^ يب عشان كذا أنا مستغرب, لأن صاحب الموضوع يبيها بين شخصين مب للكل اذا يبي بين شخصين يحدد من القريد ليست ويرسل ترايقر باسم اللي حدده ويحط اول ارقمنت للترايقر بالسيرفر الاعب الي جبناه مع اسمها وكذا صار خاص Link to comment
iMr ~ MnHmAr Posted August 23, 2016 Author Share Posted August 23, 2016 مساعده لما اكتب بي الاديت مايرسل تكفون ساعدوني محتاج المود ضروري Link to comment
iMr ~ MnHmAr Posted August 23, 2016 Author Share Posted August 23, 2016 مساعده ضروريه تكفووون Link to comment
iMr ~ MnHmAr Posted August 24, 2016 Author Share Posted August 24, 2016 تكفون ردو يعالم Link to comment
iMr ~ MnHmAr Posted August 24, 2016 Author Share Posted August 24, 2016 ------------------------------ function aa() guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) end end addEventHandler ("onClientResourceStart",resourceRoot,aa) addEventHandler ("onClientPlayerJoin",root,aa) addEventHandler ("onClientPlayerChangeNick",root,aa) addEventHandler ("onClientPlayerQuit",root,aa) addEventHandler ( "onClientGUIClick", root, function() if ( source == GUIEditor.gridlist[1] ) then local selceted1 = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) guiSetVisible ( GUIEditor.window[2], true ) end end ) addEventHandler ( "onClientGUIClick", root, function() if ( source == GUIEditor.button[2] ) then local selceted = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) local player = guiGridListGetItemText(GUIEditor.gridlist[1], selceted, 1) local message = guiGetText(GUIEditor.edit[2]) if ( message ~= "" and player and player ~= "" ) then triggerServerEvent("chat", localPlayer, message, player) end end end ) addEvent("chat1", true) addEventHandler("chat1", root, function (message , name) guiSetText(GUIEditor.memo[2], name..": "..message.."/n" ) end ) سيرفر addEvent("chat", true) addEventHandler("chat", root, function (message, player) local playerName = getPlayerFromName(player) local sourceName = getPlayerName(source) triggerServerEvent(playerName,"chat1",playerName, message, sourceName) end ) Link to comment
فاّرس Posted August 24, 2016 Share Posted August 24, 2016 ما اشوف انك بدلت اكوادك بالأكواد اللي عطاك الأخ Link to comment
iMr ~ MnHmAr Posted August 24, 2016 Author Share Posted August 24, 2016 ما اشوف انك بدلت اكوادك بالأكواد اللي عطاك الأخ انتم تقلون ان اكواد تنطيل خطائه تقلون روت مدري وش يعني حاطه للجميع ابدل بي اكواد الاخ تنطيل؟ Link to comment
فاّرس Posted August 24, 2016 Share Posted August 24, 2016 بدل بس ذي : function trim(s) -- from [url=http://lua-users.org/wiki/StringTrim]http://lua-users.org/wiki/StringTrim[/url] return s:match "^%s*(.-)%s*$" end 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 triggerServerEvent("chat", localPlayer, message, player) end end end end ) addEvent("chat1", true) addEventHandler("chat1", root, function (message , name) guiSetText(GUIEditor.memo[2], guiGetText(GUIEditor.memo[2]).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message) end ) Link to comment
iMr ~ MnHmAr Posted August 24, 2016 Author Share Posted August 24, 2016 كلنت ----------------------------------- ------------------------------- function aa() guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) end end addEventHandler ("onClientResourceStart",resourceRoot,aa) addEventHandler ("onClientPlayerJoin",root,aa) addEventHandler ("onClientPlayerChangeNick",root,aa) addEventHandler ("onClientPlayerQuit",root,aa) addEventHandler ( "onClientGUIClick", root, function() if ( source == GUIEditor.gridlist[1] ) then local selceted1 = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) guiSetVisible ( GUIEditor.window[2], true ) 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 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 triggerServerEvent("chat", localPlayer, message, player) end end end end ) addEvent("chat1", true) addEventHandler("chat1", root, function (message , name) guiSetText(GUIEditor.memo[2], guiGetText(GUIEditor.memo[2]).."\n"..name:gsub("#%x%x%x%x%x%x", "").." : "..message) end ) addCommandHandler('q1',function() guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end ) سيرفر addEvent("chat", true) addEventHandler("chat", root, function (message, player) local playerName = getPlayerFromName(player) local sourceName = getPlayerName(source) triggerServerEvent(playerName,"chat1",playerName, message, sourceName) end ) debugscript 3 :- attempt to call global " triggerServerEvent" ( a nil value ) مايرسل و فوق الاكواد كامله Link to comment
N3xT Posted August 24, 2016 Share Posted August 24, 2016 addEvent("chat", true) addEventHandler("chat", root, function (message, player) local playerName = getPlayerFromName(player) local sourceName = getPlayerName(source) triggerClientEvent(playerName,"chat1",playerName, message, sourceName) end ) Link to comment
iMr ~ MnHmAr Posted August 24, 2016 Author Share Posted August 24, 2016 addEvent("chat", true) addEventHandler("chat", root, function (message, player) local playerName = getPlayerFromName(player) local sourceName = getPlayerName(source) triggerClientEvent(playerName,"chat1",playerName, message, sourceName) end ) مشكور والله يعطيكم العافيه طيب لو ابي احط الحلات بي الداتا صح ولا لا؟ او فيه طريقه غير؟ Link to comment
iMr ~ MnHmAr Posted August 25, 2016 Author Share Posted August 25, 2016 طيب لو ابي احط حالات مثل متصل او مشغول او.. كيف ردو ضروري 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