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

Colored Smokenades


Post New Thread Reply   
 
Thread Tools Display Modes
Razvann.
Senior Member
Join Date: Jul 2012
Old 07-18-2012 , 15:40   Re: Colored Smokenades
Reply With Quote #91

Very nice plugin , work perfectly.

Last edited by Razvann.; 07-18-2012 at 15:46.
Razvann. is offline
Send a message via Yahoo to Razvann.
rotosas
New Member
Join Date: Dec 2010
Old 11-09-2012 , 15:56   Re: Colored Smokenades
Reply With Quote #92

Aye, this plugin is quite good, because it is not only funny, but it also protects a server from anti-smoke cheat.

Last edited by rotosas; 11-09-2012 at 16:04.
rotosas is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 12-29-2012 , 17:23   Re: Colored Smokenades
Reply With Quote #93

How to catch smoke touch ? Any idea ?
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Unkolix
Veteran Member
Join Date: Sep 2012
Old 06-15-2013 , 05:35   Re: Colored Smokenades
Reply With Quote #94

When you throw a smoke grenade on the very end of the round, it stays even on the next round. Can you fix it? And does this happen for regular non-colored smoke grenades?
Unkolix is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 06-16-2013 , 17:30   Re: Colored Smokenades
Reply With Quote #95

pretty awesome
GhostMan is offline
CrazyRussian.
New Member
Join Date: Jun 2013
Location: in the world?
Old 06-22-2013 , 20:46   Re: Colored Smokenades
Reply With Quote #96

This is really cool and usefull man gj !
__________________
Dont worry if u get a step back ,
Remmber that the Arrow Needs to get back to move quickly forward
CrazyRussian. is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-28-2013 , 05:43   Re: Colored Smokenades
Reply With Quote #97

Quote:
Originally Posted by Unkolix View Post
..And does this happen for regular non-colored smoke grenades?
test and see by yourself, the easiest way !
__________________
ANTICHRISTUS is offline
Old 03-28-2014, 04:12
usarmy
This message has been deleted by usarmy.
ositoe
Member
Join Date: Nov 2009
Location: Palmdale, CA
Old 11-05-2014 , 20:53   Re: Colored Smokenades
Reply With Quote #98

Is there a way to use this on gungame? not having in the weapon cycle but to have as extra nade on hand while playing?
__________________
It isnt time to Hibernate????
ositoe is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-05-2014 , 22:50   Re: Colored Smokenades
Reply With Quote #99

Just use below. This will give 1 bomb at every respawn for free.
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define VERSION "1.1"

new const g_szClassname[] = "colored_smokenade";

new 
g_szSmokeSprites];
new 
g_Cvar_Enabledg_Cvar_Amount

public plugin_init( ) {
    
register_plugin"Colored Smoke"VERSION"xPaw" );
    
    
register_cvar"colored_smoke"VERSIONFCVAR_SERVER FCVAR_SPONLY );
    
set_cvar_string"colored_smoke"VERSION );
    
    
g_Cvar_Enabled register_cvar"sv_colored_smoke""1" );
    
g_Cvar_Amount register_cvar"sv_grenade_amount""1" // Amount of grenade given
    
    
register_forwardFM_EmitSound"FwdEmitSound" );
    
register_touchg_szClassname"worldspawn""FwdTouch_FakeSmoke" );
    
register_thinkg_szClassname"FwdThink_FakeSmoke" );
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerRespawn"1)
}

public 
plugin_precache( ) {
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01y.spr" );
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01r.spr" );
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01b.spr" );
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01g.spr" );
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01m.spr" );
    
g_szSmokeSprites] = precache_model"sprites/gas_puff_01o.spr" );
    
    
precache_sound"weapons/grenade_hit1.wav" );
}

public 
fw_PlayerRespawn(id)
{
    if (
is_user_alive(id))
    {
        
give_itemid"weapon_smokegrenade" )
        
cs_set_user_bpammo(idCSW_SMOKEGRENADEget_pcvar_num(g_Cvar_Amount))
    }
}

public 
FwdEmitSoundiOrigEntiChannel, const szSample[], Float:fVolFloat:fAttniFlagsiPitch ) {
    new 
iCvar get_pcvar_numg_Cvar_Enabled );
    if( 
iCvar ) {
        static const 
szSmokeSound[] = "weapons/sg_explode.wav";
        
        if( 
equalszSampleszSmokeSound ) ) {
            
// cache origin, angles and model
            
new Float:vOrigin], Float:vAngles], szModel64 ], iOwner;
            
iOwner entity_get_edictiOrigEntEV_ENT_owner );
            
entity_get_vectoriOrigEntEV_VEC_originvOrigin );
            
entity_get_vectoriOrigEntEV_VEC_anglesvAngles );
            
entity_get_stringiOrigEntEV_SZ_modelszModelcharsmaxszModel ) );
            
            
// remove entity from world
            
entity_set_vectoriOrigEntEV_VEC_originFloat:{ 9999.99999.99999.9 } );
            
entity_set_intiOrigEntEV_INT_flagsFL_KILLME );
            
            
// create new entity
            
new iEntity create_entity"info_target" );
            if( 
iEntity ) {
                
entity_set_stringiEntityEV_SZ_classnameg_szClassname );
                
                
entity_set_originiEntityvOrigin );
                
entity_set_vectoriEntityEV_VEC_anglesvAngles );
                
                
entity_set_intiEntityEV_INT_movetypeMOVETYPE_TOSS );
                
entity_set_intiEntityEV_INT_solidSOLID_BBOX );
                
                
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 21.5 );
                
entity_set_floatiEntityEV_FL_gravity0.5 );
                
entity_set_floatiEntityEV_FL_friction0.8 );
                
                
entity_set_modeliEntityszModel );
                
                new 
Float:vVelocity];
                
vVelocity] = random_float( -220.0220.0 );
                
vVelocity] = random_float( -220.0220.0 );
                
vVelocity] = random_float(  200.0300.0 );
                
entity_set_vectoriEntityEV_VEC_velocityvVelocity );
                
                
emit_soundiEntityiChannelszSamplefVolfAttniFlagsiPitch );
                
                
// Create fake smoke
                
new iSmoke;
                
                if( 
iCvar == )
                    
iSmoke get_user_teamiOwner ); // i did indexes as team, 1 - red, 2 - blue, 3 - green( spec oO )
                
else
                    
iSmoke random_num0);
                
                
// Store the smoke number in entity, we will use it later
                
entity_set_intiEntityEV_INT_iuser4iSmoke );
                
                
message_beginMSG_BROADCASTSVC_TEMPENTITY );
                
write_byteTE_FIREFIELD );
                
engfuncEngFunc_WriteCoordvOrigin] );
                
engfuncEngFunc_WriteCoordvOrigin] );
                
engfuncEngFunc_WriteCoordvOrigin] + 50 );
                
write_short100 );
                
write_shortg_szSmokeSpritesiSmoke ] );
                
write_byte100 );
                
write_byteTEFIRE_FLAG_ALPHA );
                
write_byte1000 );
                
message_end();
                
                
message_beginMSG_BROADCASTSVC_TEMPENTITY );
                
write_byteTE_FIREFIELD );
                
engfuncEngFunc_WriteCoordvOrigin] );
                
engfuncEngFunc_WriteCoordvOrigin] );
                
engfuncEngFunc_WriteCoordvOrigin] + 50 );
                
write_short150 );
                
write_shortg_szSmokeSpritesiSmoke ] );
                
write_byte10 );
                
write_byteTEFIRE_FLAG_ALPHA TEFIRE_FLAG_SOMEFLOAT );
                
write_byte1000 );
                
message_end( );
            }
        }
    }
}

public 
FwdTouch_FakeSmokeiEntityiWorld ) {
    if( !
is_valid_entiEntity ) )
        return 
PLUGIN_CONTINUE;
    
    
// Bounce sound
    
emit_soundiEntityCHAN_VOICE"weapons/grenade_hit1.wav"0.25ATTN_NORM0PITCH_NORM );
    
    new 
Float:vVelocity];
    
entity_get_vectoriEntityEV_VEC_velocityvVelocity );
    
    if( 
vVelocity] <= 0.0 && vVelocity] <= 0.0 ) {
        new 
Float:vOrigin];
        new 
iSmoke entity_get_intiEntityEV_INT_iuser4 );
        
entity_get_vectoriEntityEV_VEC_originvOrigin );
        
        
// Make small smoke near grenade on ground
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byteTE_FIREFIELD );
        
engfuncEngFunc_WriteCoordvOrigin] );
        
engfuncEngFunc_WriteCoordvOrigin] );
        
engfuncEngFunc_WriteCoordvOrigin] + 10 );
        
write_short);
        
write_shortg_szSmokeSpritesiSmoke ] );
        
write_byte);
        
write_byteTEFIRE_FLAG_ALLFLOAT TEFIRE_FLAG_ALPHA );
        
write_byte30 );
        
message_end();
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
FwdThink_FakeSmokeiEntity ) {
    if( !
is_valid_entiEntity ) )
        return 
PLUGIN_CONTINUE;
    
    
remove_entityiEntity );
    
    return 
PLUGIN_CONTINUE;

If you want to edit the value, just edit this part:
PHP Code:
g_Cvar_Amount register_cvar"sv_grenade_amount""1" // Amount of grenade given 

Last edited by zmd94; 11-05-2014 at 22:51.
zmd94 is offline
ositoe
Member
Join Date: Nov 2009
Location: Palmdale, CA
Old 11-06-2014 , 12:53   Re: Colored Smokenades
Reply With Quote #100

Awesome Thank YoU!!!!!!!
__________________
It isnt time to Hibernate????
ositoe is offline
Reply


Thread Tools
Display Modes

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 12:51.


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