• Print

Author Topic: Slay - there can only be one  (Read 11079 times)

0 Members and 1 Guest are viewing this topic.

Offline Declivity

  • Newbie
  • *
  • Posts: 8
  • Karma: -1
Slay - there can only be one
« on: January 12, 2013, 06:23:29 am »
I want to stop people from accidentally slaying a lot of ppl when they don't put in the full name of the person they are trying to slay.

How would I make it so it targets like ban or kick?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Slay - there can only be one
« Reply #1 on: January 12, 2013, 07:00:25 am »
line 93 of fun.lua:
Code: Lua
  1. slay:addParam{ type=ULib.cmds.PlayersArg }

change to:

Code: Lua
  1. slay:addParam{ type=ULib.cmds.PlayerArg }

This is line 72:
Code: Lua
  1. function ulx.slay( calling_ply, target_plys )

Add after that:

Code: Lua
  1. target_plys = { target_plys }
Experiencing God's grace one day at a time.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Slay - there can only be one
« Reply #2 on: January 12, 2013, 07:56:41 am »
why does slay take  the name you put in and  slay everyone who has the letters in there  name  i would think that it should throw a user error not slay all the users that have that name or did i miss something that something would be useful in that manner
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Slay - there can only be one
« Reply #3 on: January 12, 2013, 10:31:16 am »
Seems like most commands should probably only target one person, I know a couple years ago I suggested the wildcard * for everyone, and it was implemented I think by stickly,

What would be very useful is an "everyone but" command, would be great for muting everyone but yourself, or someone else who has something to say
My TTT server. Join the fun!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Slay - there can only be one
« Reply #4 on: January 12, 2013, 10:50:14 am »
Seems like most commands should probably only target one person

I disagree in general, but I can perhaps see the argument for partial names not targeting more than one person.


What would be very useful is an "everyone but" command, would be great for muting everyone but yourself, or someone else who has something to say

Already possible:
Code: [Select]
!^
Experiencing God's grace one day at a time.

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Slay - there can only be one
« Reply #5 on: January 13, 2013, 12:17:27 pm »
@.@ news to me! That's awesome. Going to be using this so much.
My TTT server. Join the fun!

  • Print