qq457417918 发表于 2007-4-12 20:48:13

请高手近来看下

new const sModel_Weaponbox_w[] = "models/w_weaponbox.mdl"
new const sModel_FlashBang_w[] = "models/w_flashbang.mdl"
new const sModel_HeGrenade_w[] = "models/w_hegrenade.mdl"
new const sModel_SmokeGrenade_w[] = "models/w_smokegrenade.mdl"
new const sModel_c4_w[] = "models/w_c4.mdl"
new const sModel_ak47_w[] = "models/ak47.mdl"
public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
    register_event("CurWeapon", "event_CurWeapon_CheckWeapon", "be", "1>0", "2!4", "2!9", "2!29", "2!25", "2!6", "1!1", "1!2", "1!3", "1!4", "1!5", "1!6", "2!1", "2!2", "3!1", "3!2", "3!3", "3!4", "3!5", "4>0", "4!1", "4!2", "4!3", "4!4", "4!5", "4!6", "4!7", "4!8", "4!9", "5>0", "5!1", "6>0", "7>0", "8!1", "8!2", "8!3", "8!4", "8!5", "8!6", "8!7", "8!8", "9>0", "9!5", "9!6", "9!7", "9!8",)
    register_forward(FM_SetModel, "FM_SetModel_SetKnife")
}
public event_CurWeapon_CheckWeapon(id)
{
    iUserLastWeaponID = read_data(2)
}
public FM_SetModel_SetKnife(iEnt, sModel[])
{
    if ( !pev_valid(iEnt)
    || equal(sModel, sModel_Weaponbox_w)
    || ( !equal(sModel, sModel_HeGrenade_w) && !equal(sModel, sModel_SmokeGrenade_w) && !equal(sModel, sModel_FlashBang_w) && !equal(sModel, sModel_c4_w) && !equal(sModel, sModel_ak47_w)) )
      return FMRES_IGNORED




但是为什么编译不成功呢请高手看看 图片是bmp格式的不能上传   只有压缩上传了

Rulzy 发表于 2007-4-12 21:56:57

回复: 请高手近来看下

乱得一踏糊涂,帮你看真累。
register_event("CurWeapon"....
这个事件的条件根本就不对,这个事件就只有3个条件,1为是否激活,2为WeaponId,3为当前弹药,哪来的4、5、6、7、8、9?
出现你说的错误是因为,这一行的最后反括号前多了个逗号。

qq457417918 发表于 2007-4-12 22:01:40

回复: 请高手近来看下

呵呵我是菜鸟   自己学着修改的斑竹请讲明白一点
页: [1]
查看完整版本: 请高手近来看下