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

Solved Problem in Explode Balrog1 Damge ( HELP )


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FonixPro20
Member
Join Date: Mar 2018
Old 09-13-2018 , 13:44   Problem in Explode Balrog1 Damge ( HELP )
Reply With Quote #1

Hello Guys i found problem shoting somone with balrog-1 Damge kill
How i can remove damge from the player use weapon ( CT , T )

Thanks For Help !!

PHP Code:
public explode(id)
{
    if(
is_user_alive(id))
    {
            new 
Float:originF[3]
            
fm_get_aim_origin(id,originF)
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(TE_EXPLOSION)
            
engfunc(EngFunc_WriteCoordoriginF[0])
            
engfunc(EngFunc_WriteCoordoriginF[1])
            
engfunc(EngFunc_WriteCoordoriginF[2])
            
write_short(sExplo)
            
write_byte(20)
            
write_byte(50)
            
write_byte(0)
            
message_end()
            new 
FM_NULLENT
            
while((find_ent_in_sphere(a,originF,200.0)) != 0)
            {
            if(
pev(a,pev_takedamage)!=DAMAGE_NO)
            {
                
ExecuteHamBHam_TakeDamage,id ,idget_pcvar_float(cvar_dmg_exp), DMG_BULLET )
            }
            }
    }

FonixPro20 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-13-2018 , 14:03   Re: Problem in Explode Balrog1 Damge ( HELP )
Reply With Quote #2

I think it's pretty obvious which line is the damage.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
FonixPro20
Member
Join Date: Mar 2018
Old 09-13-2018 , 14:15   Re: Problem in Explode Balrog1 Damge ( HELP )
Reply With Quote #3

You Mean from Primaryattack

PHP Code:
public fw_b1_PrimaryAttack_Post(Weapon)
{
    
g_IsInPrimaryAttack 0
    
new Player get_pdata_cbase(Weapon414)
    
    new 
szClipszAmmo
    get_user_weapon
(PlayerszClipszAmmo)
    
    if(!
is_user_alive(Player))
        return

    if (
g_iClip <= cs_get_weapon_ammo(Weapon))
        return

    if(
g_has_b1[Player])
    {
        if (!
g_clip_ammo[Player])
            return

        new 
Float:push[3]
        
pev(Player,pev_punchangle,push)
        
xs_vec_sub(push,cl_pushangle[Player],push)
        
        
xs_vec_mul_scalar(push,get_pcvar_float(cvar_recoil_b1),push)
        
xs_vec_add(push,cl_pushangle[Player],push)
        
set_pev(Player,pev_punchangle,push)
        if( 
gMode[Player] ) {
            
explode(Player//  < ----------------------|
            
set_pdata_floatPlayer832.0 )
        }
        
emit_sound(PlayerCHAN_WEAPONFire_Sounds[gMode[Player]], VOL_NORMATTN_NORM0PITCH_NORM)
        
UTIL_PlayWeaponAnimation(PlayergMode[Player]?b1_SHOOT2:b1_SHOOT1)
        if( 
gMode[Player] ) gMode[Player] = 0
    
}

FonixPro20 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-13-2018 , 15:55   Re: Problem in Explode Balrog1 Damge ( HELP )
Reply With Quote #4

PHP Code:
public explode(id

    if(
is_user_alive(id)) 
    { 
            new 
Float:originF[3
            
fm_get_aim_origin(id,originF
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY
            
write_byte(TE_EXPLOSION
            
engfunc(EngFunc_WriteCoordoriginF[0]) 
            
engfunc(EngFunc_WriteCoordoriginF[1]) 
            
engfunc(EngFunc_WriteCoordoriginF[2]) 
            
write_short(sExplo
            
write_byte(20
            
write_byte(50
            
write_byte(0
            
message_end() 
            new 
FM_NULLENT 
            
while((find_ent_in_sphere(a,originF,200.0)) != 0
            { 
            if(
pev(a,pev_takedamage)!=DAMAGE_NO && != id
            { 
                
ExecuteHamBHam_TakeDamage,id ,idget_pcvar_float(cvar_dmg_exp), DMG_BULLET 
            } 
            } 
    } 

__________________
My plugin:
Celena Luna is offline
FonixPro20
Member
Join Date: Mar 2018
Old 09-15-2018 , 09:00   Re: Problem in Explode Balrog1 Damge ( HELP )
Reply With Quote #5

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
public explode(id

    if(
is_user_alive(id)) 
    { 
            new 
Float:originF[3
            
fm_get_aim_origin(id,originF
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY
            
write_byte(TE_EXPLOSION
            
engfunc(EngFunc_WriteCoordoriginF[0]) 
            
engfunc(EngFunc_WriteCoordoriginF[1]) 
            
engfunc(EngFunc_WriteCoordoriginF[2]) 
            
write_short(sExplo
            
write_byte(20
            
write_byte(50
            
write_byte(0
            
message_end() 
            new 
FM_NULLENT 
            
while((find_ent_in_sphere(a,originF,200.0)) != 0
            { 
            if(
pev(a,pev_takedamage)!=DAMAGE_NO && != id
            { 
                
ExecuteHamBHam_TakeDamage,id ,idget_pcvar_float(cvar_dmg_exp), DMG_BULLET 
            } 
            } 
    } 

Thank you For Help Me it Work <3
FonixPro20 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 05:09.


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