AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved [CS:GO][REQ] Show Damage (https://forums.alliedmods.net/showthread.php?t=317746)

trickgod 07-27-2019 18:45

[CS:GO][REQ] Show Damage
 
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

Nexd 07-27-2019 19:47

Re: [CS:GO][REQ] Show Damage
 
https://forums.alliedmods.net/showthread.php?p=2315058

trickgod 07-27-2019 20:32

Re: [CS:GO][REQ] Show Damage
 
Quote:

Originally Posted by Nexd (Post 2660880)

not working on my server

trickgod 07-27-2019 20:45

Re: [CS:GO][REQ] Show Damage
 
I really need this. Please anyone making a simple plugin :(

Pilo 07-28-2019 07:51

Re: [CS:GO][REQ] Show Damage
 
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.

trickgod 07-28-2019 09:31

Re: [CS:GO][REQ] Show Damage
 
Quote:

Originally Posted by Pilo (Post 2660944)
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 ?

Shane1390 07-28-2019 12:54

Re: [CS:GO][REQ] Show Damage
 
1 Attachment(s)
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:

trickgod 07-28-2019 16:53

Re: [CS:GO][REQ] Show Damage
 
Quote:

Originally Posted by Shane1390 (Post 2660979)
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:

Wow, thanks its works

Franc1sco 07-29-2019 03:01

Re: [CS:GO][REQ] Show Damage
 
Quote:

Originally Posted by trickgod (Post 2660873)
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

Oylsister 03-09-2020 23:45

Re: [CS:GO][REQ] Show Damage
 
Quote:

Originally Posted by Shane1390 (Post 2660979)
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:

:bacon!::bacon!:


All times are GMT -4. The time now is 07:59.

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