Plugin

Global hooks for general use.

Plugin hooks are regular hooks that can be used in your schema with Schema:HookName(args), in your plugin with PLUGIN:HookName(args), or in your addon with hook.Add("HookName", function(args) end).

Functions

PLUGIN:AdjustCreationPayload(client, payload, newPayload)

Adjusts the data used just before creating a new character.

Parameters

  • client Player

    Player that is creating the character

  • payload table

    Table of data to be used for character creation

  • newPayload table

    Table of data be merged with the current payload

Example Usage

function PLUGIN:AdjustCreationPayload(client, payload, newPayload)
	newPayload.money = payload.attributes["stm"] -- Sets the characters initial money to the stamina attribute value.
end

PLUGIN:AdjustStaminaOffset(client, baseOffset)

Adjusts a player's current stamina offset amount. This is called when the player's stamina is about to be changed; every 0.25 seconds on the server, and every frame on the client.

Parameters

  • client Player

    Player whose stamina is changing

  • baseOffset number

    Amount the stamina is changing by. This can be a positive or negative number depending if they are exhausting or regaining stamina

Returns

  • number

    New offset to use

Example Usage

function PLUGIN:AdjustStaminaOffset(client, baseOffset)
	return baseOffset * 2 -- Drain/Regain stamina twice as fast.
end

PLUGIN:BuildBusinessMenu()

Creates the business panel in the tab menu.

Returns

  • bool

    Whether or not to create the business menu

Example Usage

function PLUGIN:BuildBusinessMenu()
	return LocalPlayer():IsAdmin() -- Only builds the business menu for admins.
end

PLUGIN:CanAutoFormatMessage(speaker, chatType, text)

Whether or not a message can be auto formatted with punctuation and capitalization.

Parameters

  • speaker Player

    Player that sent the message

  • chatType string

    Chat type of the message. This will be something registered with ix.chat.Register - like ic, ooc, etc.

  • text string

    Unformatted text of the message

Returns

  • bool

    Whether or not to allow auto formatting on the message

Example Usage

function PLUGIN:CanAutoFormatMessage(speaker, chatType, text)
	return false -- Disable auto formatting outright.
end

PLUGIN:CanCreateCharacterInfo(suppress)

Whether or not certain information can be displayed in the character info panel in the tab menu.

Parameters

  • suppress table

    Information to NOT display in the UI - modify this to change the behaviour. This is a table of the names of some panels to avoid displaying. Valid names include:

    • time - current in-game time
    • name - name of the character
    • description - description of the character
    • characterInfo - entire panel showing a list of additional character info
    • faction - faction name of the character
    • class - name of the character's class if they're in one
    • money - current money the character has
    • attributes - attributes list for the character

    Note that schemas/plugins can add additional character info panels.

Example Usage

function PLUGIN:CanCreateCharacterInfo(suppress)
	suppress.attributes = true -- Hides the attributes panel from the character info tab
end

PLUGIN:CanDrawAmmoHUD(weapon)

Whether or not the ammo HUD should be drawn.

Parameters

  • weapon Entity

    Weapon the player currently is holding

Returns

  • bool

    Whether or not to draw the ammo hud

Example Usage

function PLUGIN:CanDrawAmmoHUD(weapon)
	if (weapon:GetClass() == "weapon_frag") then -- Hides the ammo hud when holding grenades.
		return false
	end
end

PLUGIN:CanPlayerAccessDoor(client, door, access)

Called when a player tries to use abilities on the door, such as locking.

Parameters

  • client Player

    The client trying something on the door.

  • door Entity

    The door entity itself.

  • access number

    The access level used when called.

Returns

  • bool

    Whether or not to allow the client access.

Example Usage

function PLUGIN:CanPlayerAccessDoor(client, door, access)
	return true -- Always allow access.
end

PLUGIN:CanPlayerCreateCharacter(client, payload)

Whether or not a player is allowed to create a new character with the given payload.

Parameters

  • client Player

    Player attempting to create a new character

  • payload table

    Data that is going to be used for creating the character

Returns

  • bool

    Whether or not the player is allowed to create the character. This function defaults to true, so you should only ever return false if you're disallowing creation. Otherwise, don't return anything as you'll prevent any other calls to this hook from running.

  • string

    Language phrase to use for the error message

  • ...

    Arguments to use for the language phrase

Example Usage

function PLUGIN:CanPlayerCreateCharacter(client, payload)
	if (!client:IsAdmin()) then
		return false, "notNow" -- only allow admins to create a character
	end
end
-- non-admins will see the message "You are not allowed to do this right now!"

PLUGIN:CanPlayerDropItem(client, item)

Whether or not a player is allowed to drop the given item.

Parameters

  • client Player

    Player attempting to drop an item

  • item number

    instance ID of the item being dropped

Returns

  • bool

    Whether or not to allow the player to drop the item

Example Usage

function PLUGIN:CanPlayerDropItem(client, item)
	return false -- Never allow dropping items.
end

PLUGIN:CanPlayerEarnSalary(client, faction)

Whether or not a player can earn money at regular intervals. This hook runs only if the player's character faction has a salary set - i.e FACTION.pay is set to something other than 0 for their faction.

Parameters

  • client Player

    Player to give money to

  • faction table

    Faction of the player's character

Returns

  • bool

    Whether or not to allow the player to earn salary

Example Usage

function PLUGIN:CanPlayerEarnSalary(client, faction)
	return client:IsAdmin() -- Restricts earning salary to admins only.
end

PLUGIN:CanPlayerEnterObserver(client)

Whether or not the player is allowed to enter observer mode. This is allowed only for admins by default and can be customized by server owners if the server is using a CAMI-compliant admin mod.

Parameters

  • client Player

    Player attempting to enter observer

Returns

  • bool

    Whether or not to allow the player to enter observer

Example Usage

function PLUGIN:CanPlayerEnterObserver(client)
	return true -- Always allow observer.
end

PLUGIN:CanPlayerEquipItem(client, item)

Whether or not a player can equip the given item. This is called for items with outfit, pacoutfit, or weapons as their base. Schemas/plugins can utilize this hook for their items.

Parameters

  • client Player

    Player attempting to equip the item

  • item table

    Item being equipped

Returns

  • bool

    Whether or not to allow the player to equip the item

Example Usage

function PLUGIN:CanPlayerEquipItem(client, item)
	return client:IsAdmin() -- Restrict equipping items to admins only.
end

See Also

PLUGIN:CanPlayerHoldObject(client, entity)

Whether or not a player is allowed to hold an entity with the hands SWEP.

Parameters

  • client Player

    Player attempting to hold an entity

  • entity Entity

    Entity being held

Returns

  • bool

    Whether or not to allow the player to hold the entity

Example Usage

function PLUGIN:CanPlayerHoldObject(client, entity)
	return !(client:GetMoveType() == MOVETYPE_NOCLIP and !client:InVehicle()) -- Disallow players in observer holding objects.
end

PLUGIN:CanPlayerInteractEntity(client, entity, option, data)

Whether or not a player is allowed to interact with an entity's interaction menu if it has one.

Parameters

  • client Player

    Player attempting interaction

  • entity Entity

    Entity being interacted with

  • option string

    Option selected by the player

  • data

    Any data passed with the interaction option

Returns

  • bool

    Whether or not to allow the player to interact with the entity

Example Usage

function PLUGIN:CanPlayerInteractEntity(client, entity, option, data)
	return false -- Disallow interacting with any entity.
end

PLUGIN:CanPlayerInteractItem(client, action, item, data)

Whether or not a player is allowed to interact with an item via an inventory action (e.g picking up, dropping, transferring inventories, etc). Note that this is for an item table, not an item entity. This is called after CanPlayerDropItem and CanPlayerTakeItem.

Parameters

  • client Player

    Player attempting interaction

  • action string

    The action being performed

  • item

    Item's instance ID or item table

  • data

    Any data passed with the action

Returns

  • bool

    Whether or not to allow the player to interact with the item

Example Usage

function PLUGIN:CanPlayerInteractItem(client, action, item, data)
	return false -- Disallow interacting with any item.
end

PLUGIN:CanPlayerJoinClass(client, class, info)

Whether or not a plyer is allowed to join a class.

Parameters

  • client Player

    Player attempting to join

  • class number

    ID of the class

  • info table

    The class table

Returns

  • bool

    Whether or not to allow the player to join the class

Example Usage

function PLUGIN:CanPlayerJoinClass(client, class, info)
	return client:IsAdmin() -- Restrict joining classes to admins only.
end

PLUGIN:CanPlayerKnock(client, entity)

Whether or not a player can knock on the door with the hands SWEP.

Parameters

  • client Player

    Player attempting to knock

  • entity Entity

    Door being knocked on

Returns

  • bool

    Whether or not to allow the player to knock on the door

Example Usage

function PLUGIN:CanPlayerKnock(client, entity)
	return false -- Disable knocking on doors outright.
end

PLUGIN:CanPlayerOpenShipment(client, entity)

Whether or not a player can open a shipment spawned from the business menu.

Parameters

  • client Player

    Player attempting to open the shipment

  • entity Entity

    Shipment entity

Returns

  • bool

    Whether or not to allow the player to open the shipment

Example Usage

function PLUGIN:CanPlayerOpenShipment(client, entity)
	return client:Team() == FACTION_BMD -- Restricts opening shipments to FACTION_BMD.
end

PLUGIN:CanPlayerSpawnContainer(client, model, entity)

Whether or not a player is allowed to spawn a container entity.

Parameters

  • client Player

    Player attempting to spawn a container

  • model string

    Model of the container being spawned

  • entity Entity

    Container entity

Returns

  • bool

    Whether or not to allow the player to spawn the container

Example Usage

function PLUGIN:CanPlayerSpawnContainer(client, model, entity)
	return client:IsAdmin() -- Restrict spawning containers to admins.
end

PLUGIN:CanPlayerTakeItem(client, item)

Whether or not a player is allowed to take an item and put it in their inventory.

Parameters

  • client Player

    Player attempting to take the item

  • item Entity

    Entity corresponding to the item

Returns

  • bool

    Whether or not to allow the player to take the item

Example Usage

function PLUGIN:CanPlayerTakeItem(client, item)
	return !(client:GetMoveType() == MOVETYPE_NOCLIP and !client:InVehicle()) -- Disallow players in observer taking items.
end

PLUGIN:CanPlayerThrowPunch(client)

Whether or not the player is allowed to punch with the hands SWEP.

Parameters

  • client Player

    Player attempting throw a punch

Returns

  • bool

    Whether or not to allow the player to punch

Example Usage

function PLUGIN:CanPlayerThrowPunch(client)
	return client:GetCharacter():GetAttribute("str", 0) > 0 -- Only allow players with strength to punch.
end

PLUGIN:CanPlayerTradeWithVendor(client, entity, uniqueID, isSellingToVendor)

Whether or not a player can trade with a vendor.

Parameters

  • client Player

    Player attempting to trade

  • uniqueID string

    The uniqueID of the item being traded.

  • isSellingToVendor boolean

    If the client is selling to the vendor

Returns

  • bool

    Whether or not to allow the client to trade with the vendor

Example Usage

function PLUGIN:CanPlayerTradeWithVendor(client, entity, uniqueID, isSellingToVendor)
	return false -- Disallow trading with vendors outright.
end

PLUGIN:CanPlayerUnequipItem(client, item)

Whether or not a player can unequip an item.

Parameters

  • client Player

    Player attempting to unequip an item

  • item table

    Item being unequipped

Returns

  • bool

    Whether or not to allow the player to unequip the item

Example Usage

function PLUGIN:CanPlayerUnequipItem(client, item)
	return false -- Disallow unequipping items.
end

See Also

PLUGIN:CanPlayerUseBusiness(client, uniqueID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • uniqueID

PLUGIN:CanPlayerUseCharacter(client, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

PLUGIN:CanPlayerUseDoor(client, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

PLUGIN:CanPlayerUseVendor(activator)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • activator

PLUGIN:CanPlayerViewInventory()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:CanSaveContainer(entity, inventory)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

  • inventory

PLUGIN:CanTransferItem(item, currentInv, oldInv)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • item

  • currentInv

  • oldInv

PLUGIN:CharacterAttributeBoosted(client, character, attribID, boostID, boostAmount)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

  • attribID

  • boostID

  • boostAmount

PLUGIN:CharacterAttributeUpdated(client, self, key, value)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • self

  • key

  • value

PLUGIN:CharacterDeleted(client, id, isCurrentChar)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • id

  • isCurrentChar

PLUGIN:CharacterHasFlags(self, flags)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • self

  • flags

PLUGIN:CharacterLoaded(character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

PLUGIN:CharacterPostSave(character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

PLUGIN:CharacterPreSave(character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

PLUGIN:CharacterRecognized()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:CharacterRestored(character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

PLUGIN:CharacterVarChanged(character, key, oldVar, value)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

  • key

  • oldVar

  • value

PLUGIN:CharacterVendorTraded(client, entity, uniqueID, isSellingToVendor)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

  • uniqueID

  • isSellingToVendor

PLUGIN:ChatboxCreated()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:ChatboxPositionChanged(x, y, width, height)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • x

  • y

  • width

  • height

PLUGIN:ColorSchemeChanged(color)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • color

PLUGIN:ContainerRemoved(container, inventory)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • container

  • inventory

PLUGIN:CreateCharacterInfo(panel)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

PLUGIN:CreateCharacterInfoCategory(panel)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

PLUGIN:CreateItemInteractionMenu(icon, menu, itemTable)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • icon

  • menu

  • itemTable

PLUGIN:CreateMenuButtons(tabs)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • tabs

PLUGIN:CreateShipment(client, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

PLUGIN:DatabaseConnected()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:DatabaseConnectionFailed(error)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • error

PLUGIN:DoPluginIncludes(path, pluginTable)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • path

  • pluginTable

PLUGIN:DrawCharacterOverview()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:DrawHelixModelView(panel, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

  • entity

PLUGIN:DrawPlayerRagdoll(entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

PLUGIN:GetCharacterDescription(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:GetCharacterName(speaker, chatType)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • speaker

  • chatType

PLUGIN:GetChatPrefixInfo(text)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • text

PLUGIN:GetCrosshairAlpha(curAlpha)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • curAlpha

PLUGIN:GetDefaultAttributePoints(client, count)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • count

PLUGIN:GetDefaultCharacterName(client, faction)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • faction

PLUGIN:GetMaxPlayerCharacter(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:GetPlayerDeathSound(client)

Returns the sound to emit from the player upon death. If nothing is returned then it will use the default male/female death sounds.

Parameters

  • client Player

    Player that died

Returns

  • string

    Sound to play

  • OR
  • bool

    false if a sound shouldn't be played at all

Example Usage

function PLUGIN:GetPlayerDeathSound(client)
	-- play impact sound every time someone dies
	return "physics/body/body_medium_impact_hard1.wav"
end
function PLUGIN:GetPlayerDeathSound(client)
	-- don't play a sound at all
	return false
end

PLUGIN:GetPlayerEntityMenu(client, options)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • options

PLUGIN:GetPlayerIcon(speaker)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • speaker

PLUGIN:GetPlayerPainSound(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:GetPlayerPunchDamage(client, damage, context)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • damage

  • context

PLUGIN:GetSalaryAmount(client, faction)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • faction

PLUGIN:GetTypingIndicator(character, text)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

  • text

PLUGIN:InitializedChatClasses()

Registers chat classes after the core framework chat classes have been registered. You should usually create your chat classes in this hook - especially if you want to reference the properties of a framework chat class.

Example Usage

function PLUGIN:InitializedChatClasses()
	-- let's say you wanted to reference an existing chat class's color
	ix.chat.Register("myclass", {
		format = "%s says \"%s\"",
		GetColor = function(self, speaker, text)
			-- make the chat class slightly brighter than the "ic" chat class
			local color = ix.chat.classes.ic:GetColor(speaker, text)

			return Color(color.r + 35, color.g + 35, color.b + 35)
		end,
		-- etc.
	})
end

See Also

PLUGIN:InitializedConfig()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:InitializedPlugins()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:InitializedSchema()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:InventoryItemAdded(oldInv, inventory, item)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • oldInv

  • inventory

  • item

PLUGIN:InventoryItemRemoved(inventory, item)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • inventory

  • item

PLUGIN:IsCharacterRecognized(character, id)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • character

  • id

PLUGIN:IsPlayerRecognized(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:IsRecognizedChatType(chatType)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • chatType

PLUGIN:LoadData()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:LoadFonts(font, genericFont)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • font

  • genericFont

PLUGIN:LoadIntro()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:MenuSubpanelCreated(subpanelName, panel)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • subpanelName

  • panel

PLUGIN:MessageReceived(client, info)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • info

PLUGIN:OnAreaChanged(oldID, newID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • oldID

  • newID

PLUGIN:OnCharacterCreated(client, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

PLUGIN:OnCharacterDisconnect(client, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

PLUGIN:OnCharacterFallover(client, entity, bFallenOver)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

  • bFallenOver

PLUGIN:OnCharacterGetup(client, ragdoll)

Called when a character has gotten up from the ground.

Parameters

  • client Player

    Player that has gotten up

  • ragdoll Entity

    Ragdoll used to represent the player

PLUGIN:OnCharacterMenuCreated(panel)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

PLUGIN:OnItemSpawned(entity)

Called whenever an item entity has spawned in the world. You can access the entity's item table with entity:GetItemTable().

Parameters

  • entity Entity

    Spawned item entity

Example Usage

function PLUGIN:OnItemSpawned(entity)
	local item = entity:GetItemTable()
	-- do something with the item here
end

PLUGIN:OnItemTransferred(item, curInv, inventory)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • item

  • curInv

  • inventory

PLUGIN:OnLocalVarSet(key, var)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • key

  • var

PLUGIN:OnPAC3PartTransferred(part)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • part

PLUGIN:OnPickupMoney(client, self)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • self

PLUGIN:OnPlayerAreaChanged(client, oldID, newID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • oldID

  • newID

PLUGIN:OnPlayerObserve(client, state)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • state

PLUGIN:OnPlayerOptionSelected(client, callingClient, option)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • callingClient

  • option

PLUGIN:OnPlayerPurchaseDoor(client, entity, bBuying, bCallOnDoorChild)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

  • bBuying

  • bCallOnDoorChild

PLUGIN:OnPlayerRestricted(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:OnPlayerUnRestricted(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:OnSavedItemLoaded(loadedItems)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • loadedItems

PLUGIN:OnWipeTables()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:PlayerEnterSequence(client, sequence, callback, time, bNoFreeze)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • sequence

  • callback

  • time

  • bNoFreeze

PLUGIN:PlayerInteractEntity(client, entity, option, data)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

  • option

  • data

PLUGIN:PlayerInteractItem(client, action, item)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • action

  • item

PLUGIN:PlayerJoinedClass(client, class, oldClass)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • class

  • oldClass

PLUGIN:PlayerLeaveSequence(entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

PLUGIN:PlayerLoadedCharacter(client, character, currentChar)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

  • currentChar

PLUGIN:PlayerLockedDoor(client, door, partner)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • door

  • partner

PLUGIN:PlayerLockedVehicle(client, vehicle)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • vehicle

PLUGIN:PlayerMessageSend(speaker, chatType, text, anonymous, receivers, rawText)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • speaker

  • chatType

  • text

  • anonymous

  • receivers

  • rawText

PLUGIN:PlayerModelChanged(client, model)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • model

PLUGIN:PlayerStaminaGained(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:PlayerStaminaLost(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:PlayerThrowPunch(client, trace)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • trace

PLUGIN:PlayerUnlockedDoor(client, door, partner)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • door

  • partner

PLUGIN:PlayerUnlockedVehicle(client, door)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • door

PLUGIN:PlayerUse(client, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

PLUGIN:PlayerUseDoor(client, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • entity

PLUGIN:PlayerWeaponChanged(client, weapon)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • weapon

PLUGIN:PluginLoaded(uniqueID, pluginTable)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • uniqueID

  • pluginTable

PLUGIN:PluginShouldLoad(uniqueID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • uniqueID

PLUGIN:PluginUnloaded(uniqueID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • uniqueID

PLUGIN:PopulateCharacterInfo(client, character, tooltip)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

  • tooltip

PLUGIN:PopulateEntityInfo(entity, tooltip)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

  • tooltip

PLUGIN:PopulateHelpMenu(categories)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • categories

PLUGIN:PopulateImportantCharacterInfo(entity, character, tooltip)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

  • character

  • tooltip

PLUGIN:PopulateItemTooltip(tooltip, item)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • tooltip

  • item

PLUGIN:PopulatePlayerTooltip(client, tooltip)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • tooltip

PLUGIN:PopulateScoreboardPlayerMenu(client, menu)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • menu

PLUGIN:PostChatboxDraw(width, height, alpha)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • width

  • height

  • alpha

PLUGIN:PostDrawHelixModelView(panel, entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

  • entity

PLUGIN:PostDrawInventory(panel)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

PLUGIN:PostLoadData()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:PostPlayerLoadout(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:PostPlayerSay(client, chatType, message, anonymous)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • chatType

  • message

  • anonymous

PLUGIN:PostSetupActs()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:PreCharacterDeleted(client, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

PLUGIN:PrePlayerLoadedCharacter(client, character, currentChar)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • character

  • currentChar

PLUGIN:PrePlayerMessageSend(client, chatType, message, bAnonymous)

Called before a message sent by a player is processed to be sent to other players - i.e this is ran as early as possible and before things like the auto chat formatting. Can be used to prevent the message from being sent at all.

Parameters

  • client Player

    Player sending the message

  • chatType string

    Chat class of the message

  • message string

    Contents of the message

  • bAnonymous boolean

    Whether or not the player is sending the message anonymously

Returns

  • bool

    Whether or not to prevent the message from being sent

Example Usage

function PLUGIN:PrePlayerMessageSend(client, chatType, message, bAnonymous)
	if (!client:IsAdmin()) then
		return false -- only allow admins to talk in chat
	end
end

PLUGIN:SaveData()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:ScreenResolutionChanged(width, height)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • width

  • height

PLUGIN:SetupActs()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:SetupAreaProperties()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:ShipmentItemTaken(client, uniqueID, amount)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • uniqueID

  • amount

PLUGIN:ShouldBarDraw(bar)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • bar

PLUGIN:ShouldDeleteSavedItems()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:ShouldDisplayArea(newID)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • newID

PLUGIN:ShouldDrawCrosshair(client, weapon)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

  • weapon

PLUGIN:ShouldDrawItemSize(item)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • item

PLUGIN:ShouldHideBars()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:ShouldPermakillCharacter(client, character, inflictor, attacker)

Whether or not a character should be permakilled upon death. This is only called if the permakill server config is enabled.

Parameters

  • client Player

    Player to permakill

  • character Character

    Player's current character

  • inflictor Entity

    Entity that inflicted the killing blow

  • attacker Entity

    Other player or entity that killed the player

Returns

  • bool

    false if the player should not be permakilled

Example Usage

function PLUGIN:ShouldPermakillCharacter(client, character, inflictor, attacker)
		if (client:IsAdmin()) then
			return false -- all non-admin players will have their character permakilled
		end
	end

PLUGIN:ShouldPlayerDrowned(v)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • v

PLUGIN:ShouldRemoveRagdollOnDeath(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:ShouldRestoreInventory(characterID, inventoryID, inventoryType)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • characterID

  • inventoryID

  • inventoryType

PLUGIN:ShouldShowPlayerOnScoreboard(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:ShouldSpawnClientRagdoll(client)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • client

PLUGIN:ShowEntityMenu(entity)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • entity

PLUGIN:ThirdPersonToggled(oldValue, value)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • oldValue

  • value

PLUGIN:UpdateCharacterInfo(panel, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

  • character

PLUGIN:UpdateCharacterInfoCategory(panel, character)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • panel

  • character

PLUGIN:VoiceDistanceChanged(newValue)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • newValue

PLUGIN:WeaponCycleSound()

Incomplete

Documentation for this section is incomplete and needs expanding.

PLUGIN:WeaponSelectSound(weapon)

Incomplete

Documentation for this section is incomplete and needs expanding.

Parameters

  • weapon