ULX

Author Topic: help with modifying ulx spectate  (Read 2302 times)

0 Members and 2 Guests are viewing this topic.

Offline punkbeech1

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
help with modifying ulx spectate
« on: January 07, 2015, 12:45:25 PM »
hello, so on my server i wanted to modify the ulx spectate command so that it can spectate everyone. I noticed that when you pick a target to spectate on the other team then when you hit the left click it goes back to your team and you can spectate the other team anymore. ill looked through the util.lua where the ulx spectate code is. ive tired to modify it myself but cant get it to work. so i was wondering if someone could help me out so i could spectate everyone with that command.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: help with modifying ulx spectate
« Reply #1 on: January 07, 2015, 03:56:21 PM »
1) I personally wouldn't, as it sounds like a cheat to view another team. Spectate was intended for Sandbox, to view another players actions to ensure no troublemaking. Sandbox in most cases doesn't have multiple teams.
2) Make sure you're using latest ULib and ULX from our Github. Latest has been known to fix many oddities our almost 2 year old "release" code has due to Gmod updates.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline punkbeech1

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: help with modifying ulx spectate
« Reply #2 on: January 07, 2015, 04:41:03 PM »
this would be intended for staff only. I have a prop hunt server and i wanted to stop the constant team switching and users from using the spectator class so i edited fretta so you cant pick the spectator class and when u join a team it says u have to wait 9999 seconds before switching teams again. I was just trying to think of ways for only staff to be able to join spectator. so i thought of trying to modify the ulx spectate command. but is it possible to join spectator class with that command?
« Last Edit: January 07, 2015, 04:45:28 PM by punkbeech1 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: help with modifying ulx spectate
« Reply #3 on: January 07, 2015, 04:58:34 PM »
From looking at our current code, and your description, it sounds as though the game mode your using modifies Gmod's spectate and or spectateindex commands (or hooks)
Which, for a gamemode, are perfectly "ethical' things to do if they have a "spectator" team.

I'd still recommend you ensuring you have the latest ULib and ULX from github. I see we changed code in Oct 2014 re: spectate and TTT.
Perhaps it might help with prop hunt and your issue (though, I doubt it, as again, it sounds like prop hunt has modified spectate functions or hooks related to it.)

As this isn't truly a 'help with use or issue/bug" of ULib or ulx, I'm moving this thread to developers corner.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline punkbeech1

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: help with modifying ulx spectate
« Reply #4 on: January 07, 2015, 05:01:49 PM »
ok thank you for your help