|
发表于 2010-8-13 18:36:29
|
显示全部楼层
来自 中国–广东–梅州
本帖最后由 czdczdczd 于 2010-8-13 18:39 编辑
/*
Plugin author { DT.Sakulekingz \ KIN \ KzFun.wUgu1 \ k1nader }
__....__ 1. DT.Sakulekingz is KIN,
.-~~/ \__/ \~~-. 2. KIN is KzFun.wUgu1,
/_/``\__/ \__/``\_\.--. 3. KzFun.wUgu1 is k1nader,
/ \__/ \__/ \__/ \ o`. 4. k1nader is DT.Sakulekingz,
`==/\__/__\__/__\__/__\__/\`'--' 5. so..DT.Sakulekingz = KIN = KzFun.wUgu1 = k1nader
~/__/__/^^^^^^^^\__\__\~ 6. DT.Sakuleking, KIN, KzFun.wUgu1, k1nader (the 4 names is me).
*/
#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") 有加b权限,可好象无效,,我是菜鸟,请楼上2位朋友指点,谢
在new_weapons.ini加一句
原本模組名字 取代更換別模組的名字
例如"models/v_knife.mdl" "models/TZknife.mdl"
x:\cs\cstrike\addons\amxmodx\configs\new_weapons.ini
x:\cs\cstrike\addons\amxmodx\plugins\GHW_Weapon_Replacement.amxx
在plugins.ini 加上一句 GHW_Weapon_Replacement.amxx
PS:上面的已经设好 |
|