Jump to content

بدي تصحيح للكود


Recommended Posts

بدي كود مثلا عند اضغط علي زر انا مخلي الزر يظهر في الشات للشخص نفسه لكن بدي يكون يظهر لكل الموجودين في السيرفر

او في

outChatBox(root,"تم نقل "..getPlayerName.."الي وظعية الافك",root, 255, 255, 255, true ) 

او

exports["guimessages"]:outputServer(root,"تم نقل "..getPlayerName.."الي وظعية الافك",root, 255, 255, 255, true ) 

Link to comment

client

addEventHandler("onClientGUIClick", root,  
function(  ) 
     if ( source == N ) then 
triggerServerEvent('add',localPlayer) 
        end 
    end 
) 
  

server

addEvent("add",true) 
addEventHandler("add",root, 
function ( ) 
exports["guimessages"]:outputServer(root,"تم نقل "..getPlayerName(source).."الي وظعية الافك",root, 255, 255, 255, true ) 
end) 

هيك تقصد ؟

Link to comment
client
addEventHandler("onClientGUIClick", root,  
function(  ) 
     if ( source == N ) then 
triggerServerEvent('add',localPlayer) 
        end 
    end 
) 
  

server

addEvent("add",true) 
addEventHandler("add",root, 
function ( ) 
exports["guimessages"]:outputServer(root,"تم نقل "..getPlayerName(source).."الي وظعية الافك",root, 255, 255, 255, true ) 
end) 

هيك تقصد ؟

قصدي اني يوم اضغط علي زر يقولي كلام مثل مانا كاتب :arrowup: لكن يطلع للجميع مو انا فقط

Link to comment
    addEvent("add",true) 
    addEventHandler("add",root, 
    function ( ) 
    exports["guimessages"]:outputServer(root,"تم نقل "..getPlayerName(source).."الي وظعية الافك",root, 255, 255, 255) 
    end) 

خلي ملف السيرفر هيك طيب وجرب

Link to comment
    addEvent("add",true) 
    addEventHandler("add",root, 
    function ( Name ) 
    exports["guimessages"]:outputServer(root,"تم نقل "..Name.."الي وظعية الافك",root, 255, 255, 255, true ) 
    end) 

كلينت

  
addEventHandler("onClientGUIClick", root, 
function(  ) 
     if ( source == N ) then 
Name = getPlayerName(localPlayer) 
triggerServerEvent('add',localPlayer,Name) 
        end 
    end 
) 

Link to comment

يا حبيبي

كيف تباه يشتغل و انتا كاتب

exports["guimessages"]:outputServer(root,"تم نقل "..Name.."الي وظعية الافك",root, 255, 255, 255, true ) 

خله كدا

exports["guimessages"]:outputServer(root, "تم نقل "..Name.."الي وظعية الافك", 255, 255, 255, true ) 

Syntax :

exports["guimessages"]:outputServer(source, text, r, g, b)

مثال

addEventHandler("onPlayerLogin", root, 
exports["guimessages"]:outputServer(root," "..getPlayerName(source).." Has Login !!", 255, 255, 0) 
end) 
Edited by Guest
Link to comment

addEventHandler("onClientGUIClick", root, 
function() 
if source == Button1 then 
triggerServerEvent("msg", localPlayer) 
   end 
end) 
---- 
Server Side 
  
addEvent("msg", true) 
addEventHandler("msg", root, 
function() 
exports["guimessages"]:outputServer(root, "HI ALL", 255, 255, 0, true) 
end) 
Link to comment
ياخي ولله المشكلة مو هنا المشكلة انه يكرر الكلمة مرتين انا بدي يقول HI ALL مره واحدههههههههه

وريني الكود بتاعك اللي انت حاطه في الملف كدة :~)

Link to comment

addEventHandler ( "onClientGUIClick", resourceRoot, function (    ) 
    if ( source == اسم الزر ) then 
        exports [ "guimessages" ] : outputClient ( root, "Hi All", 255, 255, 255, true ) 
    end 
end ) 

بكذا بيطلع الكلام للكل الي في السيرفر بناء على طلبك

+ حطه من جانب كلينت وتأكد من ملف الميتا انه مضبوط

يكون شغال عشان يطلع الكلام guimessgaes وضروري مود

Link to comment
addEventHandler ( "onClientGUIClick", resourceRoot, function (    ) 
    if ( source == اسم الزر ) then 
        exports [ "guimessages" ] : outputClient ( root, "Hi All", 255, 255, 255, true ) 
    end 
end ) 

بكذا بيطلع الكلام للكل الي في السيرفر بناء على طلبك

+ حطه من جانب كلينت وتأكد من ملف الميتا انه مضبوط

يكون شغال عشان يطلع الكلام guimessgaes وضروري مود

كودك خطا

-----

exports["guimessages"]:outputClient("HI ALL", 255, 255, 255, true)

علي طول

فكودي انا مسوي تريقر للسيرفر + الأخ الي يقول يكرر الكلام

الكود جربتو ما يكرر الكلام معي

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