Jump to content

Repassando Variáveis do Cliente para o Server


Recommended Posts

Gostaria de repassar a variavel do cliente para o server, n lembro muito bem como se faz esse processo 

//Cliente//


function outputEditBox (buttom, state)
	local item = dgsComboBoxGetSelectedItem(qiw)
	if buttom == "left" and state == "down" then
		if item ~= -1 then
         text = dgsGetText ( editBox )
         text2 = dgsComboBoxGetItemText(qiw, item) 

    end
end
end
addEventHandler ( "onDgsMouseClick", buttom, outputEditBox )


function Receber( text, text2)
	 if ( hasObjectPermissionTo ( source, "function.mute", true ) ) then
		 outputChatBox (text .. "" .. text2, source )

end
end
addEvent ("Receber>Dados", true)
addEventHandler ("Receber>Dados", root, Receber)

 

Link to comment
52 minutes ago, MRXBBC said:

Gostaria de repassar a variavel do cliente para o server, n lembro muito bem como se faz esse processo 


//Cliente//


function outputEditBox (buttom, state)
	local item = dgsComboBoxGetSelectedItem(qiw)
	if buttom == "left" and state == "down" then
		if item ~= -1 then
         text = dgsGetText ( editBox )
         text2 = dgsComboBoxGetItemText(qiw, item) 

    end
end
end
addEventHandler ( "onDgsMouseClick", buttom, outputEditBox )



function Receber( text, text2)
  local text = tostring(text)
  local text2 = tostring(text2)
	 if ( hasObjectPermissionTo ( source, "function.mute", true ) ) then
		 outputChatBox (text .. "" .. text2, source )

end
end
addEvent ("Receber>Dados", true)
addEventHandler ("Receber>Dados", root, Receber)

 

 

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