View Single Post
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-23-2015 , 14:35   Re: Colorful Admin Message v1.1
Reply With Quote #10

This is pretty useless IMO, but given that there is no other plugin that does this I will let it pass if you make this changes:

1.#define ADMIN_FLAG ADMIN_IMMUNITY make it a cvar/command instead.
2.Add cvars for colors. You could let the owner decide if he wants random color or some predefined ones(that he can set up from cvars too).
3.message should be 192 and not 64. 192 is the max.
4.Remove the "stock" keyword, stock is used for functions that may not be used, but you should use everything from your plugin, thus "stock" does not make sense.
5.In print_colored:
  • use charsmax() instead of hardcoding a string-array size, it's better for readability.
  • if (is_user_connected(id)) check is not needed, get_players give you an array of valid player.
  • if (index) -> check if it is between 1 and MaxPlayers.
6.Put any relevant informations inside source file, it's easier for the owner. This include cvars, how to use the plugin, thread link etc.

Some suggestions:
1.Allow users to use this messages too(maybe a cvar, why not ?)
2.You could include a command like amx_showcolorcodes(or sth like this) and print the shortcuts(!g, etc).
3.Allow the player to specify to which player to send the message. For example, you may want to send the message only to player X or to all players. You can add another argument inside the command for this(like 0(for all)/CT/T/X(the player name)).

Last edited by HamletEagle; 10-23-2015 at 14:37.
HamletEagle is offline