ULX

Author Topic: ULX "Fun" commands  (Read 3178 times)

0 Members and 1 Guest are viewing this topic.

Offline [eG] Tom

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
ULX "Fun" commands
« on: December 26, 2012, 06:22:34 PM »
Hi,

Is there a way that ULX "fun" commands do not send a chat message to the whole server? How can their output be silenced?

Thanks in advance.
« Last Edit: December 26, 2012, 08:01:06 PM by [eG] Tom »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX "Fun" commands
« Reply #1 on: December 26, 2012, 09:04:01 PM »
Use the console instead of the chat window to do commands, and set your echo options in ulx configs accordingly.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline [eG] Tom

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: ULX "Fun" commands
« Reply #2 on: December 26, 2012, 09:25:48 PM »
Use the console instead of the chat window to do commands, and set your echo options in ulx configs accordingly.

Thanks! I found it out right before I read your reply though. :P

I have two more questions, if you'd be willing to answer them.

1) I run a TTT server, and I'd like for a player to know who killed them. For example, when they die they would see "You were killed by [eG] Tom with rifle." How could I implement this?
2) Is there a way that I could setup an automated votemap? When the map is over, it would ask all players what map they would like and they could vote, instead of having to do !votemap.

Thank you so much for your help!

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
Re: ULX "Fun" commands
« Reply #3 on: December 26, 2012, 09:55:29 PM »
I run a TTT server, and I'd like for a player to know who killed them. For example, when they die they would see "You were killed by [eG] Tom with rifle." How could I implement this?

Here are 2 links that will help you make your own, http://wiki.garrysmod.com/page/Hooks/Base | http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html

...and here is my code (not tested.)...

Code: [Select]
function playerDies( victim, weapon, killer )
    if(IsValid(killer) and killer:IsPlayer()) then
        victim:ChatPrint( killer:GetName() .. " has killed you with a " .. weapon:GetClass() .. "\n" )
    end
end
hook.Add( "PlayerDeath", "playerDeathUniqueName", playerDies )
I cry every time I see that I am not a respected member of this community.