Raised This Month: $ Target: $400
 0% 

About grenade explosion halo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Osker Lee
Member
Join Date: Jul 2011
Old 07-23-2011 , 10:10   About grenade explosion halo
Reply With Quote #1

I want to creat a explosion halo when the grende is exploding,here is my plugin,but it didn't work in CS1.6,who can help me?
(CS1.6 V4554 + AMXMODX1.8.1 + Metamod1.19)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
const m_fGrenadeState 114;
new 
exp;
new 
cvar_radius;
 
public 
plugin_init()
 
{
 
        
register_plugin("GrenadeEffect""1.0""xxx");
 
        
cvar_radius register_cvar("explosion_radius""200");
 
        
RegisterHam(Ham_Think"grenade""fw_ThinkGrenade");
 
}
 
public 
plugin_precache()
 
        
exp precache_model("sprites/shockwave.spr");
 
public 
fw_ThinkGrenade(ent)
 
{
 
        
// Invalid entity
 
        
if (!pev_valid(ent))
 
                return 
HAM_IGNORED;
 
 
 
        if (
get_pdata_int(entm_fGrenadeState) & (1<<0))
 
        {
 
                
blastcircles(ent);
 
        }
 
        return 
HAM_IGNORED;
 
}
 
public 
blastcircles(id)
 
{
 
        
client_print(0,print_chat,"blastcircles");
 
        new 
Float:forigin[3];
 
        
pev(idpev_originforigin);
 
        new 
blast get_pcvar_num(cvar_radius);
 
 
 
        
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYforigin)
 
        
write_byte(TE_BEAMCYLINDER)
 
        
engfunc(EngFunc_WriteCoord,forigin[0])
 
        
engfunc(EngFunc_WriteCoord,forigin[1])
 
        
engfunc(EngFunc_WriteCoord,forigin[2] - 16)
 
        
engfunc(EngFunc_WriteCoord,forigin[0])
 
        
engfunc(EngFunc_WriteCoord,forigin[1])
 
        
engfunc(EngFunc_WriteCoord,forigin[2] - 16 blast)
 
        
write_short(exp)
 
        
write_byte(6
        
write_byte(2
        
write_byte(6
        
write_byte(90)  //
 
        
write_byte(4)   //
 
        
write_byte(238//
 
        
write_byte(130//
 
        
write_byte(238
        
write_byte(250
        
write_byte(5
        
message_end()
 
        
engfunc(EngFunc_MessageBeginMSG_PVS,SVC_TEMPENTITY,forigin)
 
        
write_byte(TE_PARTICLEBURST// TE id
 
        
engfunc(EngFunc_WriteCoord,forigin[0]) // x
 
        
engfunc(EngFunc_WriteCoord,forigin[1]) // y
 
        
engfunc(EngFunc_WriteCoord,forigin[2]) // z
 
        
write_short(240// 
        
write_byte(140// 
        
write_byte(2// 
        
message_end()
 
        
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYforigin)
 
        
write_byte(TE_BEAMCYLINDER)
 
        
engfunc(EngFunc_WriteCoord,forigin[0])
 
        
engfunc(EngFunc_WriteCoord,forigin[1])
 
        
engfunc(EngFunc_WriteCoord,forigin[2] - 16)
 
        
engfunc(EngFunc_WriteCoord,forigin[0])
 
        
engfunc(EngFunc_WriteCoord,forigin[1])
 
        
engfunc(EngFunc_WriteCoord,forigin[2] - 2936 blast /2)
 
        
write_short(exp)
 
        
write_byte(1
        
write_byte(2
        
write_byte(4
        
write_byte(6)
 
        
write_byte(255
        
write_byte(255)
 
        
write_byte(255)
 
        
write_byte(255)
 
        
write_byte(255)  
 
        
write_byte(5
        
message_end()
 
        
engfunc(EngFunc_MessageBeginMSG_PVS,SVC_TEMPENTITY,forigin)
 
        
write_byte(TE_PARTICLEBURST// TE id
 
        
engfunc(EngFunc_WriteCoord,forigin[0]) // x
 
        
engfunc(EngFunc_WriteCoord,forigin[1]) // y
 
        
engfunc(EngFunc_WriteCoord,forigin[2]) // z
 
        
write_short(200// 
        
write_byte(100// 
        
write_byte(4// 
        
message_end()
 

Attached Thumbnails
Click image for larger version

Name:	00.jpg
Views:	158
Size:	97.1 KB
ID:	89321  

Last edited by Osker Lee; 07-23-2011 at 10:23.
Osker Lee is offline
Osker Lee
Member
Join Date: Jul 2011
Old 07-23-2011 , 16:42   Re: About grenade explosion halo
Reply With Quote #2

Now I know why,just because it clashs with some plugins.Now no bug! *(^_^)*

Last edited by Osker Lee; 07-23-2011 at 16:45.
Osker Lee 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 00:46.


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