Author Topic: ULX Targetting System  (Read 1706 times)

0 Members and 1 Guest are viewing this topic.

Offline Juvare

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
ULX Targetting System
« on: March 26, 2016, 10:02:43 PM »
I have a rather odd question in regards to ULX - I've been wanting to add a way to target certain Job types in the RP servers that I administrate,
but don't know the functionality in the Garry's Mod Lua behind how the targetting system works:
(That is, how ^, @, and # is resolved to target a set person).

I've also been checking the Garry's Mod wiki for any hints as to where to start off, but I don't know whether to call the Player:GetUserGroup() or a different function;
or if there's a set parameter/definition that I need to change in my ULib or Ulx.
Any help with this would be much appreciated
Thanks
 :D

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: ULX Targetting System
« Reply #1 on: March 27, 2016, 01:27:33 AM »
You call the team (job). I don't remember what the function is, but you can get it on the DarkRP wiki.
Once you get to know me, you'll find you'll have never met me at all.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX Targetting System
« Reply #2 on: March 27, 2016, 04:13:31 AM »
Experiencing God's grace one day at a time.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: ULX Targetting System
« Reply #3 on: March 27, 2016, 01:36:45 PM »
Not sure what the DarkRP function is for targeting jobs, but this can be easily added to ULib using our hooks:
http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#ULibGetUserCustomKeyword
http://ulyssesmod.net/docs/files/lua/ulib/shared/defines-lua.html#ULibGetUsersCustomKeyword

iirc (I'm probably wrong, haven't done anything with DarkRP in years), it's something along the lines of ply.Team()
Once you get to know me, you'll find you'll have never met me at all.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX Targetting System
« Reply #4 on: March 27, 2016, 02:30:33 PM »
Juvare, or anyone else, by default, server administration "groups" have little to do with "jobs" in RP.
Most RP mods and gamemodes set teams for jobs.
Admin mods (whether they be ULX or not) use "groups" for server control.
This allows for server control no matter what game mode team you're on.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming