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

Change Smoke Velocity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
4dead
Member
Join Date: Jun 2012
Old 10-19-2012 , 15:17   Change Smoke Velocity
Reply With Quote #1

I'need A plugins who change a Smoke Grenade Velocity Like In The Snowball War Plugins .
Thanks
4dead is offline
4dead
Member
Join Date: Jun 2012
Old 10-23-2012 , 09:07   Re: Change Smoke Velocity
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>
new pcvar_gravity,pcvar_velocity

public plugin_init()
{
register_clcmd("say /sm""smoke")
    
register_forward(FM_SetModel,"fw_SetModel")
    
pcvar_gravity register_cvar("sw_snowball_gravity","0.3")
    
pcvar_velocity register_cvar("sw_snowball_velocity","2.0")
}
public 
fw_SetModel(ent,const model[])
{
    
//Check ent validity
    
if(!pev_valid(ent))
        return 
FMRES_IGNORED
    
    
//If model is equal to HE model, change it to snowball model
    
if(equali(model,"models/w_smokegrenade.mdl"))
    {
        
//get owner to renew his ammo
        
new Float:velocity[3],owner pev(ent,pev_owner)
        
//Set less gravity, so it will be "real" snowball
        
set_pev(ent,pev_gravity,get_pcvar_float(pcvar_gravity))
        
        
//Get grenade velocity
        
pev(entpev_velocityvelocity)
        
        
//Calculate new velocity
        
velocity[0] *= get_pcvar_float(pcvar_velocity)
        
velocity[1] *= get_pcvar_float(pcvar_velocity)
        
velocity[2] *= get_pcvar_float(pcvar_velocity)
        
        
//Set new velocity
        
set_pev(entpev_velocity,velocity)
        
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}

public 
smokeid )
{
give_itemid"weapon_smokegrenade" );
cs_set_user_bpammoidCSW_SMOKEGRENADE100 );

I Fixed It Hope I help some one
4dead 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 06:44.


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