Player

A physical player in the server

Functions

Player:AddChatText(...)

View source »

Acts as a chat.AddText(...) but sent from the server.

Parameters

  • ...

    Message to send to the player's chatbox

Player:AddPropCount(ent)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Adds a prop to the players prop list.

Parameters

Player:AddSkillXP(name, value)

View source »

Adds XP to a specified skill.

Parameters

  • name string

    internal identifier.

  • value int

    XP amount to add.

Player:AddXP(amount)

View source »

Adds XP to the players total XP count.

Parameters

  • amount int

    Amount to add.

Player:AllowScenePVSControl(bool)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Determines if the player is allowed to control extra PVS (Render zones basically) to render a cutscene correctly.

Parameters

  • bool boolean

    Allow or not.

Player:Arrest()

View source »

Detains the player, does not put them in jail.

Player:CanArrest(target)

View source »

Returns if a player can arrest the target

Parameters

  • target Entity

    The target who would be arrested

Returns

  • bool

    Can arrest

Player:CanBuyDoor(doorOwners, doorBuyable)

View source »

Retruns if a user can own a door given the parameters.

Parameters

  • doorOwners

    The door owners.

  • doorBuyable boolean

    is the door buyable?

Returns

  • bool

    can buy door.

Player:CanLockUnlockDoor(doorOwners, doorBuyable)

View source »

Can the user lock or unlock the door.

Parameters

  • doorOwners

    The door owners.

  • doorBuyable boolean

    is the door buyable?

Returns

  • bool

    can buy door.

Player:DragPlayer(ply)

View source »

Drags the specified player if they pass the Player:CanArrest check.

Parameters

Player:FeedHunger(amount)

View source »

Gives the player the amount of hunger

Parameters

  • amount int

    Amount of hunger (0-100)

Player:GetDescription()

View source »

The players description, changes depending on the team.

Returns

  • string

    The players description, if none is set, it will return ""

Player:GetHunger(fallback)

View source »

Returns the players hunger value.

Parameters

  • fallback int optional

    The value to fallback to if the SyncVar is nil.

Returns

  • int

    Hunger amount.

Player:GetKnownHealth()

View source »

Get's a text version of the players health amount.

Returns

  • string

    The players health described in text.

  • color

    The color to draw in.

Player:GetPropCount(skip)

View source »

Returns the players prop count.

Parameters

  • skip boolean default: true

    Skip syncing the prop count to the player.

Returns

  • int

    Prop count.

Player:GetSavedRPName()

View source »

Gets the player's database RP name.

Returns

Player:GetSkillXP(name)

View source »

Returns the players XP in a given skill.

Parameters

  • name string

    internal identifier of the given skill.

Returns

  • int

    skill xp amount or 0.

Player:GetXP()

View source »

Returns the players XP gained on the server.

Returns

  • int

    xp

Player:GetZone()

View source »

Returns the zone ID the player currently is in.

Returns

  • int

    zone id

Player:GetZoneName()

View source »

Returns the name of the current zone the player is in.

Returns

Player:GiveTimedXP()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Adds amount based off of XP times, ran automatically.

Player:InSpawn()

View source »

Returns if a player is in the spawn zone

Returns

  • bool

    Is in spawn

Player:IsAFK()

View source »

Returns if a player is AFK.

Returns

  • afk

    is afk.

Player:IsAdmin()

View source »

Returns if the player has Admin access (The normal moderation level of access.)

Returns

  • bool

    Has admin access

Player:IsArrested()

View source »

Returns if a player is arrested

Returns

  • bool

    Is arrested

Player:IsCharacterFemale()

View source »

Returns if the player has a female character

Returns

  • bool

    Is female

Player:IsCommunityManager()

View source »

Returns if the player is a Community Manager or higher

Returns

  • bool

    Is Community Manager

Player:IsDeveloper()

View source »

Returns if a player is an impulse framework developer

Returns

  • bool

    Is developer

Player:IsDonator()

View source »

Returns if a player has donator status

Returns

  • bool

    Is donator

Player:IsDoorOwner(doorOwners)

View source »

Retruns if a user is an owner of a set of door owners.

Parameters

  • doorOwners

    The door owners.

Returns

  • bool

    is owner.

Player:IsGameMaster()

View source »

Returns if the player is a Game Master or higher

Returns

  • bool

    Is Game Master

Player:IsLeadAdmin()

View source »

Returns if the player is a lead moderator or higher

Returns

  • bool

    Is Lead Admin

Player:IsPureGameMaster()

View source »

Returns if the player is a Game Master and not higher

Returns

  • bool

    Is Game Master

Player:IsSuperAdmin()

View source »

Returns if the player has Super Admin access (The highest level of access.)

Returns

  • bool

    Has superadmin access

Player:IsWeaponRaised()

View source »

Checks whether the player has their weapon raised or not.

Returns

  • bool

    Is the weapon raised.

Player:Jail(time, jailData)

View source »

Puts the player in prison.

Parameters

  • time int

    A 16-bit unsigned integer.

  • jailData

    Data for the players jail sentence.

Player:KnownName()

View source »

Returns the player's name that appears above their head, runs the "PlayerGetKnownName" hook to override the RP name.

Returns

  • string

    Player's visible name.

Player:MakeAFK()

View source »

Makes a player AFK.

Player:Name()

View source »

Returns the player's RP name.

Returns

  • string

    The player's RP name if they have one, otherwise returns their Steam Name.

Player:NetworkSkill(name, value)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Networks a skills XP to a specified value.

Parameters

  • name string

    internal identifier.

  • value int

    XP amount.

Player:Notify(message, class)

View source »

Sends a notification to a player.

Parameters

  • message string

    The notification message

  • class int

    Notification class ID.

Player:RemoveSkillXP(name, value)

View source »

Removes XP to a specified skill.

Parameters

  • name string

    internal identifier.

  • value int

    XP amount to remove.

Player:ResetSubMaterials()

View source »

Resets the players submaterials on their model.

Player:SendJailInfo(time, jailData)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Networks specified jail data to the player.

Parameters

  • time int

    A 16-bit unsigned integer.

  • jailData

    Data for the players jail sentence.

Player:SetAFKImmune(b)

View source »

Sets a user to be AFK immune.

Parameters

  • b boolean

    True/False for AFK immunity

Player:SetHandsBehindBack(state)

View source »

Sets if players hands are behind their back, this can be called on the server but always be called on the client to avoid lag

Parameters

  • state boolean

Player:SetHunger(amount)

View source »

Set the hunger amount of a player

Parameters

  • amount int

    Amount of hunger (0-100)

Player:SetRPName(name, save)

View source »

Changes the player's RP name.

Parameters

  • name string

    Name to change to.

  • save boolean

    Should this save to your database.

Player:SetSkillXP(name, value)

View source »

Sets a skills XP to a specified value.

Parameters

  • name string

    internal identifier.

  • value int

    XP amount.

Player:SetWeaponRaised(state)

View source »

Sets whether the player has their weapon raised or not.

Parameters

  • state boolean

    Raised or not.

Player:SetXP(amount)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Sets the players XP gained on the server. Probably should use Player:AddXP

Parameters

  • amount int

    XP to set to.

Player:SetZone(id)

View source »

Updates the players zone and syncs to LOCAL client.

Parameters

  • id int

    zone id.

Player:SteamName()

View source »

Gets the player's steam name, replaces meta:Name().

Returns

Player:StopDrag()

View source »

Stops dragging anyone if the player is dragging someone.

Player:ToggleWeaponRaised()

View source »

Toggles the weapon raised bool.

Player:UnArrest()

View source »

Unrestrains the player, does not remove them in jail.

Player:UnJail()

View source »

Frees the player from prison.

Player:UnMakeAFK()

View source »

Makes a player NOT AFK.