PAHANCS | Дата: Четверг, 23.07.2009, 17:02:07 | Сообщение # 1 |
Полковник
Группа: Пользователи
Сообщений: 183
Статус: Не в сети
| Незнаю, может уже и есть подобный скрипт, но всё таки может кому пригодится. Code #include amxmodx #include fakemeta
#define OFFSET_SHIELD 510 #define HAS_SHIELD (1<<24) //16777216
stock fm_cs_strip_weapon_shield(id) { new shield = get_pdata_int(id, OFFSET_SHIELD) if(shield & HAS_SHIELD) { shield &= ~HAS_SHIELD set_pdata_int(id, OFFSET_SHIELD, shield) for(new h=1; h<=30; h++) { if(user_has_weapon(id, h) && h != get_user_weapon(id)) { new weaponname[32] get_weaponname(h, weaponname, 31) engclient_cmd(id, weaponname) return 1 } } new viewmodel[24], weaponmodel[24] pev(id, pev_viewmodel2, viewmodel, 23) pev(id, pev_weaponmodel2, weaponmodel, 23) if(containi(viewmodel, "shield") != -1 || containi(weaponmodel, "shield") != -1) { switch(get_user_weapon(id)) { case CSW_P228: { set_pev(id, pev_viewmodel2, "models/v_p228.mdl") set_pev(id, pev_weaponmodel2, "models/p_p228.mdl") } case CSW_ELITE: { set_pev(id, pev_viewmodel2, "models/v_elite.mdl") set_pev(id, pev_weaponmodel2, "models/p_elite.mdl") } case CSW_FIVESEVEN: { set_pev(id, pev_viewmodel2, "models/v_fiveseven.mdl") set_pev(id, pev_weaponmodel2, "models/p_fiveseven.mdl") } case CSW_USP: { set_pev(id, pev_viewmodel2, "models/v_usp.mdl") set_pev(id, pev_weaponmodel2, "models/p_usp.mdl") } case CSW_GLOCK18: { set_pev(id, pev_viewmodel2, "models/v_glock18.mdl") set_pev(id, pev_weaponmodel2, "models/p_glock18.mdl") } case CSW_DEAGLE: { set_pev(id, pev_viewmodel2, "models/v_deagle.mdl") set_pev(id, pev_weaponmodel2, "models/p_deagle.mdl") } case CSW_HEGRENADE: { set_pev(id, pev_viewmodel2, "models/v_hegrenade.mdl") set_pev(id, pev_weaponmodel2, "models/p_hegrenade.mdl") } case CSW_SMOKEGRENADE: { set_pev(id, pev_viewmodel2, "models/v_smokegrenade.mdl") set_pev(id, pev_weaponmodel2, "models/p_smokegrenade.mdl") } case CSW_FLASHBANG: { set_pev(id, pev_viewmodel2, "models/v_flashbang.mdl") set_pev(id, pev_weaponmodel2, "models/p_flashbang.mdl") } case CSW_KNIFE: { set_pev(id, pev_viewmodel2, "models/v_knife.mdl") set_pev(id, pev_weaponmodel2, "models/p_knife.mdl") } } } return 1 } return 0 }
Код в файле:
PAHANCS
|
|
| |