Raised This Month: $ Target: $400
 0% 

User Tag Prefix


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-18-2014 , 17:18   User Tag Prefix
Reply With Quote #1

Game : Counter-Strike
Version : 2.2





[ Description ]

[UTP] User tag Prefix its a plugin which you can give players or admins tags by name or ip or steamid or flag or pass and you have to use also access flag....

[ Cvars ]

Code:
utp_show_user_status "1" - Show Alive/Dead user status in chat, value <0 - Show Alive/Dead> <1 - Show Dead Only> <2 - Show Alive Only>
utp_login_info "_tag" - login info | when user login or connected check his password by this user info
[ Cmd ]
Code:
amx_reloadtags - reload the config tag file
amx_addtag - add tag (usage : <ip/steam/name/flag/pass> <u-ip/u-steam/u-name/none/(u-ip/u-steam/u-name)> <flag> <tag> <chat-color(!t/!y/!g)> <password/passcode>)
amx_removetagmenu - remove tags by using the menu its will be more simple fore you!
amx_changetagmenu - Multitags you can now change you'r tag prefix to you'r available tags! *NEW* From here also you can disable the tag!
amx_tag_password - this cmd open's the login menu for pass method!
[ Version ]

Code:

v1.0: Released:...
v1.1: Command Cvar flag Added, Command Add Tag Added.
v1.2: Flag Method Added, Code Updated.
v1.3: Command Cvar utp_show_user_stats, Message id Sending Fixed, Fixing Few Bugs.
v1.4: Command amx_removetagmenu Added, Mistakes Fixed, Colors Added to Chat(By Typing !t - team color, !g - green color, !y - yellow color).
v1.5: Added Password method, Fixed Few Bugs.
v1.6: A-Bug Fixed & Now you can add colors to your tag.
v1.7: Multitags(Change tag) Menu Added.
v1.8: Fixed Some bugs, Code Optimized.
v1.9: Fixed Some Bugs, Added Save last Tag Chosen, Optimized Some Code.
v2.0: Optimized Some Code, Now you can disable the tag from the 'amx_changetagmenu', Colored-chat is now available, Fixed some bugs.
v2.1: Remove tags menu was fixed.
v2.2: Small bugs were fixed.
How to add tags

add tag by name:-
PHP Code:
 "Name" "user nick name" "user flag" "tag prefix" "CColor(!g/!y/!t)" 
add tag by steam:-
PHP Code:
 "Steam" "user steamid" "user flag" "tag prefix" "CColor(!g/!y/!t)" 
add tag by ip:-
PHP Code:
 "IP" "user IP Address" "user flag" "tag prefix" "CColor(!g/!y/!t)" 
add tag by flags:-
PHP Code:
 "Flag" "note" "user flag" "tag prefix" "CColor(!g/!y/!t)" 
add tag by pass:-
PHP Code:
 "Pass" "user nick name or ip or steamid" "user flag" "tag prefix" "CColor(!g/!y/!t)" "user password/passcode" 
[ Installation ]

Add the files in their direct folders and then go to configs/ open plugins.ini file, scroll down
add the plugin name 'user_tag_prefix.amxx' at the last close and save !

Code:

users_tag.cfg ----------- addons/amxmodx/configs/'Over Here'
user_tag_prefix.amxx ----------- addons/amxmodx/plugins/'Over Here'
Attached Thumbnails
Click image for larger version

Name:	2015-08-15_00001.png
Views:	6074
Size:	53.1 KB
ID:	147430   Click image for larger version

Name:	2015-08-15_00002.png
Views:	4082
Size:	35.8 KB
ID:	147431  
Attached Files
File Type: cfg users_tag.cfg (531 Bytes, 3628 views)
File Type: sma Get Plugin or Get Source (user_tag_prefix.sma - 5447 views - 24.2 KB)

Last edited by Natsheh; 06-24-2017 at 19:56. Reason: Updating
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-19-2014 , 12:20   Re: User Tag Prefix
Reply With Quote #2

No, not again a tag plugin, they are everywhere.
__________________
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-19-2014 , 12:32   Re: User Tag Prefix
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
No, not again a tag plugin, they are everywhere.
Hahhhhh i expect that , cant i make my own version?
And beside this one will be different..
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-19-2014 , 12:40   Re: User Tag Prefix
Reply With Quote #4

And so so so badly coded.
__________________
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-19-2014 , 12:45   Re: User Tag Prefix
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
And so so so badly coded.
Huh realy?
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 12-19-2014 , 12:51   Re: User Tag Prefix
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Huh realy?
Yup.
Example:
Code:
get_user_info(id, "name", sNname, 32-1)

Instead of writing 32-1 use charsmax().
Also use formatex instead of format.
In remove_users_tags() you should use get_players.
__________________
Kia is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-19-2014 , 12:57   Re: User Tag Prefix
Reply With Quote #7

Some more and more and more examples:

1. In plugin_init you create msgid_saytext and use it just one time, just use directly the native.
2. You don't need to remove tags in disconnect & putinserver, do that only in disconnect.
3. In client_infochanged static is not needed.
4. Use charsmas instead of harcoding a string array size.
5. Use formatex, not format, is faster.
6. You use prefix wrong. On a bool, you put "s" and "f" with makes me think at a string and a float, not at a bool.
7. sizeof is not a function, you should not use it like sizeof(string), but sizeof string.
8. In remove_user_flags use get_players to get all VALID players.
9. You should not return an array, this may work but it's a bad way.
__________________
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-19-2014 , 12:58   Re: User Tag Prefix
Reply With Quote #8

Quote:
Originally Posted by Kia View Post
Yup.
Example:
Code:
get_user_info(id, "name", sNname, 32-1)

Instead of writing 32-1 use charsmax().
Also use formatex instead of format.
In remove_users_tags() you should use get_players.
You telling me thats get_players better than this & how so
PHP Code:
for(new 0maxplayers)
    If(
is_user_connected(i))
          
//rest of the code 
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-19-2014 , 13:02   Re: User Tag Prefix
Reply With Quote #9

When you loop from 0 to maxplayers you loop all possible ent that can be players, not all players and you can get invalid results. get_players is faster and will give correct results.
__________________
HamletEagle is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-19-2014 , 13:11   Re: User Tag Prefix
Reply With Quote #10

All the hard coded will be FiXeD Soon...

Last edited by Natsheh; 12-19-2014 at 13:13.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 12:17.


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