Raised This Month: $ Target: $400
 0% 

Bullet 'tracer'


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-21-2005 , 21:46  
Reply With Quote #5

Yes, you need to get the ending origin, and you can do it like v3x posted.

From that code it looks like TE_MULTIGUNSHOT will do some tracer action, and it will also create the bullet holes in the wall.

This is xeroblood's method of determining when a shot is fired:

Code:
#define MAX_PLAYERS 32 // Tracks players Shots-Fired: [0]=WeaponID, [1]=Ammo new g_nCurWeapon[MAX_PLAYERS][2] public plugin_init() {     register_event( "CurWeapon", "Event_ShotFired",  "b" ) } public Event_ShotFired( id ) {     // Players current weapon data..     new weaponID = read_data( 2 )     new wAmmo = read_data( 3 )     if( g_nCurWeapon[id-1][0] != weaponID ) // User Changed Weapons..     {         g_nCurWeapon[id-1][0] = weaponID         g_nCurWeapon[id-1][1] = wAmmo         return PLUGIN_CONTINUE     }     if( g_nCurWeapon[id-1][1] < wAmmo ) // User Reloaded..     {         g_nCurWeapon[id-1][1] = wAmmo         return PLUGIN_CONTINUE     }     if( g_nCurWeapon[id-1][1] == wAmmo ) // User did something else, but didn't shoot..         return PLUGIN_CONTINUE         // This far means user shot his/her gun..     // Save new weapon data..     g_nCurWeapon[id-1][1] = wAmmo     g_nCurWeapon[id-1][0] = weaponID     // Now you can do stuff, like:     // Get the origin of weapon hit-point     new nPoint[3]     get_user_origin( id, nPoint, 3 )     // blah blah blah...     return PLUGIN_CONTINUE }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:29.


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