UNPKG

@plugify-plugins/s2sdk-types

Version:

generated typescript types to write plugins on plugify

1,859 lines (1,495 loc) 327 kB
declare module ":s2sdk" { /** * @description Enum representing the possible teams in Counter-Strike. */ export enum CSTeam { /** * @description No team. * */ None = 0, /** * @description Spectator team. * */ Spectator = 1, /** * @description Terrorist team. * */ T = 2, /** * @description Counter-Terrorist team. * */ CT = 3 } /** * @description Enum representing various flags for ConVars and ConCommands. */ export enum ConVarFlag { /** * @description The default, no flags at all. * */ None = 0, /** * @description Linked to a ConCommand. * */ LinkedConcommand = 1, /** * @description Hidden in released products. Automatically removed if ALLOW_DEVELOPMENT_CVARS is defined. * */ DevelopmentOnly = 2, /** * @description Defined by the game DLL. * */ GameDll = 4, /** * @description Defined by the client DLL. * */ ClientDll = 8, /** * @description Hidden. Doesn't appear in find or auto-complete. Like DEVELOPMENTONLY but cannot be compiled out. * */ Hidden = 16, /** * @description Server cvar; data is not sent since it's sensitive (e.g., passwords). * */ Protected = 32, /** * @description This cvar cannot be changed by clients connected to a multiplayer server. * */ SpOnly = 64, /** * @description Saved to vars.rc. * */ Archive = 128, /** * @description Notifies players when changed. * */ Notify = 256, /** * @description Changes the client's info string. * */ UserInfo = 512, /** * @description Hides the cvar from lookups. * */ Missing0 = 1024, /** * @description If this is a server cvar, changes are not logged to the file or console. * */ Unlogged = 2048, /** * @description Hides the cvar from lookups. * */ Missing1 = 4096, /** * @description Server-enforced setting on clients. * */ Replicated = 8192, /** * @description Only usable in singleplayer/debug or multiplayer with sv_cheats. * */ Cheat = 16384, /** * @description Causes auto-generated varnameN for splitscreen slots. * */ PerUser = 32768, /** * @description Records this cvar when starting a demo file. * */ Demo = 65536, /** * @description Excluded from demo files. * */ DontRecord = 131072, /** * @description Reserved for future use. * */ Missing2 = 262144, /** * @description Cvars tagged with this are available to customers. * */ Release = 524288, /** * @description Marks the cvar as a menu bar item. * */ MenuBarItem = 1048576, /** * @description Reserved for future use. * */ Missing3 = 2097152, /** * @description Cannot be changed by a client connected to a server. * */ NotConnected = 4194304, /** * @description Enables fuzzy matching for vconsole. * */ VconsoleFuzzyMatching = 8388608, /** * @description The server can execute this command on clients. * */ ServerCanExecute = 16777216, /** * @description Allows clients to execute this command. * */ ClientCanExecute = 33554432, /** * @description The server cannot query this cvar's value. * */ ServerCannotQuery = 67108864, /** * @description Sets focus in the vconsole. * */ VconsoleSetFocus = 134217728, /** * @description IVEngineClient::ClientCmd can execute this command. * */ ClientCmdCanExecute = 268435456, /** * @description Executes the cvar every tick. * */ ExecutePerTick = 536870912 } /** * @description Enum representing the possible results of an operation. */ export enum ResultType { /** * @description The action continues to be processed without interruption. * */ Continue = 0, /** * @description Indicates that the action has altered the state or behavior during execution. * */ Changed = 1, /** * @description The action has been successfully handled, and no further action is required. * */ Handled = 2, /** * @description The action processing is halted, and no further steps will be executed. * */ Stop = 3 } /** * @description Enum representing the type of callback. */ export enum HookMode { /** * @description Callback will be executed before the original function * */ Pre = 0, /** * @description Callback will be executed after the original function * */ Post = 1 } /** * @description undefined */ export enum ConVarType { /** * @description Invalid type * */ Invalid = -1, /** * @description Boolean type * */ Bool = 0, /** * @description 16-bit signed integer * */ Int16 = 1, /** * @description 16-bit unsigned integer * */ UInt16 = 2, /** * @description 32-bit signed integer * */ Int32 = 3, /** * @description 32-bit unsigned integer * */ UInt32 = 4, /** * @description 64-bit signed integer * */ Int64 = 5, /** * @description 64-bit unsigned integer * */ UInt64 = 6, /** * @description 32-bit floating point * */ Float32 = 7, /** * @description 64-bit floating point (double) * */ Float64 = 8, /** * @description String type * */ String = 9, /** * @description Color type * */ Color = 10, /** * @description 2D vector * */ Vector2 = 11, /** * @description 3D vector * */ Vector3 = 12, /** * @description 4D vector * */ Vector4 = 13, /** * @description Quaternion angle * */ Qangle = 14, /** * @description Maximum value (used for bounds checking) * */ Max = 15 } /** * @description Enum representing various movement types for entities. */ export enum MoveType { /** * @description Never moves. * */ None = 0, /** * @description Previously isometric movement type. * */ Isometric = 1, /** * @description Player only - moving on the ground. * */ Walk = 2, /** * @description No gravity, but still collides with stuff. * */ Fly = 3, /** * @description Flies through the air and is affected by gravity. * */ Flygravity = 4, /** * @description Uses VPHYSICS for simulation. * */ Vphysics = 5, /** * @description No clip to world, push and crush. * */ Push = 6, /** * @description No gravity, no collisions, still has velocity/avelocity. * */ Noclip = 7, /** * @description Used by players only when going onto a ladder. * */ Ladder = 8, /** * @description Observer movement, depends on player's observer mode. * */ Observer = 9, /** * @description Allows the entity to describe its own physics. * */ Custom = 10 } /** * @description Enum representing rendering modes for materials. */ export enum RenderMode { /** * @description Standard rendering mode (src). * */ Normal = 0, /** * @description Composite: c*a + dest*(1-a). * */ TransColor = 1, /** * @description Composite: src*a + dest*(1-a). * */ TransTexture = 2, /** * @description Composite: src*a + dest -- No Z buffer checks -- Fixed size in screen space. * */ Glow = 3, /** * @description Composite: src*srca + dest*(1-srca). * */ TransAlpha = 4, /** * @description Composite: src*a + dest. * */ TransAdd = 5, /** * @description Not drawn, used for environmental effects. * */ Environmental = 6, /** * @description Uses a fractional frame value to blend between animation frames. * */ TransAddFrameBlend = 7, /** * @description Composite: src + dest*(1-a). * */ TransAlphaAdd = 8, /** * @description Same as Glow but not fixed size in screen space. * */ WorldGlow = 9, /** * @description No rendering. * */ None = 10, /** * @description Developer visualizer rendering mode. * */ DevVisualizer = 11 } /** * @description Represents the possible types of data that can be passed as a value in input actions. */ export enum FieldType { /** * @description Automatically detect the type of the value. * */ Auto = 0, /** * @description A 32-bit floating-point number. * */ Float32 = 1, /** * @description A 64-bit floating-point number. * */ Float64 = 2, /** * @description A 32-bit signed integer. * */ Int32 = 3, /** * @description A 32-bit unsigned integer. * */ UInt32 = 4, /** * @description A 64-bit signed integer. * */ Int64 = 5, /** * @description A 64-bit unsigned integer. * */ UInt64 = 6, /** * @description A boolean value (true or false). * */ Boolean = 7, /** * @description A single character. * */ Character = 8, /** * @description A managed string object. * */ String = 9, /** * @description A null-terminated C-style string. * */ CString = 10, /** * @description A script handle, typically for scripting integration. * */ HScript = 11, /** * @description An entity handle, used to reference an entity within the system. * */ EHandle = 12, /** * @description A resource handle, such as a file or asset reference. * */ Resource = 13, /** * @description A 3D vector, typically representing position or direction. * */ Vector3d = 14, /** * @description A 2D vector, for planar data or coordinates. * */ Vector2d = 15, /** * @description A 4D vector, often used for advanced mathematical representations. * */ Vector4d = 16, /** * @description A 32-bit color value (RGBA). * */ Color32 = 17, /** * @description A quaternion-based angle representation. * */ QAngle = 18, /** * @description A quaternion, used for rotation and orientation calculations. * */ Quaternion = 19 } /** * @description Enum representing the type of callback. */ export enum EventHookError { /** * @description Indicates that the event hook was successfully created. * */ Okay = 0, /** * @description Indicates that the event name provided is invalid or does not exist. * */ InvalidEvent = 1, /** * @description Indicates that the event system is not currently active or initialized. * */ NotActive = 2, /** * @description Indicates that the callback function provided is invalid or not compatible with the event system. * */ InvalidCallback = 3 } /** * @description Enum representing the possible verbosity of a logger. */ export enum LoggingVerbosity { /** * @description Turns off all spew. * */ Off = 0, /** * @description Turns on vital logs. * */ Essential = 1, /** * @description Turns on most messages. * */ Default = 2, /** * @description Allows for walls of text that are usually useful. * */ Detailed = 3, /** * @description Allows everything. * */ Max = 4 } /** * @description Enum representing the possible verbosity of a logger. */ export enum LoggingSeverity { /** * @description Turns off all spew. * */ Off = 0, /** * @description A debug message. * */ Detailed = 1, /** * @description An informative logging message. * */ Message = 2, /** * @description A warning, typically non-fatal. * */ Warning = 3, /** * @description A message caused by an Assert**() operation. * */ Assert = 4, /** * @description An error, typically fatal/unrecoverable. * */ Error = 5 } /** * @description Logging channel behavior flags, set on channel creation. */ export enum LoggingChannelFlags { /** * @description Indicates that the spew is only relevant to interactive consoles. * */ ConsoleOnly = 1, /** * @description Indicates that spew should not be echoed to any output devices. * */ DoNotEcho = 2 } /** * @description Enum representing the possible reasons a vote creation or processing has failed. */ export enum VoteCreateFailed { /** * @description Generic vote failure. * */ Generic = 0, /** * @description Vote failed due to players transitioning. * */ TransitioningPlayers = 1, /** * @description Vote failed because vote rate limit was exceeded. * */ RateExceeded = 2, /** * @description Vote failed because Yes votes must exceed No votes. * */ YesMustExceedNo = 3, /** * @description Vote failed due to quorum not being met. * */ QuorumFailure = 4, /** * @description Vote failed because the issue is disabled. * */ IssueDisabled = 5, /** * @description Vote failed because the map was not found. * */ MapNotFound = 6, /** * @description Vote failed because map name is required. * */ MapNameRequired = 7, /** * @description Vote failed because a similar vote failed recently. * */ FailedRecently = 8, /** * @description Vote to kick failed recently. * */ FailedRecentKick = 9, /** * @description Vote to change map failed recently. * */ FailedRecentChangeMap = 10, /** * @description Vote to swap teams failed recently. * */ FailedRecentSwapTeams = 11, /** * @description Vote to scramble teams failed recently. * */ FailedRecentScrambleTeams = 12, /** * @description Vote to restart failed recently. * */ FailedRecentRestart = 13, /** * @description Team is not allowed to call vote. * */ TeamCantCall = 14, /** * @description Vote failed because game is waiting for players. * */ WaitingForPlayers = 15, /** * @description Target player was not found. * */ PlayerNotFound = 16, /** * @description Cannot kick an admin. * */ CannotKickAdmin = 17, /** * @description Scramble is currently in progress. * */ ScrambleInProgress = 18, /** * @description Swap is currently in progress. * */ SwapInProgress = 19, /** * @description Spectators are not allowed to vote. * */ Spectator = 20, /** * @description Voting is disabled. * */ Disabled = 21, /** * @description Next level is already set. * */ NextLevelSet = 22, /** * @description Rematch vote failed. * */ Rematch = 23, /** * @description Vote to surrender failed due to being too early. * */ TooEarlySurrender = 24, /** * @description Vote to continue failed. * */ Continue = 25, /** * @description Vote failed because match is already paused. * */ MatchPaused = 26, /** * @description Vote failed because match is not paused. * */ MatchNotPaused = 27, /** * @description Vote failed because game is not in warmup. * */ NotInWarmup = 28, /** * @description Vote failed because there are not 10 players. * */ Not10Players = 29, /** * @description Vote failed due to an active timeout. * */ TimeoutActive = 30, /** * @description Vote failed because timeout is inactive. * */ TimeoutInactive = 31, /** * @description Vote failed because timeout has been exhausted. * */ TimeoutExhausted = 32, /** * @description Vote failed because the round can't end now. * */ CantRoundEnd = 33, /** * @description Sentinel value. Not a real failure reason. * */ Max = 34 } /** * @description Enum representing the possible types of a vote actions. */ export enum VoteAction { /** * @description Triggered when the vote begins. No additional parameters are used. * */ Start = 0, /** * @description Triggered when a player casts a vote. 'clientSlot' holds the voter's slot and 'choice' is the selected option (e.g., VOTE_OPTION1 for yes, VOTE_OPTION2 for no). * */ Vote = 1, /** * @description Triggered when the vote concludes. 'clientSlot' is typically -1. 'choice' contains the reason the vote ended (from YesNoVoteEndReason). * */ End = 2 } /** * @description Enum representing the possible types of a vote. */ export enum VoteEndReason { /** * @description All possible votes were cast. * */ AllVotes = 0, /** * @description Time ran out. * */ TimeUp = 1, /** * @description The vote got cancelled. * */ Cancelled = 2 } /** * @description Enum representing the possible flags of a timer. */ export enum TimerFlag { /** * @description Timer with no unique properties. * */ Default = 0, /** * @description Timer will repeat until stopped. * */ Repeat = 1, /** * @description Timer will not carry over mapchanges. * */ NoMapChange = 2 } /** * @description Enum representing the possible reasons for a round ending in Counter-Strike. */ export enum CSRoundEndReason { /** * @description Target successfully bombed. * */ TargetBombed = 1, /** * @description The VIP has escaped (not present in CS:GO). * */ VIPEscaped = 2, /** * @description VIP has been assassinated (not present in CS:GO). * */ VIPKilled = 3, /** * @description The terrorists have escaped. * */ TerroristsEscaped = 4, /** * @description The CTs have prevented most of the terrorists from escaping. * */ CTStoppedEscape = 5, /** * @description Escaping terrorists have all been neutralized. * */ TerroristsStopped = 6, /** * @description The bomb has been defused. * */ BombDefused = 7, /** * @description Counter-Terrorists win. * */ CTWin = 8, /** * @description Terrorists win. * */ TerroristWin = 9, /** * @description Round draw. * */ Draw = 10, /** * @description All hostages have been rescued. * */ HostagesRescued = 11, /** * @description Target has been saved. * */ TargetSaved = 12, /** * @description Hostages have not been rescued. * */ HostagesNotRescued = 13, /** * @description Terrorists have not escaped. * */ TerroristsNotEscaped = 14, /** * @description VIP has not escaped (not present in CS:GO). * */ VIPNotEscaped = 15, /** * @description Game commencing. * */ GameStart = 16, /** * @description Terrorists surrender. * */ TerroristsSurrender = 17, /** * @description CTs surrender. * */ CTSurrender = 18, /** * @description Terrorists planted the bomb. * */ TerroristsPlanted = 19, /** * @description CTs reached the hostage. * */ CTsReachedHostage = 20, /** * @description Survival mode win. * */ SurvivalWin = 21, /** * @description Survival mode draw. * */ SurvivalDraw = 22 } /** * @description Enum representing different weapon types. */ export enum CSWeaponType { /** * @description undefined * */ Knife = 0, /** * @description undefined * */ Pistol = 1, /** * @description undefined * */ SubmachineGun = 2, /** * @description undefined * */ Rifle = 3, /** * @description undefined * */ Shotgun = 4, /** * @description undefined * */ SniperRifle = 5, /** * @description undefined * */ MachineGun = 6, /** * @description undefined * */ C4 = 7, /** * @description undefined * */ Taser = 8, /** * @description undefined * */ Grenade = 9, /** * @description undefined * */ Equipment = 10, /** * @description undefined * */ StackableItem = 11, /** * @description undefined * */ Unknown = 12 } /** * @description Enum representing different weapon categories. */ export enum CSWeaponCategory { /** * @description undefined * */ Other = 0, /** * @description undefined * */ Melee = 1, /** * @description undefined * */ Secondary = 2, /** * @description undefined * */ SMG = 3, /** * @description undefined * */ Rifle = 4, /** * @description undefined * */ Heavy = 5 } /** * @description Enum representing different gear slots. */ export enum GearSlot { /** * @description undefined * */ Invalid = 4294967295, /** * @description undefined * */ Rifle = 0, /** * @description undefined * */ Pistol = 1, /** * @description undefined * */ Knife = 2, /** * @description undefined * */ Grenades = 3, /** * @description undefined * */ C4 = 4, /** * @description undefined * */ ReservedSlot6 = 5, /** * @description undefined * */ ReservedSlot7 = 6, /** * @description undefined * */ ReservedSlot8 = 7, /** * @description undefined * */ ReservedSlot9 = 8, /** * @description undefined * */ ReservedSlot10 = 9, /** * @description undefined * */ ReservedSlot11 = 10, /** * @description undefined * */ Boosts = 11, /** * @description undefined * */ Utility = 12 } /** * @description Enum representing different weapon definition indices. */ export enum WeaponDefIndex { /** * @description undefined * */ InvDefInd = 0, /** * @description undefined * */ Deagle = 1, /** * @description undefined * */ Elite = 2, /** * @description undefined * */ FiveSeven = 3, /** * @description undefined * */ Glock = 4, /** * @description undefined * */ AK47 = 7, /** * @description undefined * */ AUG = 8, /** * @description undefined * */ AWP = 9, /** * @description undefined * */ FAMAS = 10, /** * @description undefined * */ G3SG1 = 11, /** * @description undefined * */ GalilAR = 13, /** * @description undefined * */ M249 = 14, /** * @description undefined * */ M4A1 = 16, /** * @description undefined * */ MAC10 = 17, /** * @description undefined * */ P90 = 19, /** * @description undefined * */ ZoneRepulsor = 20, /** * @description undefined * */ MP5SD = 23, /** * @description undefined * */ UMP45 = 24, /** * @description undefined * */ XM1014 = 25, /** * @description undefined * */ Bizon = 26, /** * @description undefined * */ MAG7 = 27, /** * @description undefined * */ Negev = 28, /** * @description undefined * */ SawedOff = 29, /** * @description undefined * */ Tec9 = 30, /** * @description undefined * */ Taser = 31, /** * @description undefined * */ HKP2000 = 32, /** * @description undefined * */ MP7 = 33, /** * @description undefined * */ MP9 = 34, /** * @description undefined * */ Nova = 35, /** * @description undefined * */ P250 = 36, /** * @description undefined * */ Shield = 37, /** * @description undefined * */ SCAR20 = 38, /** * @description undefined * */ SG556 = 39, /** * @description undefined * */ SSG08 = 40, /** * @description undefined * */ KnifeEgg = 41, /** * @description undefined * */ Knife = 42, /** * @description undefined * */ Flashbang = 43, /** * @description undefined * */ HEGrenade = 44, /** * @description undefined * */ SmokeGrenade = 45, /** * @description undefined * */ Molotov = 46, /** * @description undefined * */ Decoy = 47, /** * @description undefined * */ IncGrenade = 48, /** * @description undefined * */ C4 = 49, /** * @description undefined * */ Kevlar = 50, /** * @description undefined * */ AssaultSuit = 51, /** * @description undefined * */ HeavyAssaultSuit = 52, /** * @description undefined * */ NVG = 54, /** * @description undefined * */ Defuser = 55, /** * @description undefined * */ Cutters = 56, /** * @description undefined * */ HealthShot = 57, /** * @description undefined * */ MusicKitDefault = 58, /** * @description undefined * */ KnifeT = 59, /** * @description undefined * */ M4A1Silencer = 60, /** * @description undefined * */ USPSilencer = 61, /** * @description undefined * */ RecipeTradeUp = 62, /** * @description undefined * */ CZ75A = 63, /** * @description undefined * */ Revolver = 64, /** * @description undefined * */ RemoveKeychainTool = 65, /** * @description undefined * */ TagGrenade = 68, /** * @description undefined * */ Fists = 69, /** * @description undefined * */ BreachCharge = 70, /** * @description undefined * */ Tablet = 72, /** * @description undefined * */ Melee = 74, /** * @description undefined * */ Axe = 75, /** * @description undefined * */ Hammer = 76, /** * @description undefined * */ Spanner = 78, /** * @description undefined * */ KnifeGhost = 80, /** * @description undefined * */ Firebomb = 81, /** * @description undefined * */ Diversion = 82, /** * @description undefined * */ FragGrenade = 83, /** * @description undefined * */ Snowball = 84, /** * @description undefined * */ BumpMine = 85 } namespace Callbacks { /** * @description Handles the execution of a command triggered by a caller. This function processes the command, interprets its context, and handles any provided arguments. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-CommandCallback|Docs} * * @param caller An identifier for the entity or object invoking the command. Typically used to track the source of the command. * @param context The context in which the command is being executed. This value can be used to provide additional information about the environment or state related to the command. * @param arguments An array of strings representing the arguments passed to the command. These arguments define the parameters or options provided by the caller. */ function CommandCallback(caller: number, context: number, arguments: string[]): ResultType; /** * @description Handles changes to a console variable's value. This function is called whenever the value of a specific console variable is modified. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-ChangeCallback|Docs} * * @param conVarHandle A handle to the console variable that is being changed. This provides access to the variable's metadata and current state. * @param newValue The new value being assigned to the console variable. This string contains the updated value after the change. * @param oldValue The previous value of the console variable before the change. This string contains the value that was overridden. */ function ChangeCallback(conVarHandle: number, newValue: string, oldValue: string): void; /** * @description Defines a QueueTask Callback. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-TaskCallback|Docs} * * @param userData An array intended to hold user-related data, allowing for elements of any type. */ function TaskCallback(userData: any[]): void; /** * @description This function is a callback handler for entity output events. It is triggered when a specific output event is activated, and it handles the process by passing the activator, the caller, and a delay parameter for the output. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-HookEntityOutputCallback|Docs} * * @param activatorHandle The activator is an identifier for the entity or object that triggers the event. It is typically a reference to the entity that caused the output to occur. * @param callerHandle The caller represents the entity or object that calls the output function. It can be used to identify which entity initiated the action that caused the event. * @param flDelay This parameter specifies the delay in seconds before the output action is executed. It allows the output to be triggered after a certain period of time, providing flexibility in handling time-based behaviors. */ function HookEntityOutputCallback(activatorHandle: number, callerHandle: number, flDelay: number): ResultType; /** * @description Handles events triggered by the game event system. This function processes the event data, determines the necessary action, and optionally prevents event broadcasting. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-EventCallback|Docs} * * @param name The name of the event being handled. This string is used to identify the type or category of the event. * @param event A 64-bit pointer to the event data structure. This pointer contains detailed information about the event being processed. * @param dontBroadcast A boolean flag indicating whether the event should be prevented from being broadcasted to other listeners. Set to `true` to suppress broadcasting. */ function EventCallback(name: string, event: number, dontBroadcast: boolean): ResultType; /** * @description Handles the final result of a Yes/No vote. This function is called when a vote concludes, and is responsible for determining whether the vote passed based on the number of 'yes' and 'no' votes. Also receives context about the clients who participated in the vote. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-YesNoVoteResult|Docs} * * @param numVotes Total number of votes submitted (yes + no). * @param yesVotes Number of 'yes' votes cast. * @param noVotes Number of 'no' votes cast. * @param numClients Total number of clients eligible to vote. * @param clientInfoSlot List of player slot indices representing voting clients. * @param clientInfoItem List of contextual data associated with each client (e.g., vote weight or custom info). */ function YesNoVoteResult(numVotes: number, yesVotes: number, noVotes: number, numClients: number, clientInfoSlot: number[], clientInfoItem: number[]): boolean; /** * @description * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-YesNoVoteHandler|Docs} * * @param action The action type from VoteAction enum. * @param clientSlot For Vote actions, this is the slot of the client who voted. For Start/End, typically -1. * @param choice For Vote actions, the vote choice (VOTE_OPTION1=yes, VOTE_OPTION2=no). For End, the YesNoVoteEndReason value. */ function YesNoVoteHandler(action: VoteAction, clientSlot: number, choice: number): void; /** * @description This function is invoked when a timer event occurs. It handles the timer-related logic and performs necessary actions based on the event. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-TimerCallback|Docs} * * @param timer An id to the timer object. This object contains the details of the timer, such as its current state, duration, and any associated data. * @param userData An array intended to hold user-related data, allowing for elements of any type. */ function TimerCallback(timer: number, userData: any[]): void; /** * @description Called on client connection. If you return true, the client will be allowed in the server. If you return false (or return nothing), the client will be rejected. If the client is rejected by this forward or any other, OnClientDisconnect will not be called.<br>Note: Do not write to rejectmsg if you plan on returning true. If multiple plugins write to the string buffer, it is not defined which plugin's string will be shown to the client, but it is guaranteed one of them will. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnectCallback|Docs} * * @param playerSlot The player slot * @param name The client name * @param networkId The client id */ function OnClientConnectCallback(playerSlot: number, name: string, networkId: string): boolean; /** * @description Called on client connection. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnect_PostCallback|Docs} * * @param playerSlot The player slot */ function OnClientConnect_PostCallback(playerSlot: number): void; /** * @description Called once a client successfully connects. This callback is paired with OnClientDisconnect. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnectedCallback|Docs} * * @param playerSlot The player slot */ function OnClientConnectedCallback(playerSlot: number): void; /** * @description Called when a client is entering the game. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientPutInServerCallback|Docs} * * @param playerSlot The player slot */ function OnClientPutInServerCallback(playerSlot: number): void; /** * @description Called when a client is disconnecting from the server. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientDisconnectCallback|Docs} * * @param playerSlot The player slot */ function OnClientDisconnectCallback(playerSlot: number): void; /** * @description Called when a client is disconnected from the server. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientDisconnect_PostCallback|Docs} * * @param playerSlot The player slot * @param reason The reason for disconnect */ function OnClientDisconnect_PostCallback(playerSlot: number, reason: number): void; /** * @description Called when a client is activated by the game. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientActiveCallback|Docs} * * @param playerSlot The player slot * @param isActive Active state */ function OnClientActiveCallback(playerSlot: number, isActive: boolean): void; /** * @description Called when a client is fully connected to the game. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientFullyConnectCallback|Docs} * * @param playerSlot The player slot */ function OnClientFullyConnectCallback(playerSlot: number): void; /** * @description Called whenever the client's settings are changed. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientSettingsChangedCallback|Docs} * * @param playerSlot The player slot */ function OnClientSettingsChangedCallback(playerSlot: number): void; /** * @description Called when a client is fully connected to the game. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientAuthenticatedCallback|Docs} * * @param playerSlot The player slot * @param steam Steam account ID or 0 if not available. */ function OnClientAuthenticatedCallback(playerSlot: number, steam: number): void; /** * @description Called when the map starts loading. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnLevelInitCallback|Docs} * * @param mapName The name of the map * @param mapEntities The entities of the map */ function OnLevelInitCallback(mapName: string, mapEntities: string): void; /** * @description Called right before a map ends. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnLevelShutdownCallback|Docs} * * */ function OnLevelShutdownCallback(): void; /** * @description Called when an entity is spawned. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnEntitySpawnedCallback|Docs} * * @param entityHandle The spawned entity handle */ function OnEntitySpawnedCallback(entityHandle: number): void; /** * @description Called when an entity is created. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnEntityCreatedCallback|Docs} * * @param entityHandle The created entity handle */ function OnEntityCreatedCallback(entityHandle: number): void; /** * @description Called when when an entity is destroyed. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnEntityDeletedCallback|Docs} * * @param entityHandle The deleted entity handle */ function OnEntityDeletedCallback(entityHandle: number): void; /** * @description When an entity is reparented to another entity. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnEntityParentChangedCallback|Docs} * * @param entityHandle The entity whose parent changed * @param parentHandle The new parent entity handle */ function OnEntityParentChangedCallback(entityHandle: number, parentHandle: number): void; /** * @description Called on every server startup. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnServerStartupCallback|Docs} * * */ function OnServerStartupCallback(): void; /** * @description Called on every server activate. * * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnServerActivateCallback|Docs} * * */ function OnServerActivateCallback(): void; /**