Raised This Month: $ Target: $400
 0% 

Grenade Trails


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 07-21-2007 , 00:11   Re: Grenade Trails
Reply With Quote #4

Because, i think, the forward "Grenade_Throw" is not in TFC, only CS.
Thus, it never calls.

Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Jim/Drak"   new g_cvar_tr new g_cvar_color new g_trail new const gModel[] = "models/lol.mdl" // CHANGE THIS public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_SetModel,"forwardSetModel");         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 forwardSetModel(ent,const model[]) {     if(equal(model,gModel))     {         new gtm = get_pcvar_num(g_cvar_tr)         if(!gtm) return         new r, g, b         switch(gtm)         {             case 1:             {                 r = random(256)                 g = random(256)                 b = random(256)             }             case 2:             {                 new nade, color[10]                 get_pcvar_string(g_cvar_color, color, 9)                 new c = str_to_num(color)                 r = c / 1000000                 c %= 1000000                 g = c / 1000                 b = c % 1000                }         }         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)         write_byte(TE_BEAMFOLLOW)         write_short(ent)         write_short(g_trail)         write_byte(10)         write_byte(5)         write_byte(r)         write_byte(g)         write_byte(b)         write_byte(192)         message_end()     } }

(In order for this code to work, you need to change "g_model" to the model you want to have a trail)
__________________
Oh yeah

Last edited by Drak; 07-21-2007 at 00:20.
Drak is offline
Send a message via MSN to Drak
 



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