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

[CS:GO] Make player bleed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-13-2021 , 09:30   [CS:GO] Make player bleed
Reply With Quote #1

I searched all of Duck Duck Go and didn't find a single thing that makes a player bleed. I prefer using default blood because I assume it should be edited by low violence mode.

Couldn't get TE_SetupBloodSprite to work.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 01-13-2021 , 10:33   Re: [CS:GO] Make player bleed
Reply With Quote #2

PHP Code:
char g_pBloodParticleNames[][] =
{
    
"blood_impact_heavy",
    
"blood_impact_goop_heavy",
    
"blood_impact_red_01_chunk",
    
"blood_impact_headshot_01c",
    
"blood_impact_headshot_01b",
    
"blood_impact_headshot_01d",
    
"blood_impact_basic",
    
"blood_impact_medium",
    
"blood_impact_red_01_goop_a",
    
"blood_impact_red_01_goop_b",
    
"blood_impact_goop_medium",
    
"blood_impact_red_01_goop_c",
    
"blood_impact_red_01_drops",
    
"blood_impact_drops1",
    
"blood_impact_red_01_backspray"
};

public 
Action OnTakeDamage(int iVictimintiAttackerintiIfloatfDintiDTintiWeaponfloat pDmgForce[3], float pDmgPos[3])
{
    if(
iVictim != iAttacker && IsValidClient(iVictim) && IsValidClient(iAttacker))
    {
        if(
g_bIsVIP[iAttacker])
        {
            
g_fDmgPos pDmgPos;
            
RequestFrame(CreateBlood);
        }
    }
    return 
Plugin_Continue;
}

void CreateBlood()
{
    static 
int iIter 0;
    for (
iIter 0iIter 15iIter++)
    {
        if (
GetRandomInt(03) == 0)
            
CreateParticle(g_pBloodParticleNames[iIter], g_fDmgPos);
    }
}

void CreateParticle(char[] szNamefloat pDmgPos[3])
{
    static 
int iEntity;
    
iEntity CreateEntityByName("info_particle_system");

    if (
iEntity != INVALID_ENT_REFERENCE && IsValidEdict(iEntity) && IsValidEntity(iEntity))
    {
        
pDmgPos[0] += GetRandomFloat(-3.03.0);
        
pDmgPos[1] += GetRandomFloat(-3.03.0);
        
pDmgPos[2] += GetRandomFloat(-3.03.0);
        
        
TeleportEntity(iEntitypDmgPosNULL_VECTORNULL_VECTOR);

        
DispatchKeyValue(iEntity"effect_name"szName);
        
DispatchSpawn(iEntity);
        
ActivateEntity(iEntity);
        
AcceptEntityInput(iEntity"Start");

        
CreateTimer(0.75Timer_DeleteiEntityTIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action Timer_Delete(Handle pTimerany _Data)
{
    static 
char szName[MAX_NAME_LENGTH] = "";

    if (
IsValidEdict(_Data) && GetEdictClassname(_DataszNamesizeof(szName)))
    {
        if (
StrEqual(szName"Info_Particle_System"false))
            
AcceptEntityInput(_Data"KillHierarchy");
    }

__________________
kratoss1812 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-13-2021 , 11:02   Re: [CS:GO] Make player bleed
Reply With Quote #3

Quote:
Originally Posted by kratoss1812 View Post
PHP Code:
char g_pBloodParticleNames[][] =
{
    
"blood_impact_heavy",
    
"blood_impact_goop_heavy",
    
"blood_impact_red_01_chunk",
    
"blood_impact_headshot_01c",
    
"blood_impact_headshot_01b",
    
"blood_impact_headshot_01d",
    
"blood_impact_basic",
    
"blood_impact_medium",
    
"blood_impact_red_01_goop_a",
    
"blood_impact_red_01_goop_b",
    
"blood_impact_goop_medium",
    
"blood_impact_red_01_goop_c",
    
"blood_impact_red_01_drops",
    
"blood_impact_drops1",
    
"blood_impact_red_01_backspray"
};

public 
Action OnTakeDamage(int iVictimintiAttackerintiIfloatfDintiDTintiWeaponfloat pDmgForce[3], float pDmgPos[3])
{
    if(
iVictim != iAttacker && IsValidClient(iVictim) && IsValidClient(iAttacker))
    {
        if(
g_bIsVIP[iAttacker])
        {
            
g_fDmgPos pDmgPos;
            
RequestFrame(CreateBlood);
        }
    }
    return 
Plugin_Continue;
}

void CreateBlood()
{
    static 
int iIter 0;
    for (
iIter 0iIter 15iIter++)
    {
        if (
GetRandomInt(03) == 0)
            
CreateParticle(g_pBloodParticleNames[iIter], g_fDmgPos);
    }
}

void CreateParticle(char[] szNamefloat pDmgPos[3])
{
    static 
int iEntity;
    
iEntity CreateEntityByName("info_particle_system");

    if (
iEntity != INVALID_ENT_REFERENCE && IsValidEdict(iEntity) && IsValidEntity(iEntity))
    {
        
pDmgPos[0] += GetRandomFloat(-3.03.0);
        
pDmgPos[1] += GetRandomFloat(-3.03.0);
        
pDmgPos[2] += GetRandomFloat(-3.03.0);
        
        
TeleportEntity(iEntitypDmgPosNULL_VECTORNULL_VECTOR);

        
DispatchKeyValue(iEntity"effect_name"szName);
        
DispatchSpawn(iEntity);
        
ActivateEntity(iEntity);
        
AcceptEntityInput(iEntity"Start");

        
CreateTimer(0.75Timer_DeleteiEntityTIMER_FLAG_NO_MAPCHANGE);
    }
}

public 
Action Timer_Delete(Handle pTimerany _Data)
{
    static 
char szName[MAX_NAME_LENGTH] = "";

    if (
IsValidEdict(_Data) && GetEdictClassname(_DataszNamesizeof(szName)))
    {
        if (
StrEqual(szName"Info_Particle_System"false))
            
AcceptEntityInput(_Data"KillHierarchy");
    }

I forgot to send the video I wanted it to look like:

https://www.youtube.com/watch?v=hftu...nnel=backwards

Edit:

CreateParticle("blood_pool", Origin)

This makes the pool in the video, but I can't figure out what particle makes the blood drop from the player.

Last edit:

Found the blood splatter file, how do I make it work?

https://www.mediafire.com/file/1hszs...blood.pcf/file
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 01-13-2021 at 12:36.
eyal282 is offline
FroGeX
Senior Member
Join Date: Aug 2020
Old 01-23-2021 , 01:54   Re: [CS:GO] Make player bleed
Reply With Quote #4

Quote:
Originally Posted by eyal282 View Post
I forgot to send the video I wanted it to look like:

https://www.youtube.com/watch?v=hftu...nnel=backwards

Edit:

CreateParticle("blood_pool", Origin)

This makes the pool in the video, but I can't figure out what particle makes the blood drop from the player.

Last edit:

Found the blood splatter file, how do I make it work?

https://www.mediafire.com/file/1hszs...blood.pcf/file
Just ask @backwards
FroGeX 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 08:18.


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