Raised This Month: $ Target: $400
 0% 

[REQ] Admin Explode


Post New Thread Reply   
 
Thread Tools Display Modes
Joce93
Senior Member
Join Date: Feb 2016
Old 07-29-2016 , 12:14   Re: [REQ] Admin Explode
Reply With Quote #11

Hello. So i used this plugin for few months now, it works great, killing people etc very nice. But i would like to change the blast effect:

I want to have the same effect than the video (the explosion effect with a earthquake touch):

At the moment i have this, a kind of rainbow shockwave:





I want an explosion effect like this:



The video:

https://www.youtube.com/watch?v=IPR4uHiqYSM#t=0m17s



I don't know how to script a plugin i'm sorry. Even if I replace the "shockwave.spr" by "explosion.spr" it does not work, because something need to be changed about the amplitude i think.

I'm using arnall's plugin (see page 1):

PHP Code:
#include < amxmodx >
#include < amxmisc >

#include < engine >


#include < fun >

#pragma semicolon 1

new gCvarEnabled;
new 
gCvarRadius;
new 
gCvarDamage;
new 
gCvarFragBonus;
//new gCvarMoneyBonus;

new gCylinderSprite;
new 
gMaxPlayers;
new 
gMessageDeathMsg;

new 
Trie:gTrieHandleInflictorToIgnore;

new const 
InflictorToIgnore[ ][ ] =
{
    
"world",
        
"worldspawn",
        
"trigger_hurt",
        
"door_rotating",
        
"door",
        
"rotating",
        
"env_explosion"
};

new const 
gExplodeSound[ ] = "weapons/rocketfire1.wav";

public 
plugin_init( )
{
    
register_plugin"Admin Explode""1.0.1""tuty" );
    
register_concmd "explode","autoexplode",ADMIN_LEVEL_B,"auto_explode",-1);

    
register_event"DeathMsg""Hook_DeathMessage""a" );
    
    
gCvarEnabled register_cvar"ae_enabled""1" );
    
gCvarRadius register_cvar"ae_radius""500" );
    
gCvarDamage register_cvar"ae_damage""1000.0" );
    
gCvarFragBonus register_cvar"ae_frags""1" );
    
    
    
gMaxPlayers get_maxplayers();
    
gMessageDeathMsg get_user_msgid"DeathMsg" );

    
gTrieHandleInflictorToIgnore TrieCreate( );

    for( new 
0sizeof InflictorToIgnorei++ )
    {
            
TrieSetCellgTrieHandleInflictorToIgnoreInflictorToIgnore], );
    }
}

public 
plugin_precache( )
{
    
gCylinderSprite precache_model"sprites/shockwave.spr" );
    
    
precache_soundgExplodeSound );
}
public 
autoexplode (id)
{
        new 
iOrigin];
        
get_user_originidiOrigin );
        
        new 
iRadius get_pcvar_numgCvarRadius );
    
        
UTIL_CreateBeamCylinderiOrigin120gCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
UTIL_CreateBeamCylinderiOrigin320gCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
UTIL_CreateBeamCylinderiOriginiRadiusgCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
        
UTIL_Blast_ExplodeDamageidget_pcvar_floatgCvarDamage ), floatiRadius ) );
        
        
emit_soundidCHAN_BODYgExplodeSoundVOL_NORMATTN_NORM0PITCH_NORM );
    }

    
//return PLUGIN_CONTINUE;


public Hook_DeathMessage( )
{
    if( 
get_pcvar_numgCvarEnabled ) != )
    {
        return 
PLUGIN_CONTINUE;
    }

    new 
iKiller read_data);
    new 
iVictim read_data);
    
    new 
szWeapon30 ];
    
read_data4szWeaponcharsmaxszWeapon ) );
    
    if( 
iVictim == iKiller )
    {
        return 
PLUGIN_CONTINUE;
    }
    
    if( 
TrieKeyExistsgTrieHandleInflictorToIgnoreszWeapon ) )
    {
           return 
PLUGIN_CONTINUE;
    }

    if( 
is_user_adminiVictim ) )
    {
        new 
iOrigin];
        
get_user_originiVictimiOrigin );
        
        new 
iRadius get_pcvar_numgCvarRadius );
    
        
UTIL_CreateBeamCylinderiOrigin120gCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
UTIL_CreateBeamCylinderiOrigin320gCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
UTIL_CreateBeamCylinderiOriginiRadiusgCylinderSprite006160random255 ), random255 ), random255 ), 255);
        
        
UTIL_Blast_ExplodeDamageiVictimget_pcvar_floatgCvarDamage ), floatiRadius ) );
        
        
emit_soundiVictimCHAN_BODYgExplodeSoundVOL_NORMATTN_NORM0PITCH_NORM );
    }

    return 
PLUGIN_CONTINUE;
}

stock UTIL_Blast_ExplodeDamageentidFloat:damageFloat:range 
{
    new 
Float:flOrigin1];
    
entity_get_vectorentidEV_VEC_originflOrigin1 );

    new 
Float:flDistance;
    new 
Float:flTmpDmg;
    new 
Float:flOrigin2];

    for( new 
1<= gMaxPlayersi++ ) 
    {
        if( 
is_user_alive) && get_user_teamentid ) != get_user_team) )
        {
            
entity_get_vectoriEV_VEC_originflOrigin2 );
            
flDistance get_distance_fflOrigin1flOrigin2 );
            
            static const 
szWeaponName[] = "Admin Blast Explosion";
        
            if( 
flDistance <= range 
            {
                
flTmpDmg damage - ( damage range ) * flDistance;
                
fakedamageiszWeaponNameflTmpDmgDMG_BLAST );
            
                
message_beginMSG_BROADCASTgMessageDeathMsg );
                
write_byteentid );
                
write_byte);
                
write_byte);
                
write_stringszWeaponName );
                
message_end();
            }
        }
    }

    
set_user_fragsentidget_user_fragsentid ) + get_pcvar_numgCvarFragBonus ) );
    
}

stock UTIL_CreateBeamCylinderorigin], addradspritestartfrateframeratelifewidthamplituderedgreenbluebrightnessspeed )
{
    
message_beginMSG_PVSSVC_TEMPENTITYorigin ); 
    
write_byteTE_BEAMCYLINDER );
    
write_coordorigin] );
    
write_coordorigin] );
    
write_coordorigin] );
    
write_coordorigin] );
    
write_coordorigin] );
    
write_coordorigin] + addrad );
    
write_shortsprite );
    
write_bytestartfrate );
    
write_byteframerate );
    
write_byte(life );
    
write_bytewidth );
    
write_byteamplitude );
    
write_bytered );
    
write_bytegreen );
    
write_byteblue );
    
write_bytebrightness );
    
write_bytespeed );
    
message_end();

However the radius and killing people script is working. It's just about the explosion effect. Can someone help me ?

I can pay 5€ with paypal if you make the same effect.

Last edited by Joce93; 08-01-2016 at 04:46.
Joce93 is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 07-31-2016 , 12:02   Re: [REQ] Admin Explode
Reply With Quote #12

I have another video for the explosion effect:

https://www.youtube.com/watch?v=pGqW481wI3c#t=0m10s


Can anyone help me ?

Last edited by Joce93; 07-31-2016 at 12:02.
Joce93 is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 08-12-2016 , 18:16   Re: [REQ] Admin Explode
Reply With Quote #13

Help !
Joce93 is offline
arnalll
Member
Join Date: Nov 2015
Location: France
Old 08-13-2016 , 03:37   Re: [REQ] Admin Explode
Reply With Quote #14

ok,
Now it is a little bit like you asked.

Note that you may not have the sprite in your collection, so feel free to change to what you want or i will try to upload it if i get less lazy.
Attached Files
File Type: sma Get Plugin or Get Source (aexplode3.sma - 250 views - 5.3 KB)
arnalll is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 08-13-2016 , 09:25   Re: [REQ] Admin Explode
Reply With Quote #15

Quote:
Originally Posted by arnalll View Post
ok,
Now it is a little bit like you asked.

Note that you may not have the sprite in your collection, so feel free to change to what you want or i will try to upload it if i get less lazy.
It works great thanks. I just need a last thing, is it possible to add the "earthquake" effect in the explosion area ? You know, like a normal grenade. Like in the video. If too lazy np, i can understandl. After this you can give me your paypal email

Last edited by Joce93; 08-13-2016 at 14:08.
Joce93 is offline
arnalll
Member
Join Date: Nov 2015
Location: France
Old 08-14-2016 , 03:25   Re: [REQ] Admin Explode
Reply With Quote #16

here we are
Attached Files
File Type: sma Get Plugin or Get Source (aexplode4.sma - 299 views - 5.6 KB)
arnalll is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 08-14-2016 , 09:48   Re: [REQ] Admin Explode
Reply With Quote #17

Thank you !
Joce93 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 20:26.


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