ULX

Author Topic: Freeze command suggestion  (Read 3461 times)

0 Members and 1 Guest are viewing this topic.

Offline Brandon

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
  • Minge tested, Brandon approved.
    • Steam
Freeze command suggestion
« on: October 15, 2009, 05:00:48 PM »
Recently i have noticed that in servers running ULX, people who have been frozen for punishment are easily able to get around this by typing the "kill" command in console. this lets them move around, look around, spawn props, etc, while still appearing to be frozen.

Possible update to include disabling that command while frozen?
Professionals have standards:
-Be polite.
-Be efficient.
-Have a plan to kill everyone you meet.
(yeah its off tf2 so what)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Freeze command suggestion
« Reply #1 on: October 15, 2009, 06:37:31 PM »
Wouldn't be difficult to do. We use antisuicide while in maul and jail I think.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Python1320

  • Newbie
  • *
  • Posts: 2
  • Karma: 1
Re: Freeze command suggestion
« Reply #2 on: October 16, 2009, 04:18:29 AM »
Code: [Select]
hook.Add( "CanPlayerSuicide", "ULX", function( pl )
        if pl.ulxNoDie then
              return false
        end
end )


Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Freeze command suggestion
« Reply #3 on: October 16, 2009, 06:38:50 AM »
Code: [Select]
hook.Add( "CanPlayerSuicide", "ULX", function( pl )
        if pl.ulxNoDie then
              return false
        end
end )



Except we've already got a better one setup. :)
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: Freeze command suggestion
« Reply #4 on: October 16, 2009, 03:04:05 PM »
And one might ask.. how better?
Originally, there was no "CanPlayerSuicide" hook. (Garry only added it in a recent past update.)
Megiddo wrote one based on "PlayerDeath" hook.
Megiddo and I went a few steps further and made it so that when a player is punished (maul, jail, blind, etc), it will record the weapons/ammo/health/armor and player position on the map. (And a few other things I don't remember right now).
If a player attempts suicide, it restores them with all that saved info.
(Though, yes, we do now use the CanPlayerSuicide hook to call most of those functions.)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Freeze command suggestion
« Reply #5 on: October 16, 2009, 03:19:34 PM »
Actually, I just went to look into adding ulx.setNoDie into Freeze.
It's already there.

Brandon, those servers you've been on either aren't running our latest (quite possible), or there's an error somewhere (not possible, of course :D :D :P (Joking))
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brandon

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
  • Minge tested, Brandon approved.
    • Steam
Re: Freeze command suggestion
« Reply #6 on: October 17, 2009, 01:26:00 AM »
Latest release? or SVN?
Neither my server nor my sister server run SVN. I know i run the lastest full release, i'm not sure what version my sister server runs.


Feel free to stop by my server. Hosted in Seattle, its name is "Dirac Delta"
Instant admin for ULX Team members if i'm present when you join.

« Last Edit: October 17, 2009, 01:27:50 AM by Brandon »
Professionals have standards:
-Be polite.
-Be efficient.
-Have a plan to kill everyone you meet.
(yeah its off tf2 so what)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Freeze command suggestion
« Reply #7 on: October 17, 2009, 11:31:09 AM »
Brandon, anti-suicide is in our SVN code.
I've not looked at the release, but since you're running it and it allows death..it's probably not in it.
Know Lua?
You might be able to look at jail and maul in ULX's fun.lua, and add in the death check to freeze by comparing them.

Thanks for the admin offer, but when I actually join a Gmod server online here lately, it's to relax, not administer a server.
Even that, I've not been in Gmod much.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming