Raised This Month: $32 Target: $400
 8% 

[CS:GO, ANY?] Showdamage as fortnite


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Plugin ID:
6166
Plugin Version:
1.2
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    This plugin was made for be like the showdamage on Fortnite.
    Old 06-15-2018 , 07:10   [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #1

    Description:

    This plugin was made for this request to be like the showdamage on Fortnite.

    -Hud msg with different color for headshot and fade effect.
    -Sound when you hit on head.
    -Eliminated {victimname} msg on hud when you kill someone.


    Screenshots:

    https://steamcommunity.com/sharedfil...?id=1412295191


    Download:

    Main repository
    Direct download
    Code changes
    __________________
    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.


    Last edited by Franc1sco; 06-15-2018 at 15:12.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    skyler.b
    AlliedModders Donor
    Join Date: Dec 2017
    Location: israel
    Old 06-15-2018 , 09:28   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #2

    that very nice plugin I loved the idea!
    __________________
    Taking private requests

    part of the gurney is the end.
    skyler.b is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 06-15-2018 , 09:53   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #3

    Quote:
    Originally Posted by skyler.b View Post
    that very nice plugin I loved the idea!
    Ye, thanks to sHoC for the idea
    __________________
    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.


    Last edited by Franc1sco; 06-15-2018 at 09:54.
    Franc1sco is offline
    Send a message via MSN to Franc1sco
    sHoC
    Senior Member
    Join Date: Nov 2015
    Location: Italy
    Old 06-15-2018 , 14:54   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #4

    Quote:
    Originally Posted by Franc1sco View Post
    Ye, thanks to sHoC for the idea
    Thanks for doing this plugin, the version of plugin that you posted is not as fornite, there are missing some details, like color of hs and normal damage, and the pos of death message.

    Here is the sp file edited by me, mine is the same as in fornite. You can use my code.
    HTML Code:
    #include <sourcemod>
    #include <sdktools>
    
    #pragma semicolon 1
    #pragma newdecls required
    
    #define SOUND "franug/ding.mp3"
    
    public Plugin myinfo =
    {
    	name = "SM Show iDamage as Fortnite",
    	author = "Franc1sco Steam: franug",
    	description = "",
    	version = "1.0",
    	url = "http://steamcommunity.com/id/franug"
    };
    
    public void OnPluginStart()
    {
    	HookEvent("player_hurt", Event_PlayerHurt);
    }
    
    public void OnMapStart()
    {
    	PrecacheSound(SOUND);
    	
    	char temp[128];
    	Format(temp, sizeof(temp), "sound/%s", SOUND);
    	
    	AddFileToDownloadsTable(temp);
    }
    
    public Action Event_PlayerHurt(Handle event, const char[] name, bool dontBroadcast)
    {	
    	int iAttacker = GetClientOfUserId(GetEventInt(event, "attacker"));
    	int iVictim = GetClientOfUserId(GetEventInt(event, "userid"));
    	
    	if(iVictim == iAttacker || iAttacker < 1 || iAttacker > MaxClients || !IsClientInGame(iAttacker) || IsFakeClient(iAttacker)) // check Attacker
    		return;
    
    	int iDamage = GetEventInt(event, "dmg_health"); 
    	int iHitgroup = GetEventInt(event, "hitgroup");
    	
    	if(iHitgroup == 1) // headshot
    	{
    		SetHudTextParams(-1.0, 0.45, 2.0, 255, 235, 20, 200, 1); // yellow
    		
    		EmitSoundToClient(iAttacker, SOUND); // emit sound
    	}
    	else
    	{
    		SetHudTextParams(-1.0, 0.45, 2.0, 255, 255, 255, 200, 1); // white
    	}
    	
    	ShowHudText(iAttacker, 5, "%i", iDamage); // same channel for prevent overlap
    	
    	int iHp = GetClientHealth(iVictim);
    	
    if (iHp < 1) 
    	{ 
    		SetHudTextParams(0.37, 0.50, 2.0, 255, 255, 255, 200, 1); 
    		ShowHudText(iAttacker, 1, "ELIMINATED"); 
         
    		SetHudTextParams(0.51, 0.50, 2.0, 255, 0, 0, 200, 1); 
    		ShowHudText(iAttacker, 4, "%N", iVictim); 
    	}  
    }
    __________________

    Last edited by sHoC; 06-15-2018 at 15:00.
    sHoC is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 06-15-2018 , 15:11   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #5

    Added, thanks.


    Version 1.2

    -Changed hit colors and death msg position for be more similar to Fortnite.
    __________________
    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
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 10-14-2019 , 09:30   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #6

    Now with only the sound which I absolutely love

    Also fixes a bad coding mistake, as GetClientOfUserId will either return a completely valid client or return 0, and will never return an invalid client index that is not 0, hence no need for checking bounds of 1 to MaxClients and no need for IsClientInGame.
    Attached Files
    File Type: sp Get Plugin or Get Source (Franug-HSSoundOnly.sp - 753 views - 1.9 KB)
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334
    eyal282 is offline
    starcs
    Member
    Join Date: Nov 2018
    Old 11-17-2019 , 11:28   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #7

    Have a way to let this only for VIPS or only for a especific flag?
    __________________
    Founder of ⭐ STRTEAM
    starcs is offline
    XHUNTERX
    Senior Member
    Join Date: Aug 2019
    Location: World
    Old 11-17-2019 , 14:03   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #8

    Quote:
    Originally Posted by starcs View Post
    Have a way to let this only for VIPS or only for a especific flag?
    +1
    XHUNTERX is offline
    ddd123
    Senior Member
    Join Date: May 2021
    Old 07-27-2021 , 13:03   Re: [CS:GO, ANY?] Showdamage as fortnite
    Reply With Quote #9

    Quote:
    Originally Posted by eyal282 View Post
    Now with only the sound which I absolutely love

    Also fixes a bad coding mistake, as GetClientOfUserId will either return a completely valid client or return 0, and will never return an invalid client index that is not 0, hence no need for checking bounds of 1 to MaxClients and no need for IsClientInGame.
    I know this is old thread but i need help
    This work with L4D2 but sound doesn't play when i shoot with common/uncommon infected and witch (only survivors and special infected)
    Anybody know how to make it sound also on all zombies?

    Also if possible, can i also have option to play sound only when i kill infected instead damage? I'm actually trying to put overwatch kill sound each kills

    Last edited by ddd123; 07-27-2021 at 13:20. Reason: witch didn't work too
    ddd123 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 11:10.


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