Ulysses

General => Developers Corner => Topic started by: Michael Brady on July 10, 2016, 06:49:34 PM

Title: advanced keybind help
Post by: Michael Brady on July 10, 2016, 06:49:34 PM
im trying to make a keybind the person I'm looking at and also one that targets the last one to say something in chat(could this be done with admin chat only) I would really apriciate help.
Title: Re: advanced keybind help
Post by: iViscosity on July 10, 2016, 06:54:02 PM
I'm confused... what exactly are you trying to do with the keybind?
Title: Re: advanced keybind help
Post by: Michael Brady on July 10, 2016, 06:57:27 PM
for example lets say kick the person I currently have the center of my screen on(harder one/impossible)

or somthinng that may be doable. player says something in admin chat, I press bind and goto the player since he was the last one to say somthing
Title: Re: advanced keybind help
Post by: iViscosity on July 10, 2016, 06:58:45 PM
for example lets say kick the person I currently have the center of my screen on(harder one/impossible)

or somthinng that may be doable. player says something in admin chat, I press bind and goto the player since he was the last one to say somthing

That first one is actually extremely easy.
Code: [Select]
bind "key" "ulx kick @" but I don't know if you could actually do the second one... I could look into it and see if I could find a way.


Bind targetting if you didn't know:


^ = yourself
* = everyone
@ = target you're looking at
! = everything but (followed by above (ex. !^ = everyone but yourself))
Title: Re: advanced keybind help
Post by: Michael Brady on July 10, 2016, 07:06:45 PM
wow thanks lol the others I knew about but not the @
Title: Re: advanced keybind help
Post by: iViscosity on July 10, 2016, 07:09:09 PM
wow thanks lol the others I knew about but not the @

I didn't either until I googled it a few months ago trying to make a bind like that lol

I'll look into seeing how to capture the last person to send a message, but I don't know for sure how it would be done...
Title: Re: advanced keybind help
Post by: MrPresident on July 11, 2016, 10:46:25 AM
There's not a way to get the last person who said something in admin chat without modifying admin chat and even then, there wouldn't be a way to use that player in a bind.

You would need to write a new module to do this.
Title: Re: advanced keybind help
Post by: Michael Brady on July 11, 2016, 10:49:30 AM
I mostly figured that. but while I'm smart I'm still new to coding lua so I figured id ask people who new more

also thanks for the @ ive had much fun running around saying death touch