Player
Summary
Properties
| Name | Type |
|---|---|
| name | string |
| id | int |
| onlineId | int |
| guid | Guid |
| accountGuid | Guid |
| ip | string |
| ping | int |
| alive | bool |
| isSquadLeader | bool |
| isSquadPrivate | bool |
| hasSoldier | bool |
| soldier | SoldierEntity | nil |
| corpse | SoldierEntity | nil |
| teamId | TeamId |
| squadId | SquadId |
| isAllowedToSpawn | bool |
| isAllowedToSpawnOn | bool |
| selectedKit | DataContainer | nil |
| score | int |
| kills | int |
| deaths | int |
| input | EntryInput | nil |
| controlledEntryId | int |
| attachedControllable | ControllableEntity | nil |
| controlledControllable | ControllableEntity | nil |
| customization | DataContainer | nil |
| selectedUnlocks | DataContainer{} |
| visualUnlocks | DataContainer{} |
| weapons | DataContainer[] |
| weaponUnlocks | (DataContainer{})[] |
Methods
| Method | Returns |
|---|---|
| Kick() | void |
| Kick(reason: string) | void |
| Ban() | void |
| Ban(reason: string) | void |
| BanTemporarily(seconds: int) | void |
| BanTemporarily(seconds: int, reason: string) | void |
| BanByName() | void |
| BanByName(reason: string) | void |
| BanByNameTemporarily(seconds: int) | void |
| BanByNameTemporarily(seconds: int, reason: string) | void |
| BanByIp() | void |
| BanByIp(reason: string) | void |
| BanByIpTemporarily(seconds: int) | void |
| BanByIpTemporarily(seconds: int, reason: string) | void |
| Spawn(spawnPoint: Entity, checkSpawnArea: bool) | bool |
| SelectWeapon(slot: WeaponSlot, weaponUnlockAsset: DataContainer, unlockAssets: DataContainer{}) | void |
| SelectUnlockAssets(characterCustomizationAsset: DataContainer, visualUnlockAssets: DataContainer{}) | void |
| SelectUnlockAssets(characterCustomizationAsset: DataContainer, visualUnlockAssets: DataContainer{}, miscUnlockAssets: DataContainer{}) | void |
| CreateSoldier(soldierBlueprint: DataContainer, transform: LinearTransform) | SoldierEntity | nil |
| SpawnSoldierAt(soldier: SoldierEntity, transform: LinearTransform, pose: CharacterPoseType) | void |
| SetSquadLeader(leader: bool, squadPrivate: bool) | void |
| AttachSoldier(soldier: SoldierEntity) | void |
| EnableInput(action: EntryInputActionEnum, enable: bool) | void |
| Fade(fadeTime: float, fadeToBlack: bool) | void |
| EnterVehicle(vehicle: Entity, entryId: int) | void |
| ExitVehicle(force: bool, exitOnEntry: bool) | void |
Operators
| Operator | Rhs | Returns |
|---|---|---|
| == | Player | bool |
Properties
name
string
id
int
onlineId
int
guid
accountGuid
ip
string
ping
int
alive
bool
isSquadLeader
bool
isSquadPrivate
bool
hasSoldier
bool
soldier
SoldierEntity | nil
corpse
SoldierEntity | nil
teamId
squadId
isAllowedToSpawn
bool
Describes if this player is allowed to spawn.
isAllowedToSpawnOn
bool
Describes if other players are allowed to spawn on this player.
selectedKit
DataContainer | nil
This is the SoldierBlueprint.
score
int
kills
int
deaths
int
input
EntryInput | nil
controlledEntryId
int
attachedControllable
ControllableEntity | nil
controlledControllable
ControllableEntity | nil
customization
DataContainer | nil
The CharacterCustomizationAsset currently applied to this player's soldier.
selectedUnlocks
A table of specializations (UnlockAssetBase) this player currently has equipped.
visualUnlocks
A table of visual unlocks (UnlockAsset) this player currently has equipped.
weapons
An array of weapons (SoldierWeaponUnlockAsset) this player currently has equipped. This array can be indexed using WeaponSlot + 1. A weapon at a given slot may be nil if nothing is equipped.
weaponUnlocks
(DataContainer{})[]
An array containing tables of equipped unlocks (UnlockAssetBase) for each weapon this player has. This array can be indexed using WeaponSlot + 1. The unlocks may be nil if there is no weapon equipped at a given slot.
Methods
Kick
Kick()
Kick
Kick(reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string |
Ban
Ban()
Ban
Ban(reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string |
BanTemporarily
BanTemporarily(seconds: int)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int |
BanTemporarily
BanTemporarily(seconds: int, reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int | |
| reason | string |
BanByName
BanByName()
BanByName
BanByName(reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string |
BanByNameTemporarily
BanByNameTemporarily(seconds: int)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int |
BanByNameTemporarily
BanByNameTemporarily(seconds: int, reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int | |
| reason | string |
BanByIp
BanByIp()
BanByIp
BanByIp(reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string |
BanByIpTemporarily
BanByIpTemporarily(seconds: int)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int |
BanByIpTemporarily
BanByIpTemporarily(seconds: int, reason: string)
Parameters
| Name | Type | Description |
|---|---|---|
| seconds | int | |
| reason | string |
Spawn
Spawn(spawnPoint: Entity, checkSpawnArea: bool): bool
Parameters
| Name | Type | Description |
|---|---|---|
| spawnPoint | Entity | Expected type ServerCharacterSpawnEntity |
| checkSpawnArea | bool |
Returns
| Type | Description |
|---|---|
| bool |
SelectWeapon
SelectWeapon(slot: WeaponSlot, weaponUnlockAsset: DataContainer, unlockAssets: DataContainer{})
Parameters
| Name | Type | Description |
|---|---|---|
| slot | WeaponSlot | |
| weaponUnlockAsset | DataContainer | |
| unlockAssets | DataContainer{} |
SelectUnlockAssets
SelectUnlockAssets(characterCustomizationAsset: DataContainer, visualUnlockAssets: DataContainer{})
Parameters
| Name | Type | Description |
|---|---|---|
| characterCustomizationAsset | DataContainer | |
| visualUnlockAssets | DataContainer{} |
SelectUnlockAssets
SelectUnlockAssets(characterCustomizationAsset: DataContainer, visualUnlockAssets: DataContainer{}, miscUnlockAssets: DataContainer{})
Parameters
| Name | Type | Description |
|---|---|---|
| characterCustomizationAsset | DataContainer | |
| visualUnlockAssets | DataContainer{} | |
| miscUnlockAssets | DataContainer{} |
CreateSoldier
CreateSoldier(soldierBlueprint: DataContainer, transform: LinearTransform): SoldierEntity | nil
Parameters
| Name | Type | Description |
|---|---|---|
| soldierBlueprint | DataContainer | |
| transform | LinearTransform |
Returns
| Type | Description |
|---|---|
| SoldierEntity | nil |
SpawnSoldierAt
SpawnSoldierAt(soldier: SoldierEntity, transform: LinearTransform, pose: CharacterPoseType)
Parameters
| Name | Type | Description |
|---|---|---|
| soldier | SoldierEntity | |
| transform | LinearTransform | |
| pose | CharacterPoseType |
SetSquadLeader
SetSquadLeader(leader: bool, squadPrivate: bool)
Parameters
| Name | Type | Description |
|---|---|---|
| leader | bool | |
| squadPrivate | bool |
AttachSoldier
AttachSoldier(soldier: SoldierEntity)
Parameters
| Name | Type | Description |
|---|---|---|
| soldier | SoldierEntity |
EnableInput
EnableInput(action: EntryInputActionEnum, enable: bool)
Parameters
| Name | Type | Description |
|---|---|---|
| action | EntryInputActionEnum | |
| enable | bool |
Fade
Fade(fadeTime: float, fadeToBlack: bool)
Parameters
| Name | Type | Description |
|---|---|---|
| fadeTime | float | |
| fadeToBlack | bool |
EnterVehicle
EnterVehicle(vehicle: Entity, entryId: int)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | Entity | |
| entryId | int |
ExitVehicle
ExitVehicle(force: bool, exitOnEntry: bool)
Parameters
| Name | Type | Description |
|---|---|---|
| force | bool | |
| exitOnEntry | bool |
Operators
operator==
operator==(rhs: Player): bool
Parameters
| Name | Type | Description |
|---|---|---|
| rhs | Player |
Returns
| Type | Description |
|---|---|
| bool |