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

Subplugin Submission |ZP 4.3|:Extra Item Explosive Flare Grenade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 08-22-2015 , 04:36   |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #1

This flare grenade version creates an explosion which can kill the zombies.
Take a look on video:
https://www.youtube.com/watch?v=kyVP6NchCWU
Attached Files
File Type: sma Get Plugin or Get Source (zp_explosive_flare.sma - 1242 views - 5.2 KB)
File Type: zip explosive_flare.zip (79.8 KB, 366 views)

Last edited by Krtola; 08-22-2015 at 04:37.
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-22-2015 , 06:13   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #2

Wow, very nice plugin! Nice sharing. ;)
zmd94 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-11-2015 , 17:20   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
Wow, very nice plugin! Nice sharing. ;)
Thanks.
Maybe you can help me to add that effect from Dare Devil's flare grenade?
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-12-2015 , 04:52   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #4

Dare Devil's flare grenade? Where?
zmd94 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-12-2015 , 05:10   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #5

I remember that he have new version of zp,zp ++ something like that. But now I can not find video on yt...
Krtola is offline
Send a message via Skype™ to Krtola
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-13-2015 , 13:36   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #6

all the effects from dare devil's zp++ would cause low fps on server full.. i dont recommand using that kind of effects
Depresie is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-02-2016 , 04:03   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #7

how can i make this flare be free for everyone, you know when they get all the bombs the flare you usually get will be this one
New and Clueless is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 01-12-2016 , 09:12   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #8

Quote:
Originally Posted by New and Clueless View Post
how can i make this flare be free for everyone, you know when they get all the bombs the flare you usually get will be this one
Try this version:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#include <xs>
#include <zombieplague>

#define pev_flare pev_iuser4

#define flare_id 1337

#define is_ent_flare(%1) (pev(%1, pev_flare) == flare_id) ? 1 : 0

new const explosive_flare_model[] = "models/w_smokegrenade.mdl"

const Float:FLARE_EXPLOSION_DAMAGE 65.0
const Float:FLARE_EXPLOSION_RADIUS 270.0
const Float:FLARE_DAMAGE_MULTI 1.0
const DMG_HEGRENADE = (1<<24)

new 
explosive_sprite2explosive_sprite

public plugin_precache() 
{
    
precache_model(explosive_flare_model)
        
explosive_sprite precache_model("sprites/flare_exp_1.spr")
        
explosive_sprite2 precache_model("sprites/flare_exp_2.spr")
}

public 
plugin_init()
{
    
register_plugin("[ZP]Explosive Flare""1.0""[Half-Life] Biohazard")

    
register_forward(FM_SetModel"explosive_model_stuff")
    
    
register_forward(FM_Think"explosive_think")
}

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)
        
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}

public 
make_flare_flash(ent
{
    if(!
pev_valid(ent))
        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)
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
        
write_byte(27
        
engfunc(EngFunc_WriteCoord,light_origin[0]) 
        
engfunc(EngFunc_WriteCoord,light_origin[1]) 
        
engfunc(EngFunc_WriteCoord,light_origin[2]) 
        
write_byte(22)    // radius
        
write_byte(237// r
            
write_byte(247// g
            
write_byte(35// b
        
write_byte(3)     // life
        
write_byte(0)    // rate
        
message_end()
        
set_task(0.1,"make_flare_flash",ent);
        
        return 
FMRES_SUPERCEDE
        
}
    return 
FMRES_IGNORED
}

public 
make_flare_explode(ent)
{
    if(!
pev_valid(ent))
            return

     new 
Float:atkOrigin[3]

     
pev(entpev_originatkOrigin)

     static 
classname[32]; pev(entpev_classnameclassname31)

     if(
equal(classname"grenade"))
     {     
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYatkOrigin0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordatkOrigin[0])
    
engfunc(EngFunc_WriteCoordatkOrigin[1])
    
engfunc(EngFunc_WriteCoordatkOrigin[2] + 50.0)
    
write_short(explosive_sprite)
    
write_byte(15)
    
write_byte(15)
        
write_byte(10)
    
message_end()

        
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
        
write_byteTE_SPRITETRAIL 
        
engfunc(EngFunc_WriteCoordatkOrigin]) 
        
engfunc(EngFunc_WriteCoordatkOrigin])
        
engfunc(EngFunc_WriteCoordatkOrigin] + 200.0)
        
engfunc(EngFunc_WriteCoordatkOrigin]) 
        
engfunc(EngFunc_WriteCoordatkOrigin])
        
engfunc(EngFunc_WriteCoordatkOrigin] + 30.0)
        
write_short(explosive_sprite2
        
write_byte(20
        
write_byte(random_num(1,2)) 
        
write_byte(2
        
write_byte(15
        
write_byte(2
        
message_end() 

        
set_task(4.0"make_flare_explode"ent)
     }
                               
     new 
attacker pev(entpev_owner)

     if(!
is_user_connected(attacker))
     {
        
engfunc(EngFunc_RemoveEntityent)
        return
     }
    
     new 
victim = -1
    
     
while((victim engfunc(EngFunc_FindEntityInSpherevictimatkOriginFLARE_EXPLOSION_RADIUS)) != 0)
     {     
        if(!
is_user_alive(victim) || !zp_get_user_zombie(victim)) continue;
        
        new 
Float:fOrigin[3], Float:fDistanceFloat:fDamage

        pev
(victimpev_originfOrigin)

        
fDistance get_distance_f(fOriginatkOrigin)

        
fDamage FLARE_EXPLOSION_DAMAGE floatmul(FLARE_EXPLOSION_DAMAGEfloatdiv(fDistanceFLARE_EXPLOSION_RADIUS))

        
fDamage *= 1.0

        
if(fDamage 1.0) continue;
        
        
xs_vec_sub(fOriginatkOriginfOrigin)

        
xs_vec_mul_scalar(fOriginfDamage*FLARE_DAMAGE_MULTIfOrigin)

        
xs_vec_mul_scalar(fOriginFLARE_EXPLOSION_DAMAGE xs_vec_len(fOrigin), fOrigin)

        
set_pev(victimpev_velocityfOrigin)
        
        
ExecuteHamB(Ham_TakeDamagevictimentattackerfDamageDMG_HEGRENADE)
     }
}

public 
explosive_think(ent
{
      if(
pev_valid(ent) && is_ent_flare(ent))
      {
      
engfunc(EngFunc_RemoveEntityent)
      }

Krtola is offline
Send a message via Skype™ to Krtola
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 06-18-2017 , 07:05   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #9

The new version in the making:
https://www.youtube.com/watch?v=9B6l...ature=youtu.be
Krtola is offline
Send a message via Skype™ to Krtola
Old 06-27-2017, 03:48
z0mbiland
This message has been deleted by z0mbiland.
Old 12-14-2021, 04:54
ALonsoVIP4141
This message has been deleted by ALonsoVIP4141.
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 12-14-2021 , 20:42   Re: |ZP 4.3|:Extra Item Explosive Flare Grenade
Reply With Quote #10

Quote:
Originally Posted by ALonsoVIP4141 View Post
Sory for my bad englitch

Can say to me how to chang eplotion time.
Change the 4.0 to your explosion time that you want
PHP Code:
set_task(4.0"make_flare_explode"ent
__________________
My plugin:
Celena Luna 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 17:51.


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