Raised This Month: $66 Target: $400
 16% 

Icons Color Changer v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related        Approver:   Exolent[jNr] (178)
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-29-2009 , 09:55   Icons Color Changer v1.1
Reply With Quote #1

Icons Color Changer
By xPaw

.: Description :.
Another my simple plugin, this changes the color of icons at players hud, such as vipsafety, rescue zone, buy zone, defuser, escape zone, c4.
.: Cvars :.
All cvar uses RGB Colors.

icons_c4 255 100 0 - color of c4 icon.
icons_escape 255 215 0 - color of escape zone icon.
icons_rescue 255 100 0 - color of hostage rescue zone icon.
icons_defuser 0 100 255 - color of defusers icon.
icons_buyzone 0 160 0 - color of buyzone icon.
icons_vipsafety 0 160 0 - color of vip rescue zone icon.

0 160 0 - Standart CS Color.
.: Changelog :.
  • Version 1.1
    • Destroying trie in plugin_end
    • A small memory save

.: Credits :.
  • joaquimandrade - Introduced me into tries/arrays.
Attached Files
File Type: sma Get Plugin or Get Source (IconsColorChanger.sma - 3957 views - 1.6 KB)
__________________

Last edited by xPaw; 12-05-2009 at 05:29.
xPaw is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-29-2009 , 09:57   Re: Icons Color Changer
Reply With Quote #2

Nice Job xPaw
+k
__________________
alan_el_more is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 04-29-2009 , 10:01   Re: Icons Color Changer
Reply With Quote #3

waiting 4 da screenie
beckham9224 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-29-2009 , 10:06   Re: Icons Color Changer
Reply With Quote #4

screens added
__________________
xPaw is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 04-29-2009 , 10:10   Re: Icons Color Changer
Reply With Quote #5

WOAAHHOW! KOOL 5*s!!!
beckham9224 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 04-29-2009 , 10:18   Re: Icons Color Changer
Reply With Quote #6

gg my little friend
__________________
All my lifetime work is there (includin private big ass plugins and stuff) https://github.com/tutyamxx

tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-29-2009 , 10:26   Re: Icons Color Changer
Reply With Quote #7

You should use elseif() here. Though, I would prefer using a switch.

Anyway, I think you could reduce your function like that. It's not necessary to repeat the same code each time.

Code:
public msgStatusIcon ( msgId, msgDest, id ) {     if ( !get_msg_arg_int( 1 ) )     {         return;     }         new iCvarPointer;     new szIcon[ 10 ];         get_msg_arg_string( 2, szIcon, charsmax( szIcon ) );         if ( equal( szIcon, "vipsafety" ) )    { iCvarPointer = g_Color_VipSafety; }     else if ( equal( szIcon, "escape" ) )  { iCvarPointer = g_Color_Escape;    }     else if ( equal( szIcon, "rescue" ) )  { iCvarPointer = g_Color_Rescue;    }     else if ( equal( szIcon, "defuser" ) ) { iCvarPointer = g_Color_Defuser;   }     else if ( equal( szIcon, "buyzone" ) ) { iCvarPointer = g_Color_BuyZone;   }     else if ( equal( szIcon, "c4" ) )      { iCvarPointer = g_Color_C4;        }         if ( iCvarPointer )     {         new szColor[ 12 ], szRed[ 4 ], szGreen[ 4 ], szBlue[ 4 ];             get_pcvar_string( iCvarPointer, szColor, charsmax( szColor ) );         parse( szColor, szRed, charsmax( szRed ) , szGreen, charsmax( szGreen ), szBlue, charsmax( szBlue ) );         set_msg_arg_int( 3, ARG_BYTE, clamp( str_to_num( szRed )  , 0, 255 ) );         set_msg_arg_int( 4, ARG_BYTE, clamp( str_to_num( szGreen ), 0, 255 ) );         set_msg_arg_int( 5, ARG_BYTE, clamp( str_to_num( szBlue ) , 0, 255 ) );     } }
Arkshine is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-29-2009 , 10:28   Re: Icons Color Changer
Reply With Quote #8

Very nice ;)
BOYSplayCS is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-29-2009 , 10:28   Re: Icons Color Changer
Reply With Quote #9

arkshine it has tries now
__________________
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-29-2009 , 10:31   Re: Icons Color Changer
Reply With Quote #10

Sorry, I don't understand you.
Arkshine is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:18.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode