|
发表于 2008-6-30 13:20:36
|
显示全部楼层
来自 中国–北京–北京–海淀区
回复: 那位高手,帮忙改一下我的小鸡手雷插件!
- #include <amxmodx>
- #include <fakemeta>
- #define PLUGIN "Test"
- #define AUTHOR "Jim"
- #define VERSION "1.0"
- new const chick[] = "models/chick.mdl"
-
- public plugin_precache()
- {
- precache_model(chick)
- }
-
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_forward(FM_SetModel, "fwd_setmodel")
- }
- public fwd_setmodel(ent, const m[])
- {
- if(pev_valid(ent) && pev(ent, pev_owner)
- && m[7] == 'w' && m[8] == '_' && m[9] == 'h')
- {
- set_pev(ent, pev_model, chick)
- return FMRES_SUPERCEDE
- }
- return FMRES_IGNORED
- }
复制代码 |
|