Skip to content

Latest commit

 

History

History

l4d_drop

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Description | 內容

Allows players to drop the weapon they are holding

  • Video | 影片展示
    None

  • Image | 圖示
    None

  • Require | 必要安裝
    None

  • ConVar | 指令
    • cfg\sourcemod\l4d_drop.cfg
       // Prevent players from dropping their secondaries? (Fixes bugs that can come with incapped weapons or A-Posing.)
       sm_drop_block_secondary "0"
      
       // Prevent players from dropping objects in between actions? (Fixes throwable cloning.) 1 = All weapons. 2 = Only throwables.
       sm_drop_block_mid_action "1"
      
       // Prevent players from dropping the M60? (Allows for better compatibility with certain plugins.)
       sm_drop_block_m60 "0"
      
       // (L4D2) Drop - sound file (relative to to sound/, empty=disable)
       sm_drop_soundfile "ui/gift_pickup.wav"
      
       // (L4D1) Drop - sound file (relative to to sound/, empty=disable)
       sm_drop_soundfile "items/itempickup.wav"
  • Command | 命令
    • Drop weapon
       sm_drop
       sm_g
  • API | 串接
     Registers a library name: l4d_drop
     /**
     * @brief Called whenever weapon prepared to drop by plugin l4d_drop
     *
     * @param client        player index to be drop weapon
     * @param weapon        weapon index to be drop
     *
     * @return              Plugin_Continue to continuing dropping,
     *                      Plugin_Changed to change weapon target, otherwise to prevent weapon dropping.
     */
     forward Action OnWeaponDrop(int client, int& weapon);
  • Apply to | 適用於

     L4D1
     L4D2
    
  • Related Plugin | 相關插件
    1. drop_secondary: Survivor players will drop their secondary weapon (including melee) when they die

      死亡時掉落第二把武器

  • Changelog | 版本日誌
    • v1.12 (2023-1-7)

      • Add Drop Sound
      • Add Cvars
    • v1.11 (2023-10-28)

      • Optimize code and improve performance
      • Add inc file
    • v1.10 (2022-12-1)

      • Add OnWeaponDrop API, thanks to NoroHime. Called whenever weapon prepared to drop by this plugin.
    • v1.9

      • Can't drop weapons when survivor is hanging from ledge, incapacitated, or pinned by infected attacker
      • Drop single pistol instead of dual pistols
    • v1.7

    • 1.5


中文說明

玩家可自行丟棄手中的武器

  • 原理

    • 輸入!drop掉落手上的武器
    • 可掉雙手槍
  • 指令中文介紹 (點我展開)
    • cfg\sourcemod\l4d_drop.cfg
       // 為1時,禁止丟棄副武器 (避免玩家手上空空如也)
       sm_drop_block_secondary "0"
      
       // 為1時,所有武器在裝彈、切換、開槍、投擲....時禁止丟棄
       // 為2時,只有投擲物品禁止丟棄
       sm_drop_block_mid_action "1"
      
       // 為1時,禁止丟棄M60 (搭配其他有使用M60相關的插件)
       sm_drop_block_m60 "0"
      
       // (L4D2) 丟棄武器的音效檔案 (路徑相對於 sound 資料夾, 空=無音效)
       sm_drop_soundfile "ui/gift_pickup.wav"
      
       // (L4D1) 丟棄武器的音效檔案 (路徑相對於 sound 資料夾, 空=無音效)
       sm_drop_soundfile "items/itempickup.wav"
  • 命令中文介紹 (點我展開)
    • 丟棄手中的武器
       sm_drop
       sm_g