AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Basic Votekick Immunity (https://forums.alliedmods.net/showthread.php?t=161586)

psychonic 07-08-2011 19:50

[TF2] Basic Votekick Immunity
 
1 Attachment(s)
Not much description needed beyond what's in post header.

Plugin stops people from calling kick votes in TF2 that target someone that they cannot via SM. ie. normal players cannot target admins. Admins cannot target admins of higher immunity. etc.

Enable sv_vote_issue_kick_allowed with immunity!
Enable sv_vote_issue_kick_allowed with impunity!

FlaminSarge 07-08-2011 19:54

Re: [TF2] Basic Votekick Immunity
 
Hi.

DarthNinja 07-08-2011 20:39

Re: [TF2] Basic Votekick Immunity
 
<insert psyduck here> :3

FlyveHest 07-09-2011 03:25

Re: [TF2] Basic Votekick Immunity
 
This is precisely what the doctor ordered, thanks :)

Powerlord 07-19-2011 20:20

Re: [TF2] Basic Votekick Immunity
 
Request:

Please update this to send the CallVoteFailed usermessage back to the player with arguments 12 for the first byte (reason, 12 is Can't Kick the Server Admin as discovered by me earlier today and now documented here) and... -1 for the short (time), as it's only used for reason 2.

psychonic 07-19-2011 20:21

Re: [TF2] Basic Votekick Immunity
 
Quote:

Originally Posted by Powerlord (Post 1514221)
Request:

Please update this to send the CallVoteFailed usermessage back to the player with arguments -1/255 for the first byte (team) and 12 for the second byte (reason, 12 is Can't Kick the Server Admin).

What is the benefit?

Powerlord 07-20-2011 12:13

2 Attachment(s)
Quote:

Originally Posted by psychonic (Post 1514222)
What is the benefit?

It comes out in the user's own language.

As Asherkin pointed out in another thread, this corresponds to the #GameUI_vote_failed_cannot_kick_admin in-game translation string.

-- MERGE --

Specifically, the code would look something like this (Note I was looking at the wrong usermessage earlier, which is why the arguments here are byte and short):
PHP Code:

new Handle:bf StartMessageOne("CallVoteFailed"clientUSERMSG_RELIABLE);
BfWriteByte(bf12);
BfWriteShort(bf, -1);
EndMessage(); 

The second argument is the time when the first argument is 2, otherwise it's ignored. However, all of Valve's internal functions set it to -1 when it's not used.

-- MERGE --

And here is what it would look like in game, in English.

-- MERGE --

I haven't tested it, but in theory this should work.

Changelog:
  • Updated version to 1.0a (I don't like changing major or minor version numbers in other peoples' plugins.)
  • Modified it to send the CallVoteFailed usermessage with fail reason 12 rather than a PrintToChat message.
  • Changed the spelling of psychonic's name to remove an extra n (it was spelled psychoninc in 1.0)
The SourceMod docs aren't clear if I needed to CloseHandle the BitBuffer handle or not, so I did just in case. If you get errors about invalid handles, it didn't, and this is why you're getting errors. Tell me and I'll fix it.

psychonic 07-20-2011 12:36

Re: [TF2] Basic Votekick Immunity
 
Quote:

Originally Posted by Powerlord (Post 1514636)
The SourceMod docs aren't clear if I needed to CloseHandle the BitBuffer handle or not, so I did just in case.

It will probably error when trying to close as there's nothing mentioned about them needing to be closed and,
Quote:

Closeable: Only if explicitly stated
http://wiki.alliedmods.net/Handles_(...ng)#BitBuffers

I'll likely add it as optional. The wording of the message is likely a bit too specific for the taste of some. "the server admin" in my mind implies that it is a single person running the server. The individual may not even have any admin power at all, let alone being "the admin". They may just have a reserve slot or be a donator.

If people are concerned about the hardcoded message in the plugin not being translatable, I can add a translation file.

Powerlord 07-20-2011 15:17

Re: [TF2] Basic Votekick Immunity
 
Quote:

Originally Posted by psychonic (Post 1514647)
It will probably error when trying to close as there's nothing mentioned about them needing to be closed and,


http://wiki.alliedmods.net/Handles_(SourceMod_Scripting)#BitBuffers

I'll likely add it as optional. The wording of the message is likely a bit too specific for the taste of some. "the server admin" in my mind implies that it is a single person running the server. The individual may not even have any admin power at all, let alone being "the admin". They may just have a reserve slot or be a donator.

One thing I didn't do was see if setting the short to a client index or userid would cause it to display something differently.

Rd1981 02-25-2012 23:29

Re: [TF2] Basic Votekick Immunity
 
Is there a certain flag this plugin follows because donators can still be kicked havent tried on admins yet.


All times are GMT -4. The time now is 16:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.