Raised This Month: $51 Target: $400
 12% 

Custom Player Tags


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 05-08-2011 , 19:34   Custom Player Tags
Reply With Quote #1

I do not support this plugin anymore, there are too many people complaining about bugs and I don't know how to solve them. If you want to fix the bugs and support the plugin, please do it.

Custom Player Tags v4.0
by thony
- Description:
With this plugin you can add custom tags to a player. When a player writes something in the chat it will appear his tag in green before his name. Like:
Quote:
[1337] thony : Hello! I'm thony, or kotinha...

- How does flag system works?

So, because the way I wanted to do this flag system had too many errors, I've decided to do a new one.

If you have the flags abcdefgh and you want to give a tag to all players with the same flags as you, you'll need to do:
cpt_tagflags "abcdefgh" "MY AWESOME TAG"
If you do cpt_tagflags "a" "MY AWESOME TAG" you WON'T have that tag. (this way is how I wanted to do previously...)
- Cvars & Commands:
cpt_tagplayer < player name > < tag > - Add a tag to a player
cpt_tagflags < flag(s) > < tag > - Add a tag to all players with the specified flag(s).
cpt_untagplayer < player name > - Removes a tag from a player
cpt_untagflags < flag(s) > - Removes a tag from flag(s)
cpt_removeall - Removes all tags
new! cpt_viewflags < player name > - View the flags from a player.
new! toggletag - Enables / Disables your tag (ADMIN_BAN or ADMIN_KICK)
- Changelog:
Quote:
v. 1.1 - 09-05-2011
- Code optimized. Thanks to fysiks
v. 1.2 - 10-05-2011
- Fixed a bug. Thanks to dontogar and ConnorMcLeod
v. 2.0 beta - 10-05-2011
- Command names edited.
- Added tags by flag.
- Added remove tags command.
v. 3.0 - 09-05-2011
- Remade the plugin!
v. 3.1 - 11-09-2011
- Flag related stuff made again...
v. 4.0 - 24-10-2011
- Remade the plugin! (again...)
- New flag system.
- Added command - cpt_viewflags
- Added command - toggletag

- To Do:
- Add tags by flags.
Attached Files
File Type: sma Get Plugin or Get Source (customplayertags.sma - 6102 views - 6.7 KB)
__________________
"If God exists, I hope he has a good excuse." - Woody Allen

Last edited by kotinha; 03-16-2012 at 11:22. Reason: Update :)
kotinha is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-08-2011 , 21:28   Re: Custom Player Tags
Reply With Quote #2

This plugin will not work correctly on most mods therefore the modification category should be changed.

Names won't be longer than 32 characters so there's no need to make those variables larger than that.

new msgID = get_user_msgid("SayText") should be a global variable. It won't change mid-game.

if(equal(szText, "")) if( !szText[0] )

You should probably use static variables in your hook_say() function because it will be called relatively often.

Use cs_get_user_team() with a switch with CS_TEAM_[CT|T] constants as cases and set the default case to use grey.

Instead of using szTeam like you do, you can make a global array containing the display-able team names indexed by cs_get_user_team() value.
__________________
fysiks is offline
GarbageBox
Senior Member
Join Date: Feb 2010
Old 05-09-2011 , 05:15   Re: Custom Player Tags
Reply With Quote #3

This is what I want for a long time.
But if the player's can change their tag with say /sth XX it would be better
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 05-09-2011 , 07:41   Re: Custom Player Tags
Reply With Quote #4

Thanks for the corrections fysiks! I've done everything that you told me to do except the last one, because I don't understand it lol
And what is the difference between static and new?

@GarbageBox I'll do that as soon as the plugin doesn't need more fixes
EDIT: If the player can change their tag he can put like [ADMIN] and people will think that he is admin O.o
__________________
"If God exists, I hope he has a good excuse." - Woody Allen

Last edited by kotinha; 05-09-2011 at 07:58.
kotinha is offline
GarbageBox
Senior Member
Join Date: Feb 2010
Old 05-09-2011 , 10:05   Re: Custom Player Tags
Reply With Quote #5

Maybe can change admin chat color to green, then it wont let others confuse.
__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others
GarbageBox is offline
dontogar
New Member
Join Date: Apr 2011
Old 05-10-2011 , 10:14   Re: Custom Player Tags
Reply With Quote #6

doesnt work
dontogar is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-10-2011 , 10:37   Re: Custom Player Tags
Reply With Quote #7

BLOCK_ONCE fails, most messages are looped through all players.
Just return PLUGIN_HANDLED_MAIN so chat commands can work and chat messages are not sent.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 05-10-2011 , 12:36   Re: Custom Player Tags
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
BLOCK_ONCE fails, most messages are looped through all players.
Just return PLUGIN_HANDLED_MAIN so chat commands can work and chat messages are not sent.
Done (:
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
FuZ!on
Senior Member
Join Date: Aug 2007
Old 05-11-2011 , 13:06   Re: Custom Player Tags
Reply With Quote #9

If you add it, do they keep it until you remove it or just until disconnect?
FuZ!on is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 05-11-2011 , 13:12   Re: Custom Player Tags
Reply With Quote #10

Quote:
Originally Posted by FuZ!on View Post
If you add it, do they keep it until you remove it or just until disconnect?
It uses nvault to save the tags so they keep until you remove it.
__________________
mabaclu is offline
Reply



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 18:56.


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