Raised This Month: $ Target: $400
 0% 

lighting tracers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 07-08-2006 , 10:33   Re: lighting tracers
Reply With Quote #5

And here the complete plugin,that i have used for testing
Code:
#include <amxmodx> new g_nCurWeapon[33][2] public plugin_init() {     register_plugin("Colored Tracers","0.1","Schnitzelmaker")     register_event("CurWeapon","make_tracer","b") } public make_tracer(id){     new weaponID = read_data( 2 )     new wAmmo = read_data( 3 )     if( g_nCurWeapon[id][0] != weaponID ) // User Changed Weapons..     {         g_nCurWeapon[id][0] = weaponID         g_nCurWeapon[id][1] = wAmmo         return PLUGIN_CONTINUE     }     if( g_nCurWeapon[id][1] < wAmmo ) // User Reloaded..     {         g_nCurWeapon[id][1] = wAmmo         return PLUGIN_CONTINUE     }     if( g_nCurWeapon[id-1][1] == wAmmo ) // User did something else, but didn't shoot..         return PLUGIN_CONTINUE     g_nCurWeapon[id][1] = wAmmo     g_nCurWeapon[id][0] = weaponID     new vec1[3], Float:velocity[3],speed=100//have set the spped low to see the tracer effect     get_user_origin(id,vec1,1)         velocity_by_aim(id,speed,velocity)         #define TE_USERTRACER            127 // larger message than the standard tracer, but allows some customization.     // coord (origin)     // coord (origin)     // coord (origin)     // coord (velocity)     // coord (velocity)     // coord (velocity)     // byte ( life * 10 )     // byte ( color ) this is an index into an array of color vectors in the engine. (0 - )     // byte ( length * 10 )         message_begin(MSG_ALL,SVC_TEMPENTITY)     write_byte(127) // TE_BEAMPOINTS)     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2])     write_coord(floatround(velocity[0]))     write_coord(floatround(velocity[1]))     write_coord(floatround(velocity[2]))     write_byte(10)              // Life     write_byte(1)       //Color:1=red,2=green     write_byte(1000)     message_end()     return PLUGIN_CONTINUE }
__________________

Last edited by schnitzelmaker; 07-09-2006 at 06:14.
schnitzelmaker 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 08:01.


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