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 timename
- name of the characterdescription
- description of the charactercharacterInfo
- entire panel showing a list of additional character infofaction
- faction name of the characterclass
- name of the character's class if they're in onemoney
- current money the character hasattributes
- 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:CanPlayerCombineItem(client, item, other)
Whether or not a player is allowed to combine an item other
into the given item
.
Parameters
-
client
Player
Player attempting to combine an item into another
-
item
number
instance ID of the item being dropped onto
-
other
number
instance ID of the item being combined into the first item, this can be invalid due to it being from clientside
Returns
-
bool
Whether or not to allow the player to combine the items
Example Usage
function PLUGIN:CanPlayerCombineItem(client, item, other)
local otherItem = ix.item.instances[other]
if (otherItem and otherItem.uniqueID == "soda") then
return false -- disallow combining any item that has a uniqueID equal to `soda`
end
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 returnfalse
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
-
entity
Entity
Vendor entity
-
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)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
uniqueID
PLUGIN:CanPlayerUseCharacter(client, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
PLUGIN:CanPlayerUseDoor(client, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
PLUGIN:CanPlayerUseVendor(activator)
Documentation for this section is incomplete and needs expanding.
Parameters
-
activator
PLUGIN:CanPlayerViewInventory()
Documentation for this section is incomplete and needs expanding.
PLUGIN:CanSaveContainer(entity, inventory)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
-
inventory
PLUGIN:CanTransferItem(item, currentInv, oldInv)
Documentation for this section is incomplete and needs expanding.
Parameters
-
item
-
currentInv
-
oldInv
PLUGIN:CharacterAttributeBoosted(client, character, attribID, boostID, boostAmount)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
-
attribID
-
boostID
-
boostAmount
PLUGIN:CharacterAttributeUpdated(client, self, key, value)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
self
-
key
-
value
PLUGIN:CharacterDeleted(client, id, isCurrentChar)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
id
-
isCurrentChar
PLUGIN:CharacterHasFlags(self, flags)
Documentation for this section is incomplete and needs expanding.
Parameters
-
self
-
flags
PLUGIN:CharacterLoaded(character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
PLUGIN:CharacterPostSave(character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
PLUGIN:CharacterPreSave(character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
PLUGIN:CharacterRecognized()
Documentation for this section is incomplete and needs expanding.
PLUGIN:CharacterRestored(character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
PLUGIN:CharacterVarChanged(character, key, oldVar, value)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
-
key
-
oldVar
-
value
PLUGIN:CharacterVendorTraded(client, entity, uniqueID, isSellingToVendor)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
-
uniqueID
-
isSellingToVendor
PLUGIN:ChatboxCreated()
Documentation for this section is incomplete and needs expanding.
PLUGIN:ChatboxPositionChanged(x, y, width, height)
Documentation for this section is incomplete and needs expanding.
Parameters
-
x
-
y
-
width
-
height
PLUGIN:ColorSchemeChanged(color)
Documentation for this section is incomplete and needs expanding.
Parameters
-
color
PLUGIN:ContainerRemoved(container, inventory)
Documentation for this section is incomplete and needs expanding.
Parameters
-
container
-
inventory
PLUGIN:CreateCharacterInfo(panel)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
PLUGIN:CreateCharacterInfoCategory(panel)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
PLUGIN:CreateItemInteractionMenu(icon, menu, itemTable)
Documentation for this section is incomplete and needs expanding.
Parameters
-
icon
-
menu
-
itemTable
PLUGIN:CreateMenuButtons(tabs)
Documentation for this section is incomplete and needs expanding.
Parameters
-
tabs
PLUGIN:CreateShipment(client, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
PLUGIN:DatabaseConnected()
Documentation for this section is incomplete and needs expanding.
PLUGIN:DatabaseConnectionFailed(error)
Documentation for this section is incomplete and needs expanding.
Parameters
-
error
PLUGIN:DoPluginIncludes(path, pluginTable)
Documentation for this section is incomplete and needs expanding.
Parameters
-
path
-
pluginTable
PLUGIN:DrawCharacterOverview()
Documentation for this section is incomplete and needs expanding.
PLUGIN:DrawHelixModelView(panel, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
-
entity
PLUGIN:DrawPlayerRagdoll(entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
PLUGIN:GetCharacterDescription(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:GetCharacterName(speaker, chatType)
Documentation for this section is incomplete and needs expanding.
Parameters
-
speaker
-
chatType
PLUGIN:GetChatPrefixInfo(text)
Documentation for this section is incomplete and needs expanding.
Parameters
-
text
PLUGIN:GetCrosshairAlpha(curAlpha)
Documentation for this section is incomplete and needs expanding.
Parameters
-
curAlpha
PLUGIN:GetDefaultAttributePoints(client, count)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
count
PLUGIN:GetDefaultCharacterName(client, faction)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
faction
PLUGIN:GetMaxPlayerCharacter(client)
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
-
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)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
options
PLUGIN:GetPlayerIcon(speaker)
Documentation for this section is incomplete and needs expanding.
Parameters
-
speaker
PLUGIN:GetPlayerPainSound(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:GetPlayerPunchDamage(client, damage, context)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
damage
-
context
PLUGIN:GetSalaryAmount(client, faction)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
faction
PLUGIN:GetTypingIndicator(character, text)
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()
Documentation for this section is incomplete and needs expanding.
PLUGIN:InitializedPlugins()
Documentation for this section is incomplete and needs expanding.
PLUGIN:InitializedSchema()
Documentation for this section is incomplete and needs expanding.
PLUGIN:InventoryItemAdded(oldInv, inventory, item)
Documentation for this section is incomplete and needs expanding.
Parameters
-
oldInv
-
inventory
-
item
PLUGIN:InventoryItemRemoved(inventory, item)
Documentation for this section is incomplete and needs expanding.
Parameters
-
inventory
-
item
PLUGIN:IsCharacterRecognized(character, id)
Documentation for this section is incomplete and needs expanding.
Parameters
-
character
-
id
PLUGIN:IsPlayerRecognized(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:IsRecognizedChatType(chatType)
Documentation for this section is incomplete and needs expanding.
Parameters
-
chatType
PLUGIN:LoadData()
Documentation for this section is incomplete and needs expanding.
PLUGIN:LoadFonts(font, genericFont)
Documentation for this section is incomplete and needs expanding.
Parameters
-
font
-
genericFont
PLUGIN:LoadIntro()
Documentation for this section is incomplete and needs expanding.
PLUGIN:MenuSubpanelCreated(subpanelName, panel)
Documentation for this section is incomplete and needs expanding.
Parameters
-
subpanelName
-
panel
PLUGIN:MessageReceived(client, info)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
info
PLUGIN:OnAreaChanged(oldID, newID)
Documentation for this section is incomplete and needs expanding.
Parameters
-
oldID
-
newID
PLUGIN:OnCharacterCreated(client, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
PLUGIN:OnCharacterDisconnect(client, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
PLUGIN:OnCharacterFallover(client, entity, bFallenOver)
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)
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)
Documentation for this section is incomplete and needs expanding.
Parameters
-
item
-
curInv
-
inventory
PLUGIN:OnLocalVarSet(key, var)
Documentation for this section is incomplete and needs expanding.
Parameters
-
key
-
var
PLUGIN:OnPAC3PartTransferred(part)
Documentation for this section is incomplete and needs expanding.
Parameters
-
part
PLUGIN:OnPickupMoney(client, self)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
self
PLUGIN:OnPlayerAreaChanged(client, oldID, newID)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
oldID
-
newID
PLUGIN:OnPlayerObserve(client, state)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
state
PLUGIN:OnPlayerOptionSelected(client, callingClient, option)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
callingClient
-
option
PLUGIN:OnPlayerPurchaseDoor(client, entity, bBuying, bCallOnDoorChild)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
-
bBuying
-
bCallOnDoorChild
PLUGIN:OnPlayerRestricted(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:OnPlayerUnRestricted(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:OnSavedItemLoaded(loadedItems)
Documentation for this section is incomplete and needs expanding.
Parameters
-
loadedItems
PLUGIN:OnWipeTables()
Documentation for this section is incomplete and needs expanding.
PLUGIN:PlayerEnterSequence(client, sequence, callback, time, bNoFreeze)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
sequence
-
callback
-
time
-
bNoFreeze
PLUGIN:PlayerInteractEntity(client, entity, option, data)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
-
option
-
data
PLUGIN:PlayerInteractItem(client, action, item)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
action
-
item
PLUGIN:PlayerJoinedClass(client, class, oldClass)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
class
-
oldClass
PLUGIN:PlayerLeaveSequence(entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
PLUGIN:PlayerLoadedCharacter(client, character, currentChar)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
-
currentChar
PLUGIN:PlayerLockedDoor(client, door, partner)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
door
-
partner
PLUGIN:PlayerLockedVehicle(client, vehicle)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
vehicle
PLUGIN:PlayerMessageSend(speaker, chatType, text, anonymous, receivers, rawText)
Documentation for this section is incomplete and needs expanding.
Parameters
-
speaker
-
chatType
-
text
-
anonymous
-
receivers
-
rawText
PLUGIN:PlayerModelChanged(client, model)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
model
PLUGIN:PlayerStaminaGained(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:PlayerStaminaLost(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:PlayerThrowPunch(client, trace)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
trace
PLUGIN:PlayerUnlockedDoor(client, door, partner)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
door
-
partner
PLUGIN:PlayerUnlockedVehicle(client, door)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
door
PLUGIN:PlayerUse(client, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
PLUGIN:PlayerUseDoor(client, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
entity
PLUGIN:PlayerWeaponChanged(client, weapon)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
weapon
PLUGIN:PluginLoaded(uniqueID, pluginTable)
Documentation for this section is incomplete and needs expanding.
Parameters
-
uniqueID
-
pluginTable
PLUGIN:PluginShouldLoad(uniqueID)
Documentation for this section is incomplete and needs expanding.
Parameters
-
uniqueID
PLUGIN:PluginUnloaded(uniqueID)
Documentation for this section is incomplete and needs expanding.
Parameters
-
uniqueID
PLUGIN:PopulateCharacterInfo(client, character, tooltip)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
-
tooltip
PLUGIN:PopulateEntityInfo(entity, tooltip)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
-
tooltip
PLUGIN:PopulateHelpMenu(categories)
Documentation for this section is incomplete and needs expanding.
Parameters
-
categories
PLUGIN:PopulateImportantCharacterInfo(entity, character, tooltip)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
-
character
-
tooltip
PLUGIN:PopulateItemTooltip(tooltip, item)
Documentation for this section is incomplete and needs expanding.
Parameters
-
tooltip
-
item
PLUGIN:PopulatePlayerTooltip(client, tooltip)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
tooltip
PLUGIN:PopulateScoreboardPlayerMenu(client, menu)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
menu
PLUGIN:PostChatboxDraw(width, height, alpha)
Documentation for this section is incomplete and needs expanding.
Parameters
-
width
-
height
-
alpha
PLUGIN:PostDrawHelixModelView(panel, entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
-
entity
PLUGIN:PostDrawInventory(panel)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
PLUGIN:PostLoadData()
Documentation for this section is incomplete and needs expanding.
PLUGIN:PostPlayerLoadout(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:PostPlayerSay(client, chatType, message, anonymous)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
chatType
-
message
-
anonymous
PLUGIN:PostSetupActs()
Documentation for this section is incomplete and needs expanding.
PLUGIN:PreCharacterDeleted(client, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
character
PLUGIN:PrePlayerLoadedCharacter(client, character, currentChar)
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()
Documentation for this section is incomplete and needs expanding.
PLUGIN:ScreenResolutionChanged(width, height)
Documentation for this section is incomplete and needs expanding.
Parameters
-
width
-
height
PLUGIN:SetupActs()
Documentation for this section is incomplete and needs expanding.
PLUGIN:SetupAreaProperties()
Documentation for this section is incomplete and needs expanding.
PLUGIN:ShipmentItemTaken(client, uniqueID, amount)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
uniqueID
-
amount
PLUGIN:ShouldBarDraw(bar)
Documentation for this section is incomplete and needs expanding.
Parameters
-
bar
PLUGIN:ShouldDeleteSavedItems()
Documentation for this section is incomplete and needs expanding.
PLUGIN:ShouldDisplayArea(newID)
Documentation for this section is incomplete and needs expanding.
Parameters
-
newID
PLUGIN:ShouldDrawCrosshair(client, weapon)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
-
weapon
PLUGIN:ShouldDrawItemSize(item)
Documentation for this section is incomplete and needs expanding.
Parameters
-
item
PLUGIN:ShouldHideBars()
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)
Documentation for this section is incomplete and needs expanding.
Parameters
-
v
PLUGIN:ShouldRemoveRagdollOnDeath(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:ShouldRestoreInventory(characterID, inventoryID, inventoryType)
Documentation for this section is incomplete and needs expanding.
Parameters
-
characterID
-
inventoryID
-
inventoryType
PLUGIN:ShouldShowPlayerOnScoreboard(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:ShouldSpawnClientRagdoll(client)
Documentation for this section is incomplete and needs expanding.
Parameters
-
client
PLUGIN:ShowEntityMenu(entity)
Documentation for this section is incomplete and needs expanding.
Parameters
-
entity
PLUGIN:ThirdPersonToggled(oldValue, value)
Documentation for this section is incomplete and needs expanding.
Parameters
-
oldValue
-
value
PLUGIN:UpdateCharacterInfo(panel, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
-
character
PLUGIN:UpdateCharacterInfoCategory(panel, character)
Documentation for this section is incomplete and needs expanding.
Parameters
-
panel
-
character
PLUGIN:VoiceDistanceChanged(newValue)
Documentation for this section is incomplete and needs expanding.
Parameters
-
newValue
PLUGIN:WeaponCycleSound()
Documentation for this section is incomplete and needs expanding.
PLUGIN:WeaponSelectSound(weapon)
Documentation for this section is incomplete and needs expanding.
Parameters
-
weapon