• Print

Author Topic: Garry finally fixed something?  (Read 37 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Garry finally fixed something?
« on: February 15, 2010, 10:41:01 pm »
Want to look into this for possibilities in improving our code, JamminR? http://www.facepunch.com/showthread.php?p=20225853
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #1 on: February 16, 2010, 03:09:31 pm »
O_o

OOoooo... shiny new gag spoon!
Sure.. give me a few days to get my lua hat again.
« Last Edit: February 16, 2010, 03:11:30 pm by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Garry finally fixed something?
« Reply #2 on: February 16, 2010, 03:55:45 pm »
In response to what you posted on the FP forums... there was some form of function to do it, but it was completely broken (useless, did nothing whatsoever). I think the hook is new though, so that probably works if the functions don't.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #3 on: February 16, 2010, 07:23:10 pm »
Ok, I want some input;
Two ways I can go with this...
Both have some various points good and bad
First-
Player.SetMuted
1) A smart script kiddie could write a bypass (this wouldn't bother me personally, I'd end up kicking or banning them for punishment avoidance)
2) Would require less code adjustment. (I'd simply use the existing usermessage code, instead of sending to one player, send to all muting the 'gagged' players.)
3) Is Client-side (various good/bad, see #1 and #2 again too)
4) Not sure it's working, at least GUI menu-wise. I joined a multiplayer server, went into my Main game menu, Player List, highlighted a player, 'mute' button... Close... went back.. the 'muted' flag that was there was gone again.

Second-
Gamemode.PlayerCanHearPlayersVoice
1) Server-side - less script kiddie avoidance possibility, but perhaps more server resource usage.
2) Will require major code rewrite of gag commands
3) Possible potential for other uses (?Some player to player private voice chat?)

That's all I can think of for now.
« Last Edit: February 16, 2010, 08:28:19 pm by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Garry finally fixed something?
« Reply #4 on: February 16, 2010, 08:17:46 pm »
The first way doesn't have much potential for bypassing, since they'd have to hack every client, not just themselves. This is the function that was originally broken, if I remember correctly, so you'd need to make sure it actually works first.

The second way doesn't use much server resources as far as I know, since the server still has to determine how's allowed to hear what anyways.

If I were you, I'd go for #1 if it works, #2 otherwise.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #5 on: February 16, 2010, 08:35:49 pm »
Oops. I'd gotten backwards about who's muting who.
The gagged player isn't getting setmute on his side, it's the other connected players.

Also, the Gamemode.PlayerCanHearPlayersVoice brings about another punishment idea for me.
ulx deafen
We have several other 'sense' punishments, blind, mute, gag... seems deafen would be easy and fun too.
Too bad there's no server side function GM.CanHearAnything.
Probably some client/console hacks, but I didn't like gag for that reason.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Garry finally fixed something?
« Reply #6 on: February 16, 2010, 08:36:52 pm »
Oops. I'd gotten backwards about who's muting who.
The gagged player isn't getting setmute on his side, it's the other connected players.

Also, the Gamemode.PlayerCanHearPlayersVoice brings about another punishment idea for me.
ulx deafen
We have several other 'sense' punishments, blind, mute, gag... seems deafen would be easy and fun too.
Too bad there's no server side function GM.CanHearAnything.
Probably some client/console hacks, but I didn't like gag for that reason.


probably some cvar to set volume to 0, but that's console hacks again.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #7 on: February 16, 2010, 08:53:34 pm »
Oh, though we use our current function for several things (mute, gimp, say commands)... I found this too.
http://wiki.garrysmod.com/?title=Gamemode.PlayerCanSeePlayersChat

Not sure we'd ever use it. Just throwing it out there too.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Garry finally fixed something?
« Reply #8 on: February 16, 2010, 09:01:15 pm »
Oh, though we use our current function for several things (mute, gimp, say commands)... I found this too.
http://wiki.garrysmod.com/?title=Gamemode.PlayerCanSeePlayersChat

Not sure we'd ever use it. Just throwing it out there too.

It would be neat to use for asay and psay if we could modify the message... which we could through the other hook. Think that would look better than how we're currently doing it with tsays?

Edit: Oops, was confusing mic chat with text chat. Nevermind!
« Last Edit: February 17, 2010, 12:32:41 pm by Megiddo »
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #9 on: February 16, 2010, 09:08:32 pm »
better than how we're currently doing it with tsays?
Don't think so, but maybe you're seeing bigger picture than I am.
It just says 'true all can see it' or 'no all can't'

OH!
ulx lockout - prevents users from getting into vehicles (and kicks them out if already in, or even perhaps, keeps them in using http://wiki.garrysmod.com/?title=Gamemode.CanExitVehicle)
http://wiki.garrysmod.com/?title=Gamemode.CanPlayerEnterVehicle

ulx slomo - sets player speed to <variable multiplier .1 to .5> of current speed.
http://wiki.garrysmod.com/?title=Gamemode.SetPlayerSpeed

(Running on melatonin brain... 90 miles an hou...*crash* bedtime!)
ok..gnight
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Garry finally fixed something?
« Reply #10 on: February 16, 2010, 09:17:02 pm »
Don't think so, but maybe you're seeing bigger picture than I am.
It just says 'true all can see it' or 'no all can't'

Don't think so, one of the parameters passed in is for the listener, and this is the hook that's used for team chats.

lockout and slomo seem like things that would make good addons. :)
Experiencing God's grace one day at a time.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: Garry finally fixed something?
« Reply #11 on: February 17, 2010, 11:02:35 am »
haha, this topic is entertaining.

I love the lockout/slow-mo ideas -- (who get's to make them? haha)
Quote
3) Possible potential for other uses (?Some player to player private voice chat?)
I like the idea of private chat a lot, because I can clearly remember instances where I'm trying to tell someone something, but mic chatter is too high to talk.

An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Garry finally fixed something?
« Reply #12 on: February 17, 2010, 01:31:36 pm »
Slowmo sounds fun-- of course, why limit it to going slow when you can speed things up? :D
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Garry finally fixed something?
« Reply #13 on: February 17, 2010, 03:51:55 pm »
Slowmo sounds fun-- of course, why limit it to going slow when you can speed things up? :D
Ryno-saurus has released a player setspeed thing. However, I don't like hsi way of entering a number.
Though most sandbox servers don't vary, several custom games/others use different speeds than default.
2000 (as he mentions in his post example) on one may not be the same on another.
Heck, even UTeam sets different speeds... imagind if he applied same speed to * ... no difference any more.

(Hence why I like multipliers .1 to 2 in most of my 'number settings' scripts)

Re: Jay... yeah... me on melatonin + you being easily amused... i could see entertainment.
:P
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print