Raised This Month: $275 Target: $400
 68% 

[INC] Colors (1.0.5)


Post New Thread Reply   
 
Thread Tools Display Modes
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 07-02-2015 , 13:40   Re: [INC] Colors (1.0.5)
Reply With Quote #411

Quote:
Originally Posted by sim242 View Post
It seems to not be working correctly.. I can't get purple and blue working in the same sentence.
Mega bump, but purple doesn't work at all. Even if there is no other blue tag in the message.
__________________
pcmaster is offline
KALASH NICOLE
Member
Join Date: Feb 2016
Old 05-09-2017 , 05:10   Re: [INC] Colors (1.0.5)
Reply With Quote #412

hi, i want to add red color to the chat message of this code (printtochatall and kickclient):

could you repost it with the correct code ?

PHP Code:
ConVar sm_teamkill_limit;

public 
void OnPluginStart()
{
    
sm_teamkill_limit CreateConVar("sm_teamkill_limit""3""The limit before of team kill before kicking the player"FCVAR_NONEtrue0.0);
    
HookEventEx("round_start"event);
    
HookEventEx("player_death"event);
    
HookEventEx("player_disconnect"event);
}

public 
void event(Event event, const char[] namebool dontBroadcast)
{
    static 
int teamkill_counts[MAXPLAYERS+1];

    if(
sm_teamkill_limit.IntValue <= 0) return;

    if(
StrEqual(name"round_start"))
    {
        for(
int x 1<= MaxClientsx++)
        {
            
teamkill_counts[x] = 0;
        }
        return;
    }

    if(
StrEqual(name"player_disconnect"))
    {
        
teamkill_counts[GetClientOfUserId(event.GetInt("userid"))] = 0;
        return;
    }

    
int victim GetClientOfUserId(event.GetInt("userid"));
    
int attacker GetClientOfUserId(event.GetInt("attacker"));

    if(!
attacker || attacker == victim || GetClientTeam(attacker) != GetClientTeam(victim)) return;

    
teamkill_counts[attacker]++;
    
PrintToChatAll("%N TEAMKILLED %N (%i/%i)."attackervictimteamkill_counts[attacker], sm_teamkill_limit.IntValue);

    if(
teamkill_counts[attacker] >= sm_teamkill_limit.IntValue && !IsClientInKickQueue(attacker))
    {
        
KickClient(attacker"Kicked for reaching the TeamKill limit.");
       
    }
    


Last edited by KALASH NICOLE; 05-09-2017 at 06:06.
KALASH NICOLE is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-24-2017 , 13:07   Re: [INC] Colors (1.0.5)
Reply With Quote #413

No longer works in CSGO, it doesn't change the colors sadly! At the very least I can't seem to get it to work. Been using this for a year and newly compiled plugins won't work
__________________
Trinityplay Gameserver Community
[CS:GO] Better Warden | [CS:GO] Warden Menu | [CS:GO] VIPRespawns | [Store] Coinflip


I'm available for making private plugins! PM me or add me on steam.

Last edited by condolent; 06-24-2017 at 13:08.
condolent is offline
eziosid
Senior Member
Join Date: Sep 2017
Old 12-17-2017 , 07:53   Re: [INC] Colors (1.0.5)
Reply With Quote #414

hello i need help here dont know what is wrong is this
HTML Code:
PrintToChatAll("\x01%N \x04 incapacitated {blue}%N",attacker, target);
PrintToChatAll("{blue}%N \x04incapacitated.\x01(by himself)",target);
PrintToChatAll("{blue}%N \x04 Is incapacitated.",target);
and it dose not work it's for l4d2 attached pic
Attached Images
File Type: jpg colors.jpg (48.4 KB, 76 views)
eziosid is offline
Luckiris
AlliedModders Donor
Join Date: Apr 2017
Location: Dijon, Burgundy, France
Old 12-17-2017 , 14:01   Re: [INC] Colors (1.0.5)
Reply With Quote #415

Quote:
Originally Posted by eziosid View Post
hello i need help here dont know what is wrong is this
HTML Code:
PrintToChatAll("\x01%N \x04 incapacitated {blue}%N",attacker, target);
PrintToChatAll("{blue}%N \x04incapacitated.\x01(by himself)",target);
PrintToChatAll("{blue}%N \x04 Is incapacitated.",target);
and it dose not work it's for l4d2 attached pic
You need to use CPrintToChatAlll so like this :
CPrintToChatAlll("{blue}%N \x04 Is incapacitated.",target).
Luckiris is offline
eziosid
Senior Member
Join Date: Sep 2017
Old 12-18-2017 , 01:52   Re: [INC] Colors (1.0.5)
Reply With Quote #416

Quote:
Originally Posted by Luckiris View Post
You need to use CPrintToChatAlll so like this :
CPrintToChatAlll("{blue}%N \x04 Is incapacitated.",target).
thank you very much sir its work i missed that 1 work nice tnx aouthor also for great job and all on this site
PHP Code:
CPrintToChatAll("{blue}%N \x04Is Dead.\x01{blue}%d 웃",targetcount); 
worked nice keep it up
eziosid 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:59.


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