Jump to content

مشكلة بـ triggerServerEvent


Recommended Posts

Client --

addEventHandler('onClientGUIClick', root,
function( )
if (source ==  GUIEditor.button[1] ) then
          local title = guiGetText(GUIEditor.edit[1])
          local text = guiGetText(GUIEditor.edit[2])
          triggerServerEvent ("outPut",localPlayer,text)
    end
    end )

Server -- 

addEvent("outPut",true)
addEventHandler("outPut",root,
  function (GUIEditor.edit[1],GUIEditor.edit[2])
                outputChatBox ( .. title .. getPlayerName ( thePlayer ) ..": #ffffff".. text, player, 255, 255,                255, true )
    end
  )

DeBug --

ERROR: Client (m9N) triggered serverside event outPut, bet event is not added serverside

 

Link to comment
--@Client Side


addEventHandler('onClientGUIClick', root,
function( )
if (source ==  GUIEditor.button[1] ) then
          local title = guiGetText(GUIEditor.edit[1])
          local text = guiGetText(GUIEditor.edit[2])
          triggerServerEvent ("outPut",localPlayer,text,title)
    end
    end )

--@Server Side
addEvent("outPut",true) ;
addEventHandler("outPut",root,
  function (text,title)
                outputChatBox ( .. title .. getPlayerName ( thePlayer ) ..": #ffffff".. text, player, 255, 255,255, true )
    end
  )

Try ,

  • Thanks 1
Link to comment
3 minutes ago, AbU - W6N said:

--@Client Side


addEventHandler('onClientGUIClick', root,
function( )
if (source ==  GUIEditor.button[1] ) then
          local title = guiGetText(GUIEditor.edit[1])
          local text = guiGetText(GUIEditor.edit[2])
          triggerServerEvent ("outPut",localPlayer,text,title)
    end
    end )

--@Server Side
addEvent("outPut",true) ;
addEventHandler("outPut",root,
  function (text,title)
                outputChatBox ( .. title .. getPlayerName ( thePlayer ) ..": #ffffff".. text, player, 255, 255,255, true )
    end
  )

Try ,

نفس المشكلة ..

#Salah S Hasoneh

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