Author Topic: ulx module/ulx help  (Read 8703 times)

0 Members and 1 Guest are viewing this topic.

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: ulx module/ulx help
« Reply #15 on: February 25, 2014, 12:24:23 PM »
i thought it was in the developers corner and i know that it does but i only have one comma and it i suppoesed to be there but i even tryed to remove the comma so i could test it and it didnt work but i got it to work on client but not on a server for some reason and it is in addon format

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Re: ulx module/ulx help
« Reply #16 on: February 25, 2014, 01:03:26 PM »
Remove the string concatinator (..) after the comma, and GetText is a function value so it needs to have (). So:
Code: [Select]
chat.AddText( Color( 0, 255, 0 ), "(ADMIN)", Color( 0, 255, 0 ), ..TextEntry:GetText )
Should be:
Code: [Select]
chat.AddText( Color( 0, 255, 0 ), "(ADMIN)", Color( 0, 255, 0 ), TextEntry:GetText() )

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: ulx module/ulx help
« Reply #17 on: February 25, 2014, 01:24:15 PM »
yeah i have that right now but it only works client side lol i did this last night i forgot i already had a thread and now i have a new one
but when i put it in a server it doesnt work can anyone help me with making it a ulx ! command and a "ulx    " command?

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Re: ulx module/ulx help
« Reply #18 on: February 25, 2014, 01:38:26 PM »
Derma (textentry, etc) is all clientside. As is chat.AddText. If you want it to be distributed to clients, you need to either set up a net message (suggested) or a usermessage.

Net messages:
http://wiki.garrysmod.com/page/Net_Library_Usage

Send the text to the server (net.SendToServer) then process it to the clients you want (RecipientFilter) then send it back to the clients using a second net message, which the receive function would then process using chat.AddText

Offline lampman13

  • Jr. Member
  • **
  • Posts: 71
  • Karma: -10
Re: ulx module/ulx help
« Reply #19 on: February 25, 2014, 01:59:40 PM »
so my whole code wont work?

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Re: ulx module/ulx help
« Reply #20 on: February 25, 2014, 02:31:06 PM »
It will, you just need to modify it to allow for talk between the client and the server.

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: ulx module/ulx help
« Reply #21 on: February 25, 2014, 02:50:52 PM »
Derma (textentry, etc) is all clientside. As is chat.AddText. If you want it to be distributed to clients, you need to either set up a net message (suggested) or a usermessage.
You can also use something such as ULib.tsay.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given