Raised This Month: $51 Target: $400
 12% 

[INC] Colors (1.0.5)


Post New Thread Reply   
 
Thread Tools Display Modes
dordnung
Veteran Member
Join Date: Apr 2010
Old 01-30-2013 , 12:59   [INC] Colors (1.1)
Reply With Quote #311

Updated Colors

I added the Tags "{darkred}", "{lime}" and "{lightred}" for Counter-Strike: Global Offensive

These tags are standalone tags, so they can be used with teamcolors!


You can use:

PHP Code:
CPrintToChatAll("{blue}Blue Part and {darkred}Darkred Part {lime}and Lime"
but not:

PHP Code:
CPrintToChatAll("{blue}Blue Part and {red}Red Part"

Also i added a stock, which checks, whether a tag is supported by the game or not

PHP Code:
stock CColorAllowed(Colors:color

And a stock, which can replace a color with another one (to replace non supported colors)

PHP Code:
stock CReplaceColor(Colors:colorColors:newColor

Example:

PHP Code:
if (!CColorAllowed(Color_Lightgreen) && CColorAllowed(Color_Lime))
    
CReplaceColor(Color_LightgreenColor_Lime); 

For the Colors:color parameters use:

PHP Code:
Color_Default
Color_Darkred
Color_Green
Color_Lightgreen
Color_Red
Color_Blue
Color_Olive
Color_Lime
Color_Lightred 
Attached Files
File Type: inc colors.inc (13.9 KB, 737 views)
__________________

Last edited by dordnung; 01-30-2013 at 16:27.
dordnung is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 02-07-2013 , 11:41   Re: [INC] Colors (1.0.5)
Reply With Quote #312

Hello,

is it possible to add a function to put color ReplyToCommand?
eric0279 is offline
BomBaSK
Junior Member
Join Date: Mar 2011
Old 02-12-2013 , 09:41   Re: [INC] Colors (1.0.5)
Reply With Quote #313

Hello, i have problem with compiling plugin when i used CPrintToChatEx (with CPrintToChat no problem). Anyone knows why?
"error 035: argument type mismatch <argument 2>"
BomBaSK is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-12-2013 , 10:35   Re: [INC] Colors (1.0.5)
Reply With Quote #314

Maybe you should post your code?
__________________
dordnung is offline
BomBaSK
Junior Member
Join Date: Mar 2011
Old 02-12-2013 , 12:02   Re: [INC] Colors (1.0.5)
Reply With Quote #315

Quote:
Originally Posted by Popoklopsi View Post
Maybe you should post your code?
PHP Code:
public Action:Timer_Welcome(Handle:timerany:client)
{
    if (
IsClientConnected(client) && IsClientInGame(client))
    {
        
CPrintToChatEx(client"%T""WelcomeMsg"LANG_SERVERclient);
    }

Compile error


PHP Code:
public Action:Timer_Welcome(Handle:timerany:client)
{
    if (
IsClientConnected(client) && IsClientInGame(client))
    {
        
CPrintToChat(client"%T""WelcomeMsg"LANG_SERVERclient);
    }

No problems -.-"

Last edited by BomBaSK; 02-12-2013 at 12:09.
BomBaSK is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 02-12-2013 , 12:14   Re: [INC] Colors (1.0.5)
Reply With Quote #316

Quote:
Originally Posted by BomBaSK View Post
PHP Code:
public Action:Timer_Welcome(Handle:timerany:client)
{
    if (
IsClientConnected(client) && IsClientInGame(client))
    {
        
CPrintToChatEx(client"%T""WelcomeMsg"LANG_SERVERclient);
    }

Compile error


PHP Code:
public Action:Timer_Welcome(Handle:timerany:client)
{
    if (
IsClientConnected(client) && IsClientInGame(client))
    {
        
CPrintToChat(client"%T""WelcomeMsg"LANG_SERVERclient);
    }

No problems -.-"
CPrintToChatEx takes two int parameters first. The second one is the author, meaning:
CPrintToChatEx(client, client, "My Text");
would work
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
BomBaSK
Junior Member
Join Date: Mar 2011
Old 02-12-2013 , 13:33   Re: [INC] Colors (1.0.5)
Reply With Quote #317

Quote:
Originally Posted by minimoney1 View Post
CPrintToChatEx takes two int parameters first. The second one is the author, meaning:
CPrintToChatEx(client, client, "My Text");
would work
Thanks! Now its working perfectly.
BomBaSK is offline
BomBaSK
Junior Member
Join Date: Mar 2011
Old 02-13-2013 , 16:27   Re: [INC] Colors (1.0.5)
Reply With Quote #318

Quote:
Originally Posted by minimoney1 View Post
CPrintToChatEx takes two int parameters first. The second one is the author, meaning:
CPrintToChatEx(client, client, "My Text");
would work
Im overwriting one plugin.
And when im using.
PHP Code:
  if(mostDamage 0) {
    
CPrintToChatAllEx("{gold}Hrac {teamcolor}%s {gold}sposobil najvacsie poskodenie, {fullred}%d {gold}dmg v {fullred}%d {gold}hitoch!"g_PlayerName[mostDamagePlayer], mostDamagemostHits);
  }
  if(
mostKills 0) {
    
CPrintToChatAllEx("{gold}Najviac killov: {teamcolor}%s {gold}z {fullred}%d {gold}zabiti" ,g_PlayerName[mostKillsPlayer], mostKills);
  }

Same problem with compiling. (now using morecolors to compile).
BomBaSK is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 02-13-2013 , 16:35   Re: [INC] Colors (1.0.5)
Reply With Quote #319

Than post it to the morecolors thread!
__________________
dordnung is offline
BomBaSK
Junior Member
Join Date: Mar 2011
Old 02-13-2013 , 16:58   Re: [INC] Colors (1.0.5)
Reply With Quote #320

Quote:
Originally Posted by Popoklopsi View Post
Than post it to the morecolors thread!
Sure,
but CPrintToChatAllEx does not have same function on both includes?
Its only for teamcolor using when im correct. If i confused srry -.-" .
Thx for help.
BomBaSK is offline
Reply



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 12:41.


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