General > Developers Corner
Lua n00b questions
krooks:
Ok, so I've really built upon my !snr command for TTT. This code works just fine as is, and I'm pretty excited, because it has built in ban features!
http://pastebin.com/q578QtGM
It could probably look better, or be more efficient, I'm sure.
But I am still having issues echoing what is happening to said players via chat, I've use ULX commands, and also built in gmod chat commands. I can't figure out how to target everyone, since "v" only targets the selected player and "target_plys" targets the selected group.
I'd like everyone to know what is happening so that I don't have to manually write "the RDM'er is being dealt with" when ppl are crying about RDM.
JamminR:
--- Quote from: krooks on January 19, 2013, 12:25:29 PM ---But I am still having issues echoing what is happening to said players via chat, I've use ULX commands, and also built in gmod chat commands. I can't figure out how to target everyone, since "v" only targets the selected player and "target_plys" targets the selected group.
I'd like everyone to know what is happening so that I don't have to manually write "the RDM'er is being dealt with" when ppl are crying about RDM.
--- End quote ---
http://ulyssesmod.net/docs/files/lua/ulib/shared/messages-lua.html#tsay
Not sure why you'd have trouble. As long as you run tsay from the server, and leave the target nil, it would print to everyone's chat and console.
ULib.tsay( , "Message to all players" )
Above would work. If you like placeholders for nil, you could actually type nil, or use a known nil variable. Ulysses often uses _
ULib.tsay( _, "Message to all players" )
krooks:
Ugh, and it says it right in the documentation. :-X
Thanks for putting up with me. I'm going to write a couple more TTT specific commands and release a ULX TTT command pack soon (my first official release! woo!)
JamminR:
--- Quote from: krooks on January 21, 2013, 01:56:08 PM ---Ugh, and it says it right in the documentation. :-X
Thanks for putting up with me.<clip> release a ULX TTT command pack soon (my first official release! woo!)
--- End quote ---
No worries. Makes me use my brain to assist someone actually coding.
I've just not had motivation for lua projects of my own in years.
Helping others lets me live vicariously in the Gmod lua code world. :)
We look forward to your contributions.
krooks:
Well it doesn't go unappreciated. I'm the same way, though. I love helping people on forums, I've got a few where I help out with design/ web related things, it's always nice, and as I become more comfortable with lua, I'll probably be doing the same.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version