Jump to content

مشكله بكود - طلب تصحيح


Mhmd.z

Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا مسوي كود اذا الاعب ضغط زر ييجي بالجيرد ليست انه ضغط الزر , بس هو الي يشوف بالجيرد ليست انه غط , ابي كل الاعبين يشوفو انه غط الزر كيف؟

addEventHandler ( "onClientGUIClick", root, 
function () 
if source == button then 
local localPlayerName = getPlayerName(getLocalPlayer()) 
local row = guiGridListAddRow(supportList) 
guiGridListSetItemText ( supportList, row, column, localPlayerName, false, false ) 
end 
end 
) 

Link to comment

كذه طلع معاي , بس مو ضابط

--client 
addEventHandler ( "onClientGUIClick", root, 
function () 
if source == button then 
local localPlayerName = getPlayerName(getLocalPlayer()) 
local row = guiGridListAddRow(supportList) 
triggerServerEvent ("client1_system", localPlayer) 
end 
end 
) 
  
--server 
function mhmd1(  ) 
for id, mhmd in ipairs(getElementsByType("player")) do 
triggerClientEvent("server1_system", mhmd, source) 
    end 
end 
addEvent( "client1_system", true ) 
addEventHandler( "client1_system", root, mhmd1 ) 
--client 
  
function mhmd1 () 
local row = guiGridListAddRow(supportList) 
local localPlayerName = getPlayerName(getLocalPlayer()) 
guiGridListSetItemText ( supportList, row, column, getPlayerName(mhmd ), false, false ) 
end 
addEvent( "server1_system", true ) 
addEventHandler( "server1_system", root, mhmd, mhmd1 ) 
  

Link to comment
-- #Client 
  
addEventHandler( "onClientGUIClick", guiRoot, 
function() 
    if ( source == button ) then 
        triggerServerEvent( "FromClientToServerExecute:ButtonFunction", localPlayer, getPlayerName( localPlayer ) ) 
    end 
end ) 
  
addEvent( "ResponseFromServer:AddPlayerNameInGridList", true ) 
addEventHandler( "ResponseFromServer:AddPlayerNameInGridList", root, 
function( Name ) 
    guiGridListSetItemText( supportList, guiGridListAddRow( supportList ), column, Name, false, false ) 
end ) 
  

-- #Server 
  
addEvent( "FromClientToServerExecute:ButtonFunction", true ) 
addEventHandler( "FromClientToServerExecute:ButtonFunction", root, function( Name ) triggerClientEvent( root, "ResponseFromServer:AddPlayerNameInGridList", root, Name ) end ) 

Edited by Guest
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...