Author Topic: [ULX SVN/ULib SVN only] AntiPhysgun - Keep admins from physgunning superadmins.  (Read 1066 times)

0 Members and 1 Guest are viewing this topic.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
AntiPhysgun is an addon for ULX SVN that adds an access called "ulx physgunplayer_protect".
When added to a group or player, the player(s) can't be picked up by other players with "ulx physgunplayer".
Note: this can be overridden if the player trying to physgun has the "overcomeimmunity" access. Removed in version 1.1
By default, it adds the access to the superadmin group.

I made this because "ulx physgunplayer" doesn't work with the new command system yet.
This is most likely only temporary, as I've been told by Megiddo, but this is just a quick fix.

Usage (if you want to use it for groups other than superadmin):
Type in the console:
ulx groupallow <group> "ulx physgunplayer_protect"

And if you want to use it for specific players:
Type in the console:
ulx userallow <player's name> "ulx physgunplayer_protect"

Installation:
Extract to addons.

UPDATE: AntiPhysgun SVN version 1.1

FIX: Fixed the error since Megiddo removed the ULib.ACCESS_IMMUNITY global variable. (It's no longer needed at all)
I remember getting an error with this lately when it was working fine before, so I'm assuming this was the problem. (This is untested, post here if you have problems)
I also removed the check for "overcomeimmunity", following the way Megiddo did to the official PlayerPhysgun. (overcomeimmunity is retired now)

Enjoy.
« Last Edit: May 27, 2010, 07:54:27 PM by RynO-SauruS »

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 869
  • Karma: 54
    • View Profile
    • Dev-Solutions
Nice!

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 RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Thanks.

Offline Ploo

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
    • View Profile
If you have staff that annoy you with their ability to pick you up with the physgun, maybe, they shouldn't be staff?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 3262
  • Karma: 106
  • Project Specialist
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
I tend to agree, but not everyone rules with as much of an iron fist as some others.
:)
Software Upgrade Paradox - If you improve a piece of software enough times, you eventually ruin it - David Pogue

Offline vader0146

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 3
    • View Profile
This is good, it seems like it will be useful to a lot of people.  ;D

But really, did you have to release a 6 line PhysgunPickup hook?

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
Why remove someone's admin completely for picking me up, instead of just removing their ability to do so in particular?
I don't think picking up a superadmin is really grounds for removing someone's admin rights completely.
A lot of people don't know how to write a simple script to fix this problem. Why not release it?

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 10
    • View Profile
UPDATE: AntiPhysgun version 1.1
See bottom of first post for details.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 3488
  • Karma: 188
  • Project Lead
    • View Profile
You are correct that immunity and overcomeimmunity were removed, they weren't really intended to linger as long as they did... I just kept forgetting to remove them.
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” -Brian W. Kernighan
"I love working on my crappy code. it is crappy, but it is mine. I guess I could love other people's code, but it's like loving other people's children -- not quite the same as your own" -- Jeff Atwood
"Their tree came and found my tree!" -- Stickly Man!