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

Solved [CS:GO][REQ] Show Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
trickgod
Junior Member
Join Date: Jun 2018
Old 07-27-2019 , 18:45   [CS:GO][REQ] Show Damage
Reply With Quote #1

DR.API Show Damage Not Working

Please make a simple plugin
Print Hint Text "<PLAYERNAME> Give Damage <- HP>"
Print Hint Text "<PLAYERNAME> Killed"

And It Will Be Very Beautiful If You Can Make Texts Colored

Last edited by trickgod; 07-28-2019 at 16:55.
trickgod is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 07-27-2019 , 19:47   Re: [CS:GO][REQ] Show Damage
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=2315058
Nexd is offline
trickgod
Junior Member
Join Date: Jun 2018
Old 07-27-2019 , 20:32   Re: [CS:GO][REQ] Show Damage
Reply With Quote #3

not working on my server
trickgod is offline
trickgod
Junior Member
Join Date: Jun 2018
Old 07-27-2019 , 20:45   Re: [CS:GO][REQ] Show Damage
Reply With Quote #4

I really need this. Please anyone making a simple plugin
trickgod is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 07-28-2019 , 07:51   Re: [CS:GO][REQ] Show Damage
Reply With Quote #5

PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
HookEvent("player_hurt"Event_PlayerHurt);
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
Action Event_PlayerHurt(Event event, const char[] namebool dB)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
int damage event.GetInt("dmg_health");
    
    if (
IsClientInGame(attacker) && IsClientInGame(victim))
    {
        if (!
IsFakeClient(attacker) && !IsFakeClient(victim))
        {
            if (
attacker != victim)
            {
                
PrintHintText(attacker"%i Damage to %N"damagevictim);
            }
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_PlayerDeath(Event event, const char[] namebool dB)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
    if (
IsClientInGame(attacker) && IsClientInGame(victim))
    {
        if (!
IsFakeClient(attacker) && !IsFakeClient(victim))
        {
            if (
attacker != victim)
            {
                
PrintHintText(attacker"%N Killed"victim);
            }
        }
    }
    return 
Plugin_Continue;

Untested.
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
trickgod
Junior Member
Join Date: Jun 2018
Old 07-28-2019 , 09:31   Re: [CS:GO][REQ] Show Damage
Reply With Quote #6

Quote:
Originally Posted by Pilo View Post
PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
HookEvent("player_hurt"Event_PlayerHurt);
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
Action Event_PlayerHurt(Event event, const char[] namebool dB)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
int damage event.GetInt("dmg_health");
    
    if (
IsClientInGame(attacker) && IsClientInGame(victim))
    {
        if (!
IsFakeClient(attacker) && !IsFakeClient(victim))
        {
            if (
attacker != victim)
            {
                
PrintHintText(attacker"%i Damage to %N"damagevictim);
            }
        }
    }
    return 
Plugin_Continue;
}

public 
Action Event_PlayerDeath(Event event, const char[] namebool dB)
{
    
int attacker GetClientOfUserId(event.GetInt("attacker"));
    
int victim GetClientOfUserId(event.GetInt("userid"));
    
    if (
IsClientInGame(attacker) && IsClientInGame(victim))
    {
        if (!
IsFakeClient(attacker) && !IsFakeClient(victim))
        {
            if (
attacker != victim)
            {
                
PrintHintText(attacker"%N Killed"victim);
            }
        }
    }
    return 
Plugin_Continue;

Untested.
Killed Hint Text Working But Damage To Hint Text Not Working can you solve ?
trickgod is offline
Shane1390
Member
Join Date: Apr 2018
Old 07-28-2019 , 12:54   Re: [CS:GO][REQ] Show Damage
Reply With Quote #7

Edit of a plugin made by AntiTeal, I added the menu (w/ settings), as well as hitmarkers, removed the zombies dependency, added colors (similar to a popular csgo server).

I made this edit a while ago and the code definitely needs to get cleaned up
Requires: https://forums.alliedmods.net/showthread.php?t=185016

Screenies:
Spoiler
Attached Files
File Type: sp Get Plugin or Get Source (shownames.sp - 158 views - 7.3 KB)
Shane1390 is offline
trickgod
Junior Member
Join Date: Jun 2018
Old 07-28-2019 , 16:53   Re: [CS:GO][REQ] Show Damage
Reply With Quote #8

Quote:
Originally Posted by Shane1390 View Post
Edit of a plugin made by AntiTeal, I added the menu (w/ settings), as well as hitmarkers, removed the zombies dependency, added colors (similar to a popular csgo server).

I made this edit a while ago and the code definitely needs to get cleaned up
Requires: https://forums.alliedmods.net/showthread.php?t=185016

Screenies:
Spoiler
Wow, thanks its works
trickgod is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-29-2019 , 03:01   Re: [CS:GO][REQ] Show Damage
Reply With Quote #9

Quote:
Originally Posted by trickgod View Post
DR.API Show Damage Not Working

Please make a simple plugin
Print Hint Text "<PLAYERNAME> Give Damage <- HP>"
Print Hint Text "<PLAYERNAME> Killed"

And It Will Be Very Beautiful If You Can Make Texts Colored
My showdamage plugin works well -> https://forums.alliedmods.net/showthread.php?p=2359028
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Oylsister
Senior Member
Join Date: Aug 2019
Location: KhonKaen, Thailand
Old 03-09-2020 , 23:45   Re: [CS:GO][REQ] Show Damage
Reply With Quote #10

Quote:
Originally Posted by Shane1390 View Post
Edit of a plugin made by AntiTeal, I added the menu (w/ settings), as well as hitmarkers, removed the zombies dependency, added colors (similar to a popular csgo server).

I made this edit a while ago and the code definitely needs to get cleaned up
Requires: https://forums.alliedmods.net/showthread.php?t=185016

Screenies:
Spoiler
Oylsister 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 17:05.


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