@plugify-plugins/s2sdk-types 1.1.12 → 1.1.14
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.
- package/index.d.ts +186 -168
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -213,6 +213,22 @@ declare module ":s2sdk" {
|
|
|
213
213
|
Stop = 3
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
/**
|
|
217
|
+
* @description Enum representing the type of callback.
|
|
218
|
+
*/
|
|
219
|
+
export enum HookMode {
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @description Callback will be executed before the original function
|
|
223
|
+
* */
|
|
224
|
+
Pre = 0,
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @description Callback will be executed after the original function
|
|
228
|
+
* */
|
|
229
|
+
Post = 1
|
|
230
|
+
}
|
|
231
|
+
|
|
216
232
|
/**
|
|
217
233
|
* @description undefined
|
|
218
234
|
*/
|
|
@@ -832,105 +848,105 @@ declare module ":s2sdk" {
|
|
|
832
848
|
*
|
|
833
849
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnectCallback|Docs}
|
|
834
850
|
*
|
|
835
|
-
* @param
|
|
851
|
+
* @param playerSlot The player slot
|
|
836
852
|
* @param name The client name
|
|
837
853
|
* @param networkId The client id
|
|
838
854
|
*/
|
|
839
855
|
|
|
840
|
-
function OnClientConnectCallback(
|
|
856
|
+
function OnClientConnectCallback(playerSlot: number, name: string, networkId: string): boolean;
|
|
841
857
|
|
|
842
858
|
/**
|
|
843
859
|
* @description Called on client connection.
|
|
844
860
|
*
|
|
845
861
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnect_PostCallback|Docs}
|
|
846
862
|
*
|
|
847
|
-
* @param
|
|
863
|
+
* @param playerSlot The player slot
|
|
848
864
|
*/
|
|
849
865
|
|
|
850
|
-
function OnClientConnect_PostCallback(
|
|
866
|
+
function OnClientConnect_PostCallback(playerSlot: number): void;
|
|
851
867
|
|
|
852
868
|
/**
|
|
853
869
|
* @description Called once a client successfully connects. This callback is paired with OnClientDisconnect.
|
|
854
870
|
*
|
|
855
871
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientConnectedCallback|Docs}
|
|
856
872
|
*
|
|
857
|
-
* @param
|
|
873
|
+
* @param playerSlot The player slot
|
|
858
874
|
*/
|
|
859
875
|
|
|
860
|
-
function OnClientConnectedCallback(
|
|
876
|
+
function OnClientConnectedCallback(playerSlot: number): void;
|
|
861
877
|
|
|
862
878
|
/**
|
|
863
879
|
* @description Called when a client is entering the game.
|
|
864
880
|
*
|
|
865
881
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientPutInServerCallback|Docs}
|
|
866
882
|
*
|
|
867
|
-
* @param
|
|
883
|
+
* @param playerSlot The player slot
|
|
868
884
|
*/
|
|
869
885
|
|
|
870
|
-
function OnClientPutInServerCallback(
|
|
886
|
+
function OnClientPutInServerCallback(playerSlot: number): void;
|
|
871
887
|
|
|
872
888
|
/**
|
|
873
889
|
* @description Called when a client is disconnecting from the server.
|
|
874
890
|
*
|
|
875
891
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientDisconnectCallback|Docs}
|
|
876
892
|
*
|
|
877
|
-
* @param
|
|
893
|
+
* @param playerSlot The player slot
|
|
878
894
|
*/
|
|
879
895
|
|
|
880
|
-
function OnClientDisconnectCallback(
|
|
896
|
+
function OnClientDisconnectCallback(playerSlot: number): void;
|
|
881
897
|
|
|
882
898
|
/**
|
|
883
899
|
* @description Called when a client is disconnected from the server.
|
|
884
900
|
*
|
|
885
901
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientDisconnect_PostCallback|Docs}
|
|
886
902
|
*
|
|
887
|
-
* @param
|
|
903
|
+
* @param playerSlot The player slot
|
|
888
904
|
* @param reason The reason for disconnect
|
|
889
905
|
*/
|
|
890
906
|
|
|
891
|
-
function OnClientDisconnect_PostCallback(
|
|
907
|
+
function OnClientDisconnect_PostCallback(playerSlot: number, reason: number): void;
|
|
892
908
|
|
|
893
909
|
/**
|
|
894
910
|
* @description Called when a client is activated by the game.
|
|
895
911
|
*
|
|
896
912
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientActiveCallback|Docs}
|
|
897
913
|
*
|
|
898
|
-
* @param
|
|
914
|
+
* @param playerSlot The player slot
|
|
899
915
|
* @param isActive Active state
|
|
900
916
|
*/
|
|
901
917
|
|
|
902
|
-
function OnClientActiveCallback(
|
|
918
|
+
function OnClientActiveCallback(playerSlot: number, isActive: boolean): void;
|
|
903
919
|
|
|
904
920
|
/**
|
|
905
921
|
* @description Called when a client is fully connected to the game.
|
|
906
922
|
*
|
|
907
923
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientFullyConnectCallback|Docs}
|
|
908
924
|
*
|
|
909
|
-
* @param
|
|
925
|
+
* @param playerSlot The player slot
|
|
910
926
|
*/
|
|
911
927
|
|
|
912
|
-
function OnClientFullyConnectCallback(
|
|
928
|
+
function OnClientFullyConnectCallback(playerSlot: number): void;
|
|
913
929
|
|
|
914
930
|
/**
|
|
915
931
|
* @description Called whenever the client's settings are changed.
|
|
916
932
|
*
|
|
917
933
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientSettingsChangedCallback|Docs}
|
|
918
934
|
*
|
|
919
|
-
* @param
|
|
935
|
+
* @param playerSlot The player slot
|
|
920
936
|
*/
|
|
921
937
|
|
|
922
|
-
function OnClientSettingsChangedCallback(
|
|
938
|
+
function OnClientSettingsChangedCallback(playerSlot: number): void;
|
|
923
939
|
|
|
924
940
|
/**
|
|
925
941
|
* @description Called when a client is fully connected to the game.
|
|
926
942
|
*
|
|
927
943
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-OnClientAuthenticatedCallback|Docs}
|
|
928
944
|
*
|
|
929
|
-
* @param
|
|
945
|
+
* @param playerSlot The player slot
|
|
930
946
|
* @param steam Steam account ID or 0 if not available.
|
|
931
947
|
*/
|
|
932
948
|
|
|
933
|
-
function OnClientAuthenticatedCallback(
|
|
949
|
+
function OnClientAuthenticatedCallback(playerSlot: number, steam: number): void;
|
|
934
950
|
|
|
935
951
|
/**
|
|
936
952
|
* @description Called when the map starts loading.
|
|
@@ -1048,239 +1064,239 @@ declare module ":s2sdk" {
|
|
|
1048
1064
|
}
|
|
1049
1065
|
|
|
1050
1066
|
/**
|
|
1051
|
-
* @description Retrieves
|
|
1067
|
+
* @description Retrieves The player slot from a given entity pointer.
|
|
1052
1068
|
*
|
|
1053
|
-
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-
|
|
1069
|
+
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetPlayerSlotFromEntityPointer|Docs}
|
|
1054
1070
|
*
|
|
1055
1071
|
* @param entity A pointer to the entity (CBaseEntity*).
|
|
1056
1072
|
*/
|
|
1057
|
-
export function
|
|
1073
|
+
export function GetPlayerSlotFromEntityPointer(entity: number): number;
|
|
1058
1074
|
|
|
1059
1075
|
/**
|
|
1060
|
-
* @description Retrieves the client object from a given
|
|
1076
|
+
* @description Retrieves the client object from a given player slot.
|
|
1061
1077
|
*
|
|
1062
|
-
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-
|
|
1078
|
+
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientBaseFromPlayerSlot|Docs}
|
|
1063
1079
|
*
|
|
1064
|
-
* @param
|
|
1080
|
+
* @param playerSlot The index of the client.
|
|
1065
1081
|
*/
|
|
1066
|
-
export function
|
|
1082
|
+
export function GetClientBaseFromPlayerSlot(playerSlot: number): number;
|
|
1067
1083
|
|
|
1068
1084
|
/**
|
|
1069
1085
|
* @description Retrieves the index of a given client object.
|
|
1070
1086
|
*
|
|
1071
|
-
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-
|
|
1087
|
+
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetPlayerSlotFromClientBase|Docs}
|
|
1072
1088
|
*
|
|
1073
1089
|
* @param client A pointer to the client object (CServerSideClient*).
|
|
1074
1090
|
*/
|
|
1075
|
-
export function
|
|
1091
|
+
export function GetPlayerSlotFromClientBase(client: number): number;
|
|
1076
1092
|
|
|
1077
1093
|
/**
|
|
1078
1094
|
* @description Retrieves a client's authentication string (SteamID).
|
|
1079
1095
|
*
|
|
1080
1096
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientAuthId|Docs}
|
|
1081
1097
|
*
|
|
1082
|
-
* @param
|
|
1098
|
+
* @param playerSlot The index of the player's slot whose authentication string is being retrieved.
|
|
1083
1099
|
*/
|
|
1084
|
-
export function GetClientAuthId(
|
|
1100
|
+
export function GetClientAuthId(playerSlot: number): string;
|
|
1085
1101
|
|
|
1086
1102
|
/**
|
|
1087
1103
|
* @description Returns the client's Steam account ID, a unique number identifying a given Steam account.
|
|
1088
1104
|
*
|
|
1089
1105
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientAccountId|Docs}
|
|
1090
1106
|
*
|
|
1091
|
-
* @param
|
|
1107
|
+
* @param playerSlot The index of the player's slot.
|
|
1092
1108
|
*/
|
|
1093
|
-
export function GetClientAccountId(
|
|
1109
|
+
export function GetClientAccountId(playerSlot: number): number;
|
|
1094
1110
|
|
|
1095
1111
|
/**
|
|
1096
1112
|
* @description Retrieves a client's IP address.
|
|
1097
1113
|
*
|
|
1098
1114
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientIp|Docs}
|
|
1099
1115
|
*
|
|
1100
|
-
* @param
|
|
1116
|
+
* @param playerSlot The index of the player's slot.
|
|
1101
1117
|
*/
|
|
1102
|
-
export function GetClientIp(
|
|
1118
|
+
export function GetClientIp(playerSlot: number): string;
|
|
1103
1119
|
|
|
1104
1120
|
/**
|
|
1105
1121
|
* @description Returns the client's name.
|
|
1106
1122
|
*
|
|
1107
1123
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientName|Docs}
|
|
1108
1124
|
*
|
|
1109
|
-
* @param
|
|
1125
|
+
* @param playerSlot The index of the player's slot.
|
|
1110
1126
|
*/
|
|
1111
|
-
export function GetClientName(
|
|
1127
|
+
export function GetClientName(playerSlot: number): string;
|
|
1112
1128
|
|
|
1113
1129
|
/**
|
|
1114
1130
|
* @description Returns the client's connection time in seconds.
|
|
1115
1131
|
*
|
|
1116
1132
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientTime|Docs}
|
|
1117
1133
|
*
|
|
1118
|
-
* @param
|
|
1134
|
+
* @param playerSlot The index of the player's slot.
|
|
1119
1135
|
*/
|
|
1120
|
-
export function GetClientTime(
|
|
1136
|
+
export function GetClientTime(playerSlot: number): number;
|
|
1121
1137
|
|
|
1122
1138
|
/**
|
|
1123
1139
|
* @description Returns the client's current latency (RTT).
|
|
1124
1140
|
*
|
|
1125
1141
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientLatency|Docs}
|
|
1126
1142
|
*
|
|
1127
|
-
* @param
|
|
1143
|
+
* @param playerSlot The index of the player's slot.
|
|
1128
1144
|
*/
|
|
1129
|
-
export function GetClientLatency(
|
|
1145
|
+
export function GetClientLatency(playerSlot: number): number;
|
|
1130
1146
|
|
|
1131
1147
|
/**
|
|
1132
1148
|
* @description Returns the client's access flags.
|
|
1133
1149
|
*
|
|
1134
1150
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetUserFlagBits|Docs}
|
|
1135
1151
|
*
|
|
1136
|
-
* @param
|
|
1152
|
+
* @param playerSlot The index of the player's slot.
|
|
1137
1153
|
*/
|
|
1138
|
-
export function GetUserFlagBits(
|
|
1154
|
+
export function GetUserFlagBits(playerSlot: number): number;
|
|
1139
1155
|
|
|
1140
1156
|
/**
|
|
1141
1157
|
* @description Sets the access flags on a client using a bitmask.
|
|
1142
1158
|
*
|
|
1143
1159
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetUserFlagBits|Docs}
|
|
1144
1160
|
*
|
|
1145
|
-
* @param
|
|
1161
|
+
* @param playerSlot The index of the player's slot.
|
|
1146
1162
|
* @param flags Bitmask representing the flags to be set.
|
|
1147
1163
|
*/
|
|
1148
|
-
export function SetUserFlagBits(
|
|
1164
|
+
export function SetUserFlagBits(playerSlot: number, flags: number): void;
|
|
1149
1165
|
|
|
1150
1166
|
/**
|
|
1151
1167
|
* @description Adds access flags to a client.
|
|
1152
1168
|
*
|
|
1153
1169
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-AddUserFlags|Docs}
|
|
1154
1170
|
*
|
|
1155
|
-
* @param
|
|
1171
|
+
* @param playerSlot The index of the player's slot.
|
|
1156
1172
|
* @param flags Bitmask representing the flags to be added.
|
|
1157
1173
|
*/
|
|
1158
|
-
export function AddUserFlags(
|
|
1174
|
+
export function AddUserFlags(playerSlot: number, flags: number): void;
|
|
1159
1175
|
|
|
1160
1176
|
/**
|
|
1161
1177
|
* @description Removes access flags from a client.
|
|
1162
1178
|
*
|
|
1163
1179
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-RemoveUserFlags|Docs}
|
|
1164
1180
|
*
|
|
1165
|
-
* @param
|
|
1181
|
+
* @param playerSlot The index of the player's slot.
|
|
1166
1182
|
* @param flags Bitmask representing the flags to be removed.
|
|
1167
1183
|
*/
|
|
1168
|
-
export function RemoveUserFlags(
|
|
1184
|
+
export function RemoveUserFlags(playerSlot: number, flags: number): void;
|
|
1169
1185
|
|
|
1170
1186
|
/**
|
|
1171
1187
|
* @description Checks if a certain player has been authenticated.
|
|
1172
1188
|
*
|
|
1173
1189
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsClientAuthorized|Docs}
|
|
1174
1190
|
*
|
|
1175
|
-
* @param
|
|
1191
|
+
* @param playerSlot The index of the player's slot.
|
|
1176
1192
|
*/
|
|
1177
|
-
export function IsClientAuthorized(
|
|
1193
|
+
export function IsClientAuthorized(playerSlot: number): boolean;
|
|
1178
1194
|
|
|
1179
1195
|
/**
|
|
1180
1196
|
* @description Checks if a certain player is connected.
|
|
1181
1197
|
*
|
|
1182
1198
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsClientConnected|Docs}
|
|
1183
1199
|
*
|
|
1184
|
-
* @param
|
|
1200
|
+
* @param playerSlot The index of the player's slot.
|
|
1185
1201
|
*/
|
|
1186
|
-
export function IsClientConnected(
|
|
1202
|
+
export function IsClientConnected(playerSlot: number): boolean;
|
|
1187
1203
|
|
|
1188
1204
|
/**
|
|
1189
1205
|
* @description Checks if a certain player has entered the game.
|
|
1190
1206
|
*
|
|
1191
1207
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsClientInGame|Docs}
|
|
1192
1208
|
*
|
|
1193
|
-
* @param
|
|
1209
|
+
* @param playerSlot The index of the player's slot.
|
|
1194
1210
|
*/
|
|
1195
|
-
export function IsClientInGame(
|
|
1211
|
+
export function IsClientInGame(playerSlot: number): boolean;
|
|
1196
1212
|
|
|
1197
1213
|
/**
|
|
1198
1214
|
* @description Checks if a certain player is the SourceTV bot.
|
|
1199
1215
|
*
|
|
1200
1216
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsClientSourceTV|Docs}
|
|
1201
1217
|
*
|
|
1202
|
-
* @param
|
|
1218
|
+
* @param playerSlot The index of the player's slot.
|
|
1203
1219
|
*/
|
|
1204
|
-
export function IsClientSourceTV(
|
|
1220
|
+
export function IsClientSourceTV(playerSlot: number): boolean;
|
|
1205
1221
|
|
|
1206
1222
|
/**
|
|
1207
1223
|
* @description Checks if the client is alive or dead.
|
|
1208
1224
|
*
|
|
1209
1225
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsClientAlive|Docs}
|
|
1210
1226
|
*
|
|
1211
|
-
* @param
|
|
1227
|
+
* @param playerSlot The index of the player's slot.
|
|
1212
1228
|
*/
|
|
1213
|
-
export function IsClientAlive(
|
|
1229
|
+
export function IsClientAlive(playerSlot: number): boolean;
|
|
1214
1230
|
|
|
1215
1231
|
/**
|
|
1216
1232
|
* @description Checks if a certain player is a fake client.
|
|
1217
1233
|
*
|
|
1218
1234
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-IsFakeClient|Docs}
|
|
1219
1235
|
*
|
|
1220
|
-
* @param
|
|
1236
|
+
* @param playerSlot The index of the player's slot.
|
|
1221
1237
|
*/
|
|
1222
|
-
export function IsFakeClient(
|
|
1238
|
+
export function IsFakeClient(playerSlot: number): boolean;
|
|
1223
1239
|
|
|
1224
1240
|
/**
|
|
1225
1241
|
* @description Retrieves a client's team index.
|
|
1226
1242
|
*
|
|
1227
1243
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientTeam|Docs}
|
|
1228
1244
|
*
|
|
1229
|
-
* @param
|
|
1245
|
+
* @param playerSlot The index of the player's slot.
|
|
1230
1246
|
*/
|
|
1231
|
-
export function GetClientTeam(
|
|
1247
|
+
export function GetClientTeam(playerSlot: number): number;
|
|
1232
1248
|
|
|
1233
1249
|
/**
|
|
1234
1250
|
* @description Returns the client's health.
|
|
1235
1251
|
*
|
|
1236
1252
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientHealth|Docs}
|
|
1237
1253
|
*
|
|
1238
|
-
* @param
|
|
1254
|
+
* @param playerSlot The index of the player's slot.
|
|
1239
1255
|
*/
|
|
1240
|
-
export function GetClientHealth(
|
|
1256
|
+
export function GetClientHealth(playerSlot: number): number;
|
|
1241
1257
|
|
|
1242
1258
|
/**
|
|
1243
1259
|
* @description Returns the client's armor value.
|
|
1244
1260
|
*
|
|
1245
1261
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientArmor|Docs}
|
|
1246
1262
|
*
|
|
1247
|
-
* @param
|
|
1263
|
+
* @param playerSlot The index of the player's slot.
|
|
1248
1264
|
*/
|
|
1249
|
-
export function GetClientArmor(
|
|
1265
|
+
export function GetClientArmor(playerSlot: number): number;
|
|
1250
1266
|
|
|
1251
1267
|
/**
|
|
1252
1268
|
* @description Retrieves the client's origin vector.
|
|
1253
1269
|
*
|
|
1254
1270
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientAbsOrigin|Docs}
|
|
1255
1271
|
*
|
|
1256
|
-
* @param
|
|
1272
|
+
* @param playerSlot The index of the player's slot.
|
|
1257
1273
|
*/
|
|
1258
|
-
export function GetClientAbsOrigin(
|
|
1274
|
+
export function GetClientAbsOrigin(playerSlot: number): vec3;
|
|
1259
1275
|
|
|
1260
1276
|
/**
|
|
1261
1277
|
* @description Retrieves the client's position angle.
|
|
1262
1278
|
*
|
|
1263
1279
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientAbsAngles|Docs}
|
|
1264
1280
|
*
|
|
1265
|
-
* @param
|
|
1281
|
+
* @param playerSlot The index of the player's slot.
|
|
1266
1282
|
*/
|
|
1267
|
-
export function GetClientAbsAngles(
|
|
1283
|
+
export function GetClientAbsAngles(playerSlot: number): vec3;
|
|
1268
1284
|
|
|
1269
1285
|
/**
|
|
1270
1286
|
* @description Retrieves the client's eye angle.
|
|
1271
1287
|
*
|
|
1272
1288
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientEyeAngles|Docs}
|
|
1273
1289
|
*
|
|
1274
|
-
* @param
|
|
1290
|
+
* @param playerSlot The index of the player's slot.
|
|
1275
1291
|
*/
|
|
1276
|
-
export function GetClientEyeAngles(
|
|
1292
|
+
export function GetClientEyeAngles(playerSlot: number): vec3;
|
|
1277
1293
|
|
|
1278
1294
|
/**
|
|
1279
1295
|
* @description Processes the target string to determine if one user can target another.
|
|
1280
1296
|
*
|
|
1281
1297
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-ProcessTargetString|Docs}
|
|
1282
1298
|
*
|
|
1283
|
-
* @param caller
|
|
1299
|
+
* @param caller The index of the player's slot making the target request.
|
|
1284
1300
|
* @param target The target string specifying the player or players to be targeted.
|
|
1285
1301
|
*/
|
|
1286
1302
|
export function ProcessTargetString(caller: number, target: string): number[];
|
|
@@ -1290,60 +1306,60 @@ declare module ":s2sdk" {
|
|
|
1290
1306
|
*
|
|
1291
1307
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-ChangeClientTeam|Docs}
|
|
1292
1308
|
*
|
|
1293
|
-
* @param
|
|
1309
|
+
* @param playerSlot The index of the player's slot.
|
|
1294
1310
|
* @param team The team index to assign the client to.
|
|
1295
1311
|
*/
|
|
1296
|
-
export function ChangeClientTeam(
|
|
1312
|
+
export function ChangeClientTeam(playerSlot: number, team: CSTeam): void;
|
|
1297
1313
|
|
|
1298
1314
|
/**
|
|
1299
1315
|
* @description Switches the player's team.
|
|
1300
1316
|
*
|
|
1301
1317
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SwitchClientTeam|Docs}
|
|
1302
1318
|
*
|
|
1303
|
-
* @param
|
|
1319
|
+
* @param playerSlot The index of the player's slot.
|
|
1304
1320
|
* @param team The team index to switch the client to.
|
|
1305
1321
|
*/
|
|
1306
|
-
export function SwitchClientTeam(
|
|
1322
|
+
export function SwitchClientTeam(playerSlot: number, team: CSTeam): void;
|
|
1307
1323
|
|
|
1308
1324
|
/**
|
|
1309
1325
|
* @description Respawns a player.
|
|
1310
1326
|
*
|
|
1311
1327
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-RespawnClient|Docs}
|
|
1312
1328
|
*
|
|
1313
|
-
* @param
|
|
1329
|
+
* @param playerSlot The index of the player's slot to respawn.
|
|
1314
1330
|
*/
|
|
1315
|
-
export function RespawnClient(
|
|
1331
|
+
export function RespawnClient(playerSlot: number): void;
|
|
1316
1332
|
|
|
1317
1333
|
/**
|
|
1318
1334
|
* @description Forces a player to commit suicide.
|
|
1319
1335
|
*
|
|
1320
1336
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-ForcePlayerSuicide|Docs}
|
|
1321
1337
|
*
|
|
1322
|
-
* @param
|
|
1338
|
+
* @param playerSlot The index of the player's slot.
|
|
1323
1339
|
* @param explode If true, the client will explode upon death.
|
|
1324
1340
|
* @param force If true, the suicide will be forced.
|
|
1325
1341
|
*/
|
|
1326
|
-
export function ForcePlayerSuicide(
|
|
1342
|
+
export function ForcePlayerSuicide(playerSlot: number, explode: boolean, force: boolean): void;
|
|
1327
1343
|
|
|
1328
1344
|
/**
|
|
1329
1345
|
* @description Disconnects a client from the server as soon as the next frame starts.
|
|
1330
1346
|
*
|
|
1331
1347
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-KickClient|Docs}
|
|
1332
1348
|
*
|
|
1333
|
-
* @param
|
|
1349
|
+
* @param playerSlot The index of the player's slot to be kicked.
|
|
1334
1350
|
*/
|
|
1335
|
-
export function KickClient(
|
|
1351
|
+
export function KickClient(playerSlot: number): void;
|
|
1336
1352
|
|
|
1337
1353
|
/**
|
|
1338
1354
|
* @description Bans a client for a specified duration.
|
|
1339
1355
|
*
|
|
1340
1356
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-BanClient|Docs}
|
|
1341
1357
|
*
|
|
1342
|
-
* @param
|
|
1358
|
+
* @param playerSlot The index of the player's slot to be banned.
|
|
1343
1359
|
* @param duration Duration of the ban in seconds.
|
|
1344
1360
|
* @param kick If true, the client will be kicked immediately after being banned.
|
|
1345
1361
|
*/
|
|
1346
|
-
export function BanClient(
|
|
1362
|
+
export function BanClient(playerSlot: number, duration: number, kick: boolean): void;
|
|
1347
1363
|
|
|
1348
1364
|
/**
|
|
1349
1365
|
* @description Bans an identity (either an IP address or a Steam authentication string).
|
|
@@ -1361,185 +1377,185 @@ declare module ":s2sdk" {
|
|
|
1361
1377
|
*
|
|
1362
1378
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientActiveWeapon|Docs}
|
|
1363
1379
|
*
|
|
1364
|
-
* @param
|
|
1380
|
+
* @param playerSlot The index of the client.
|
|
1365
1381
|
*/
|
|
1366
|
-
export function GetClientActiveWeapon(
|
|
1382
|
+
export function GetClientActiveWeapon(playerSlot: number): number;
|
|
1367
1383
|
|
|
1368
1384
|
/**
|
|
1369
1385
|
* @description Retrieves a list of weapon handles owned by the client.
|
|
1370
1386
|
*
|
|
1371
1387
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientWeapons|Docs}
|
|
1372
1388
|
*
|
|
1373
|
-
* @param
|
|
1389
|
+
* @param playerSlot The index of the client.
|
|
1374
1390
|
*/
|
|
1375
|
-
export function GetClientWeapons(
|
|
1391
|
+
export function GetClientWeapons(playerSlot: number): number[];
|
|
1376
1392
|
|
|
1377
1393
|
/**
|
|
1378
1394
|
* @description Forces a player to drop their weapon.
|
|
1379
1395
|
*
|
|
1380
1396
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-DropWeapon|Docs}
|
|
1381
1397
|
*
|
|
1382
|
-
* @param
|
|
1398
|
+
* @param playerSlot The index of the player's slot.
|
|
1383
1399
|
* @param weaponHandle The handle of weapon to drop.
|
|
1384
1400
|
* @param target Target direction.
|
|
1385
1401
|
* @param velocity Velocity to toss weapon or zero to just drop weapon.
|
|
1386
1402
|
*/
|
|
1387
|
-
export function DropWeapon(
|
|
1403
|
+
export function DropWeapon(playerSlot: number, weaponHandle: number, target: vec3, velocity: vec3): void;
|
|
1388
1404
|
|
|
1389
1405
|
/**
|
|
1390
1406
|
* @description Removes all weapons from a client, with an option to remove the suit as well.
|
|
1391
1407
|
*
|
|
1392
1408
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-StripWeapons|Docs}
|
|
1393
1409
|
*
|
|
1394
|
-
* @param
|
|
1410
|
+
* @param playerSlot The index of the client.
|
|
1395
1411
|
* @param removeSuit A boolean indicating whether to also remove the client's suit.
|
|
1396
1412
|
*/
|
|
1397
|
-
export function StripWeapons(
|
|
1413
|
+
export function StripWeapons(playerSlot: number, removeSuit: boolean): void;
|
|
1398
1414
|
|
|
1399
1415
|
/**
|
|
1400
1416
|
* @description Bumps a player's weapon.
|
|
1401
1417
|
*
|
|
1402
1418
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-BumpWeapon|Docs}
|
|
1403
1419
|
*
|
|
1404
|
-
* @param
|
|
1420
|
+
* @param playerSlot The index of the client.
|
|
1405
1421
|
* @param weaponHandle The handle of weapon to bump.
|
|
1406
1422
|
*/
|
|
1407
|
-
export function BumpWeapon(
|
|
1423
|
+
export function BumpWeapon(playerSlot: number, weaponHandle: number): void;
|
|
1408
1424
|
|
|
1409
1425
|
/**
|
|
1410
1426
|
* @description Switches a player's weapon.
|
|
1411
1427
|
*
|
|
1412
1428
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SwitchWeapon|Docs}
|
|
1413
1429
|
*
|
|
1414
|
-
* @param
|
|
1430
|
+
* @param playerSlot The index of the client.
|
|
1415
1431
|
* @param weaponHandle The handle of weapon to switch.
|
|
1416
1432
|
*/
|
|
1417
|
-
export function SwitchWeapon(
|
|
1433
|
+
export function SwitchWeapon(playerSlot: number, weaponHandle: number): void;
|
|
1418
1434
|
|
|
1419
1435
|
/**
|
|
1420
1436
|
* @description Removes a player's weapon.
|
|
1421
1437
|
*
|
|
1422
1438
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-RemoveWeapon|Docs}
|
|
1423
1439
|
*
|
|
1424
|
-
* @param
|
|
1440
|
+
* @param playerSlot The index of the client.
|
|
1425
1441
|
* @param weaponHandle The handle of weapon to remove.
|
|
1426
1442
|
*/
|
|
1427
|
-
export function RemoveWeapon(
|
|
1443
|
+
export function RemoveWeapon(playerSlot: number, weaponHandle: number): void;
|
|
1428
1444
|
|
|
1429
1445
|
/**
|
|
1430
1446
|
* @description Gives a named item (e.g., weapon) to a client.
|
|
1431
1447
|
*
|
|
1432
1448
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GiveNamedItem|Docs}
|
|
1433
1449
|
*
|
|
1434
|
-
* @param
|
|
1450
|
+
* @param playerSlot The index of the client.
|
|
1435
1451
|
* @param itemName The name of the item to give.
|
|
1436
1452
|
*/
|
|
1437
|
-
export function GiveNamedItem(
|
|
1453
|
+
export function GiveNamedItem(playerSlot: number, itemName: string): number;
|
|
1438
1454
|
|
|
1439
1455
|
/**
|
|
1440
1456
|
* @description Retrieves the state of a specific button for a client.
|
|
1441
1457
|
*
|
|
1442
1458
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientButtons|Docs}
|
|
1443
1459
|
*
|
|
1444
|
-
* @param
|
|
1460
|
+
* @param playerSlot The index of the client.
|
|
1445
1461
|
* @param buttonIndex The index of the button (0-2).
|
|
1446
1462
|
*/
|
|
1447
|
-
export function GetClientButtons(
|
|
1463
|
+
export function GetClientButtons(playerSlot: number, buttonIndex: number): number;
|
|
1448
1464
|
|
|
1449
1465
|
/**
|
|
1450
1466
|
* @description Retrieves the amount of money a client has.
|
|
1451
1467
|
*
|
|
1452
1468
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientMoney|Docs}
|
|
1453
1469
|
*
|
|
1454
|
-
* @param
|
|
1470
|
+
* @param playerSlot The index of the client.
|
|
1455
1471
|
*/
|
|
1456
|
-
export function GetClientMoney(
|
|
1472
|
+
export function GetClientMoney(playerSlot: number): number;
|
|
1457
1473
|
|
|
1458
1474
|
/**
|
|
1459
1475
|
* @description Sets the amount of money for a client.
|
|
1460
1476
|
*
|
|
1461
1477
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetClientMoney|Docs}
|
|
1462
1478
|
*
|
|
1463
|
-
* @param
|
|
1479
|
+
* @param playerSlot The index of the client.
|
|
1464
1480
|
* @param money The amount of money to set.
|
|
1465
1481
|
*/
|
|
1466
|
-
export function SetClientMoney(
|
|
1482
|
+
export function SetClientMoney(playerSlot: number, money: number): void;
|
|
1467
1483
|
|
|
1468
1484
|
/**
|
|
1469
1485
|
* @description Retrieves the number of kills for a client.
|
|
1470
1486
|
*
|
|
1471
1487
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientKills|Docs}
|
|
1472
1488
|
*
|
|
1473
|
-
* @param
|
|
1489
|
+
* @param playerSlot The index of the client.
|
|
1474
1490
|
*/
|
|
1475
|
-
export function GetClientKills(
|
|
1491
|
+
export function GetClientKills(playerSlot: number): number;
|
|
1476
1492
|
|
|
1477
1493
|
/**
|
|
1478
1494
|
* @description Sets the number of kills for a client.
|
|
1479
1495
|
*
|
|
1480
1496
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetClientKills|Docs}
|
|
1481
1497
|
*
|
|
1482
|
-
* @param
|
|
1498
|
+
* @param playerSlot The index of the client.
|
|
1483
1499
|
* @param kills The number of kills to set.
|
|
1484
1500
|
*/
|
|
1485
|
-
export function SetClientKills(
|
|
1501
|
+
export function SetClientKills(playerSlot: number, kills: number): void;
|
|
1486
1502
|
|
|
1487
1503
|
/**
|
|
1488
1504
|
* @description Retrieves the number of deaths for a client.
|
|
1489
1505
|
*
|
|
1490
1506
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientDeaths|Docs}
|
|
1491
1507
|
*
|
|
1492
|
-
* @param
|
|
1508
|
+
* @param playerSlot The index of the client.
|
|
1493
1509
|
*/
|
|
1494
|
-
export function GetClientDeaths(
|
|
1510
|
+
export function GetClientDeaths(playerSlot: number): number;
|
|
1495
1511
|
|
|
1496
1512
|
/**
|
|
1497
1513
|
* @description Sets the number of deaths for a client.
|
|
1498
1514
|
*
|
|
1499
1515
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetClientDeaths|Docs}
|
|
1500
1516
|
*
|
|
1501
|
-
* @param
|
|
1517
|
+
* @param playerSlot The index of the client.
|
|
1502
1518
|
* @param deaths The number of deaths to set.
|
|
1503
1519
|
*/
|
|
1504
|
-
export function SetClientDeaths(
|
|
1520
|
+
export function SetClientDeaths(playerSlot: number, deaths: number): void;
|
|
1505
1521
|
|
|
1506
1522
|
/**
|
|
1507
1523
|
* @description Retrieves the number of assists for a client.
|
|
1508
1524
|
*
|
|
1509
1525
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientAssists|Docs}
|
|
1510
1526
|
*
|
|
1511
|
-
* @param
|
|
1527
|
+
* @param playerSlot The index of the client.
|
|
1512
1528
|
*/
|
|
1513
|
-
export function GetClientAssists(
|
|
1529
|
+
export function GetClientAssists(playerSlot: number): number;
|
|
1514
1530
|
|
|
1515
1531
|
/**
|
|
1516
1532
|
* @description Sets the number of assists for a client.
|
|
1517
1533
|
*
|
|
1518
1534
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetClientAssists|Docs}
|
|
1519
1535
|
*
|
|
1520
|
-
* @param
|
|
1536
|
+
* @param playerSlot The index of the client.
|
|
1521
1537
|
* @param assists The number of assists to set.
|
|
1522
1538
|
*/
|
|
1523
|
-
export function SetClientAssists(
|
|
1539
|
+
export function SetClientAssists(playerSlot: number, assists: number): void;
|
|
1524
1540
|
|
|
1525
1541
|
/**
|
|
1526
1542
|
* @description Retrieves the total damage dealt by a client.
|
|
1527
1543
|
*
|
|
1528
1544
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientDamage|Docs}
|
|
1529
1545
|
*
|
|
1530
|
-
* @param
|
|
1546
|
+
* @param playerSlot The index of the client.
|
|
1531
1547
|
*/
|
|
1532
|
-
export function GetClientDamage(
|
|
1548
|
+
export function GetClientDamage(playerSlot: number): number;
|
|
1533
1549
|
|
|
1534
1550
|
/**
|
|
1535
1551
|
* @description Sets the total damage dealt by a client.
|
|
1536
1552
|
*
|
|
1537
1553
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetClientDamage|Docs}
|
|
1538
1554
|
*
|
|
1539
|
-
* @param
|
|
1555
|
+
* @param playerSlot The index of the client.
|
|
1540
1556
|
* @param damage The amount of damage to set.
|
|
1541
1557
|
*/
|
|
1542
|
-
export function SetClientDamage(
|
|
1558
|
+
export function SetClientDamage(playerSlot: number, damage: number): void;
|
|
1543
1559
|
|
|
1544
1560
|
/**
|
|
1545
1561
|
* @description Creates a console command as an administrative command.
|
|
@@ -1551,8 +1567,9 @@ declare module ":s2sdk" {
|
|
|
1551
1567
|
* @param description A brief description of what the command does.
|
|
1552
1568
|
* @param flags Command flags that define the behavior of the command.
|
|
1553
1569
|
* @param callback A callback function that is invoked when the command is executed.
|
|
1570
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
1554
1571
|
*/
|
|
1555
|
-
export function AddAdminCommand(name: string, adminFlags: number, description: string, flags: ConVarFlag, callback: typeof Callbacks.CommandCallback): boolean;
|
|
1572
|
+
export function AddAdminCommand(name: string, adminFlags: number, description: string, flags: ConVarFlag, callback: typeof Callbacks.CommandCallback, type: HookMode): boolean;
|
|
1556
1573
|
|
|
1557
1574
|
/**
|
|
1558
1575
|
* @description Creates a console command or hooks an already existing one.
|
|
@@ -1563,8 +1580,9 @@ declare module ":s2sdk" {
|
|
|
1563
1580
|
* @param description A brief description of what the command does.
|
|
1564
1581
|
* @param flags Command flags that define the behavior of the command.
|
|
1565
1582
|
* @param callback A callback function that is invoked when the command is executed.
|
|
1583
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
1566
1584
|
*/
|
|
1567
|
-
export function AddConsoleCommand(name: string, description: string, flags: ConVarFlag, callback: typeof Callbacks.CommandCallback): boolean;
|
|
1585
|
+
export function AddConsoleCommand(name: string, description: string, flags: ConVarFlag, callback: typeof Callbacks.CommandCallback, type: HookMode): boolean;
|
|
1568
1586
|
|
|
1569
1587
|
/**
|
|
1570
1588
|
* @description Removes a console command from the system.
|
|
@@ -1583,9 +1601,9 @@ declare module ":s2sdk" {
|
|
|
1583
1601
|
*
|
|
1584
1602
|
* @param name The name of the command.
|
|
1585
1603
|
* @param callback The callback function that will be invoked when the command is executed.
|
|
1586
|
-
* @param
|
|
1604
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
1587
1605
|
*/
|
|
1588
|
-
export function AddCommandListener(name: string, callback: typeof Callbacks.CommandCallback,
|
|
1606
|
+
export function AddCommandListener(name: string, callback: typeof Callbacks.CommandCallback, type: HookMode): boolean;
|
|
1589
1607
|
|
|
1590
1608
|
/**
|
|
1591
1609
|
* @description Removes a callback that fires when a command is sent to the server.
|
|
@@ -1594,9 +1612,9 @@ declare module ":s2sdk" {
|
|
|
1594
1612
|
*
|
|
1595
1613
|
* @param name The name of the command.
|
|
1596
1614
|
* @param callback The callback function to be removed.
|
|
1597
|
-
* @param
|
|
1615
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
1598
1616
|
*/
|
|
1599
|
-
export function RemoveCommandListener(name: string, callback: typeof Callbacks.CommandCallback,
|
|
1617
|
+
export function RemoveCommandListener(name: string, callback: typeof Callbacks.CommandCallback, type: HookMode): boolean;
|
|
1600
1618
|
|
|
1601
1619
|
/**
|
|
1602
1620
|
* @description Executes a server command as if it were run on the server console or through RCON.
|
|
@@ -1621,20 +1639,20 @@ declare module ":s2sdk" {
|
|
|
1621
1639
|
*
|
|
1622
1640
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-ClientCommand|Docs}
|
|
1623
1641
|
*
|
|
1624
|
-
* @param
|
|
1642
|
+
* @param playerSlot The index of the client executing the command.
|
|
1625
1643
|
* @param command The command to execute on the client.
|
|
1626
1644
|
*/
|
|
1627
|
-
export function ClientCommand(
|
|
1645
|
+
export function ClientCommand(playerSlot: number, command: string): void;
|
|
1628
1646
|
|
|
1629
1647
|
/**
|
|
1630
1648
|
* @description Executes a client command on the server without network communication.
|
|
1631
1649
|
*
|
|
1632
1650
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-FakeClientCommand|Docs}
|
|
1633
1651
|
*
|
|
1634
|
-
* @param
|
|
1652
|
+
* @param playerSlot The index of the client.
|
|
1635
1653
|
* @param command The command to be executed by the client.
|
|
1636
1654
|
*/
|
|
1637
|
-
export function FakeClientCommand(
|
|
1655
|
+
export function FakeClientCommand(playerSlot: number, command: string): void;
|
|
1638
1656
|
|
|
1639
1657
|
/**
|
|
1640
1658
|
* @description Sends a message to the server console.
|
|
@@ -1650,50 +1668,50 @@ declare module ":s2sdk" {
|
|
|
1650
1668
|
*
|
|
1651
1669
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintToConsole|Docs}
|
|
1652
1670
|
*
|
|
1653
|
-
* @param
|
|
1671
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1654
1672
|
* @param message The message to be sent to the client's console.
|
|
1655
1673
|
*/
|
|
1656
|
-
export function PrintToConsole(
|
|
1674
|
+
export function PrintToConsole(playerSlot: number, message: string): void;
|
|
1657
1675
|
|
|
1658
1676
|
/**
|
|
1659
1677
|
* @description Prints a message to a specific client in the chat area.
|
|
1660
1678
|
*
|
|
1661
1679
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintToChat|Docs}
|
|
1662
1680
|
*
|
|
1663
|
-
* @param
|
|
1681
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1664
1682
|
* @param message The message to be printed in the chat area.
|
|
1665
1683
|
*/
|
|
1666
|
-
export function PrintToChat(
|
|
1684
|
+
export function PrintToChat(playerSlot: number, message: string): void;
|
|
1667
1685
|
|
|
1668
1686
|
/**
|
|
1669
1687
|
* @description Prints a message to a specific client in the center of the screen.
|
|
1670
1688
|
*
|
|
1671
1689
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintCenterText|Docs}
|
|
1672
1690
|
*
|
|
1673
|
-
* @param
|
|
1691
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1674
1692
|
* @param message The message to be printed in the center of the screen.
|
|
1675
1693
|
*/
|
|
1676
|
-
export function PrintCenterText(
|
|
1694
|
+
export function PrintCenterText(playerSlot: number, message: string): void;
|
|
1677
1695
|
|
|
1678
1696
|
/**
|
|
1679
1697
|
* @description Prints a message to a specific client with an alert box.
|
|
1680
1698
|
*
|
|
1681
1699
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintAlertText|Docs}
|
|
1682
1700
|
*
|
|
1683
|
-
* @param
|
|
1701
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1684
1702
|
* @param message The message to be printed in the alert box.
|
|
1685
1703
|
*/
|
|
1686
|
-
export function PrintAlertText(
|
|
1704
|
+
export function PrintAlertText(playerSlot: number, message: string): void;
|
|
1687
1705
|
|
|
1688
1706
|
/**
|
|
1689
1707
|
* @description Prints a html message to a specific client in the center of the screen.
|
|
1690
1708
|
*
|
|
1691
1709
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintCentreHtml|Docs}
|
|
1692
1710
|
*
|
|
1693
|
-
* @param
|
|
1711
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1694
1712
|
* @param message The HTML-formatted message to be printed.
|
|
1695
1713
|
*/
|
|
1696
|
-
export function PrintCentreHtml(
|
|
1714
|
+
export function PrintCentreHtml(playerSlot: number, message: string): void;
|
|
1697
1715
|
|
|
1698
1716
|
/**
|
|
1699
1717
|
* @description Sends a message to every client's console.
|
|
@@ -1745,10 +1763,10 @@ declare module ":s2sdk" {
|
|
|
1745
1763
|
*
|
|
1746
1764
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-PrintToChatColored|Docs}
|
|
1747
1765
|
*
|
|
1748
|
-
* @param
|
|
1766
|
+
* @param playerSlot The index of the player's slot to whom the message will be sent.
|
|
1749
1767
|
* @param message The message to be printed in the chat area with color.
|
|
1750
1768
|
*/
|
|
1751
|
-
export function PrintToChatColored(
|
|
1769
|
+
export function PrintToChatColored(playerSlot: number, message: string): void;
|
|
1752
1770
|
|
|
1753
1771
|
/**
|
|
1754
1772
|
* @description Prints a colored message to all clients in the chat area.
|
|
@@ -2465,50 +2483,50 @@ declare module ":s2sdk" {
|
|
|
2465
2483
|
*
|
|
2466
2484
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SendConVarValue|Docs}
|
|
2467
2485
|
*
|
|
2468
|
-
* @param
|
|
2486
|
+
* @param playerSlot The index of the client to replicate the value to.
|
|
2469
2487
|
* @param conVarHandle The handle to the console variable data.
|
|
2470
2488
|
* @param value The value to send to the client.
|
|
2471
2489
|
*/
|
|
2472
|
-
export function SendConVarValue(
|
|
2490
|
+
export function SendConVarValue(playerSlot: number, conVarHandle: number, value: string): void;
|
|
2473
2491
|
|
|
2474
2492
|
/**
|
|
2475
2493
|
* @description Retrieves the value of a client's console variable and stores it in the output string.
|
|
2476
2494
|
*
|
|
2477
2495
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetClientConVarValue|Docs}
|
|
2478
2496
|
*
|
|
2479
|
-
* @param
|
|
2497
|
+
* @param playerSlot The index of the client whose console variable value is being retrieved.
|
|
2480
2498
|
* @param convarName The name of the console variable to retrieve.
|
|
2481
2499
|
*/
|
|
2482
|
-
export function GetClientConVarValue(
|
|
2500
|
+
export function GetClientConVarValue(playerSlot: number, convarName: string): string;
|
|
2483
2501
|
|
|
2484
2502
|
/**
|
|
2485
2503
|
* @description Replicates a console variable value to a specific fake client. This does not change the actual console variable value.
|
|
2486
2504
|
*
|
|
2487
2505
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-SetFakeClientConVarValue|Docs}
|
|
2488
2506
|
*
|
|
2489
|
-
* @param
|
|
2507
|
+
* @param playerSlot The index of the fake client to replicate the value to.
|
|
2490
2508
|
* @param convarName The name of the console variable.
|
|
2491
2509
|
* @param convarValue The value to set for the console variable.
|
|
2492
2510
|
*/
|
|
2493
|
-
export function SetFakeClientConVarValue(
|
|
2511
|
+
export function SetFakeClientConVarValue(playerSlot: number, convarName: string, convarValue: string): void;
|
|
2494
2512
|
|
|
2495
2513
|
/**
|
|
2496
2514
|
* @description Returns the path of the game's directory.
|
|
2497
2515
|
*
|
|
2498
2516
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetGameDirectory|Docs}
|
|
2499
2517
|
*
|
|
2500
|
-
*
|
|
2518
|
+
*
|
|
2501
2519
|
*/
|
|
2502
|
-
export function GetGameDirectory(
|
|
2520
|
+
export function GetGameDirectory(): string;
|
|
2503
2521
|
|
|
2504
2522
|
/**
|
|
2505
2523
|
* @description Returns the current map name.
|
|
2506
2524
|
*
|
|
2507
2525
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-GetCurrentMap|Docs}
|
|
2508
2526
|
*
|
|
2509
|
-
*
|
|
2527
|
+
*
|
|
2510
2528
|
*/
|
|
2511
|
-
export function GetCurrentMap(
|
|
2529
|
+
export function GetCurrentMap(): string;
|
|
2512
2530
|
|
|
2513
2531
|
/**
|
|
2514
2532
|
* @description Returns whether a specified map is valid or not.
|
|
@@ -2703,7 +2721,7 @@ declare module ":s2sdk" {
|
|
|
2703
2721
|
*
|
|
2704
2722
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-EmitSoundToClient|Docs}
|
|
2705
2723
|
*
|
|
2706
|
-
* @param
|
|
2724
|
+
* @param playerSlot The index of the client to whom the sound will be emitted.
|
|
2707
2725
|
* @param channel The channel through which the sound will be played.
|
|
2708
2726
|
* @param sound The name of the sound to emit.
|
|
2709
2727
|
* @param volume The volume of the sound.
|
|
@@ -2713,7 +2731,7 @@ declare module ":s2sdk" {
|
|
|
2713
2731
|
* @param origin The origin of the sound in 3D space.
|
|
2714
2732
|
* @param soundTime The time at which the sound should be played.
|
|
2715
2733
|
*/
|
|
2716
|
-
export function EmitSoundToClient(
|
|
2734
|
+
export function EmitSoundToClient(playerSlot: number, channel: number, sound: string, volume: number, soundLevel: number, flags: number, pitch: number, origin: vec3, soundTime: number): void;
|
|
2717
2735
|
|
|
2718
2736
|
/**
|
|
2719
2737
|
* @description Converts an entity index into an entity pointer.
|
|
@@ -2813,9 +2831,9 @@ declare module ":s2sdk" {
|
|
|
2813
2831
|
* @param szClassname The class name of the entity to hook the output for.
|
|
2814
2832
|
* @param szOutput The output event name to hook.
|
|
2815
2833
|
* @param callback The callback function to invoke when the output is fired.
|
|
2816
|
-
* @param
|
|
2834
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
2817
2835
|
*/
|
|
2818
|
-
export function HookEntityOutput(szClassname: string, szOutput: string, callback: typeof Callbacks.HookEntityOutputCallback,
|
|
2836
|
+
export function HookEntityOutput(szClassname: string, szOutput: string, callback: typeof Callbacks.HookEntityOutputCallback, type: HookMode): boolean;
|
|
2819
2837
|
|
|
2820
2838
|
/**
|
|
2821
2839
|
* @description Removes an entity output hook.
|
|
@@ -2825,9 +2843,9 @@ declare module ":s2sdk" {
|
|
|
2825
2843
|
* @param szClassname The class name of the entity from which to unhook the output.
|
|
2826
2844
|
* @param szOutput The output event name to unhook.
|
|
2827
2845
|
* @param callback The callback function that was previously hooked.
|
|
2828
|
-
* @param
|
|
2846
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
2829
2847
|
*/
|
|
2830
|
-
export function UnhookEntityOutput(szClassname: string, szOutput: string, callback: typeof Callbacks.HookEntityOutputCallback,
|
|
2848
|
+
export function UnhookEntityOutput(szClassname: string, szOutput: string, callback: typeof Callbacks.HookEntityOutputCallback, type: HookMode): boolean;
|
|
2831
2849
|
|
|
2832
2850
|
/**
|
|
2833
2851
|
* @description Searches for an entity by classname.
|
|
@@ -3223,9 +3241,9 @@ declare module ":s2sdk" {
|
|
|
3223
3241
|
*
|
|
3224
3242
|
* @param name The name of the event to hook.
|
|
3225
3243
|
* @param pCallback The callback function to call when the event is fired.
|
|
3226
|
-
* @param
|
|
3244
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
3227
3245
|
*/
|
|
3228
|
-
export function HookEvent(name: string, pCallback: typeof Callbacks.EventCallback,
|
|
3246
|
+
export function HookEvent(name: string, pCallback: typeof Callbacks.EventCallback, type: HookMode): number;
|
|
3229
3247
|
|
|
3230
3248
|
/**
|
|
3231
3249
|
* @description Removes a hook for when a game event is fired.
|
|
@@ -3234,9 +3252,9 @@ declare module ":s2sdk" {
|
|
|
3234
3252
|
*
|
|
3235
3253
|
* @param name The name of the event to unhook.
|
|
3236
3254
|
* @param pCallback The callback function to remove.
|
|
3237
|
-
* @param
|
|
3255
|
+
* @param type Whether the hook was in post mode (after processing) or pre mode (before processing).
|
|
3238
3256
|
*/
|
|
3239
|
-
export function UnhookEvent(name: string, pCallback: typeof Callbacks.EventCallback,
|
|
3257
|
+
export function UnhookEvent(name: string, pCallback: typeof Callbacks.EventCallback, type: HookMode): number;
|
|
3240
3258
|
|
|
3241
3259
|
/**
|
|
3242
3260
|
* @description Creates a game event to be fired later.
|
|
@@ -3264,9 +3282,9 @@ declare module ":s2sdk" {
|
|
|
3264
3282
|
* {@link https://untrustedmodders.github.io/plugify-generator/?file=https://github.com/untrustedmodders/plugify-source-2/blob/main/s2sdk.pplugin.in#item-FireEventToClient|Docs}
|
|
3265
3283
|
*
|
|
3266
3284
|
* @param pInfo A pointer to the EventInfo structure containing event data.
|
|
3267
|
-
* @param
|
|
3285
|
+
* @param playerSlot The index of the client to fire the event to.
|
|
3268
3286
|
*/
|
|
3269
|
-
export function FireEventToClient(pInfo: number,
|
|
3287
|
+
export function FireEventToClient(pInfo: number, playerSlot: number): void;
|
|
3270
3288
|
|
|
3271
3289
|
/**
|
|
3272
3290
|
* @description Cancels a previously created game event that has not been fired.
|