Author Topic: ULX Functions  (Read 2391 times)

0 Members and 1 Guest are viewing this topic.

Offline GGG KILLER

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
ULX Functions
« on: September 18, 2013, 02:17:00 PM »
So guys, I'm making a taser and some people asked for me to make a way of just admins receive a message.
So I'm here asking:
1. What is the function to send a message to all admins
2. What is the function to add a message to the logs

My taser addon is here
http://steamcommunity.com/sharedfiles/filedetails/?id=173953834

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX Functions
« Reply #1 on: September 18, 2013, 03:05:49 PM »
As ulx wasn't itself written to be a library, we've never actually posted a document of commands within it.
We have however, published ULib, which ULX relies on.
http://ulyssesmod.net/docs/

If you're wanting a 'chat like' message sent to admins, look up ulx.asay in our ulx files.
If you're wanting a 'log' like echo that only admins can see and is written to server logs, check out FancyLogAdmin (I think). Probably in logs.lua of ulx.

Our ULX code is commented reasonably well, and written in such a way that isn't obfuscated.
Variables are easy to understand, functions are too, etc.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline GGG KILLER

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: ULX Functions
« Reply #2 on: September 21, 2013, 04:54:55 PM »
But now i need to know how to change the color from green to another one(red or blue)

Offline iSnipeu

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 12
Re: ULX Functions
« Reply #3 on: September 21, 2013, 05:16:41 PM »
But now i need to know how to change the color from green to another one(red or blue)
Just use tsayColor
« Last Edit: September 21, 2013, 05:18:32 PM by iSnipeu »