Hi!
I got this code
What do i need to write if i want to use the TriggerH when the player shoot??
HTML Code:
#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>
new laserspr;
new const laser[ ] = "sprites/dot.spr";
public plugin_init()
{
/// ????
}
public plugin_precache()
{
laserspr = precache_model( laser );
}
public TriggerH(client)
{
static iTarget, iBody;
get_user_aiming( client, iTarget, iBody );
static iOrigin[ 3 ];
get_user_origin( client, iOrigin, 3 );
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMENTPOINT );
write_short( client | 0x1000 );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_short( laserspr );
write_byte( 1 );
write_byte( 10 );
write_byte( 1 );
write_byte( 5 );
write_byte( 0 );
write_byte( random_num(0,255) );
write_byte( random_num(0,255) );
write_byte( random_num(0,255) );
write_byte( 150 );
write_byte( 25 );
message_end( );
}
__________________