月梦神
|
分享:
▲
▼
public fw_CmdStart(id, uc_handle, seed) { if(!is_user_alive(id) || !is_user_connected(id)) return if(get_user_weapon(id) != CSW_MAC10 || !g_had_Speargun[id]) return static ent; ent = fm_get_user_weapon_entity(id, CSW_MAC10) if(!pev_valid(ent)) return static CurButton CurButton = get_uc(uc_handle, UC_Buttons) if(CurButton & IN_ATTACK && get_pdata_float(id, 83, 5) <= 0.0) { if(get_pdata_float(ent, 46, OFFSET_LINUX_WEAPONS) > 0.0 || get_pdata_float(ent, 47, OFFSET_LINUX_WEAPONS) > 0.0) return CurButton &= ~IN_ATTACK set_uc(uc_handle, UC_Buttons, CurButton) if(g_Speargun_ammo[id] == 0) return if(get_pdata_float(id, 83, 5) <= 0.0) { FireArrow_Charge(id) g_ready = 1 g_Speargun_ammo[id]-- update_ammo(id) set_weapons_timeidle(id, CSW_MAC10, 2.2) set_player_nextattackx(id, 2.2) if(g_Speargun_ammo[id] >= 1) { Set_WeaponAnim(id, Speargun_ANIM_SHOOT) emit_sound(id, CHAN_WEAPON, sound[0], 1.0, ATTN_NORM, 0, PITCH_NORM) set_task(1.0, "reloadspear", id) } else { Set_WeaponAnim(id, Speargun_ANIM_SHOOT) emit_sound(id, CHAN_WEAPON, sound[0], 1.0, ATTN_NORM, 0, PITCH_NORM) } } } else if(CurButton & IN_ATTACK2) { if(g_ready) { CurButton &= ~IN_ATTACK2 set_uc(uc_handle, UC_Buttons, CurButton) remove_task(Ent) g_rightclick = 1 explode(Ent) } } }
|