s091140
|
分享:
▲
▼
new const g_iMuzzleFlash[ ] = "sprites/MUZZ.spr" ; //(枪火)
public plugin_precahce( ) precache_model( g_iMuzzleFlash )
RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_BASE_NAME, "CBaseWeapon_PrimaryAttack_Post", .Post = true );
public CBaseWeapon_PrimaryAttack_Post( pEntity ) { UTIL_MakeMuzzle( pId ) }
stock UTIL_MakeMuzzle( pId ) { new pEntity = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_sprite")) new Float:vecOrigin[ 3 ] pev( pId, pev_origin, vecOrigin )
entity_set_origin( pEntity, vecOrigin ) entity_set_model( pEntity, g_iMuzzleFlash )
entity_set_int( pEntity, EV_INT_solid, SOLID_NOT ) entity_set_int( pEntity, EV_INT_movetype, MOVETYPE_NOCLIP ) entity_set_string( pEntity, EV_SZ_classname, "muzzle_et" )
entity_set_float( pEntity, EV_FL_animtime, get_gametime() ) entity_set_float( pEntity, EV_FL_framerate, 50.0 ) set_pev( pEntity, pev_scale, 0.1 )
set_pev( pEntity, pev_spawnflags, SF_SPRITE_ONCE)
set_pev(pEntity, pev_rendermode, kRenderTransAdd) set_pev(pEntity, pev_renderamt, 255.0)
set_pev(pEntity, pev_skin, pId ) set_pev(pEntity, pev_body, 1) set_pev(pEntity, pev_aiment, pId)
entity_set_float(pEntity, EV_FL_nextthink, get_gametime() + 3.0 ); DispatchSpawn( pEntity ); }
在ZOMBIEMOD.RU发现
|