Thread: User Tag Prefix
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-19-2014 , 11: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