Author Topic: Auto slay  (Read 3536 times)

0 Members and 1 Guest are viewing this topic.

Offline JJD

  • Newbie
  • *
  • Posts: 2
  • Karma: -1
Auto slay
« on: November 11, 2016, 06:40:40 PM »
This sub-forum is only for help or discussion regarding projects created by Team Ulysses. If you are requesting help, please search the forums FIRST to make sure your question has not already been answered. If you still need help, fill in the following information.

My ULib/ULX versions (run "ulx version" in console):
ULib v..2.61
ULX v..3.71

Game mode(s) I am having this problem on: TTT

Lua errors shown in console, if any:
Code: [Select]
<insert errors here>
So, I run a TTT server and I would like it to at the beggining of the round, check for players in a group and if they are in it, slay them.
My script is in gamemode>gamemode>init.lua as follows:
local function BadBoyChecker(ply)
   if GetRoundState() == ROUND_ACTIVE then
   if ply:CheckGroup("badboys") then
   ply:Kill()
   else
end
   Im not the best at lua so I may be making on obvious mistake, but am getting it correct in theory.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Auto slay
« Reply #1 on: November 11, 2016, 07:39:19 PM »
If you use TTTDamagelogs there is a built in !aslay command.

If you wanted to make your own though you'd need to make it in addons. I'd help more but I'm kind of busy atm. If you want to make your own I could help you later.

Also,
This sub-forum is only for help or discussion regarding projects created by Team Ulysses.
« Last Edit: November 11, 2016, 07:42:38 PM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JJD

  • Newbie
  • *
  • Posts: 2
  • Karma: -1
Re: Auto slay
« Reply #2 on: November 12, 2016, 06:38:28 AM »
My mistake in wording, I mean to have a group that all time slays them. I put them in the ULX group "bad boys" maybe for mass rdming and every round they would get slayed. Essentially, they would be "banned" from playing.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Auto slay
« Reply #3 on: November 14, 2016, 10:17:22 AM »
Why not just ban them?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Auto slay
« Reply #4 on: November 14, 2016, 03:20:16 PM »
Why not just ban them?
My thought exactly, but, I thought too obvious to ask.
Thank you for verbalizing my same thought.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming