Player
Defined in: server/api.d.ts:655
A connected player and the character they control. Their own game decides their body: what a getter reads is their last report, and a setter is a request their game carries out, then reports back.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Player(
id):Player
Defined in: server/api.d.ts:660
Wraps an already connected player with this ID; it neither connects nor spawns anyone.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Player
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addBounty()
Section titled “addBounty()”addBounty(
faction,amount,violent?):boolean
Defined in: server/api.d.ts:1322
Adds to the bounty a player owes a crime faction, as Papyrus Faction.ModCrimeGold does; a negative amount pays part of it off.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
amount
Section titled “amount”number
How much to add, -1,000,000 to 1,000,000; never below 0 in all.
violent?
Section titled “violent?”boolean
The violent part (assault, murder), which the game’s guards answer by attacking; the non-violent one (theft, trespass) when false or left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
addPerk()
Section titled “addPerk()”addPerk(
perk,withLowerRanks?):boolean
Defined in: server/api.d.ts:1217
Gives the character a perk rank without spending a point.
Parameters
Section titled “Parameters”string | number
A BGSPerk rank.
withLowerRanks?
Section titled “withLowerRanks?”boolean
Also give the ranks below it; true when left out.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established. Throws for a form ID that is no perk.
addXp()
Section titled “addXp()”addXp(
amount):boolean
Defined in: server/api.d.ts:1183
Awards experience as the game does: each level it reaches brings a perk point and the game’s level-up.
Parameters
Section titled “Parameters”amount
Section titled “amount”number
More than 0. Not scaled by Intelligence.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established.
damageValue()
Section titled “damageValue()”damageValue(
value,amount):boolean
Defined in: server/api.d.ts:1134
Lowers an actor value’s current value in the player’s game, as ObjectReference.DamageValue does. Health damaged to 0 kills.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
amount
Section titled “amount”number
How much, at least 0. Rads rise by it.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
discoverLocations()
Section titled “discoverLocations()”discoverLocations(
markers,canTravel?):boolean
Defined in: server/api.d.ts:1362
Puts map markers on the player’s map, as ObjectReference.AddToMap does, without its notice. The map is their game’s own: the server keeps no copy, so send it again when they join.
Parameters
Section titled “Parameters”markers
Section titled “markers”(string | number)[]
Map marker references, each a form ID as a number or hex string; up to 4096.
canTravel?
Section titled “canTravel?”boolean
Also fast travel destinations (default true); false shows them on the map only.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
emit()
Section titled “emit()”emit(
eventName,payloadJson?):void
Defined in: server/api.d.ts:4387
Emits a named script event to this player’s client connection.
Parameters
Section titled “Parameters”eventName
Section titled “eventName”string
Client event name.
payloadJson?
Section titled “payloadJson?”string
Optional JSON payload forwarded verbatim to the owning client.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”enterPowerArmor()
Section titled “enterPowerArmor()”enterPowerArmor(
frame?):boolean
Defined in: server/api.d.ts:865
Places a power armor frame where the player stands and puts them into it at once, as Actor.SwitchToPowerArmor does. playerPowerArmor follows. The suit’s pieces are the frame’s; dress them with setOutfit.
Parameters
Section titled “Parameters”frame?
Section titled “frame?”string | number
The TESFurniture of the frame to place; the game’s empty frame when left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone or already in power armor.
equipItem()
Section titled “equipItem()”equipItem(
form):boolean
Defined in: server/api.d.ts:996
Has the player draw a weapon or wear an armor piece they carry. Right after giveItem it lands too: the inventory reaches their game first.
Parameters
Section titled “Parameters”string | number
A weapon or armor piece the player carries.
Returns
Section titled “Returns”boolean
True when sent; false when the server’s record has none of it or the player is gone.
exitPowerArmor()
Section titled “exitPowerArmor()”exitPowerArmor():
boolean
Defined in: server/api.d.ts:781
Takes the player out of their power armor; the frame stays where they stand. playerPowerArmor follows once their game is done, which it is not while they fly the fly camera (NoClip): the game leaves the player’s own update alone until the camera comes back.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone or not in power armor.
fastTravel()
Section titled “fastTravel()”fastTravel(
destination):boolean
Defined in: server/api.d.ts:1335
Has the player’s game fast travel to a reference, through the game’s own fast travel, as Game.FastTravel does. playerFastTravel is not raised: the script decided already.
Parameters
Section titled “Parameters”destination
Section titled “destination”string | number
The reference to arrive at: a map marker, or any other placed reference.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
fire()
Section titled “fire()”fire(
shots?):boolean
Defined in: server/api.d.ts:830
Has the player’s game fire its drawn weapon.
Parameters
Section titled “Parameters”shots?
Section titled “shots?”number
How many times, 1 to 255; once when left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
forgetLocations()
Section titled “forgetLocations()”forgetLocations(
markers):boolean
Defined in: server/api.d.ts:1369
Takes map markers off the player’s map; they stop being fast travel destinations.
Parameters
Section titled “Parameters”markers
Section titled “markers”(string | number)[]
Map marker references, each a form ID as a number or hex string; up to 4096.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
getAppearance()
Section titled “getAppearance()”getAppearance():
string|null
Defined in: server/api.d.ts:932
The player’s whole look as their game last reported it, as an opaque string to keep (a database column) and hand back to setAppearance.
Returns
Section titled “Returns”string | null
Null before their first report or once they are gone.
getBaseValue()
Section titled “getBaseValue()”getBaseValue(
value):number|null
Defined in: server/api.d.ts:1118
The base the character’s record holds for an actor value: SPECIAL, Experience, and any base a script set.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
Returns
Section titled “Returns”number | null
The base; null for one the record does not hold.
getBounty()
Section titled “getBounty()”getBounty(
faction):number
Defined in: server/api.d.ts:1304
The bounty the player owes a crime faction, as FiveM’s wanted level reads: the crime gold their game says they owe it, violent and not together. Their own crimes raise it as the game’s do, theft and assault the faction’s members witness; setBounty and addBounty change it. playerBountyChange follows every change.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
Returns
Section titled “Returns”number
The crime gold; 0 when they owe none or are gone.
getCaps()
Section titled “getCaps()”getCaps():
number
Defined in: server/api.d.ts:1230
The bottle caps the player carries: the Caps001 item in the inventory record.
Returns
Section titled “Returns”number
The count; 0 before the first inventory report or once they are gone.
getCharacter()
Section titled “getCharacter()”getCharacter():
CharacterDocument|null
Defined in: server/api.d.ts:1255
The whole character: experience, level, perk points, bases, perks, current values and inventory. Keep it wherever the gamemode likes; setCharacter takes it back.
Returns
Section titled “Returns”CharacterDocument | null
The document; null before the character is established.
getDamageModifier()
Section titled “getDamageModifier()”getDamageModifier():
number
Defined in: server/api.d.ts:1047
What setDamageModifier scales the player’s hits by.
Returns
Section titled “Returns”number
The modifier; 1 when none was set.
getDefenseModifier()
Section titled “getDefenseModifier()”getDefenseModifier():
number
Defined in: server/api.d.ts:1060
What setDefenseModifier scales the hits on the player by.
Returns
Section titled “Returns”number
The modifier; 1 when none was set.
getFactionRank()
Section titled “getFactionRank()”getFactionRank(
faction):number|null
Defined in: server/api.d.ts:1282
The player’s rank in a faction the server put them in.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
Returns
Section titled “Returns”number | null
The rank; null when the server did not put them in it.
getFactions()
Section titled “getFactions()”getFactions():
object[]
Defined in: server/api.d.ts:1275
The factions the server put the player in, each with its rank. The factions their character holds from the game’s own data, such as PlayerFaction, are not listed.
Returns
Section titled “Returns”object[]
One entry per faction, in the order they were joined; empty when the player is gone.
getIdleTime()
Section titled “getIdleTime()”getIdleTime():
number
Defined in: server/api.d.ts:1002
How long the player has neither moved nor turned their view, in seconds, as the server measures it from what their game reports: what an AFK check reads.
Returns
Section titled “Returns”number
0 for one who is moving or looking around, or who is gone.
getInventory()
Section titled “getInventory()”getInventory():
InventoryItem[]
Defined in: server/api.d.ts:952
What the player carries, from the server’s record.
Returns
Section titled “Returns”One entry per base object and condition; empty before the player’s first report, shortly after they join, and once they are gone.
getIP()
Section titled “getIP()”getIP():
string
Defined in: server/api.d.ts:4393
Returns this player’s current remote network address.
Returns
Section titled “Returns”string
Address string, or an empty string when the player or peer is unavailable.
Inherited from
Section titled “Inherited from”getItemCount()
Section titled “getItemCount()”getItemCount(
form):number
Defined in: server/api.d.ts:959
How many of an item the player carries.
Parameters
Section titled “Parameters”string | number
The base object.
Returns
Section titled “Returns”number
The count; 0 when they carry none or are gone.
getLevel()
Section titled “getLevel()”getLevel():
number
Defined in: server/api.d.ts:1156
The character’s level.
Returns
Section titled “Returns”number
The level; 0 when the player is gone.
getLocation()
Section titled “getLocation()”getLocation():
number|null
Defined in: server/api.d.ts:1341
The named location the player is in, a BGSLocation form ID, as their game last reported it.
Returns
Section titled “Returns”number | null
Null in the open, before their first report, or when the player is gone.
getMapWaypoint()
Section titled “getMapWaypoint()”getMapWaypoint():
Vector3|null
Defined in: server/api.d.ts:1347
Where the player’s own map marker is: the waypoint they dropped on the Pip-Boy map, or the one a script set.
Returns
Section titled “Returns”Vector3 | null
The position, in the space they stood in; null while they have none or when the player is gone.
getNametagColor()
Section titled “getNametagColor()”getNametagColor():
number
Defined in: server/api.d.ts:4374
Reads this player’s nametag color.
Returns
Section titled “Returns”number
Packed 0xAARRGGBB color; opaque white when untinted.
Inherited from
Section titled “Inherited from”getNametagText()
Section titled “getNametagText()”getNametagText():
string
Defined in: server/api.d.ts:4368
Reads this player’s nametag text override.
Returns
Section titled “Returns”string
The override, or an empty string when the player’s own name is drawn.
Inherited from
Section titled “Inherited from”getOutfit()
Section titled “getOutfit()”getOutfit():
OutfitPiece[]
Defined in: server/api.d.ts:896
What the player wears.
Returns
Section titled “Returns”One entry per armor piece; empty when the player is gone.
getPerkPoints()
Section titled “getPerkPoints()”getPerkPoints():
number
Defined in: server/api.d.ts:1189
The character’s unspent perk points.
Returns
Section titled “Returns”number
The points; 0 when the player is gone.
getPerks()
Section titled “getPerks()”getPerks():
number[]
Defined in: server/api.d.ts:1202
The perk ranks the character holds. Each rank of a perk is a BGSPerk of its own.
Returns
Section titled “Returns”number[]
Their form IDs; empty when the player is gone.
getPowerArmor()
Section titled “getPowerArmor()”getPowerArmor():
PlayerPowerArmor|null
Defined in: server/api.d.ts:878
The power armor frame the player wears.
Returns
Section titled “Returns”PlayerPowerArmor | null
The frame, or null when they wear none or are gone.
getSpace()
Section titled “getSpace()”getSpace():
PlayerSpace|null
Defined in: server/api.d.ts:884
Where the player is.
Returns
Section titled “Returns”PlayerSpace | null
The worldspace or interior cell, or null when the player is gone.
getValue()
Section titled “getValue()”getValue(
value):number|null
Defined in: server/api.d.ts:1111
An actor value as it stands: Health, ActionPoints and Rads as the player’s game last reported them, any other the base the record holds.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
Returns
Section titled “Returns”number | null
The value; null before the character is established or for a value the record does not hold.
getWeapon()
Section titled “getWeapon()”getWeapon():
PlayerWeapon|null
Defined in: server/api.d.ts:890
The weapon in the player’s hands.
Returns
Section titled “Returns”PlayerWeapon | null
The weapon, or null when they have none or are gone.
getWeather()
Section titled “getWeather()”getWeather():
number|null
Defined in: server/api.d.ts:1412
The weather setWeather gave the player alone.
Returns
Section titled “Returns”number | null
Null while they follow World.weather, or once they are gone.
getWeatherRegion()
Section titled “getWeatherRegion()”getWeatherRegion():
number
Defined in: server/api.d.ts:1424
The region whose weathers the player’s game would roll where they stand, as their game finds it each time they change cell: the TESRegion form ID, for World.getRegionWeathers.
Returns
Section titled “Returns”number
0 when they stand in no region with weathers, or their game has not said yet.
getXp()
Section titled “getXp()”getXp():
number
Defined in: server/api.d.ts:1169
The character’s total experience.
Returns
Section titled “Returns”number
The XP; 0 when the player is gone.
giveItem()
Section titled “giveItem()”giveItem(
form,count?,condition?,mods?,name?):boolean
Defined in: server/api.d.ts:970
Puts items in the player’s inventory. It does not equip them: see equipItem.
Parameters
Section titled “Parameters”string | number
The base object.
count?
Section titled “count?”number
How many, 1 to 1000000; one when left out.
condition?
Section titled “condition?”number
Their condition in percent of full, 0 to 100, as one stack: a fusion core’s charge. Full when left out.
number[]
The OMOD form IDs they carry, as setItemMods takes them; the mods their record gives a new one when left out.
string | null
The name they show, as setItemName gives it; their own when left out.
Returns
Section titled “Returns”boolean
True when the record changed; false before the player’s first report or once they are gone.
hasPerk()
Section titled “hasPerk()”hasPerk(
perk):boolean
Defined in: server/api.d.ts:1209
Whether the character holds a perk rank.
Parameters
Section titled “Parameters”string | number
A BGSPerk rank.
Returns
Section titled “Returns”boolean
True when they hold it. Throws for a form ID that is no perk.
isNametagHealthVisible()
Section titled “isNametagHealthVisible()”isNametagHealthVisible():
boolean
Defined in: server/api.d.ts:4362
Checks whether the health bar under this player’s nametag is shown.
Returns
Section titled “Returns”boolean
True unless the health bar was hidden; false also when this game has no nametags.
Inherited from
Section titled “Inherited from”BasePlayer.isNametagHealthVisible
isNametagVisible()
Section titled “isNametagVisible()”isNametagVisible():
boolean
Defined in: server/api.d.ts:4356
Checks whether this player’s nametag is shown to other players.
Returns
Section titled “Returns”boolean
True unless the nametag was hidden; false also when this game has no nametags.
Inherited from
Section titled “Inherited from”kick()
Section titled “kick()”kick(
reason?):void
Defined in: server/api.d.ts:4380
Disconnects this player from the server.
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Optional reason shown to the disconnected player; omitting it uses the generic kicked reason.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”kill()
Section titled “kill()”kill():
boolean
Defined in: server/api.d.ts:787
Kills the player through their game’s own hit path; playerDeath follows with a null killer.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone or already dead.
knockDown()
Section titled “knockDown()”knockDown(
force?,from?):boolean
Defined in: server/api.d.ts:1075
Knocks the player off their feet into their ragdoll from the server, as FiveM’s SetPedToRagdoll does a player’s ped: their game pushes them, as LocalPlayer.knockDown does, they lie a moment and get up by themselves, and every other player sees them fall. A player who is down, dead, held in place or in furniture is left as they are.
Parameters
Section titled “Parameters”force?
Section titled “force?”number
How hard they are thrown, as ObjectReference.PushActorAway takes it: small numbers, 1 to 50 (600 threw an NPC 8,700 units); 0, the default, drops them where they stand.
The point they are thrown away from; where they stand by default.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
openLookEditor()
Section titled “openLookEditor()”openLookEditor():
boolean
Defined in: server/api.d.ts:793
Opens the character look editor on the player’s screen.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
openPerkChart()
Section titled “openPerkChart()”openPerkChart():
boolean
Defined in: server/api.d.ts:1249
Opens the game’s perk chart on the player’s screen. Each rank bought comes back as playerPerkRequest.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
openSpecialMenu()
Section titled “openSpecialMenu()”openSpecialMenu():
boolean
Defined in: server/api.d.ts:1243
Opens the game’s SPECIAL allocation menu on the player’s screen, as the Vault 111 exit does. Each point they move comes back as playerValueRequest.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
playIdle()
Section titled “playIdle()”playIdle(
idle):boolean
Defined in: server/api.d.ts:1104
Plays an idle animation on the player, as Actor.PlayIdle does; everyone around them sees it. The idle’s own conditions apply, so one meant for another skeleton, a piece of furniture or a state the player is not in does nothing. Moving ends most idles; stopIdle ends any.
Parameters
Section titled “Parameters”string | number
An idle animation from the game’s data (an IDLE record): its editor ID, such as "Salute", or its form ID.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone. Throws for a name or form ID no IDLE record has.
randomizeLook()
Section titled “randomizeLook()”randomizeLook(
seed?,morphsOnly?):boolean
Defined in: server/api.d.ts:926
Rolls the character a new look from their race’s character generation data.
Parameters
Section titled “Parameters”number
Rolls the same look for the same seed; a fresh one when left out.
morphsOnly?
Section titled “morphsOnly?”boolean
Only the face sliders and regions, keeping sex, hair and colours.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
randomizeOutfit()
Section titled “randomizeOutfit()”randomizeOutfit(
seed?):boolean
Defined in: server/api.d.ts:911
Dresses the player in a random playable outfit, mods included.
Parameters
Section titled “Parameters”number
Rolls the same outfit for the same seed; a fresh one when left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
removeFromAllFactions()
Section titled “removeFromAllFactions()”removeFromAllFactions():
boolean
Defined in: server/api.d.ts:1328
Takes the player out of every faction the server put them in. The factions their character holds from the game’s own data stay.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
removeFromFaction()
Section titled “removeFromFaction()”removeFromFaction(
faction):boolean
Defined in: server/api.d.ts:1297
Takes the player out of a faction the server put them in, as Actor.RemoveFromFaction does.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
Returns
Section titled “Returns”boolean
True when they were in it; false otherwise or when the player is gone.
removeItem()
Section titled “removeItem()”removeItem(
form,count?,condition?,mods?,name?):boolean
Defined in: server/api.d.ts:981
Takes items out of the player’s inventory.
Parameters
Section titled “Parameters”string | number
The base object.
count?
Section titled “count?”number
How many, 1 to 1000000; one when left out. More than they carry takes them all.
condition?
Section titled “condition?”number
The condition to take first, 0 to 100; the rest come from the fullest stacks. Full when left out.
number[]
The mods of the ones to take, as getInventory lists them; none when left out.
string | null
The name of the ones to take; unnamed ones when left out.
Returns
Section titled “Returns”boolean
True when the record changed; false before the player’s first report or once they are gone.
removePerk()
Section titled “removePerk()”removePerk(
perk):boolean
Defined in: server/api.d.ts:1224
Takes a perk rank from the character, and every rank above it. No point is refunded.
Parameters
Section titled “Parameters”string | number
A BGSPerk rank.
Returns
Section titled “Returns”boolean
True when the record changed; false when they do not hold it.
respawn()
Section titled “respawn()”respawn(
position?,heading?):boolean
Defined in: server/api.d.ts:823
Brings a dead player back at full health. Nothing respawns a player on its own: call this from playerDeath, at once or later.
Parameters
Section titled “Parameters”position?
Section titled “position?”Where to come back; where the player fell when left out.
heading?
Section titled “heading?”number
Facing in radians; the one they died with when left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone or alive.
restoreValue()
Section titled “restoreValue()”restoreValue(
value,amount):boolean
Defined in: server/api.d.ts:1142
Raises an actor value’s current value in the player’s game up to its maximum, as ObjectReference.RestoreValue does.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
amount
Section titled “amount”number
How much, at least 0. Rads fall by it.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
say(
line):boolean
Defined in: server/api.d.ts:1067
Has the player’s character speak, voice and subtitle, as FiveM’s PlayAmbientSpeechNative does a player’s ped: their own game says it, picking a topic’s line among those whose conditions pass, and every other player’s game hears their puppet say the same line in the player voice of their sex. Lines the character says on its own, in dialogue or in a fight, are heard the same way.
Parameters
Section titled “Parameters”string | number
A dialogue topic (DIAL) by form ID or editor ID, such as 0x1B40FA, the player’s combat lines, or one of its lines (INFO) by form ID.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone. Throws for a form no DIAL or INFO record has.
setAlpha()
Section titled “setAlpha()”setAlpha(
alpha,fade?):boolean
Defined in: server/api.d.ts:1090
Draws the player more or less see-through for everyone, as FiveM’s SetEntityAlpha and SetEntityVisible do a player’s ped: their own game sets it, as LocalPlayer.setAlpha does, and every other game draws their body the same. At 0 no game shows their nametag either. An admin’s invisibility, a spectator, a spawn’s protection.
Parameters
Section titled “Parameters”number
0, invisible, to 1, solid.
boolean
Fade there rather than cut (default false).
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setAppearance()
Section titled “setAppearance()”setAppearance(
look):boolean
Defined in: server/api.d.ts:939
Puts a whole look back on the player: their game rebuilds them and everyone sees it. Throws for a look from another server version.
Parameters
Section titled “Parameters”string
As getAppearance returned it on this server version.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setBaseValue()
Section titled “setBaseValue()”setBaseValue(
value,base):boolean
Defined in: server/api.d.ts:1126
Sets an actor value’s base on the record and in the player’s game, as ObjectReference.SetValue does: for Health or CarryWeight that is the maximum. It is saved with the character and set again whenever they join.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
number
The new base. SPECIAL is rounded and kept within 1 to 11.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established.
setBounty()
Section titled “setBounty()”setBounty(
faction,amount,violent?):boolean
Defined in: server/api.d.ts:1313
Sets the bounty a player owes a crime faction, as Papyrus Faction.SetCrimeGold / SetCrimeGoldViolent and FiveM’s SetPlayerWantedLevel do: their own game records it, so the faction’s guards answer it as the game does a crime of theirs. getBounty reads the result once their game reports it.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
amount
Section titled “amount”number
The new crime gold, 0 to 1,000,000; 0 clears it.
violent?
Section titled “violent?”boolean
The violent part (assault, murder), which the game’s guards answer by attacking; the non-violent one (theft, trespass) when false or left out.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setCaps()
Section titled “setCaps()”setCaps(
caps):boolean
Defined in: server/api.d.ts:1237
Sets the bottle caps the player carries.
Parameters
Section titled “Parameters”number
0 to 1000000.
Returns
Section titled “Returns”boolean
True when the record changed; false before the first inventory report.
setCharacter()
Section titled “setCharacter()”setCharacter(
character):boolean
Defined in: server/api.d.ts:1262
Replaces the character with a document, and brings the player’s game to it.
Parameters
Section titled “Parameters”character
Section titled “character”Partial<CharacterDocument>
As getCharacter returns it. What it leaves out stays as it is.
Returns
Section titled “Returns”boolean
True when applied; false before the character is established. Throws for a malformed document.
setClipAmmo()
Section titled “setClipAmmo()”setClipAmmo(
rounds):boolean
Defined in: server/api.d.ts:844
Loads rounds into the player’s weapon, as FiveM’s SetAmmoInClip does a ped’s. The rounds come from those they carry, as a reload takes them: never more than they have, so giveItem the ammo first. Their game ignores it without a weapon that loads ammo in hand.
Parameters
Section titled “Parameters”rounds
Section titled “rounds”number
The rounds to load, 0 to 100000; more than the weapon’s clip loads a full clip.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setCollision()
Section titled “setCollision()”setCollision(
enabled):boolean
Defined in: server/api.d.ts:851
Takes the player’s collision away or gives it back, as FiveM’s SetEntityCollision does a ped and the console’s tcl the player: without it they move along where they look, through walls and floors, without gravity. An admin’s noclip on foot; everyone else sees their body pass through. It ends with their session.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
False to take their collision away, true to give it back.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setDamageModifier()
Section titled “setDamageModifier()”setDamageModifier(
modifier):boolean
Defined in: server/api.d.ts:1041
Scales the damage the player’s hits deal, on players and NPCs alike, as FiveM’s SetPlayerWeaponDamageModifier does. Every hit is scaled by the attacker’s modifier, the weapon’s (setWeaponDamageModifier) and the victim’s defense (setDefenseModifier) before playerHit or npcHit hears of it: their damage is what is dealt. A hit on an NPC the attacker’s own game runs is taken there at once, unscaled, and the difference is dealt or given back right after. It lasts until set again or they leave.
Parameters
Section titled “Parameters”modifier
Section titled “modifier”number
From 0 to 100: 1 for none, 0.5 for half, 2 for double, 0 for no damage at all.
Returns
Section titled “Returns”boolean
True when set; false when the player is gone.
setDefenseModifier()
Section titled “setDefenseModifier()”setDefenseModifier(
modifier):boolean
Defined in: server/api.d.ts:1054
Scales the damage hits deal the player, from players and NPCs alike, as FiveM’s SetPlayerWeaponDefenseModifier does: 0.5 halves what they take. A hit by an NPC their own game runs is taken there at once, unscaled, and the difference is dealt or given back right after. Falls, radiation and hazards are their game’s and are not scaled. It lasts until set again or they leave.
Parameters
Section titled “Parameters”modifier
Section titled “modifier”number
From 0 to 100: 1 for none, 0.5 for half, 2 for double, 0 for no damage at all.
Returns
Section titled “Returns”boolean
True when set; false when the player is gone.
setDifficulty()
Section titled “setDifficulty()”setDifficulty(
difficulty):boolean
Defined in: server/api.d.ts:1384
Sets the game’s difficulty for the player, as its settings menu does: how hard they hit and are hit. “survival” is the game’s Survival mode with all its rules, run by its own quest in the player’s game: hunger, thirst and sleep, illness, carry weight that hurts, no fast travel, no saving, no compass markers for unfound places. It lasts until they leave, when their game goes back to what it was; set it again for each player as they join.
Parameters
Section titled “Parameters”difficulty
Section titled “difficulty”"veryEasy" | "easy" | "normal" | "hard" | "veryHard" | "survival"
The game’s difficulty setting.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setFactionRank()
Section titled “setFactionRank()”setFactionRank(
faction,rank?):boolean
Defined in: server/api.d.ts:1290
Puts the player in a faction at a rank, or re-ranks them, as Actor.SetFactionRank does: their own game and every other player’s give their character the membership, so the game’s hostility follows it. NPCs of the faction and its allies treat them as one of their own; its enemies attack them. Up to 16 factions per player; whether a player’s hits on another land stays playerHit’s say.
Parameters
Section titled “Parameters”faction
Section titled “faction”string | number
A TESFaction form ID, as a number or hex string.
number
0 to 127; 0 when left out.
Returns
Section titled “Returns”boolean
True when set; false when the player is gone or already in 16 factions.
setGameName()
Section titled “setGameName()”setGameName(
name):boolean
Defined in: server/api.d.ts:946
Names the player’s character in their own game, as the Vault 111 registration form does: what the game’s menus show, and what the SPECIAL menu requires before it closes. Others see the nametag, not this.
Parameters
Section titled “Parameters”string
1 to 64 characters.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setGameSetting()
Section titled “setGameSetting()”setGameSetting(
name,value):boolean
Defined in: server/api.d.ts:1377
Changes one of the game’s own tuning values (a game setting, GMST) in the player’s game, where it takes effect at once and lasts until they leave. The server keeps no copy: to make it a rule, set it for each player as they join. A name their game has not, or a value of the wrong kind, changes nothing there.
Parameters
Section titled “Parameters”string
The setting’s name as the game’s data defines it: “fJumpHeightMin”, “fSprintSpeedMult”.
number | boolean
The new value, of the setting’s kind: a boolean for a b setting, a number for the others.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setHour()
Section titled “setHour()”setHour(
hour):boolean
Defined in: server/api.d.ts:1406
Holds the player’s clock, and the sun and the sky with it, at an hour of their own until it is released. Their game’s day count and date stay the world’s. Lasts until they leave.
Parameters
Section titled “Parameters”number | null
The hour to hold the player’s clock at, wrapped into 0-24; null to follow World.hour again.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setInvulnerable()
Section titled “setInvulnerable()”setInvulnerable(
invulnerable):boolean
Defined in: server/api.d.ts:1034
Makes the player unhurtable, as FiveM’s SetPlayerInvincible does: their game makes them a ghost, which shots, blows and explosions pass over, and turns on the game’s immortal mode, so a fall or radiation never takes their last point of health; the server drops every hit still reported on them, from players and NPCs, before playerHit or npcAttack. It lasts until undone or they leave.
Parameters
Section titled “Parameters”invulnerable
Section titled “invulnerable”boolean
True to make them unhurtable, false to make them hurtable again.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setItemCount()
Section titled “setItemCount()”setItemCount(
form,count):boolean
Defined in: server/api.d.ts:989
Sets how many of an item the player carries, over every condition: more are added at full condition, fewer are taken from full stacks first.
Parameters
Section titled “Parameters”string | number
The base object.
number
How many the player should carry, 0 to 1000000.
Returns
Section titled “Returns”boolean
True when the record changed; false before the player’s first report or once they are gone.
setItemMods()
Section titled “setItemMods()”setItemMods(
form,mods,current?):boolean
Defined in: server/api.d.ts:1011
Changes the mods on one item the player carries, as FiveM’s GiveWeaponComponentToPed and RemoveWeaponComponentFromPed do, or a workbench would: its condition stays, and the weapon in hand is taken up again with them. Mods that do not fit the item are left out by their game. The change reaches getInventory and getWeapon once their game reports it.
Parameters
Section titled “Parameters”string | number
A weapon or armor piece the player carries.
number[]
The OMOD form IDs it should carry, all of them: a scope, a barrel, a paint. Empty gives it the mods its record gives a new one, as a weapon is never without a receiver.
current?
Section titled “current?”number[]
The mods of the one to change, among several; the weapon in hand when left out and it is of this form, else the first one found.
Returns
Section titled “Returns”boolean
True when changed, or already so; false when the player carries none that matches.
setItemName()
Section titled “setItemName()”setItemName(
form,name,current?):boolean
Defined in: server/api.d.ts:1020
Names one item the player carries, as a workbench’s rename does: the Pip-Boy, the trade and container menus and the HUD show the name in place of the item’s own, and it stays with the item when it is dropped, stored in a container or picked up again. How a script shows what its own systems track, such as “Pipe Pistol [73%]”. The game keeps a named item apart from the unnamed ones, and the one in hand or worn is taken up again under its new name. The change reaches getInventory once their game reports it.
Parameters
Section titled “Parameters”string | number
The item the player carries.
string | null
The name it shows, up to 64 bytes of UTF-8 without control characters; null or empty gives it back its own.
current?
Section titled “current?”Which one among several: each field given narrows it. The weapon in hand or the armor piece worn when left out and it is of this form, else the first one found.
condition?
Section titled “condition?”number
number[]
string | null
Returns
Section titled “Returns”boolean
True when changed, or already so; false when the player carries none that matches.
setLevel()
Section titled “setLevel()”setLevel(
level):boolean
Defined in: server/api.d.ts:1163
Sets the character’s level and their XP to the start of it. No perk points come with it: see setPerkPoints.
Parameters
Section titled “Parameters”number
1 to 65535.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established.
setLook()
Section titled “setLook()”setLook(
look):boolean
Defined in: server/api.d.ts:918
Changes the character’s look; the player’s game rebuilds them and everyone sees it.
Parameters
Section titled “Parameters”What to change: the sex, the skin tone in 0-255 channels, a hair BGSHeadPart. What is left out stays.
female?
Section titled “female?”boolean
string | number
skinTone?
Section titled “skinTone?”{ b: number; g: number; r: number; }
skinTone.b
Section titled “skinTone.b”number
skinTone.g
Section titled “skinTone.g”number
skinTone.r
Section titled “skinTone.r”number
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setMapWaypoint()
Section titled “setMapWaypoint()”setMapWaypoint(
position):boolean
Defined in: server/api.d.ts:1354
Places the player’s own map marker, which their compass and Pip-Boy map show, or takes it off. playerMapWaypoint is not raised: the script decided already.
Parameters
Section titled “Parameters”position
Section titled “position”Vector3 | null
Where to, in the space the player stands in; null takes it off.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setNametagColor()
Section titled “setNametagColor()”setNametagColor(
color):void
Defined in: server/api.d.ts:4417
Tints the text on this player’s nametag.
Parameters
Section titled “Parameters”number
Packed 0xAARRGGBB color.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setNametagHealthVisible()
Section titled “setNametagHealthVisible()”setNametagHealthVisible(
visible):void
Defined in: server/api.d.ts:4405
Shows or hides the health bar under this player’s nametag, leaving the name itself alone.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to show the health bar under this player’s name, false to hide it.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”BasePlayer.setNametagHealthVisible
setNametagText()
Section titled “setNametagText()”setNametagText(
text?):void
Defined in: server/api.d.ts:4411
Overrides the text drawn on this player’s nametag.
Parameters
Section titled “Parameters”string
Text to show instead of the player’s name, cut to 64 bytes; empty or omitted restores the name.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setNametagVisible()
Section titled “setNametagVisible()”setNametagVisible(
visible):void
Defined in: server/api.d.ts:4399
Shows or hides the name over this player’s head for every other player. The health bar has its own switch, and each player can still hide all nametags locally.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
True to show this player’s nametag to everyone, false to hide it.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setOutfit()
Section titled “setOutfit()”setOutfit(
pieces,mode?):boolean
Defined in: server/api.d.ts:904
Dresses the player. Pieces the player’s game cannot wear are skipped there.
Parameters
Section titled “Parameters”pieces
Section titled “pieces”(string | number | { form: string | number; mods?: (string | number)[]; })[]
Armor form IDs, or objects naming the mods to attach. Up to 32 pieces of 8 mods.
"replace" | "remove" | "add"
replace, the default, wears exactly these and takes every other piece off; add puts them on over what is worn; remove takes them off.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setPerkPoints()
Section titled “setPerkPoints()”setPerkPoints(
points):boolean
Defined in: server/api.d.ts:1196
Sets the character’s unspent perk points.
Parameters
Section titled “Parameters”points
Section titled “points”number
0 to 255.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established.
setPowerArmorBattery()
Section titled “setPowerArmorBattery()”setPowerArmorBattery(
charge):boolean
Defined in: server/api.d.ts:872
Sets the charge of the fusion core in the player’s power armor, through the value their game drains. At 0 their game does what it does with an empty core: it loads the next fusion core they carry, or leaves the suit unpowered. Above the core’s capacity the capacity follows. It also lifts the hold a refused core left the suit in. playerPowerArmorBattery follows.
Parameters
Section titled “Parameters”charge
Section titled “charge”number
The charge to leave in the core, 0 to 1000; a full fusion core holds 100.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone or not in power armor.
setRace()
Section titled “setRace()”setRace(
race):boolean
Defined in: server/api.d.ts:858
Rebuilds the player on another race, as the console’s setrace and Actor.SetRace do: a ghoul. Their skin and body become the race’s, their head parts stay their own, and every other player sees their puppet rebuilt the same way. Only human and ghoul are supported; any other race is refused. The race they had comes back with null, and when their session ends.
Parameters
Section titled “Parameters”string | number | null
0x13746 (HumanRace) or 0xEAFB6 (GhoulRace); null for the race they had.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setRestrained()
Section titled “setRestrained()”setRestrained(
restrained):boolean
Defined in: server/api.d.ts:1097
Holds the player in place from the server, as FiveM’s FreezeEntityPosition does a player’s ped and Actor.SetRestrained an actor: their game keeps them standing where they are, neither moving nor acting, until let go. Cuffs, an arrest, an admin freeze, a cutscene. A player who is down or dead is left as they are.
Parameters
Section titled “Parameters”restrained
Section titled “restrained”boolean
True to hold them where they stand, false to let them go.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setScale()
Section titled “setScale()”setScale(
scale):boolean
Defined in: server/api.d.ts:1082
Scales the player in every game, as ObjectReference.SetScale does: their own game scales their character, and every other game their body. It lasts until set again or they leave.
Parameters
Section titled “Parameters”number
1 for their normal size, from 0.01 to 10.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setValue()
Section titled “setValue()”setValue(
value,current):boolean
Defined in: server/api.d.ts:1150
Moves an actor value’s current value in the player’s game, keeping its base.
Parameters
Section titled “Parameters”string | number
An actor value: its editor ID, such as "Strength" or "Health", or its form ID.
current
Section titled “current”number
The current value to reach; no higher than the maximum.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setVatsRolledByServer()
Section titled “setVatsRolledByServer()”setVatsRolledByServer(
enabled):boolean
Defined in: server/api.d.ts:1391
Moves the roll of the player’s VATS hits to the server. Their game rolls each queued shot against the chance it shows; while this is on, every shot with a chance above 0 strikes instead, and its hit reaches playerHit or npcHit as kind “vats” with that chance: the handler rolls it (Math.random() < vatsChance) and returns false for a miss. Lasts until they leave; set it again for each player as they join.
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
True to roll the player’s VATS hits on the server, false to leave them to their game.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setVirtualWorld()
Section titled “setVirtualWorld()”setVirtualWorld(
world):void
Defined in: server/api.d.ts:4292
Moves this entity into another virtual world.
Parameters
Section titled “Parameters”number
Virtual-world identifier used to partition replication and visibility.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setVisibleTo()
Section titled “setVisibleTo()”setVisibleTo(
player):void
Defined in: server/api.d.ts:4298
Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.
Parameters
Section titled “Parameters”player
Section titled “player”Entity | null
Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setWeaponDrawn()
Section titled “setWeaponDrawn()”setWeaponDrawn(
drawn):boolean
Defined in: server/api.d.ts:837
Holds the player’s weapon out or away, as FiveM’s SetCurrentPedWeapon forces a ped’s: their game draws or holsters it at once and keeps it so against their own ready-weapon key and the game’s. Away for a safe zone, out for a scripted scene. With no weapon in hand, out raises their fists. To stop attacks too, a client script turns off Controls “fighting”.
Parameters
Section titled “Parameters”boolean | null
True to hold their weapon out, false to keep it away, null to hand it back to them.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setWeather()
Section titled “setWeather()”setWeather(
weather,force?):boolean
Defined in: server/api.d.ts:1399
Gives the player a sky of their own, over the one World holds for everyone: the weather of the worldspace they stand in, a storm over one quest, a clear sky for a cutscene. The server strikes its lightning as for the World’s. Lasts until they leave: to make it a rule, set it on playerSpaceChange, playerWeatherRegionChange or as they join.
Parameters
Section titled “Parameters”weather
Section titled “weather”string | number | null
A TESWeather form ID for this player alone; null to follow World.weather again.
force?
Section titled “force?”boolean
Swap it in at once rather than transition to it.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
setXp()
Section titled “setXp()”setXp(
xp):boolean
Defined in: server/api.d.ts:1176
Sets the character’s total experience, and their level to match. No perk points come with it.
Parameters
Section titled “Parameters”number
The total, at least 0.
Returns
Section titled “Returns”boolean
True when the record changed; false before the character is established.
stopIdle()
Section titled “stopIdle()”stopIdle():
boolean
Defined in: server/api.d.ts:799
Stops the idle animation the player plays and returns them to their stance.
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
strikeLightning()
Section titled “strikeLightning()”strikeLightning():
boolean
Defined in: server/api.d.ts:1418
Strikes lightning in the player’s sky alone: a flash and a thunderclap, if their sky is in a weather that thunders. In a session the game’s own strikes come from the server (World.setLightningEnabled).
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone.
teleport()
Section titled “teleport()”teleport(
position,heading?,space?,options?):boolean
Defined in: server/api.d.ts:815
Moves the player, within their space or into another one. Into an interior they land at a persistent reference inside it, as a quest script moves the player, and position is not used: wait for playerSpaceChange, then teleport them within it. playerSpaceChange follows any change of space.
Parameters
Section titled “Parameters”position
Section titled “position”Where to, in the space the player goes to.
heading?
Section titled “heading?”number
Facing in radians; the current one when left out.
space?
Section titled “space?”Another worldspace or an interior cell, exactly one of the two; the one the player is in when left out.
interiorCell?
Section titled “interiorCell?”string | number
worldSpace?
Section titled “worldSpace?”string | number
options?
Section titled “options?”loadScreen: whether the player’s game may show its loading screen when the destination is not loaded (default true). With false the destination streams in with no loading screen, as the game’s own “No Load Screen” doors do: their game stalls for the load instead, so fade the screen first (Hud.fade).
loadScreen?
Section titled “loadScreen?”boolean
Returns
Section titled “Returns”boolean
True when sent; false when the player is gone, or the interior has no reference to land at. Throws for a position that is not a finite Vector3.
toString()
Section titled “toString()”toString():
string
Defined in: server/api.d.ts:805
Formats this handle for logging.
Returns
Section titled “Returns”string
The player’s network ID and nickname.
Inherited from
Section titled “Inherited from”unequipItem()
Section titled “unequipItem()”unequipItem(
form):boolean
Defined in: server/api.d.ts:1027
Has the player put a weapon away for good or take an armor piece off: they keep carrying it.
Parameters
Section titled “Parameters”string | number
A weapon or armor piece the player carries.
Returns
Section titled “Returns”boolean
True when sent; false when the server’s record has none of it or the player is gone.
staticall():Player[]
Defined in: server/api.d.ts:1453
Every connected player.
Returns
Section titled “Returns”Player[]
One handle per player, in no particular order.
getById()
Section titled “getById()”
staticgetById(id):Player|null
Defined in: server/api.d.ts:1460
Looks a player up by network ID.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Player | null
The handle, or null when no connected player has that ID.
getInRange()
Section titled “getInRange()”
staticgetInRange(center,radius,options?):Player[]
Defined in: server/api.d.ts:1433
The players around a point, a player or an NPC, nearest first, as FiveM scripts run GetActivePlayers through a distance check: who hears a shout, who stands in a zone, who is close enough to trade. Positions are the ones the players’ games last reported.
Parameters
Section titled “Parameters”center
Section titled “center”A point, or a player or an NPC, whose position and space are then the search’s; a player is not counted among its own.
radius
Section titled “radius”number
How far from it, in game units.
options?
Section titled “options?”space: where a point is, the Commonwealth when left out. limit: how many at most, 32 by default, never more than 512.
limit?
Section titled “limit?”number
space?
Section titled “space?”{ worldSpace: number; } | { interiorCell: number; }
Returns
Section titled “Returns”Player[]
Empty when nobody is in range, or the center is gone. Throws for a center that is none of these, or a negative radius.
getWeaponDamageModifier()
Section titled “getWeaponDamageModifier()”
staticgetWeaponDamageModifier(weapon):number
Defined in: server/api.d.ts:1447
What setWeaponDamageModifier scales the weapon’s hits by.
Parameters
Section titled “Parameters”weapon
Section titled “weapon”string | number
The weapon (WEAP).
Returns
Section titled “Returns”number
The modifier; 1 when none was set.
setWeaponDamageModifier()
Section titled “setWeaponDamageModifier()”
staticsetWeaponDamageModifier(weapon,modifier):void
Defined in: server/api.d.ts:1440
Scales the damage every hit of a weapon deals, whoever wields it, players and NPCs alike, as FiveM’s SetWeaponDamageModifier does; it stacks with the attacker’s setDamageModifier and the victim’s setDefenseModifier. It lasts while the server runs.
Parameters
Section titled “Parameters”weapon
Section titled “weapon”string | number
The weapon (WEAP) whose hits are scaled.
modifier
Section titled “modifier”number
From 0 to 100: 1 for none, which forgets it.
Returns
Section titled “Returns”void
xpForLevel()
Section titled “xpForLevel()”
staticxpForLevel(level):number
Defined in: server/api.d.ts:1269
The total experience a level starts at, by the game’s formula.
Parameters
Section titled “Parameters”number
1 to 65535.
Returns
Section titled “Returns”number
The XP.
Properties
Section titled “Properties”aimPitch
Section titled “aimPitch”
readonlyaimPitch:number
Defined in: server/api.d.ts:715
Aim pitch, in radians.
readonlyarmor:number
Defined in: server/api.d.ts:680
Damage resistance from the armor the player wears.
discordId
Section titled “discordId”
readonlydiscordId:string
Defined in: server/api.d.ts:4324
Authenticated Discord identifier, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”discordName
Section titled “discordName”
readonlydiscordName:string
Defined in: server/api.d.ts:4329
Discord username the client reported, not verified by the server, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”epicId
Section titled “epicId”
readonlyepicId:string
Defined in: server/api.d.ts:4319
Epic Games account identifier the client reported, not verified by the server, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”hardwareId
Section titled “hardwareId”
readonlyhardwareId:string
Defined in: server/api.d.ts:4334
Framework hardware identifier, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”heading
Section titled “heading”
readonlyheading:number
Defined in: server/api.d.ts:710
Facing, in radians around Z.
health
Section titled “health”health:
number
Defined in: server/api.d.ts:670
Current health, as the player’s game last reported it. Assigning asks their game to move it there, as setValue("Health", value) does; it reads the new value once they report it.
readonlyid:number
Defined in: server/api.d.ts:4260
Immutable network entity identifier.
Inherited from
Section titled “Inherited from”
readonlyip:string
Defined in: server/api.d.ts:4344
Current remote network address, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”isAiming
Section titled “isAiming”
readonlyisAiming:boolean
Defined in: server/api.d.ts:750
Whether the player aims down the sights of a drawn gun.
isBleedingOut
Section titled “isBleedingOut”
readonlyisBleedingOut:boolean
Defined in: server/api.d.ts:695
Whether the player is in the game’s bleedout: down on the ground and alive, where a client script put them with LocalPlayer.setBleedingOut.
isDead
Section titled “isDead”
readonlyisDead:boolean
Defined in: server/api.d.ts:700
Whether the player is dead. A dead player stays down until respawn.
isFemale
Section titled “isFemale”
readonlyisFemale:boolean
Defined in: server/api.d.ts:705
Whether the character is female.
isInPowerArmor
Section titled “isInPowerArmor”
readonlyisInPowerArmor:boolean
Defined in: server/api.d.ts:760
Whether the player wears a power armor frame.
isInvulnerable
Section titled “isInvulnerable”
readonlyisInvulnerable:boolean
Defined in: server/api.d.ts:685
Whether setInvulnerable made the player unhurtable.
isJetpackFiring
Section titled “isJetpackFiring”
readonlyisJetpackFiring:boolean
Defined in: server/api.d.ts:775
Whether the jetpack of the player’s power armor thrusts.
isJumping
Section titled “isJumping”
readonlyisJumping:boolean
Defined in: server/api.d.ts:730
Whether the player is in the air: from a jump, a fall or their power armor jetpack.
isKnockedDown
Section titled “isKnockedDown”
readonlyisKnockedDown:boolean
Defined in: server/api.d.ts:690
Whether the player is knocked down, alive: in their ragdoll or getting up, after a blast or a client script’s LocalPlayer.knockDown.
isPipBoyOpen
Section titled “isPipBoyOpen”
readonlyisPipBoyOpen:boolean
Defined in: server/api.d.ts:755
Whether the player’s Pip-Boy is up.
isRunning
Section titled “isRunning”
readonlyisRunning:boolean
Defined in: server/api.d.ts:740
Whether the player runs rather than walks.
isSneaking
Section titled “isSneaking”
readonlyisSneaking:boolean
Defined in: server/api.d.ts:725
Whether the player sneaks.
isSprinting
Section titled “isSprinting”
readonlyisSprinting:boolean
Defined in: server/api.d.ts:735
Whether the player sprints.
isSwimming
Section titled “isSwimming”
readonlyisSwimming:boolean
Defined in: server/api.d.ts:765
Whether the player swims: in water deep enough that their game took them off their feet.
isUnderwater
Section titled “isUnderwater”
readonlyisUnderwater:boolean
Defined in: server/api.d.ts:770
Whether the water reaches above the player’s neck, as their game’s IsUnderWater condition answers. A swimmer’s body often keeps it so at the surface too.
isWeaponDrawn
Section titled “isWeaponDrawn”
readonlyisWeaponDrawn:boolean
Defined in: server/api.d.ts:745
Whether the player’s weapon is out.
maxHealth
Section titled “maxHealth”
readonlymaxHealth:number
Defined in: server/api.d.ts:675
Health at full.
nickname
Section titled “nickname”
readonlynickname:string
Defined in: server/api.d.ts:665
The name the player connected with. Empty once they are gone.
readonlyping:number
Defined in: server/api.d.ts:4339
Current round-trip latency in milliseconds, or -1 when unavailable.
Inherited from
Section titled “Inherited from”position
Section titled “position”position:
Vector3
Defined in: server/api.d.ts:4270
Authoritative world-space position; assignment forces replicated state.
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: server/api.d.ts:4275
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
Inherited from
Section titled “Inherited from”
readonlystate:StateBag
Defined in: server/api.d.ts:4280
Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.
Inherited from
Section titled “Inherited from”steamId
Section titled “steamId”
readonlysteamId:string
Defined in: server/api.d.ts:4314
Authenticated Steam identifier, or an empty string when unavailable.
Inherited from
Section titled “Inherited from”velocity
Section titled “velocity”
readonlyvelocity:Vector3
Defined in: server/api.d.ts:720
Velocity, in game units per second.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: server/api.d.ts:4265
Current virtual-world identifier.