pKeys - Privilege Keys in Garry's Mod

pKeys - Privilege Keys in Garry’s Mod

This addon was originally for a ScriptFodder job but the person who posted the job isn’t interested any more so I thought I’d release this here.

If you’ve ever used Teamspeak you’ll know you can redeem a rank by typing in a privilege key, which is just a long string of text. This means people can get their ranks without admins being online, they can just send them the key and they can redeem their rank whenever.

Small video:

How to use:
Type !pk and it’ll show you the menu to either redeem, or if you’re one of the ranks in the config file, it’ll show you the menu to generate the keys.
NOTE: This only is currently setup to use ULX.

Download link:

The config file is located at:

The code is fairly well commented so it should be easy to understand, keys are saved to data/pkeys. The name of the txt file is the privilege key and inside is the rank it’ll give.

This is very useful for when players are selling donators when they donate for other people, Thanks for the addon!

I feel like the TeamSpeak part was a little misleading, never having seen anything like it before, and thought this had something to do with a connection between TeamSpeak and Garry’s Mod.

But when it comes to the concept itself, it looks really nice! Very good idea!

I didn’t really know what else to compare it to, I hope I clarified it with the video/text however. If anyone else has a better name or description I’d happily change it over, but Teamspeak 3 Privilege Keys seems the most relevant name I can think of.

Can keys be redeemed twice?

Once a key is redeemed it gets destroyed

Edit: It wouldn’t be difficult to add it as a config option if people are actually interested

Adzter Can I use that for DarkRP money? (How do I change)

I’m not quite sure I understand the question. Could you rephrase it?

I wanted people to write the key and get DarkRP $$$money$$$

Pretty cool concept but I honestly cannot grasp when this would come in handy. Why exactly would a community require such a thing? Surely if an admin is available to generate a key they’d be able to simply set the user as admin?

I’ll look into adding this

The idea is that when an admin is online, he can generate a key, he can then send this key to a person, say via IM, a forum message, etc. So that the user can get their rank if the admin isn’t online. Useful for users that are in a different timezone or busy admins.

This could also be extrapolated to do lots of other things. Give someone money, give someone an item, set a playermodel, give the player a perk such as speed, etc.

This would be great if it worked with prometheus, once donated you will get a key on the screen!

Or you could, you know, make prometheus directly add you to that usergroup.

Why not just use the rank action directly? xD

I too thought this was for Teamspeak itself when I first read the title / thread. But then I watched the video and understood it just works like Teamspeak’s privilege keys, anyhow, this is neat little thing Adzter!

So when the key is used its destroyed? If so you should make a config option that will decide whether the key should destroy

There could be a system if the package was not delivered. a specified key could be printed.

I learned how to fix this, but one thing I do not understand why I did not generate keys

Cool idea, but it can definitely be automated just as easily. Also, please get “TeamSpeak” removed from the title. As Author. said, it’s is super misleading, especially since the idea of privilege keys aren’t something unique to TeamSpeak.

What were you doing when the error occurred, ie, generating superadmin key after pressing the ‘send’ button.


EDIT: Wait seems you can’t change the title of the thread yourself, i’ll PM a mod.