Skip to content

[INC] ColorStatus

This include lets you change StatusText, with 4 colors available. Limitations: in the text you can use only 1 color, i.e. you can't make part of it red and part white. Maximum 196 characters. If a player has the console open at the moment the plugin sends the text, the color will be wrong…

ToolCounter-Strike 1.6Views:12Downloads:26

Description

This include lets you change StatusText, with 4 colors available.

niebieski
szary
czerwony

Limitations

  • In the text you can use only 1 color, i.e. you can't make part of it red and part white.
  • Maximum 196 characters
  • If a player has the console open at the moment the plugin sends the text, the color will be wrong

Usage

First, add initColorStatus() to plugin_init in your plugin.
For example:

Pawn
public plugin_init() {
                register_plugin(PLUGIN, VERSION, AUTHOR)
                initColorStatus();
}

Function for displaying text:
makeStatusText(id,COLOR_STATUS:color,Float:fTime = 0.0,const szText[] = "",any:...)

  • id - the ID of the player to show the text to; if id = 0, the text is shown to all players
  • color - text color
    • RED_STATUS - red
    • BLUE_STATUS - blue
    • YELLOW_STATUS - yellow
    • GREY_STATUS - gray
  • fTime - display time; if 0.0, the text stays until it is replaced
  • szText - the text itself; it can be formatted, the same way you do it with the format function

Code examples

makeStatusText(id,YELLOW_STATUS,5.0,"formatowany %d %s",1,"string");
yellow text for a specific player, display time 5 sec. ("formatowany 1 string")

makeStatusText(0,RED_STATUS,0.0,"Czerwony statustext");
red text for all players, until it is replaced

Source: https://forums.alliedmods.net/showthread.php?t=168294

Credits

Authors: DarkGL

Related

GIMP plugin that allows you to import and export sprites from a Half-Life game. This plugin can also open new version sprites containing DDS textures used in Counter-Strike Online (Experimantal feature).

Update to 1.1.3: added support for angled sprites (import only), added the Force 256 Pallete option to expand the palette to 256 colors, fixed a bug when saving a sprite whose width is not a multiple of 4. A plugin for importing and exporting HL sprites for the Paint.net raster graphics editor…

As you know, showing a page generated by your plugin in the MOTD is fairly simple, but achieving two-way interaction with the MOTD is not such a trivial task. In this article you will learn how to do it. So why is this needed? For example, for creating your own cool shop or choosing a class…