Left 4 Dead 2

Left 4 Dead 2

Left 4 Fun
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
smilzo  [udvikler] 25. apr. 2019 kl. 10:52
Addon commands
All the following commands can be sent via chat trigger:
!l4f <command> <value1> <value2> <value N>
(server will reply on public chat)

Or using the equivalent console command:
scripted_user_func l4f,<command>,<value1>,<value2>,<value N>
(server will reply on the sender's console)


User commands

Name
Description
Allowed values
help
Shows help about the available commands (only user commands, not admin ones)
  1. Command (or nothing to list the available commands)
Ex:
!help
!help buy
helpme
If the feature is enabled (see l4f_helpme cvar in Extra (fake) cvars) allows incapped (or hanging) players to revive themselves using their pain pills/adrenaline/first aid kit
No value expected
money
Returns how much money you collected (see l4f_money cvar in Extra (fake) cvars)
No value expected
price
Shows the price of the given item (type: '!help price' to see the list of available items)
  1. Item name
Ex:
!price ak
!price adrenaline
buy
You can buy items with this command (type: '!help buy' to see the list of available items)
  1. Item name
Ex:
!buy ak
!price adrenaline
drop_money
Drop 50 of your collected credits to the ground for a teammate to pickup
No value expected
give_money
You can send money to another survivor
  1. Target player(s) - player name (or character name) or one of the following keywords: others, bots
  2. Amount
Ex:
!give_money bots 100
!give_money nick 1000
team
If the game mode allows it, you can switch team with this command
No value expected
next_infected
Playing as infected you can change your infected type while in ghost mode by using this command
No value expected
release_tank
Playing as infected you can pass the control of the tank to the next player by using this command
No value expected
ability_set
Allows you to set the Survivor Ability to use (by default you can only set it while still in the saferoom)
  1. Ability name
Ex:
!ability_set fireman
!ability_set bhop
ability_start
Activates your Survivor Ability (if not in cooldown)
No value expected
ability_stop
Stops your active Survivor Ability
No value expected
ability_use
Passive Survivor Abilities don't need this but some need to be fired to be used (after activating them). You can bind this to a button with: bind "BUTTON" "scripted_user_func ability_use"
No value expected


Admin commands

Name
Description
Allowed values
l4f_admin_init
Add the sender to the admins list when the list is empty, will stop working when the first admin has been added to the list
No value expected
settings
Change or retrieve settings values
  1. Setting name (or dump to print all the settings values at once)
  2. New value (or nothing to retrieve the current value)
Ex:
!settings mod l4f_low_gravity
!settings ricochet

Click here for the complete list of available settings
admins
Add/Remove/List admins
  1. Command switch - add / remove / list
  2. Player name (or character name) for add and remove switches - Nothing for list
Ex:
!admins add zoey
!admins list

Note: list will list the admins currently online
trolls
Add/Remove/List players with the "troll" flag (such players will have special "restrictions" during the game)
  1. Command switch - add / remove / list
  2. Player name (or character name) for add and remove switches - Nothing for list
Ex:
!trolls add zoey
!trolls list

Note: list will list the "troll" players currently online
kick
Kick player
  1. Player name (or character name)
  2. Reason
Ex:
!kick bill afk
ban
Ban player
  1. Player name (or character name)
  2. Reason
Ex:
!ban bill troll
bspawn
Spawn an extra survivor bot (only L4D1 characters) at the crosshair location
  1. Survivor character name to spawn
Ex:
!bspawn bill
zspawn
Spawn the given infected at the crosshair location
  1. Infected type: common, smoker, boomer, leaker, hunter, spitter, jockey, charger, witch, witch_bride, tank, mob, random
  2. Spawn amount
Ex:
!zspawn tank 2
help_player
Helps the given survivor(s). If the survivor is pinned by a special, the special gets killed. If the survivor is incapacitated, hanging from a ledge or dead, he is automatically revived (unlike the "respawn" command, this one does not teleport the player near a teammate after reviving from death).
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
Ex:
!help_player me
!help_player bots
incap
Incapacitate the given survivor(s)
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
Ex:
!incap rochelle
!incap bots
kill
Kill the given survivor(s)
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
Ex:
!kill all

respawn
Respawn the given dead player(s)
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
Ex:
!respawn nick
warp
Teleport the given Survivor(s)/Special infected to the given location
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all, tank, boomer, charger, hunter, jockey, smoker, spitter
  2. Destination player - player name (or character name) or one of the following keywords: me, start, saferoom, finale, rescue, here (crossair location)
Ex:
!warp tank bill
!warp all saferoom

Note: all refers to all the survivors, not the infected
give
Give item to player(s)
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
  2. Item name
Ex:
!give all first_aid_kit
!give me weapon_grenade_launcher
remove
Remove an item from the players inventory
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
  2. Inventory slot: held, slot0, slot1, slot2, slot3, slot4, slot5
Ex:
!remove bill slot2
speak_command
Makes the target player(s) speak the given vocalizer command
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
  2. Vocalizer command to speak
Ex:
!speak_command all PlayerLaugh
speak_scene
Makes the target player(s) speak the given scene
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
  2. Scene to speak
Ex:
!speak_scene zoey scenes/TeenGirl/DLC1_C6M3_L4D1FinaleCinematic15.vcd
!speak_scene zoey DLC1_C6M3_L4D1FinaleCinematic15
cvar
Set/Retrieve a cvar value
  1. Cvar name
  2. Cvar value to set or nothing to retrieve the current value
Ex:
!cvar l4f_max_specials 4
!cvar sv_gravity
pcvar
Set/Retrieve a persistent cvar value. Since the Last Stand update the cvar set via script get reset after each map transition. Use this command to set a persistent value for a certain cvar in order to keep the change on the next chapter and the next time you start the game
  1. Cvar name
  2. Cvar value to set or nothing to retrieve the current value
Ex:
!pcvar l4f_max_specials 4
!pcvar sv_gravity
pcvars
You can use this command to remove a persistent value for a cvar or to delete them all
  1. Switch: list, delete, clear
  2. Cvar name to delete if switch is delete - Nothing if switch is list or clear)
Ex:
!pcvars list
!pcvars delete sv_gravity
!pcvars clear
console
Execute the given command on the server's console
  1. Console command
Ex:
!console crash
director
Start/Stop AI director
  1. Switch: on, off
Ex:
!director off
restart
Restart the current chapter
No value expected
end
End the current map
No value expected
load_cvars
Load cvars from the given file
  1. File name
Ex:
!load_cvar test.txt
setprice
Sets the price of an item
  1. Item name
  2. New price
Ex:
!setprice ak 2000
!setprice adrenaline 200
force_buy
Forces the given target survivor to buy the item
  1. Target survivor
  2. Item name
Ex:
!force_buy nick ak
bank_amount
Sets the bank amount for the given target survivor
  1. Target survivor
  2. Bank type: money, gifts (note: only 'money' is used at the moment)
  3. New amount
Ex:
!bank_amount nick money 3000
botcmd
Sends a command to the target survivor bot(s)
  1. Command: move, attack, retreat, reset
  2. Target surivor bot(s) - bot name (or character name) or one of the following keywords: bots (all the bots)
  3. Other entity
Ex:
!botcmd move nick rochelle
!botcmd attack bots tank
!botcmd retreat bots tank
switchteam
Switches the team of the target player(s)
  1. Target player(s) - player name (or character name) or one of the following keywords: me, bots, all
Ex:
!switchteam nick
!switchteam bots
ability_set
Allows the admin to set the Survivor Ability of any survivor (no need to be in the saferoom)
  1. Ability name
  2. Target
Ex:
!ability_set fireman coach
!ability_set bhop me
ability_start
Activates the target survivor's Survivor Ability (if not in cooldown)
  1. Target
Ex:
!ability_start coach
ability_stop
Stops the active target survivor's Survivor Ability
  1. Target
Ex:
!ability_stop coach
ability_use
Admin can fire the active Survivor Ability of any survivor
  1. Target
Ex:
!ability_use coach
Sidst redigeret af smilzo; 30. aug. 2023 kl. 5:52