AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   User Tag Prefix (https://forums.alliedmods.net/showthread.php?t=253252)

Natsheh 12-18-2014 16:18

User Tag Prefix
 
4 Attachment(s)
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'


HamletEagle 12-19-2014 11:20

Re: User Tag Prefix
 
No, not again a tag plugin, they are everywhere.

Natsheh 12-19-2014 11:32

Re: User Tag Prefix
 
Quote:

Originally Posted by HamletEagle (Post 2237185)
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..

HamletEagle 12-19-2014 11:40

Re: User Tag Prefix
 
And so so so badly coded.

Natsheh 12-19-2014 11:45

Re: User Tag Prefix
 
Quote:

Originally Posted by HamletEagle (Post 2237191)
And so so so badly coded.

Huh realy?

Kia 12-19-2014 11:51

Re: User Tag Prefix
 
Quote:

Originally Posted by Natsheh (Post 2237193)
Huh realy?

Yup.
Example:
Code:
get_user_info(id, "name", sNname, 32-1)

Instead of writing 32-1 :nono: use charsmax().
Also use formatex instead of format.
In remove_users_tags() you should use get_players.

HamletEagle 12-19-2014 11:57

Re: User Tag Prefix
 
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.

Natsheh 12-19-2014 11:58

Re: User Tag Prefix
 
Quote:

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

Instead of writing 32-1 :nono: 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 


HamletEagle 12-19-2014 12:02

Re: User Tag Prefix
 
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.

Natsheh 12-19-2014 12:11

Re: User Tag Prefix
 
All the hard coded will be FiXeD Soon... :nono:


All times are GMT -4. The time now is 15:14.

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