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

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
Senior Member
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
__________________
Taking private paid requests in PM

No more FREE requests.
Discord: KillStr3aK#9143
Nexd is online now
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
Junior 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 - 21 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 SourceMod Coder -> Activity channel
I dont accept more paid request, here why. If you want my private help then you could get it for free, just ask me on steam

You like my work? Drop a +Rep in my steam profile comments

Franc1sco is offline
Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
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 11:56.


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