Quote:
Originally Posted by Ellie
Hey, I was debating whether using this include or more colors. More colors works great with TF2 which I tested, but it doesn't work for non-source 2009 games like L4D2 (which is unbelievable since L4D2 was released in 2009 and is a source game). However, it has some stocks maybe that can be added to colors.inc such as:
Code:
/**
* Shows admin activity with colors
*
* @param client Client performing an action
* @param message Message (formatting rules)
* @noreturn
*/
stock CShowActivity(client, const String:message[], any:...)
/**
* Shows admin activity with colors
*
* @param client Client performing an action
* @param tag Tag to prepend to the message (color tags supported)
* @param message Message (formatting rules)
* @noreturn
*/
stock CShowActivityEx(client, const String:tag[], const String:message[], any:...)
/**
* Shows admin activity with colors
*
* @param client Client performing an action
* @param tag Tag to prepend to the message (color tags supported)
* @param message Message (formatting rules)
* @noreturn
*/
stock CShowActivity2(client, const String:tag[], const String:message[], any:...)
Can someone add those to colors.inc please 
|
To get these working correctly requires a bit of effort. For example, just by looking at the code, I can tell you that translations don't work properly with morecolors.inc's CShowActivity functions simply because formatting is done before passing the message on to a function that sends messages to all players (this is why CPrintToChatAll manually loops through players one by one rather and does formatting there than just calling CPrintToChat for each player in colors.inc and morecolors.inc).
To do it properly is a bit of effort, because you have to essentially duplicate what SourceMod is doing for each of these functions. While not impossible, it's a bit of a pain, especially since only natives can pass ... parameters to other functions... because ShowActivity and ShowActivityEx are essentially the same function.
Sometimes I think Colors and MoreColors should just be plugins to deal with this sort of thing, but then you'd only be able to have one or the other loaded at a time.
__________________