#STZ Posted June 17, 2016 Share Posted June 17, 2016 انا سويت كود لما يضغط علي الزر يظهر كلمة في الشات تمام ولكن طبعا كود الزر كلنت وانا ابي الكود هذاك outputChatBox ( "#FF0000Hello #00FF00World", getRootElement(), 255, 255, 255, true ) في ملف سيرفر كيف اربط بينهم بحيث لما يضغط علي الزر اللي اسمه في ملف لكلنت يظهر الكلمة اللي في ملف السيرفر لاحد يقول حطه في الكلنت ادري انه تنفع كلنت بس ابيها في ملف السيرفر Link to comment
SycroX Posted June 17, 2016 Share Posted June 17, 2016 triggerServerEvent Example : addEventHandler("onClientGUIClick", root, function() if source == Button then triggerServerEvent("ShowMessages", localPlayer, "Hello Word", 255, 255, 0) elseif source == Button2 then triggerServerEvent("ShowMessages", localPlayer, "Hi all", 255, 0, 0) end end) addEvent("ShowMessages", true) addEventHandler("ShowMessages", root, function(Message, R, G, B) outputChatBox(Message, getRootElement(), R, G, B, true) end) Link to comment
#STZ Posted June 17, 2016 Author Share Posted June 17, 2016 اخي وضح وين السيرفر و الكلنت Link to comment
' A F . Posted June 17, 2016 Share Posted June 17, 2016 Client : addEventHandler("onClientGUIClick", root, function() if source == Button then triggerServerEvent("ShowMessages", localPlayer, "Hello Word", 255, 255, 0) elseif source == Button2 then triggerServerEvent("ShowMessages", localPlayer, "Hi all", 255, 0, 0) end end) Server : addEvent("ShowMessages", true) addEventHandler("ShowMessages", root, function(Message, R, G, B) outputChatBox(Message, getRootElement(), R, G, B, true) end) Link to comment
SycroX Posted June 17, 2016 Share Posted June 17, 2016 اخي وضحوين السيرفر و الكلنت معلش مثل ما قالك الأخ Default + معلش ما شفتش 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