|
发表于 2009-12-11 07:10:47
|
显示全部楼层
来自 中国–四川–内江
本帖最后由 sakulekingz 于 2009-12-11 07:14 编辑
- #include <amxmodx>
- #include <amxmisc>
- #include <engine>
- #define PLUGIN "New weapon model for VIP"
- #define VERSION "1.0"
- #define AUTHOR "KzFun.wUgu1"
- #define LOADING "^n^t%s v%s, Copyright (C) 2009 by %s^n"
- new player_flags;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- server_print(LOADING,PLUGIN,VERSION,AUTHOR);
- player_flags = register_cvar("amx_vip_flags","b");
- register_event("CurWeapon", "SwitchWeapon", "be", "1=1");
- }
- public plugin_precache()
- {
- precache_model("models/v_ak47_vip.mdl");
- precache_model("models/w_ak47_vip.mdl");
- precache_model("models/v_m4a1_vip.mdl");
- precache_model("models/w_m4a1_vip.mdl");
- }
- public SwitchWeapon(id)
- {
- new needaccess[32];
- get_pcvar_string(player_flags, needaccess, 31);
- if(get_user_flags(id) & read_flags(needaccess) == 0)
- return;
-
- static iwpn, clip, ammo;
- iwpn = get_user_weapon(id, clip, ammo);
- switch(iwpn)
- {
- case CSW_AK47:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/v_ak47_vip.mdl");
- entity_set_string(id, EV_SZ_weaponmodel, "models/w_ak47_vip.mdl");
- }
- case CSW_M4A1:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/v_m4a1_vip.mdl");
- entity_set_string(id, EV_SZ_weaponmodel, "models/w_m4a1_vip.mdl");
- }
- }
- }
复制代码 自己写的。。。你可以参考,也可以直接拿去用吧。
amx_vip_flags设置需要权限<默认:b> |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|