Player commands
 
Specific commands which control the player entity. The player entity is a subclass of sentient entities, it also responds to sentient and many entity commands (gameX86 source code reference: player.cpp).

Player commands are colored in gold in my custom SinScript syntax coloring wordfile for UltraEdit32.


exitcon  
 
Function
 
This forces the player to exit the console entity he is currently using.

Syntax
 
*1 exitcon

Notes & examples
 

fov  
 
Function
 
This sets the angle of the player's field of view. The default is 90 degrees.

Syntax
 
*1 fov <angle>

Notes & examples
 
You can also save a player's field of view with the savefov command and restore the last saved field of view with the restorefov command.


give
 
Function
 
This can be used to give any ammo, armor, item or weapon to the player in the game. You can also take items away from the player with the take command.

Syntax
 
*1 give <item_name> <amount>

Notes & examples
 
In single player mode, the player is entity *1. For example, in order to give the rocket launcher the the player, you would use the following:

*1 give RocketLauncher

An optional argument might be needed as in the case of ammo or health when an amount needs to be specified, like for example if you want to give the player 10 shotgun rounds:

*1 give ShotgunClip 10

For a complete list of all possible ammo, armor, items and weapons you can give to the player, refer to the notes of the ammo, armor, item and weapon Sentient commands.


human  
 
Function
 
This turns the player back into a human after having been previously turned into a Manumit with the mutate command.

Syntax
 
*1 human

Notes & examples
 

mutate  
 
Function
 
This turns the player into a Manumit. While mutated, the player cannot use or pickup any weapons or ammo.

Syntax
 
*1 mutate

Notes & examples
 
To turn the player back into a human, use the human command.


playerkill
 
Function
 
Instantly kills the player during the game.

Syntax
 
*1 playerkill

Notes & examples
 
Useful in scripted sequences where the player needs to be killed immediately upon the occurence of a certain event.


respawn
 
Function
 
In Single Player mode, this forces the player to quit the game immediately and automatically brings up the loadgame menu. In Deathmatch, it makes the player respawn at one of the map's respawn points.

Syntax
 
*1 respawn

Notes & examples
 
Normally used after a playerkill command in Single Player so the player can reload the level. In Deathmatch, this can be used after a spectator command to bring back the player in normal play mode.


restorefov  
 
Function
 
This restores the last field of view saved with the savefov command.

Syntax
 
*1 restorefov

Notes & examples
 

savefov  
 
Function
 
This saves the player's current field of view. Once saved with this command, a field of view can later be restored with the restorefov command.

Syntax
 
*1 savefov

Notes & examples
 

skin  
 
Function
 
This changes the player's skin during the course of the game. The filename used in the argument must be a valid TGA skin filename but the file extension is omitted. See notes below.

Syntax
 
*1 skin <skin_filename>

Notes & examples
 
In order for this command to work, both the following 2 conditions must be met:
  1. The TGA file of the skin specified in the argument must reside in the player's specific folder for the basic model, animations and skins as defined in the "path" statement inside the player model's .def file.

  2. The skin name specified in the argument must be present in the "skin list" of the model's .def file.
A typical example of this is when you add custom skins for the Blade player. Let's say you just downloaded this brand new skin named kickass.tga and you copy it to the models/pl_blade folder. Of course, you will be able to select the skin for DM play but if you try to change the Blade's skin in a single player game with the command:

*1 skin kickass

The game will return an error message saying that "could not find kickass as a skin name". The reason for this is that the file kickass.tga, although it does reside in the proper folder, is not included in the skin list inside the default Blade player's .def file (pl_blade.def).

So in order to be able to set this skin in a SP game with this command, you have to open the file pl_blade.def in a text editor and manually add the name of the skin tga file in the section where all the skins are listed:

// Skins
normal    blade_base.tga
damage    blade_base_dam.tga

(add your new skins after this line)

kickass.tga    


Make sure to put a copy of this modified .def file in the game's base/models folder. This will make it take precedence over the default pl_blade.def file inside the Pak0.sin file. Of course, if you intend to distribute your SP map for others to play, you will also have to distribute both the skin TGA file and the modified .def file.


spectator  
 
Function
 
This places the player in spectator mode. In this mode, the player's hud and weapons are taken away, he is invisible to other players and "noclip" is turned on so he fly around in the map and go through walls.

Syntax
 
*1 spectator

Notes & examples
 
This is mostly used in deathmatch games. When in this mode, the player can be returned to normal player mode by using the respawn command.


take
 
Function
 
This can be used to take away any ammo, armor, item or weapon from the player in the game (assuming he already has it). You can also give items to the player with the give command.

Syntax
 
*1 take <item_name> <amount>

Notes & examples
 
In single player mode, the player is entity *1. For example, in order to take away the rocket launcher from the player (assuming he already has it), you would use the following:

*1 take RocketLauncher

An optional argument might be needed as in the case of ammo or health when an amount needs to be specified, like for example if you want to take away 10 shotgun rounds from the player:

*1 take ShotgunClip 10

For a complete list of all possible ammo, armor, items and weapons you can take away from the player, refer to the notes of the ammo, armor, item and weapon Sentient commands.


taunt  
 
Function
 
This makes the player play a taunt sound. Taunts are refered to by numbers which are defined by alias lines inside the player model's .def file. See notes below.

Syntax
 
*1 taunt <taunt_number>

Notes & examples
 
To see the complete list of a player's taunts, open the player model's .def file with a text editor and look for the taunt alias lines. The player .def files are located in the game's base/model folder. Those are:

Blade: pl_blade.def
JC: pl_jc.def
Elexis: pl_elexis.def

If you open the file pl_blade.def for example, scroll down to the section entitled "INITIALIZATION SECTION". Under the command !init:, the taunt alias lines are defined as follows:

server aliascache snd_taunt1    "player/blade/taunt/gtrffmys.wav"
server aliascache snd_taunt2    "player/blade/taunt/lkthh!.wav"
server aliascache snd_taunt3    "player/blade/taunt/mkmybtch.wav"
server aliascache snd_taunt4    "player/blade/taunt/ncshtbtc.wav"
server aliascache snd_taunt5    "player/blade/taunt/rcknrll2.wav"
server aliascache snd_taunt6    "player/blade/taunt/whsyrddd.wav"
server aliascache snd_taunt7    "player/blade/taunt/whtchmp.wav"
server aliascache snd_taunt8    "player/blade/taunt/ylttlpnk.wav"
server aliascache snd_taunt9    "player/blade/taunt/schldy.wav"


During gameplay, those can be played by pressing the key combinations ALT-1, ALT-2, etc. If you want, for example, to play snd_taunt5 with this command, you would type:

*1 taunt 5

The taunts can be modified by editing the alias lines in the .def file but you can only have one sound per taunt and you can only have 9 taunts in all.