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