請教大大們,怎麼用插件來修改玩家的開槍火焰?

Home Home
引用 | 編輯 z2352671213
2013-08-26 09:05
樓主
推文 x0
如題
求解

AMXX如何實現在玩家開槍的時候修改玩家的槍口火焰?


獻花 x0
引用 | 編輯 a7811311622
2013-08-26 09:56
1樓
  
用 MetaHook …這麼有名的東西居然不知道…?

獻花 x0
引用 | 編輯 z2352671213
2013-08-26 11:19
2樓
  
下面是引用 a7811311622 於 2013-08-26 09:56 發表的: 到引言文
用 MetaHook …這麼有名的東西居然不知道…?

我需要的是AMXX插件= =MetaHook又不是AMXX插件

獻花 x0
引用 | 編輯 a7811311622
2013-08-26 14:24
3樓
  
下面是引用 z2352671213 於 2013-08-26 11:19 發表的 : 到引言文


我需要的是AMXX插件= =MetaHook又不是AMXX插件
給你正確答案也不領情…那你自己去找「自己想要」的答案吧…表情

獻花 x1
引用 | 編輯 s091140
2013-08-28 14:36
4樓
  
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發現

獻花 x0
引用 | 編輯 a7811311622
2013-08-28 20:38
5樓
  
下面是引用 s091140 於 2013-08-28 14:36 發表的 : 到引言文
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 )
{
.......
程式碼貼的不完全…
創了一個物件卻不做 RemoveEntity …?
應該有個 nextthink 去做 RemoveEntity 吧…

獻花 x1
引用 | 編輯 cokegtal
2014-03-01 08:43
6樓
  
用 MetaHook 2.0 ???????????

獻花 x0