|
发表于 2011-2-5 13:39:31
|
显示全部楼层
|阅读模式
来自 中国–内蒙古–呼伦贝尔–海拉尔区
本帖最后由 201724 于 2011-2-5 14:24 编辑
- /* 本插件由 AMXX-Studio 中文版自动生成*/
- /* UTF-8 func by www.DT-Club.net */
- #include <amxmodx>
- #include <engine>
- #include <fakemeta_const>
- #include <fakemeta>
- //AWP
- new VIEW_MODEL_AWP[] = "models/v_goldawp.mdl"
- new PLAYER_MODEL_AWP[] = "models/p_goldawp.mdl"
- new WORLD_MODEL_AWP[] = "models/w_goldawp.mdl"
- new OLDWORLD_MODEL_AWP[] = "models/w_awp.mdl"
- //AK
- new VIEW_MODEL_AK47[] = "models/v_goldak47.mdl"
- new PLAYER_MODEL_AK47[] = "models/p_goldak47.mdl"
- new WORLD_MODEL_AK47[] = "models/w_goldak47.mdl"
- new OLDWORLD_MODEL_AK47[] = "models/w_ak47.mdl"
- //M4
- new VIEW_MODEL_M4A1[] = "models/v_goldm4a1.mdl"
- new PLAYER_MODEL_M4A1[] = "models/p_goldm4a1.mdl"
- new WORLD_MODEL_M4A1[] = "models/w_goldm4a1.mdl"
- new OLDWORLD_MODEL_M4A1[] = "models/w_m4a1.mdl"
- //沙鹰
- new VIEW_MODEL_deagle[] = "models/175PT/weapon/v_golddeagle.mdl"
- new PLAYER_MODEL_deagle[] = "models/175PT/weapon/p_golddeagle.mdl"
- new WORLD_MODEL_deagle[] = "models/175PT/weapon/w_golddeagle.mdl"
- new OLDWORLD_MODEL_deagle[] = "models/w_deagle.mdl"
- public plugin_init()
- {
- register_plugin("Weapons Models", "1.0", "201724")
- register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
- register_forward(FM_SetModel, "fw_SetModel")
- }
- public Event_CurWeapon(id)
- {
- if (is_user_alive(id) && (get_user_flags(id)&ADMIN_LEVEL_A))
- {
- new weaponID = read_data(2)
- if(weaponID == CSW_AWP)
- {
- set_pev(id, pev_viewmodel2, VIEW_MODEL_AWP)
- set_pev(id, pev_weaponmodel2, PLAYER_MODEL_AWP)
- }
- if(weaponID==CSW_AK47)
- {
- set_pev(id, pev_viewmodel2, VIEW_MODEL_AK47)
- set_pev(id, pev_weaponmodel2, PLAYER_MODEL_AK47)
- }
- if(weaponID==CSW_M4A1)
- {
- set_pev(id, pev_viewmodel2, VIEW_MODEL_M4A1)
- set_pev(id, pev_weaponmodel2, PLAYER_MODEL_M4A1)
- }
- if(weaponID==CSW_DEAGLE)
- {
- set_pev(id, pev_viewmodel2, VIEW_MODEL_deagle)
- set_pev(id, pev_weaponmodel2, PLAYER_MODEL_deagle)
- }
- }
- return PLUGIN_CONTINUE
- }
- public plugin_precache()
- {
- precache_model(VIEW_MODEL_AWP)
- precache_model(PLAYER_MODEL_AWP)
- precache_model(VIEW_MODEL_AK47)
- precache_model(PLAYER_MODEL_AK47)
- precache_model(VIEW_MODEL_M4A1)
- precache_model(PLAYER_MODEL_M4A1)
- precache_model(VIEW_MODEL_deagle)
- precache_model(PLAYER_MODEL_deagle)
- }
- public fw_SetModel(entity, model[])
- {
- if(!is_valid_ent(entity))
- return FMRES_IGNORED
- if(equali(model, OLDWORLD_MODEL_AWP))
- {
- new className[33]
- entity_get_string(entity, EV_SZ_classname, className, 32)
-
- if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
- {
- engfunc(EngFunc_SetModel, entity, WORLD_MODEL_AWP)
- return FMRES_SUPERCEDE
- }
- }
- if(equali(model, OLDWORLD_MODEL_AK47))
- {
- new className[33]
- entity_get_string(entity, EV_SZ_classname, className, 32)
-
- if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
- {
- engfunc(EngFunc_SetModel, entity, WORLD_MODEL_AK47)
- return FMRES_SUPERCEDE
- }
- }
- if(equali(model, OLDWORLD_MODEL_M4A1))
- {
- new className[33]
- entity_get_string(entity, EV_SZ_classname, className, 32)
-
- if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
- {
- engfunc(EngFunc_SetModel, entity, WORLD_MODEL_M4A1)
- return FMRES_SUPERCEDE
- }
- }
- if(equali(model, OLDWORLD_MODEL_deagle))
- {
- new className[33]
- entity_get_string(entity, EV_SZ_classname, className, 32)
-
- if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
- {
- engfunc(EngFunc_SetModel, entity, WORLD_MODEL_deagle)
- return FMRES_SUPERCEDE
- }
- }
- return FMRES_IGNORED
- }
复制代码 |
|