Raised This Month: $95 Target: $400
 23% 

Force Admin Tag 1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   devicenull (200)
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 11-06-2004 , 04:52   Force Admin Tag 1.0
Reply With Quote #1

Force Admin Tag 1.0
Nov. 11th, 2004
By: BigBaller

Simple plugin, what it does is changes a players name if they have admin on the server. This can be changed by the amx_forcetag cvar. 1 is to enable, 0 to disable. Enabled by default.

If user changes name during game, this plugin will detect it and change users name to use the admin tag.

This should work on any Half-Life based mod running AMX MOD X.

Credits
AMX MOD X Scripting Forum (http://forums.alliedmods.net/forumdisplay.php?f=11)
PM - for giving a idea on how to detect if user has [ADMIN] in name already.
XxAvalanchexX - suggesting use of is_user_admin() stock
Janzert - for fixing the nasty loop I kept getting and making a more efficent code.
Attached Files
File Type: sma Get Plugin or Get Source (admin_tag.sma - 6094 views - 1.5 KB)
__________________

BigBaller is offline
Dubie
Member
Join Date: Mar 2004
Old 11-06-2004 , 19:47  
Reply With Quote #2

Could you add if the admin has Immunity it would not change his name.
If a user signs on and has the [Admin] tag in his name will this see that and take actions?

Peace,
Dubie
Dubie is offline
Send a message via MSN to Dubie
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 11-06-2004 , 20:00  
Reply With Quote #3

I could add that feature about the immunity.

Also I am working on if a user has [ADMIN] in thier name and they arent acutally a server admin. I am debating on whether it should kick the poser or just change thier name.
__________________

BigBaller is offline
Dubie
Member
Join Date: Mar 2004
Old 11-07-2004 , 15:14  
Reply With Quote #4

You could have it change their name to impostor then slay them once.
If you just change their name, how they going to learn. lol
Either way would be cool

Peace,
Dubie
Dubie is offline
Send a message via MSN to Dubie
MassAsster
Member
Join Date: Jun 2004
Old 11-18-2004 , 11:51  
Reply With Quote #5

work for 16?
because i noticed it compiled into amxx
__________________

HellzKitchenServer.com - Dedicated Game Server hosting and Clan Website Hosting.
MassAsster is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 11-18-2004 , 13:11  
Reply With Quote #6

It will work if you use amxx .16 compiler on your own computer

However I suggest you upgrade to AMXX 1.0 because all plugins will be required to update to that version if posted in this forum.
__________________

BigBaller is offline
_SAi_
Junior Member
Join Date: Sep 2004
Old 12-07-2004 , 16:30  
Reply With Quote #7

is there a reason i cannot change the [ADMIN] to my clan tag? if I do it changes my name 5 times so my name has FIVE of my clan's tag.

for example: if clan's tag is {GF}

then it changes my name 5 times to look like:
{GF} bob
{GF} {GF} bob
{GF} {GF} {GF} bob
{GF} {GF} {GF} {GF} bob
{GF} {GF} {GF} {GF} {GF} bob

as long as I leave ADMIN in, then it doesn't matter if it's [] or {}.

Am I making sense?

Thanks!
_SAi_ is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 12-07-2004 , 21:57  
Reply With Quote #8

try this, I am not entirely sure if it will work but change

Code:
if (is_user_admin(id) && (!equal(name, "[ADMIN]", 7)))

to

Code:
if (is_user_admin(id) && (!equal(name, "{GK}", 4)))

Im going to take a wild guess here and figure that you didnt change the number after the admin tag, that is why it kept changing because the number stands for the number of characters the plugin checks for the equal to return true, hopefully that will work.
__________________

BigBaller is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-07-2004 , 22:22  
Reply With Quote #9

Do not punish a user for joining with the [ADMIN] tag and not being an admin. If you have this plugin on a variety of servers and an admin comes from one server and joins a different one without bothering to change his name (and I wouldn't if I played there often), why would you slay him and/or kick him for that? I would have it remove the [ADMIN] tag from a user's name when they leave the server, provided they are an admin. Also, a CVAR or define as to what the tag should look like would be nice.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 12-08-2004 , 00:15  
Reply With Quote #10

I havent even tried to script the "anti-admin" or w/e, too busy
__________________

BigBaller is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:17.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode