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