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

Solved stop bullets from entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-08-2019 , 08:56   stop bullets from entity
Reply With Quote #1

hii ,

how can i stop bullet to passes through enitity

like i am creating an enitity name SHIELD which protect from bullets of enemy

PHP Code:
public createshield(id)
{
         
g_Entity_Shield engfunc(EngFunc_AllocString"func_breakable")
         new 
i_Ent engfunc(EngFunc_CreateNamedEntity,g_Entity_Shield)
         
    if(!
i_Ent) return
    
    
g_iShield[id]=i_Ent

    set_pev
(i_Entpev_classnameshieldclass)
    
engfunc(EngFunc_SetModeli_EntShield_Model)
    
    
set_pev(i_Entpev_solidSOLID_BBOX)
    
set_pev(i_Entpev_movetypeMOVETYPE_FLY)
    
    
engfuncEngFunc_SetSizei_EntFloat:{ -16.0,-16.00.0 }, Float:{ 16.016.067.0 } );
    
    
fm_set_rendering(i_EntkRenderFxNone255255255kRenderTransAdd200)

    
set_pev(i_Entpev_takedamageDAMAGE_YES)
    
    
set_pev(i_Entpev_iuser1fm_cs_get_user_team(id))
    
    
set_pev(i_Entpev_healthget_pcvar_float(g_iCvar[1]))
    
    
set_pev(i_Entpev_iuser2id)
    
cs_set_user_money(idcs_get_user_money(id) - get_pcvar_num(g_iCvar[5]))
    
    
set_pdata_int(i_Ent3664)


but i am getting promblem that if any player is standing behind the Sheild (ENITITY) , he is getting damage of bullets by enemy ,


so any way to stop those bullet damage
__________________
SED LYF !!!

Last edited by SHIELD755; 07-09-2019 at 06:36.
SHIELD755 is offline
Old 07-08-2019, 09:15
thEsp
This message has been deleted by thEsp. Reason: nvm
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-08-2019 , 11:11   Re: stop bullets from entity
Reply With Quote #2

Did you try modifying the end vector in TraceAttack?
__________________
<VeCo> is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-08-2019 , 12:07   Re: stop bullets from entity
Reply With Quote #3

Classname "func_wall" would be better, entities still take damage even if their classname isn't "func_breakable".
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-08-2019 , 18:44   Re: stop bullets from entity
Reply With Quote #4

Hook traceattack pre of the shield entity

Do a traceline change every entity behind that shield to solid not so the traceline continue till it no longer hit an entity then use boolean to block the attack by also hooking traceattack player and checking inside that forward if the attack was successfully blocked by using the boolean variable.


Or you could try testing with weapon_shield.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-08-2019 at 19:04.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-09-2019 , 05:29   Re: stop bullets from entity
Reply With Quote #5

is it not possible to check that player is behind the SHIELD and stop the damage ?
__________________
SED LYF !!!

Last edited by SHIELD755; 07-09-2019 at 05:30.
SHIELD755 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-09-2019 , 05:55   Re: stop bullets from entity
Reply With Quote #6

Post in the right section.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-09-2019 , 05:59   Re: stop bullets from entity
Reply With Quote #7

Quote:
Originally Posted by thEsp View Post
Classname "func_wall" would be better, entities still take damage even if their classname isn't "func_breakable".
it does not work
__________________
SED LYF !!!

Last edited by SHIELD755; 07-09-2019 at 06:00.
SHIELD755 is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-09-2019 , 06:35   Re: stop bullets from entity
Reply With Quote #8

it doesn't work , tried
__________________
SED LYF !!!

Last edited by SHIELD755; 10-29-2023 at 03:54.
SHIELD755 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 22:01.


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