@plugify-plugins/s2sdk-types 1.1.15 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +243 -98
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -636,6 +636,48 @@ declare module ":s2sdk" {
636
636
  DoNotEcho = 2
637
637
  }
638
638
 
639
+ /**
640
+ * @description Enum representing the possible types of a vote actions.
641
+ */
642
+ export enum VoteAction {
643
+
644
+ /**
645
+ * @description Triggered when the vote begins. No additional parameters are used.
646
+ * */
647
+ Start = 0,
648
+
649
+ /**
650
+ * @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).
651
+ * */
652
+ Vote = 1,
653
+
654
+ /**
655
+ * @description Triggered when the vote concludes. 'clientSlot' is typically -1. 'choice' contains the reason the vote ended (from YesNoVoteEndReason).
656
+ * */
657
+ End = 2
658
+ }
659
+
660
+ /**
661
+ * @description Enum representing the possible types of a vote.
662
+ */
663
+ export enum VoteEndReason {
664
+
665
+ /**
666
+ * @description All possible votes were cast.
667
+ * */
668
+ AllVotes = 0,
669
+
670
+ /**
671
+ * @description Time ran out.
672
+ * */
673
+ TimeUp = 1,
674
+
675
+ /**
676
+ * @description The vote got cancelled.
677
+ * */
678
+ Cancelled = 2
679
+ }
680
+
639
681
  /**
640
682
  * @description Enum representing the possible flags of a timer.
641
683
  */
@@ -841,42 +883,7 @@ declare module ":s2sdk" {
841
883
  /**
842
884
  * @description undefined
843
885
  * */
844
- Fists = 12,
845
-
846
- /**
847
- * @description undefined
848
- * */
849
- BreachCharge = 13,
850
-
851
- /**
852
- * @description undefined
853
- * */
854
- BumpMine = 14,
855
-
856
- /**
857
- * @description undefined
858
- * */
859
- Tablet = 15,
860
-
861
- /**
862
- * @description undefined
863
- * */
864
- Melee = 16,
865
-
866
- /**
867
- * @description undefined
868
- * */
869
- Shield = 17,
870
-
871
- /**
872
- * @description undefined
873
- * */
874
- ZoneRepulsor = 18,
875
-
876
- /**
877
- * @description undefined
878
- * */
879
- Unknown = 19
886
+ Unknown = 12
880
887
  }
881
888
 
882
889
  /**
@@ -1416,6 +1423,33 @@ declare module ":s2sdk" {
1416
1423
 
1417
1424
  function EventCallback(name: string, event: number, dontBroadcast: boolean): ResultType;
1418
1425
 
1426
+ /**
1427
+ * @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.
1428
+ *
1429
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-YesNoVoteResult|Docs}
1430
+ *
1431
+ * @param numVotes Total number of votes submitted (yes + no).
1432
+ * @param yesVotes Number of 'yes' votes cast.
1433
+ * @param noVotes Number of 'no' votes cast.
1434
+ * @param numClients Total number of clients eligible to vote.
1435
+ * @param clientInfoSlot List of player slot indices representing voting clients.
1436
+ * @param clientInfoItem List of contextual data associated with each client (e.g., vote weight or custom info).
1437
+ */
1438
+
1439
+ function YesNoVoteResult(numVotes: number, yesVotes: number, noVotes: number, numClients: number, clientInfoSlot: number[], clientInfoItem: number[]): boolean;
1440
+
1441
+ /**
1442
+ * @description
1443
+ *
1444
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-YesNoVoteHandler|Docs}
1445
+ *
1446
+ * @param action The action type from VoteAction enum.
1447
+ * @param clientSlot For Vote actions, this is the slot of the client who voted. For Start/End, typically -1.
1448
+ * @param choice For Vote actions, the vote choice (VOTE_OPTION1=yes, VOTE_OPTION2=no). For End, the YesNoVoteEndReason value.
1449
+ */
1450
+
1451
+ function YesNoVoteHandler(action: VoteAction, clientSlot: number, choice: number): void;
1452
+
1419
1453
  /**
1420
1454
  * @description This function is invoked when a timer event occurs. It handles the timer-related logic and performs necessary actions based on the event.
1421
1455
  *
@@ -1614,6 +1648,16 @@ declare module ":s2sdk" {
1614
1648
 
1615
1649
  function OnServerActivateCallback(): void;
1616
1650
 
1651
+ /**
1652
+ * @description Called on every level change.
1653
+ *
1654
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnChangeLevelCallback|Docs}
1655
+ *
1656
+ *
1657
+ */
1658
+
1659
+ function OnChangeLevelCallback(): void;
1660
+
1617
1661
  /**
1618
1662
  * @description Called before every server frame. Note that you should avoid doing expensive computations or declaring large local arrays.
1619
1663
  *
@@ -3109,7 +3153,7 @@ declare module ":s2sdk" {
3109
3153
  *
3110
3154
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-FindModule|Docs}
3111
3155
  *
3112
- * @param name
3156
+ * @param name The name of the module to find.
3113
3157
  */
3114
3158
  export function FindModule(name: string): number;
3115
3159
 
@@ -3861,10 +3905,10 @@ declare module ":s2sdk" {
3861
3905
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-HookEvent|Docs}
3862
3906
  *
3863
3907
  * @param name The name of the event to hook.
3864
- * @param pCallback The callback function to call when the event is fired.
3908
+ * @param callback The callback function to call when the event is fired.
3865
3909
  * @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
3866
3910
  */
3867
- export function HookEvent(name: string, pCallback: typeof Callbacks.EventCallback, type: HookMode): number;
3911
+ export function HookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): number;
3868
3912
 
3869
3913
  /**
3870
3914
  * @description Removes a hook for when a game event is fired.
@@ -3872,10 +3916,10 @@ declare module ":s2sdk" {
3872
3916
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-UnhookEvent|Docs}
3873
3917
  *
3874
3918
  * @param name The name of the event to unhook.
3875
- * @param pCallback The callback function to remove.
3919
+ * @param callback The callback function to remove.
3876
3920
  * @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
3877
3921
  */
3878
- export function UnhookEvent(name: string, pCallback: typeof Callbacks.EventCallback, type: HookMode): number;
3922
+ export function UnhookEvent(name: string, callback: typeof Callbacks.EventCallback, type: HookMode): number;
3879
3923
 
3880
3924
  /**
3881
3925
  * @description Creates a game event to be fired later.
@@ -3892,289 +3936,289 @@ declare module ":s2sdk" {
3892
3936
  *
3893
3937
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-FireEvent|Docs}
3894
3938
  *
3895
- * @param pInfo A pointer to the EventInfo structure containing event data.
3896
- * @param bDontBroadcast A boolean indicating whether to broadcast the event.
3939
+ * @param info A pointer to the EventInfo structure containing event data.
3940
+ * @param dontBroadcast A boolean indicating whether to broadcast the event.
3897
3941
  */
3898
- export function FireEvent(pInfo: number, bDontBroadcast: boolean): void;
3942
+ export function FireEvent(info: number, dontBroadcast: boolean): void;
3899
3943
 
3900
3944
  /**
3901
3945
  * @description Fires a game event to a specific client.
3902
3946
  *
3903
3947
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-FireEventToClient|Docs}
3904
3948
  *
3905
- * @param pInfo A pointer to the EventInfo structure containing event data.
3949
+ * @param info A pointer to the EventInfo structure containing event data.
3906
3950
  * @param playerSlot The index of the client to fire the event to.
3907
3951
  */
3908
- export function FireEventToClient(pInfo: number, playerSlot: number): void;
3952
+ export function FireEventToClient(info: number, playerSlot: number): void;
3909
3953
 
3910
3954
  /**
3911
3955
  * @description Cancels a previously created game event that has not been fired.
3912
3956
  *
3913
3957
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-CancelCreatedEvent|Docs}
3914
3958
  *
3915
- * @param pInfo A pointer to the EventInfo structure of the event to cancel.
3959
+ * @param info A pointer to the EventInfo structure of the event to cancel.
3916
3960
  */
3917
- export function CancelCreatedEvent(pInfo: number): void;
3961
+ export function CancelCreatedEvent(info: number): void;
3918
3962
 
3919
3963
  /**
3920
3964
  * @description Retrieves the boolean value of a game event's key.
3921
3965
  *
3922
3966
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventBool|Docs}
3923
3967
  *
3924
- * @param pInfo A pointer to the EventInfo structure containing event data.
3968
+ * @param info A pointer to the EventInfo structure containing event data.
3925
3969
  * @param key The key for which to retrieve the boolean value.
3926
3970
  */
3927
- export function GetEventBool(pInfo: number, key: string): boolean;
3971
+ export function GetEventBool(info: number, key: string): boolean;
3928
3972
 
3929
3973
  /**
3930
3974
  * @description Retrieves the float value of a game event's key.
3931
3975
  *
3932
3976
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventFloat|Docs}
3933
3977
  *
3934
- * @param pInfo A pointer to the EventInfo structure containing event data.
3978
+ * @param info A pointer to the EventInfo structure containing event data.
3935
3979
  * @param key The key for which to retrieve the float value.
3936
3980
  */
3937
- export function GetEventFloat(pInfo: number, key: string): number;
3981
+ export function GetEventFloat(info: number, key: string): number;
3938
3982
 
3939
3983
  /**
3940
3984
  * @description Retrieves the integer value of a game event's key.
3941
3985
  *
3942
3986
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventInt|Docs}
3943
3987
  *
3944
- * @param pInfo A pointer to the EventInfo structure containing event data.
3988
+ * @param info A pointer to the EventInfo structure containing event data.
3945
3989
  * @param key The key for which to retrieve the integer value.
3946
3990
  */
3947
- export function GetEventInt(pInfo: number, key: string): number;
3991
+ export function GetEventInt(info: number, key: string): number;
3948
3992
 
3949
3993
  /**
3950
3994
  * @description Retrieves the long integer value of a game event's key.
3951
3995
  *
3952
3996
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventUInt64|Docs}
3953
3997
  *
3954
- * @param pInfo A pointer to the EventInfo structure containing event data.
3998
+ * @param info A pointer to the EventInfo structure containing event data.
3955
3999
  * @param key The key for which to retrieve the long integer value.
3956
4000
  */
3957
- export function GetEventUInt64(pInfo: number, key: string): number;
4001
+ export function GetEventUInt64(info: number, key: string): number;
3958
4002
 
3959
4003
  /**
3960
4004
  * @description Retrieves the string value of a game event's key.
3961
4005
  *
3962
4006
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventString|Docs}
3963
4007
  *
3964
- * @param pInfo A pointer to the EventInfo structure containing event data.
4008
+ * @param info A pointer to the EventInfo structure containing event data.
3965
4009
  * @param key The key for which to retrieve the string value.
3966
4010
  */
3967
- export function GetEventString(pInfo: number, key: string): string;
4011
+ export function GetEventString(info: number, key: string): string;
3968
4012
 
3969
4013
  /**
3970
4014
  * @description Retrieves the pointer value of a game event's key.
3971
4015
  *
3972
4016
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventPtr|Docs}
3973
4017
  *
3974
- * @param pInfo A pointer to the EventInfo structure containing event data.
4018
+ * @param info A pointer to the EventInfo structure containing event data.
3975
4019
  * @param key The key for which to retrieve the pointer value.
3976
4020
  */
3977
- export function GetEventPtr(pInfo: number, key: string): number;
4021
+ export function GetEventPtr(info: number, key: string): number;
3978
4022
 
3979
4023
  /**
3980
4024
  * @description Retrieves the player controller address of a game event's key.
3981
4025
  *
3982
4026
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventPlayerController|Docs}
3983
4027
  *
3984
- * @param pInfo A pointer to the EventInfo structure containing event data.
4028
+ * @param info A pointer to the EventInfo structure containing event data.
3985
4029
  * @param key The key for which to retrieve the player controller address.
3986
4030
  */
3987
- export function GetEventPlayerController(pInfo: number, key: string): number;
4031
+ export function GetEventPlayerController(info: number, key: string): number;
3988
4032
 
3989
4033
  /**
3990
4034
  * @description Retrieves the player index of a game event's key.
3991
4035
  *
3992
4036
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventPlayerIndex|Docs}
3993
4037
  *
3994
- * @param pInfo A pointer to the EventInfo structure containing event data.
4038
+ * @param info A pointer to the EventInfo structure containing event data.
3995
4039
  * @param key The key for which to retrieve the player index.
3996
4040
  */
3997
- export function GetEventPlayerIndex(pInfo: number, key: string): number;
4041
+ export function GetEventPlayerIndex(info: number, key: string): number;
3998
4042
 
3999
4043
  /**
4000
4044
  * @description Retrieves the player pawn address of a game event's key.
4001
4045
  *
4002
4046
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventPlayerPawn|Docs}
4003
4047
  *
4004
- * @param pInfo A pointer to the EventInfo structure containing event data.
4048
+ * @param info A pointer to the EventInfo structure containing event data.
4005
4049
  * @param key The key for which to retrieve the player pawn address.
4006
4050
  */
4007
- export function GetEventPlayerPawn(pInfo: number, key: string): number;
4051
+ export function GetEventPlayerPawn(info: number, key: string): number;
4008
4052
 
4009
4053
  /**
4010
4054
  * @description Retrieves the entity address of a game event's key.
4011
4055
  *
4012
4056
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventEntity|Docs}
4013
4057
  *
4014
- * @param pInfo A pointer to the EventInfo structure containing event data.
4058
+ * @param info A pointer to the EventInfo structure containing event data.
4015
4059
  * @param key The key for which to retrieve the entity address.
4016
4060
  */
4017
- export function GetEventEntity(pInfo: number, key: string): number;
4061
+ export function GetEventEntity(info: number, key: string): number;
4018
4062
 
4019
4063
  /**
4020
4064
  * @description Retrieves the entity index of a game event's key.
4021
4065
  *
4022
4066
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventEntityIndex|Docs}
4023
4067
  *
4024
- * @param pInfo A pointer to the EventInfo structure containing event data.
4068
+ * @param info A pointer to the EventInfo structure containing event data.
4025
4069
  * @param key The key for which to retrieve the entity index.
4026
4070
  */
4027
- export function GetEventEntityIndex(pInfo: number, key: string): number;
4071
+ export function GetEventEntityIndex(info: number, key: string): number;
4028
4072
 
4029
4073
  /**
4030
4074
  * @description Retrieves the entity handle of a game event's key.
4031
4075
  *
4032
4076
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventEntityHandle|Docs}
4033
4077
  *
4034
- * @param pInfo A pointer to the EventInfo structure containing event data.
4078
+ * @param info A pointer to the EventInfo structure containing event data.
4035
4079
  * @param key The key for which to retrieve the entity handle.
4036
4080
  */
4037
- export function GetEventEntityHandle(pInfo: number, key: string): number;
4081
+ export function GetEventEntityHandle(info: number, key: string): number;
4038
4082
 
4039
4083
  /**
4040
4084
  * @description Retrieves the name of a game event.
4041
4085
  *
4042
4086
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetEventName|Docs}
4043
4087
  *
4044
- * @param pInfo A pointer to the EventInfo structure containing event data.
4088
+ * @param info A pointer to the EventInfo structure containing event data.
4045
4089
  */
4046
- export function GetEventName(pInfo: number): string;
4090
+ export function GetEventName(info: number): string;
4047
4091
 
4048
4092
  /**
4049
4093
  * @description Sets the boolean value of a game event's key.
4050
4094
  *
4051
4095
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventBool|Docs}
4052
4096
  *
4053
- * @param pInfo A pointer to the EventInfo structure containing event data.
4097
+ * @param info A pointer to the EventInfo structure containing event data.
4054
4098
  * @param key The key for which to set the boolean value.
4055
4099
  * @param value The boolean value to set.
4056
4100
  */
4057
- export function SetEventBool(pInfo: number, key: string, value: boolean): void;
4101
+ export function SetEventBool(info: number, key: string, value: boolean): void;
4058
4102
 
4059
4103
  /**
4060
4104
  * @description Sets the floating point value of a game event's key.
4061
4105
  *
4062
4106
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventFloat|Docs}
4063
4107
  *
4064
- * @param pInfo A pointer to the EventInfo structure containing event data.
4108
+ * @param info A pointer to the EventInfo structure containing event data.
4065
4109
  * @param key The key for which to set the float value.
4066
4110
  * @param value The float value to set.
4067
4111
  */
4068
- export function SetEventFloat(pInfo: number, key: string, value: number): void;
4112
+ export function SetEventFloat(info: number, key: string, value: number): void;
4069
4113
 
4070
4114
  /**
4071
4115
  * @description Sets the integer value of a game event's key.
4072
4116
  *
4073
4117
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventInt|Docs}
4074
4118
  *
4075
- * @param pInfo A pointer to the EventInfo structure containing event data.
4119
+ * @param info A pointer to the EventInfo structure containing event data.
4076
4120
  * @param key The key for which to set the integer value.
4077
4121
  * @param value The integer value to set.
4078
4122
  */
4079
- export function SetEventInt(pInfo: number, key: string, value: number): void;
4123
+ export function SetEventInt(info: number, key: string, value: number): void;
4080
4124
 
4081
4125
  /**
4082
4126
  * @description Sets the long integer value of a game event's key.
4083
4127
  *
4084
4128
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventUInt64|Docs}
4085
4129
  *
4086
- * @param pInfo A pointer to the EventInfo structure containing event data.
4130
+ * @param info A pointer to the EventInfo structure containing event data.
4087
4131
  * @param key The key for which to set the long integer value.
4088
4132
  * @param value The long integer value to set.
4089
4133
  */
4090
- export function SetEventUInt64(pInfo: number, key: string, value: number): void;
4134
+ export function SetEventUInt64(info: number, key: string, value: number): void;
4091
4135
 
4092
4136
  /**
4093
4137
  * @description Sets the string value of a game event's key.
4094
4138
  *
4095
4139
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventString|Docs}
4096
4140
  *
4097
- * @param pInfo A pointer to the EventInfo structure containing event data.
4141
+ * @param info A pointer to the EventInfo structure containing event data.
4098
4142
  * @param key The key for which to set the string value.
4099
4143
  * @param value The string value to set.
4100
4144
  */
4101
- export function SetEventString(pInfo: number, key: string, value: string): void;
4145
+ export function SetEventString(info: number, key: string, value: string): void;
4102
4146
 
4103
4147
  /**
4104
4148
  * @description Sets the pointer value of a game event's key.
4105
4149
  *
4106
4150
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventPtr|Docs}
4107
4151
  *
4108
- * @param pInfo A pointer to the EventInfo structure containing event data.
4152
+ * @param info A pointer to the EventInfo structure containing event data.
4109
4153
  * @param key The key for which to set the pointer value.
4110
4154
  * @param value The pointer value to set.
4111
4155
  */
4112
- export function SetEventPtr(pInfo: number, key: string, value: number): void;
4156
+ export function SetEventPtr(info: number, key: string, value: number): void;
4113
4157
 
4114
4158
  /**
4115
4159
  * @description Sets the player controller address of a game event's key.
4116
4160
  *
4117
4161
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventPlayerController|Docs}
4118
4162
  *
4119
- * @param pInfo A pointer to the EventInfo structure containing event data.
4163
+ * @param info A pointer to the EventInfo structure containing event data.
4120
4164
  * @param key The key for which to set the player controller address.
4121
4165
  * @param value A pointer to the player controller to set.
4122
4166
  */
4123
- export function SetEventPlayerController(pInfo: number, key: string, value: number): void;
4167
+ export function SetEventPlayerController(info: number, key: string, value: number): void;
4124
4168
 
4125
4169
  /**
4126
4170
  * @description Sets the player index value of a game event's key.
4127
4171
  *
4128
4172
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventPlayerIndex|Docs}
4129
4173
  *
4130
- * @param pInfo A pointer to the EventInfo structure containing event data.
4174
+ * @param info A pointer to the EventInfo structure containing event data.
4131
4175
  * @param key The key for which to set the player index value.
4132
4176
  * @param value The player index value to set.
4133
4177
  */
4134
- export function SetEventPlayerIndex(pInfo: number, key: string, value: number): void;
4178
+ export function SetEventPlayerIndex(info: number, key: string, value: number): void;
4135
4179
 
4136
4180
  /**
4137
4181
  * @description Sets the entity address of a game event's key.
4138
4182
  *
4139
4183
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventEntity|Docs}
4140
4184
  *
4141
- * @param pInfo A pointer to the EventInfo structure containing event data.
4185
+ * @param info A pointer to the EventInfo structure containing event data.
4142
4186
  * @param key The key for which to set the entity address.
4143
4187
  * @param value A pointer to the entity to set.
4144
4188
  */
4145
- export function SetEventEntity(pInfo: number, key: string, value: number): void;
4189
+ export function SetEventEntity(info: number, key: string, value: number): void;
4146
4190
 
4147
4191
  /**
4148
4192
  * @description Sets the entity index of a game event's key.
4149
4193
  *
4150
4194
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventEntityIndex|Docs}
4151
4195
  *
4152
- * @param pInfo A pointer to the EventInfo structure containing event data.
4196
+ * @param info A pointer to the EventInfo structure containing event data.
4153
4197
  * @param key The key for which to set the entity index.
4154
4198
  * @param value The entity index value to set.
4155
4199
  */
4156
- export function SetEventEntityIndex(pInfo: number, key: string, value: number): void;
4200
+ export function SetEventEntityIndex(info: number, key: string, value: number): void;
4157
4201
 
4158
4202
  /**
4159
4203
  * @description Sets the entity handle of a game event's key.
4160
4204
  *
4161
4205
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventEntityHandle|Docs}
4162
4206
  *
4163
- * @param pInfo A pointer to the EventInfo structure containing event data.
4207
+ * @param info A pointer to the EventInfo structure containing event data.
4164
4208
  * @param key The key for which to set the entity handle.
4165
4209
  * @param value The entity handle value to set.
4166
4210
  */
4167
- export function SetEventEntityHandle(pInfo: number, key: string, value: number): void;
4211
+ export function SetEventEntityHandle(info: number, key: string, value: number): void;
4168
4212
 
4169
4213
  /**
4170
4214
  * @description Sets whether an event's broadcasting will be disabled or not.
4171
4215
  *
4172
4216
  * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetEventBroadcast|Docs}
4173
4217
  *
4174
- * @param pInfo A pointer to the EventInfo structure containing event data.
4218
+ * @param info A pointer to the EventInfo structure containing event data.
4175
4219
  * @param dontBroadcast A boolean indicating whether to disable broadcasting.
4176
4220
  */
4177
- export function SetEventBroadcast(pInfo: number, dontBroadcast: boolean): void;
4221
+ export function SetEventBroadcast(info: number, dontBroadcast: boolean): void;
4178
4222
 
4179
4223
  /**
4180
4224
  * @description Load game event descriptions from a file (e.g., "resource/gameevents.res").
@@ -4466,6 +4510,80 @@ declare module ":s2sdk" {
4466
4510
  */
4467
4511
  export function LogFullColored(channelID: number, severity: LoggingSeverity, file: string, line: number, callback: string, color: number, message: string): number;
4468
4512
 
4513
+ /**
4514
+ * @description Start a new Yes/No vote
4515
+ *
4516
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaSendYesNoVote|Docs}
4517
+ *
4518
+ * @param duration Maximum time to leave vote active for
4519
+ * @param caller Player slot of the vote caller. Use VOTE_CALLER_SERVER for 'Server'.
4520
+ * @param voteTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4521
+ * @param detailStr Extra string used in some vote translation strings.
4522
+ * @param filter Recipient filter with all the clients who are allowed to participate in the vote.
4523
+ * @param result Called when a menu action is completed.
4524
+ * @param handler Called when the vote has finished.
4525
+ */
4526
+ export function PanoramaSendYesNoVote(duration: number, caller: number, voteTitle: string, detailStr: string, filter: number, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4527
+
4528
+ /**
4529
+ * @description Start a new Yes/No vote with all players included
4530
+ *
4531
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaSendYesNoVoteToAll|Docs}
4532
+ *
4533
+ * @param duration Maximum time to leave vote active for
4534
+ * @param caller Player slot of the vote caller. Use VOTE_CALLER_SERVER for 'Server'.
4535
+ * @param voteTitle Translation string to use as the vote message. (Only '#SFUI_vote' or '#Panorama_vote' strings)
4536
+ * @param detailStr Extra string used in some vote translation strings.
4537
+ * @param result Called when a menu action is completed.
4538
+ * @param handler Called when the vote has finished.
4539
+ */
4540
+ export function PanoramaSendYesNoVoteToAll(duration: number, caller: number, voteTitle: string, detailStr: string, result: typeof Callbacks.YesNoVoteResult, handler: typeof Callbacks.YesNoVoteHandler): boolean;
4541
+
4542
+ /**
4543
+ * @description Removes a player from the current vote.
4544
+ *
4545
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaRemovePlayerFromVote|Docs}
4546
+ *
4547
+ * @param playerSlot The slot/index of the player to remove from the vote.
4548
+ */
4549
+ export function PanoramaRemovePlayerFromVote(playerSlot: number): void;
4550
+
4551
+ /**
4552
+ * @description Checks if a player is in the vote pool.
4553
+ *
4554
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaIsPlayerInVotePool|Docs}
4555
+ *
4556
+ * @param playerSlot The slot/index of the player to check.
4557
+ */
4558
+ export function PanoramaIsPlayerInVotePool(playerSlot: number): boolean;
4559
+
4560
+ /**
4561
+ * @description Redraws the vote UI to a specific player client.
4562
+ *
4563
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaRedrawVoteToClient|Docs}
4564
+ *
4565
+ * @param playerSlot The slot/index of the player to update.
4566
+ */
4567
+ export function PanoramaRedrawVoteToClient(playerSlot: number): boolean;
4568
+
4569
+ /**
4570
+ * @description Checks if a vote is currently in progress.
4571
+ *
4572
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaIsVoteInProgress|Docs}
4573
+ *
4574
+ *
4575
+ */
4576
+ export function PanoramaIsVoteInProgress(): boolean;
4577
+
4578
+ /**
4579
+ * @description Ends the current vote with a specified reason.
4580
+ *
4581
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PanoramaEndVote|Docs}
4582
+ *
4583
+ * @param reason The reason for ending the vote.
4584
+ */
4585
+ export function PanoramaEndVote(reason: VoteEndReason): void;
4586
+
4469
4587
  /**
4470
4588
  * @description Get the offset of a member in a given schema class.
4471
4589
  *
@@ -5545,6 +5663,24 @@ declare module ":s2sdk" {
5545
5663
  */
5546
5664
  export function OnServerActivate_Unregister(callback: typeof Callbacks.OnServerActivateCallback): void;
5547
5665
 
5666
+ /**
5667
+ * @description Register callback to event.
5668
+ *
5669
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnChangeLevel_Register|Docs}
5670
+ *
5671
+ * @param callback Function callback.
5672
+ */
5673
+ export function OnChangeLevel_Register(callback: typeof Callbacks.OnChangeLevelCallback): void;
5674
+
5675
+ /**
5676
+ * @description Unregister callback to event.
5677
+ *
5678
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnChangeLevel_Unregister|Docs}
5679
+ *
5680
+ * @param callback Function callback.
5681
+ */
5682
+ export function OnChangeLevel_Unregister(callback: typeof Callbacks.OnChangeLevelCallback): void;
5683
+
5548
5684
  /**
5549
5685
  * @description Register callback to event.
5550
5686
  *
@@ -6719,6 +6855,15 @@ declare module ":s2sdk" {
6719
6855
  */
6720
6856
  export function PbAddQAngle(userMessage: number, fieldName: string, value: vec3): boolean;
6721
6857
 
6858
+ /**
6859
+ * @description Retrieves the weapon VData for a given weapon name.
6860
+ *
6861
+ * {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetWeaponVDataFromKey|Docs}
6862
+ *
6863
+ * @param name The name of the weapon.
6864
+ */
6865
+ export function GetWeaponVDataFromKey(name: string): number;
6866
+
6722
6867
  /**
6723
6868
  * @description Retrieves the weapon VData for a given weapon.
6724
6869
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugify-plugins/s2sdk-types",
3
- "version": "1.1.15",
3
+ "version": "1.2.1",
4
4
  "description": "generated typescript types to write plugins on plugify",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {},