Raised This Month: $ Target: $400
 0% 

Grenade Trails


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 07-20-2007 , 20:56   Re: Grenade Trails
Reply With Quote #2

PHP Code:
/*
    Grenade Trail 1.0
    Author: Jim
    Ported by: SamuraiBarbi & potatis_invalido
 
    Cvars:
    amx_grenade_trails: default 2
    0 - None
    1 - Random Colors
    2 - Cvar: amx_grenade_color
    grenade_color "255000000" set the trail color of grenades
*/
 
#include <amxmodx>
#include <tfcx>
 
#define PLUGIN "Grenade Trail"
#define VERSION "1.0"
#define AUTHOR "Jim"
 
new g_cvar_tr
new g_cvar_color
new g_trail
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_cvar_tr register_cvar("amx_grenade_trails""2")
    
g_cvar_color register_cvar("amx_grenade_color""255000000")
}
 
public 
plugin_precache()
{
    
g_trail precache_model("sprites/smoke.spr")
}
 
public 
grenade_throw(idgidwid)
{
    new 
gtm get_pcvar_num(g_cvar_tr)
    if(!
gtm) return
    new 
rgb
    
switch(gtm)
    {
        case 
1:
        {
            
random(256)
            
random(256)
            
random(256)
        }
        case 
2:
        {
            new 
nadecolor[10]
            
get_pcvar_string(g_cvar_colorcolor9)
            new 
str_to_num(color)
            
1000000
            c 
%= 1000000 
            g 
1000
            b 
1000
        
}
    }
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_BEAMFOLLOW)
    
write_short(gid)
    
write_short(g_trail)
    
write_byte(10)
    
write_byte(5)
    
write_byte(r)
    
write_byte(g)
    
write_byte(b)
    
write_byte(192)
    
message_end()


Last edited by potatis_invalido; 07-20-2007 at 21:08.
potatis_invalido is offline
 



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 21:30.


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