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

Adding health to grenade


Post New Thread Reply   
 
Thread Tools Display Modes
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-09-2019 , 16:11   Re: Adding health to entity
Reply With Quote #11

Quote:
Originally Posted by Natsheh View Post
show us what have you done!? maybe?
Sorry,everything has been deleted, but soon will create again and post.
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-10-2019 , 03:50   Re: Adding health to entity
Reply With Quote #12

PHP Code:
public explosive_model_stuff(ent, const model[])  

    if(!
pev_valid(ent) || !equal(model[9], "smokegrenade.mdl")) 
        return 
FMRES_IGNORED 

    
static Float:light_origin[3]   

    
pev(ent,pev_origin,light_origin

    static 
classname[32]; pev(entpev_classnameclassname31

    if(
equal(classname"grenade")) 
    { 
        
engfunc(EngFunc_SetModelentexplosive_flare_model

        
set_task(0.1"make_flare_flash"ent

        
set_task(4.0"make_flare_explode"ent

        
set_pev(entpev_flare,   flare_id

        
set_pev(entpev_nextthinkget_gametime() + 199

        
set_peventpev_solidSOLID_SLIDEBOX );
    
set_peventpev_movetypeMOVETYPE_TOSS );    
    
set_peventpev_iuser2ent );

        
set_pev(ent,pev_takedamage,1.0)
                
        
set_pev(ent,pev_health99.9)
         
        return 
FMRES_SUPERCEDE 
    

    return 
FMRES_IGNORED 

Hegrenade can destroy this flare. I think the problem is in entity location. How to get correct grenade location?
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4

Last edited by Krtola; 04-10-2019 at 12:47.
Krtola is offline
Send a message via Skype™ to Krtola
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 10:00.


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