@@ -219,6 +219,12 @@ void export_client(scope _players)
219219{
220220 class_<IClient, IClient*, bases<INetChannelHandler>, boost::noncopyable> Client (" Client" , no_init);
221221
222+ Client.add_property (
223+ " slot" ,
224+ &IClient::GetPlayerSlot,
225+ " Return the client's slot.(usually entity number-1)"
226+ );
227+
222228 Client.add_property (
223229 " name" ,
224230 &IClient::GetClientName,
@@ -248,6 +254,52 @@ void export_client(scope _players)
248254 &IClientExt::Disconnect
249255 );
250256
257+ Client.def (" is_connected" ,
258+ &IClient::IsConnected,
259+ " Return True if client has established network channels."
260+ );
261+
262+ Client.def (" is_spawned" ,
263+ &IClient::IsSpawned,
264+ " Return True if client is downloading signon data."
265+ );
266+
267+ Client.def (" is_active" ,
268+ &IClient::IsActive,
269+ " Return True if client active is ingame, receiving snapshots."
270+ );
271+
272+ Client.def (" is_fake_client" ,
273+ &IClient::IsFakeClient,
274+ " Return True if client is not a real player."
275+ );
276+
277+ Client.def (" is_hltv" ,
278+ &IClient::IsHLTV,
279+ " Return True if client is a HLTV proxy."
280+ );
281+
282+ Client.def (" is_human_player" ,
283+ #if defined(ENGINE_BLADE) || defined(ENGINE_CSGO) || defined(ENGINE_LEFT4DEAD2)
284+ &IClient::IsHumanPlayer,
285+ #else
286+ &IClientExt::IsHumanPlayer,
287+ #endif
288+ " Return True if client is not a fake client and is not a HLTV proxy."
289+ );
290+
291+ Client.def (" is_hearing_client" ,
292+ &IClientExt::IsHearingClient,
293+ " Return True if client hears this player." ,
294+ args (" sender" )
295+ );
296+
297+ Client.def (" is_proximity_hearing_client" ,
298+ &IClientExt::IsProximityHearingClient,
299+ " Return True if client hears this player by proximity." ,
300+ args (" sender" )
301+ );
302+
251303 // TODO: Export more
252304
253305 Client ADD_MEM_TOOLS (IClient);
0 commit comments