-
Couldn't load subscription status.
- Fork 77
Hooks
In any gamemode, they uses pretty much hook. Since Nutscript is Open-Sourced Framework Project, NutScript has plenty of hooks to use. This list of hooks displaying what hooks NutScript is currently using, requesting.
You may find some of hooks are useful for your plugin/schema, You may find some interesting hook to test it out. I tried to provide more information about NutScript's hook to make you add some stuffs without testing how the hook is working.
If there is missing/weak information about certain hook, Feel free to notify us via Steam or GitHub.
-
boolean OnPickupMoney
Entity ActivatorMoney Entity
If the hook returns false, player can’t pickup the money. -
boolean "CanPlayerThrowPunch"
Punching Player
If the hook returns false, player can’t do punch attack. -
float "PlayerGetFistDamage"
Punching PlayerOriginal Damage
Gets the fist’s damage. -
void "PlayerThrowPunch"
Punching PlayerPunch Trace
This hook get fired when the player done with his/her punch damage. -
boolean "PlayerCanKnock"
Knocking PlayerKnocked Entity
If the hook returns false, player can’t knock the door. -
boolean "PlayerCanOpenShipment"
Shipment Opening PlayerShipment Entity
If the hook returns false, player can’t open the shipment. -
boolean "CanPlayerUseDoor"
Interacting PlayerInteracted Entity
If the hook returns false, player can’t interact with the door. -
void "PlayerUseDoor"
Interacting PlayerInteracted Entity
This hook is called when player uses the door. -
void "PlayerUse"
Interacting PlayerInteracted Entity
This hook is called when player pressed use key on the entity. -
boolean "CanPlayerDropItem"
Item's Owner(Player)Dropped Item Object
If the hook returns false, player can’t drop the item. -
string "PlayerMessageSend"
Message Sender(Player)Chat TypeMessageIs Anonymous?
This hook gets the text of the message that other player sent. -
void "PostPlayerSay"
Spoken PlayerMessageChat TypeIs Anonymous?
This hook is called when player spoken a word. -
void "PostPlayerLoadout"
Spawned Player
This hook is called right after “PlayerLoadout” hook is called. -
string "GetPlayerDeathSound"
Died Player
This hook gets the sound’s path for player’s death sound. -
string "GetPlayerPainSound"
Injured Player
This hook gets the sound’s path for player’s pain moaning sound. -
void "LoadData"
This hook is called when server loads the data. -
void "SaveData"
This hook is called when server is saves the data. -
void "OnPlayerEnterSequence"
Acting PlayerRequested SequenceFunction CallbackSequence TimeNot Stationary?This hook is called when player is performing the sequence. -
void "OnPlayerLeaveSequence"
Acted Player
This hook is called when player is done performing the sequence. -
boolean "CanPlayerUseBusiness"
PlayerItem ID
If the hook returns false, player can’t use the business menu. -
void "OnPlayerUseBusiness"
PlayerPurchased Item
This hook is called when player used the business menu. -
void "OnCreateShipment"
PlayerOrdered Shipment Entity
This hook is called when player ordered a shopment from the shipment menu. -
void "CharacterRestored"
Restored Character Index
This hook is called when player’s character is restored from character cache. -
string "GetDefaultCharName"
Character Owner PlayerFaction Data
This hook gets the default character’s name of the faction. -
boolean "CanPlayerUseChar"
Character Owner PlayerCharacter Index
If the hook returns false, player can’t use the character. -
void "PlayerLoadedChar"
PlayerLoading Character IndexPrevious(Current) Character
This hook is called when player loaded the character. -
void "AdjustCreationData"
PlayerPrevious DataNew Data
This hook is called when player created the character. You can use this hook to modify default character’s data. -
void "OnCharDelete"
PlayerCharacter IDIs Current Character?
This hook is called when player deletes his/her own character. -
void "OnCharVarChanged"
Character IndexKeyPrevious VariableChanged Variable
This hook is called when the variable of character is changed by the server. -
string "OnChatReceived"
PlayerChat TypeMessageIs Anonymous?
This hook is called when the player received the chat. -
string "GetPlayerIcon"
Speaking Player
This hook gets the OOC chat’s icon of the speaker. -
void "OnPlayerJoinClass"
Joining PlayerClass ID
This hook is called when player joins to certain class. -
boolean "CanPlayerInteractItem"
Interacting PlayerAction IDItem Object
If the hook returns false, player can’t interact with item. (In any form) -
boolean "PluginShouldLoad"
Plugin IDIf the hook returns false, server does not load the plugin. -
void "DoPluginIncludes" path, PLUGIN
This hook is called when the server includes the plugins lua data. -
void "PluginLoaded" uniqueID, PLUGIN
This hook is called when the server loaded the plugins -
void “InitializedSchema”
This hook is called when the server’s schema is initialized. -
void "InitializedPlugins"
This hook is called when the server’s plugings are initialized. -
void "PluginUnloaded" uniqueID
This hook is called when the plugin is unloaded. -
boolean "CharacterPreSave"
Saving Character Index
This hook is called right before character is saved. -
void "CharacterPostSave"
Saved Character Index
This hook is called after the character is saved. -
void "InitializedConfig"
Confing Data
This hook is called when the server/client initialized the config. -
void "OnCharFallover"
Falling PlayerFallover Ragdoll ObjectIs Entering?
This hook is called when the player performed /fallover. -
boolean "ShouldCleanDataItems"
If the hook returns false, the server does not clean data items. -
void "OnPlayerAreaChanged"
PlayerAreaID
This hook is called when the player’s area data is changed. -
boolean "CanDisplayArea"
If the hook returns false, area display will be disabled. -
void "FinishChat"
This hook is called right after the player finished the chat. -
void "ChatTextChanged"
Chat Text
This hook is called when the text in chat input is changed. -
void "StartChat"
This hook is called when player starts the chat. -
void "PlayerSay"
PlayerChat Text
This hook is called when player said the word. -
boolean "CanPlayerAccessDoor"
PlayerDoor EntityAccess
If the hook returns false, player can’t interact with the door. -
boolean "IsRecognizedChatType"
Chat Type
If the hook returns false, player will get description of the speaker’s character not the name of the speaker. -
void "StorageItemRemoved"
Storage EntityItem Object
This hook is called when the item in the storage is removed. -
boolean "CanPlayerUseVendor"
PlayerVendor Entity
If the hook returns false, the player can’t use the vendor. -
boolean "CanVendorSellItem"
PlayerVendor EntityItem ID
If the hook returns false, the player can’t sell item to the vendor. -
boolean "CanVendorBuyItem"
PlayerVendor EntityItem ID
If the hook returns false, the player can’t buy item to the vendor. -
void "OnCharTradeVendor"
PlayerVendor EntityXYBag IDPrice
This hook is called when player traded an item with the trader.
-
void "LoadFonts"
Font's Name
This hook get fired when the script loads the font. -
void "BuildHelpMenu"
Panel Object
The developer can use this hook to build the help menu. -
void "CreateCharInfoText"
Panel Object
The developer can use this hook to add more information on F1 screen. -
void "CreateCharInfo"
Panel Object
The developer can use this hook to add more information on F1 screen. -
void "OnCharInfoSetup"
Panel Object
The developer can use this hook to add more information on F1 screen. -
void "CreateMenuButtons"
Panel Object
The developer can use this hook to build main menu buttons. -
void "ShowPlayerOptions"
PlayerPanel Object
This hook is called when player pressed character’s avatar in scoreboard. -
void "LoadIntro"
This hook is called before character menu is created. -
void "DrawEntityInfo"
Target EntityDrawing Alpha
The developer can use this hook to display/draw something on screen when player is looking at the entity. -
float "AdjustBlurAmount"
Blur Goal
The developer can adjust screen’s blur with this hook. -
string "GetDisplayedName"
Target Entity
This hook gets the name of the entity’s name. -
void "ItemShowEntityMenu"
Target Entity
This hook is called when player press E on the item. -
string "WeaponCycleSound"
This hook gets the sound’s path for cycling the weapon. -
string "WeaponSelectSound"
This hook gets the sound’s path for selecting the weapon.
-
void "CharacterLoaded"
Loaded Character Index
This hook get fired when the player loaded his/her character. -
void "PlayerStaminaLost"
Player
This hook is called when player lost his/her stamina. -
boolean "StorageCanTransfer"
Inventory IDPlayerOld XOld YNew XNew YNew Inventory ID
If the hook returns false, the player can’t transfer item to the storage.