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

Solved [CS:GO] Clan Tag not appearing in Death Notice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 04-04-2019 , 16:29   [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #1

I'm trying to give BOTs Clan Tags, everything is working fine expect on the Death Notices where no Tag is being shown, How could I fix that?

Code that I'm using to set a Clan Tag
Code:
if((StrEqual(botname, "coldzera", false)) || (StrEqual(botname, "FalleN", false)) || (StrEqual(botname, "fer", false)) || (StrEqual(botname, "TACO", false)) || (StrEqual(botname, "felps", false)))
{
	CS_SetClientClanTag(client, "MIBR");
}


Click on the Image if it is small.

EDIT: I just checked and it is just bots that don't have the clan tag in the death notices, normal players have them. Is there anyway to make it so that bots also have them in the death notices?

Last edited by manicogaming; 11-04-2020 at 14:43. Reason: Further Testing
manicogaming is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 04-04-2019 , 23:40   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=315338
Maybe make like there
Indarello is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 04-05-2019 , 04:02   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #3

Quote:
Originally Posted by Indarello View Post
What I want is the Clan Tag to appear in the Death Notice, in that plugin is about death events and there doesn't seem to appear anything about Clan Tags in Death Notice.
manicogaming is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 04-05-2019 , 13:18   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #4

Maybe try to use 5% of you creation (imagination) and watch again what i send?
Indarello is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 04-05-2019 , 15:47   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #5

Quote:
Originally Posted by Indarello View Post
Maybe try to use 5% of you creation (imagination) and watch again what i send?
I know that plugin adds things to the death notices but I'm new in SourcePawn and to be completely honest I have no clue how does the plugin you send me adds things to the Death Notices (I can't understand the Source Code).

I will still try to use the plugin you sent me to get the Clan Tags working in the Death Notices but could you please explain me little bit better how put things in the death notices?

Sorry if I'm bothering you too much in any way.

EDIT: I think I kind of know what the code is doing but I still have some questions.
EDIT 2: I don't know how I can set the name of the client only on his death.

Last edited by manicogaming; 04-05-2019 at 16:33.
manicogaming is offline
impossible_cc
Senior Member
Join Date: Sep 2018
Location: Ukraine
Old 04-06-2019 , 06:30   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #6

Quote:
Originally Posted by manicogmaing View Post
I know that plugin adds things to the death notices but I'm new in SourcePawn and to be completely honest I have no clue how does the plugin you send me adds things to the Death Notices (I can't understand the Source Code).

I will still try to use the plugin you sent me to get the Clan Tags working in the Death Notices but could you please explain me little bit better how put things in the death notices?

Sorry if I'm bothering you too much in any way.

EDIT: I think I kind of know what the code is doing but I still have some questions.
EDIT 2: I don't know how I can set the name of the client only on his death.
You can try to fire fake event, like in the plugin above.
Change name before start firing fake events and change it back after.
Something like this maybe. (Code is taken from Extended Player Death Info plugin)

This is not tested

PHP Code:
public Action Event_player_death(Event event, const char[] namebool dontBroadcast)
{
    
int userid event.GetInt("userid"), attacker event.GetInt("attacker"), iClientiAttacker;
    
    if(
userid != attacker && (iClient GetClientOfUserId(userid)) && (iAttacker GetClientOfUserId(attacker)))
    {
        
char sWeapon[64];
        
event.GetString("weapon"sWeaponsizeof sWeapon);
        
        if(
ShouldChangeNickname(iAttacker))            //Make your own check
        
{
            
event.BroadcastDisabled true;

            
Event event_fake CreateEvent("player_death"true);

            
event_fake.SetString("weapon"sWeapon);                
            
event_fake.SetInt("userid"userid);                    
            
event_fake.SetInt("attacker"attacker);
            
event_fake.SetInt("assister"event.GetInt("assister"));
            
event_fake.SetBool("headshot"event.GetBool("headshot"));
            
event_fake.SetBool("penetrated"event.GetBool("penetrated"));
            
event_fake.SetBool("revenge"event.GetBool("revenge"));
            
event_fake.SetBool("dominated"event.GetBool("dominated"));

            
char oldname[64];
            
char newname[64];

            
GetClientName(attackeroldnamesizeof(oldname));
            
Format(newnamesizeof(newname), "mouz %s"oldname);        //change this

            
SetClientName(attackernewname);                                //Setting fake name

            
for(int i 1<= MaxClientsi++)
            {
                if(
IsClientInGame(i) && !IsFakeClient(i))
                {
                    
event_fake.FireToClient(i);                            //firing fake event
                
}
            }
            
event_fake.Cancel();

            
SetClientName(attackeroldname);                                //Setting real name back

            
return Plugin_Changed;
        }
    }
    return 
Plugin_Continue;

__________________

Last edited by impossible_cc; 04-06-2019 at 06:31.
impossible_cc is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 04-06-2019 , 06:33   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #7

There's a setting in csgo settings: Hide clan tags from deathnotices?
maybe deactivate it from your settings?
__________________
Ilusion9 is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 04-06-2019 , 06:59   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #8

I don’t know if it can be done with players, but it works on the entitys
hook player_death, get client name and store old, if player name equal "*" - replace string.

PHP Code:


if (StrEqual(Name"before")) 
{
    
ReplaceString(Namesizeof(Name), "before""after"false);


Last edited by farawayf; 04-06-2019 at 07:00.
farawayf is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 04-06-2019 , 11:44   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #9

Quote:
Originally Posted by impossible_cc View Post
You can try to fire fake event, like in the plugin above.
Change name before start firing fake events and change it back after.
Something like this maybe. (Code is taken from Extended Player Death Info plugin)

This is not tested

PHP Code:
public Action Event_player_death(Event event, const char[] namebool dontBroadcast)
{
    
int userid event.GetInt("userid"), attacker event.GetInt("attacker"), iClientiAttacker;
    
    if(
userid != attacker && (iClient GetClientOfUserId(userid)) && (iAttacker GetClientOfUserId(attacker)))
    {
        
char sWeapon[64];
        
event.GetString("weapon"sWeaponsizeof sWeapon);
        
        if(
ShouldChangeNickname(iAttacker))            //Make your own check
        
{
            
event.BroadcastDisabled true;

            
Event event_fake CreateEvent("player_death"true);

            
event_fake.SetString("weapon"sWeapon);                
            
event_fake.SetInt("userid"userid);                    
            
event_fake.SetInt("attacker"attacker);
            
event_fake.SetInt("assister"event.GetInt("assister"));
            
event_fake.SetBool("headshot"event.GetBool("headshot"));
            
event_fake.SetBool("penetrated"event.GetBool("penetrated"));
            
event_fake.SetBool("revenge"event.GetBool("revenge"));
            
event_fake.SetBool("dominated"event.GetBool("dominated"));

            
char oldname[64];
            
char newname[64];

            
GetClientName(attackeroldnamesizeof(oldname));
            
Format(newnamesizeof(newname), "mouz %s"oldname);        //change this

            
SetClientName(attackernewname);                                //Setting fake name

            
for(int i 1<= MaxClientsi++)
            {
                if(
IsClientInGame(i) && !IsFakeClient(i))
                {
                    
event_fake.FireToClient(i);                            //firing fake event
                
}
            }
            
event_fake.Cancel();

            
SetClientName(attackeroldname);                                //Setting real name back

            
return Plugin_Changed;
        }
    }
    return 
Plugin_Continue;

I don't think that is working. I get the notification in chat that the name was changed but on the death notice the name stays the same.
manicogaming is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 04-06-2019 , 12:36   Re: [CS:GO] Clan Tag not appearing in Death Notice
Reply With Quote #10

If you realy need this function I think it required to
1)change name
2)create data timer
3)make fake event on data timer and change name back
Also block change name spam in chat, maybe there is another solution, but I dont know about it

Last edited by Indarello; 04-06-2019 at 12:37.
Indarello 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 15:08.


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