Skip to content

Commands

NutScript Command Documentation.

Built-in and bundled-plugin commands registered through nut.command.add. Commands are executed server-side by a player and receive the issuing player plus parsed command arguments.

See also: Command library

Roleplay commands

roll (maximum)
sh_roll

Rolls a random number and broadcasts the result through the roll chat class.

Parameters:

integer maximum optional. default: 100 The highest possible roll, capped at 100

Usage:

    1
    2
    3
    /roll 20
    
    Chat output: Chestnut has rolled 14.
    

fallover (time)
sh_fallover

Ragdolls the caller for a specified duration.

Parameters:

number time optional. default: 5 The ragdoll duration in seconds, clamped between 1 and 60; use a non-positive value for no duration

Usage:

    1
    2
    3
    /fallover 10
    
    In-game output: Your character is ragdolled for 10 seconds.
    

chargetup ()
sh_chargetup

Lets the caller stand up from their ragdoll after its grace period.

Usage:

    1
    2
    3
    4
    /chargetup
    
    Chat output: You are now getting up...
    In-game output: Your ragdoll is removed and you regain control of your character.
    

content ()
sh_content

Opens the configured NutScript content URL for the caller.

Usage:

    1
    2
    3
    /content
    
    In-game output: The configured content website opens in the Steam overlay or browser.
    

Roleplay act commands

actsit (type)
sh_actsit

Character plays a sitting animation. This animation loops until interrupted.

Valid model types: citizen_male, citizen_female

Parameters:

integer type optional. default: 1 Sequence type. Up to 3

Usage:

    1
    2
    3
    /actsit
    
    In-game output: Character sits down.
    

actsitwall (type)
sh_actsitwall

Character plays a sitting animation against a wall. This animation loops until interrupted. Requires the character to have a wall against their back.

Valid model types: citizen_male, citizen_female

Parameters:

integer type optional. default: 1 Sequence type. Up to 3

Usage:

    1
    2
    3
    /actsitwall
    
    In-game output: Character sits down against a wall.
    

actinjured (type)
sh_actinjured

Character plays an injured lying animation. This animation loops until interrupted.

Valid model types: citizen_male, citizen_female

Parameters:

integer type optional. default: 1 Sequence type. Up to 3

Usage:

    1
    2
    3
    /actinjured
    
    In-game output: Character lies on the floor injured.
    

actarrest ()
sh_actarrest

Character plays an arrested animation. This animation loops until interrupted. Requires the character to face a wall.

Valid model types: citizen_male

Usage:

    1
    2
    3
    /actarrest
    
    In-game output: Character faces the wall with hands up.
    

actcheer (type)
sh_actcheer

Character plays a cheering animation.

Valid model types: citizen_male, citizen_female

Parameters:

integer type optional. default: 1 Sequence type. Up to 3

Usage:

    1
    2
    3
    /actcheer
    
    In-game output: Character cheers.
    

acthere (type)
sh_acthere

Character plays a beconing animation.

Valid model types: citizen_male, citizen_female

Parameters:

integer type optional. default: 1 Sequence type. Up to 2

Usage:

    1
    2
    3
    /acthere
    
    In-game output: Character waves towards them.
    

actstand (type)
sh_actstand

Character plays a sitting animation. This animation loops until interrupted.

Valid model types: citizen_male, citizen_female, metrocop

Parameters:

integer type optional. default: 1 Sequence type. Up to 4

Usage:

    1
    2
    3
    /actstand
    
    In-game output: Character stands idly.
    

Character commands

chardesc (description)
sh_chardesc

Changes the caller's character description.

Parameters:

string description optional The new character description; omit it to open a description prompt

Usage:

    1
    2
    3
    /chardesc A tired detective wearing a weathered coat.
    
    Chat output: You have changed your character's description.
    

charsetmodel (target, model)
sv_charsetmodel

Admin Only

This command is available to admins only!

Changes the model of a target player's character.

Parameters:

Client target The player whose character model to change

string model The model path to assign

Usage:

    1
    2
    3
    4
    /charsetmodel Chestnut models/Humans/Group01/Female_01.mdl
    
    Chat output: Rebel1324 changed Chestnut's model to models/Humans/Group01/Female_01.mdl.
    In-game output: Chestnut's character model updates.
    

charsetskin (target, skin)
sv_charsetskin

Admin Only

This command is available to admins only!

Changes the skin of a target player's character model.

Parameters:

Client target The player whose character skin is changed

integer skin The model skin index to assign

Usage:

    1
    2
    3
    4
    /charsetskin Chestnut 1
    
    Chat output: Rebel1324 changed Chestnut's skin to 1.
    In-game output: Chestnut's character model skin updates.
    

charsetbodygroup (target, bodygroup, value)
sv_charsetbodygroup

Admin Only

This command is available to admins only!

Changes or clears a named bodygroup on a target player's character.

Parameters:

Client target The player whose bodygroup is changed

string bodygroup The name of the bodygroup to change

integer value optional The bodygroup value; values below 1 clear the stored value

Usage:

    1
    2
    3
    4
    /charsetbodygroup Chestnut headgear 1
    
    Chat output: Rebel1324 changed Chestnut's headgear bodygroup to 1.
    In-game output: Chestnut's character model updates.
    

charsetname (target, newName)
sv_charsetname

Admin Only

This command is available to admins only!

Changes a target player's character name.

Parameters:

Client target The player whose character name is changed

string newName optional The new character name; omit it to open a name prompt

Usage:

    1
    2
    3
    4
    /charsetname Chestnut Cheesenut
    
    Chat output: Rebel1324 changed Chestnut's name to Cheesenut.
    In-game output: Chestnut's displayed character name updates to Cheesenut.
    

charkick (target)
sv_charkick

Admin Only

This command is available to admins only!

Kicks a target player's currently loaded character.

Parameters:

Client target The player whose character is kicked

Usage:

    1
    2
    3
    4
    /charkick Chestnut
    
    Chat output: Rebel1324 kicked char Chestnut.
    In-game output: Chestnut returns to the character-selection screen.
    

charban (target)
sv_charban

Admin Only

This command is available to admins only!

Bans a target player's currently loaded character.

Parameters:

Client target The player whose character is banned

Usage:

    1
    2
    3
    4
    /charban Chestnut
    
    Chat output: Rebel1324 banned the character Chestnut.
    In-game output: Chestnut can no longer load the banned character.
    

charunban (name)
sv_charunban

Admin Only

This command is available to admins only!

Removes a character ban by character name.

Parameters:

string name The name or partial name of the character to unban

Usage:

    1
    2
    3
    4
    /charunban Chestnut
    
    Chat output: Rebel1324 has unbanned the character Chestnut.
    In-game output: Chestnut can load the character again.
    

Character permissions commands

flaggive (target, flags)
sv_flaggive

Admin Only

This command is available to admins only!

Gives character flags to a target player.

Parameters:

Client target The player whose character receives the flags

string flags optional The flags to give; omit them to open a selection prompt

Usage:

    1
    2
    3
    /flaggive Chestnut pet
    
    Chat output: Rebel1324 has given Chestnut pet flags.
    

flagtake (target, flags)
sv_flagtake

Admin Only

This command is available to admins only!

Removes character flags from a target player.

Parameters:

Client target The player whose character loses the flags

string flags optional The flags to remove; omit them to open a selection prompt

Usage:

    1
    2
    3
    /flagtake Chestnut p
    
    Chat output: Rebel1324 has taken p flags from Chestnut.
    

plywhitelist (target, faction)
sv_plywhitelist

Admin Only

This command is available to admins only!

Whitelists a player for a faction.

Parameters:

Client target The player to whitelist

Faction faction The faction to whitelist the player for

Usage:

    1
    2
    3
    /plywhitelist Chestnut Citizen
    
    Chat output: Rebel1324 has whitelisted Chestnut for the Citizen faction.
    

plyunwhitelist (target, faction)
sv_plyunwhitelist

Admin Only

This command is available to admins only!

Removes a player's whitelist for a faction.

Parameters:

Client target The player to remove from the faction whitelist

Faction faction The faction to remove

Usage:

    1
    2
    3
    /plyunwhitelist Chestnut Citizen
    
    Chat output: Rebel1324 has unwhitelisted Chestnut from the Citizen faction.
    

Faction and class commands

plytransfer (target, faction)
sv_plytransfer

Admin Only

This command is available to admins only!

Transfers a target player's character to another faction.

Parameters:

Client target The player whose character is transferred

Faction faction The destination faction

Usage:

    1
    2
    3
    4
    /plytransfer Chestnut Citizen
    
    Chat output: Rebel1324 has transfered Chestnut to the Citizen faction.
    In-game output: Chestnut's faction data updates.
    

charsetfaction (target, faction)
sv_charsetfaction

Admin Only

This command is available to admins only!

Alias of plytransfer that transfers a target character to another faction.

Parameters:

Client target The player whose character is transferred

Faction faction The destination faction

Usage:

    1
    2
    3
    4
    /charsetfaction Chestnut Citizen
    
    Chat output: Rebel1324 has transfered Chestnut to the Citizen faction.
    In-game output: Chestnut's faction data updates.
    

beclass (class)
sh_beclass

Attempts to change the caller's character to a class.

Parameters:

vararg class The class ID, unique ID, or localized name

Usage:

    1
    2
    3
    4
    /beclass medic
    
    Chat output: You have become Medic.
    In-game output: Your character class data updates.
    

Inventory commands

chargiveitem (target, item, amount)
sv_chargiveitem

Admin Only

This command is available to admins only!

Adds an item to a target player's character inventory.

Parameters:

Client target The player whose inventory receives the item

string item The item unique ID or matching item name

integer amount optional. default: 1 The number of items to add

Usage:

    1
    2
    3
    4
    /chargiveitem Chestnut water 2
    
    Chat output: Item successfully created.
    In-game output: Two water items are added to Chestnut's inventory.
    

clearinv (target)
sv_clearinv

Admin Only

This command is available to admins only!

Removes every item from a target player's character inventory.

Parameters:

Client target The player whose inventory is cleared

Usage:

    1
    2
    3
    4
    /clearinv Chestnut
    
    Chat output: Chestnut's inventory was reset.
    In-game output: All items are removed from Chestnut's inventory.
    

Economy commands

givemoney (amount)
sh_givemoney

Gives money to the player directly in front of the caller.

Parameters:

number amount The amount of money to give

Usage:

    1
    2
    3
    4
    5
    /givemoney 50
    
    Chat output: You gave $50 to Chestnut.
    Chat output: You found $50.
    In-game output: The caller's and target's money balances update.
    

charsetmoney (target, amount)
sv_charsetmoney

Admin Only

This command is available to admins only!

Sets a target player's character money balance.

Parameters:

Client target The player whose money is changed

number amount The non-negative money amount to set

Usage:

    1
    2
    3
    4
    /charsetmoney Chestnut 500
    
    Chat output: You have set Chestnut's money to $500.
    In-game output: Chestnut's money balance updates.
    

dropmoney (amount)
sh_dropmoney

Drops money from the caller as a physical money entity.

Parameters:

number amount The amount of money to drop

Usage:

    1
    2
    3
    /dropmoney 25
    
    In-game output: A $25 money entity is dropped in front of you.
    

3D panel commands

paneladd (url, w, h, scale)
sv_paneladd

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the 3DPanel plugin. As such, its functionality might differ in different schemas, or be unavailable.

Adds a 3D web panel at the position the admin is looking at. The panel faces the surface hit by the admin's eye trace.

Parameters:

string url The URL displayed by the panel

number w optional The panel width

number h optional The panel height

number scale optional The panel display scale

Usage:

    1
    2
    3
    4
    /paneladd https://github.com/NutScript/NutScript-Wiki/blob/main/docs/assets/Nutscript.png 512 256 0.1
    
    Chat output: You have added a 3D panel.
    In-game output: A 3D web panel displaying the NutScript logo is placed on the surface you are looking at.
    

panelremove (radius)
sv_panelremove

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the 3DPanel plugin. As such, its functionality might differ in different schemas, or be unavailable.

Removes 3D panels near the position the admin is looking at.

Parameters:

number radius optional The radius around the aimed position in which to remove panels

Usage:

    1
    2
    3
    4
    /panelremove 128
    
    Chat output: You have removed 1 3D panels.
    In-game output: All 3D panels within 128 units of the aimed position are removed.
    

3D text commands

textadd (text, scale)
sv_textadd

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the 3DText plugin. As such, its functionality might differ in different schemas, or be unavailable.

Adds 3D text at the surface the admin is looking at. The text faces the surface hit by the admin's eye trace.

Parameters:

string text The text to display

number scale optional The display scale of the text

Usage:

    1
    2
    3
    4
    /textadd Welcome to City 0.1
    
    Chat output: You have added a text.
    In-game output: The text "Welcome to City" is placed on the surface you are looking at.
    

textremove (radius)
sv_textremove

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the 3DText plugin. As such, its functionality might differ in different schemas, or be unavailable.

Removes 3D text near the surface the admin is looking at.

Parameters:

number radius optional The radius around the aimed position in which to remove text

Usage:

    1
    2
    3
    4
    /textremove 128
    
    Chat output: You have removed 1 texts.
    In-game output: All 3D text within 128 units of the aimed position are removed.
    

Map scene commands

mapsceneadd (isPair)
sv_mapsceneadd

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the MapScene plugin. As such, its functionality might differ in different schemas, or be unavailable.

Adds a static or paired map scene at the admin's current position and viewing angles. Run the command once with true to save the first endpoint of a moving paired scene, then run it again to create the scene using the admin's current position and angles as the second endpoint.

Parameters:

boolean isPair optional Whether to begin a paired moving scene

Usage:

    1
    2
    3
    4
    /mapsceneadd
    
    Chat output: You have added a map scene.
    In-game output: A static map scene is added at your current position and viewing direction.
    

mapsceneremove (radius)
sv_mapsceneremove

Admin Only

This command is available to admins only!

Plugin function

This is defined and used within the MapScene plugin. As such, its functionality might differ in different schemas, or be unavailable.

Removes map scenes near the admin's current position.

Parameters:

number radius optional. default: 280 The radius around the admin in which to remove map scenes

Usage:

    1
    2
    3
    4
    /mapsceneremove 500
    
    Chat output: You have removed 1 map scenes.
    In-game output: Map scenes within 500 units of your current position are removed.