32 #ifndef _INCLUDE_SOURCEMOD_INTERFACE_IPLAYERHELPERS_H_
33 #define _INCLUDE_SOURCEMOD_INTERFACE_IPLAYERHELPERS_H_
43 #define SMINTERFACE_PLAYERMANAGER_NAME "IPlayerManager"
44 #define SMINTERFACE_PLAYERMANAGER_VERSION 21
49 #define SM_REPLY_CONSOLE 0
50 #define SM_REPLY_CHAT 1
52 #define SM_MAXPLAYERS 65
68 virtual const char *GetName() =0;
76 virtual const char *GetIPAddress() =0;
85 virtual const char *GetAuthString(
bool validated =
true) =0;
92 virtual edict_t *GetEdict() =0;
99 virtual bool IsInGame() =0;
109 virtual bool IsConnected() =0;
116 virtual bool IsFakeClient() =0;
123 virtual AdminId GetAdminId() =0;
131 virtual void SetAdminId(AdminId
id,
bool temp) =0;
138 virtual int GetUserId() =0;
145 virtual unsigned int GetLanguageId() =0;
152 virtual IPlayerInfo *GetPlayerInfo() =0;
165 virtual bool RunAdminCacheChecks() =0;
188 virtual void NotifyPostAdminChecks() =0;
195 virtual unsigned int GetSerial() =0;
202 virtual bool IsAuthorized() =0;
209 virtual void Kick(
const char *message) =0;
218 virtual bool IsInKickQueue() =0;
225 virtual void MarkAsBeingKicked() =0;
227 virtual void SetLanguageId(
unsigned int id) =0;
234 virtual bool IsSourceTV()
const =0;
241 virtual bool IsReplay()
const =0;
250 virtual unsigned int GetSteamAccountID(
bool validated =
true) =0;
257 virtual int GetIndex()
const =0;
264 virtual void PrintToConsole(
const char *pMsg) =0;
269 virtual void ClearAdmin() =0;
278 virtual uint64_t GetSteamId64(
bool validated =
true) =0;
287 virtual const char *GetSteam2Id(
bool validated =
true) =0;
296 virtual const char *GetSteam3Id(
bool validated =
true) =0;
312 return SMINTERFACE_PLAYERMANAGER_VERSION;
435 #define COMMAND_FILTER_ALIVE (1<<0)
436 #define COMMAND_FILTER_DEAD (1<<1)
437 #define COMMAND_FILTER_CONNECTED (1<<2)
438 #define COMMAND_FILTER_NO_IMMUNITY (1<<3)
439 #define COMMAND_FILTER_NO_MULTI (1<<4)
440 #define COMMAND_FILTER_NO_BOTS (1<<5)
442 #define COMMAND_TARGET_VALID 1
443 #define COMMAND_TARGET_NONE 0
444 #define COMMAND_TARGET_NOT_ALIVE -1
445 #define COMMAND_TARGET_NOT_DEAD -2
446 #define COMMAND_TARGET_NOT_IN_GAME -3
447 #define COMMAND_TARGET_IMMUNE -4
448 #define COMMAND_TARGET_EMPTY_FILTER -5
449 #define COMMAND_TARGET_NOT_HUMAN -6
450 #define COMMAND_TARGET_AMBIGUOUS -7
452 #define COMMAND_TARGETNAME_RAW 0
453 #define COMMAND_TARGETNAME_ML 1
458 struct cmd_target_info_t
494 return SMINTERFACE_PLAYERMANAGER_NAME;
498 return SMINTERFACE_PLAYERMANAGER_VERSION;
532 virtual IGamePlayer *GetGamePlayer(edict_t *pEdict) =0;
541 virtual int GetMaxClients() =0;
548 virtual int GetNumPlayers() =0;
556 virtual int GetClientOfUserId(
int userid) =0;
564 virtual bool IsServerActivated() =0;
571 virtual unsigned int GetReplyTo() =0;
579 virtual unsigned int SetReplyTo(
unsigned int reply) =0;
610 virtual int GetClientFromSerial(
unsigned int serial) =0;
625 virtual void ClearAdminId(AdminId
id) =0;
630 virtual void RecheckAnyAdmins() =0;
634 #endif //_INCLUDE_SOURCEMOD_INTERFACE_IPLAYERHELPERS_H_
int target_name_style
Definition: IPlayerHelpers.h:467
char * target_name
Definition: IPlayerHelpers.h:465
Defines the Share System, responsible for shared resources and dependencies.
virtual void OnClientDisconnecting(int client)
Called when a client is disconnecting (not fully disconnected yet).
Definition: IPlayerHelpers.h:351
int reason
Definition: IPlayerHelpers.h:468
virtual void OnClientConnected(int client)
Called when a client has connected.
Definition: IPlayerHelpers.h:333
Definition: IPlayerHelpers.h:489
Defines the base functionality required by a shared interface.
Definition: IShareSys.h:92
cell_t * targets
Definition: IPlayerHelpers.h:462
cell_t max_targets
Definition: IPlayerHelpers.h:463
virtual bool InterceptClientConnect(int client, char *error, size_t maxlength)
Called when a client requests connection.
Definition: IPlayerHelpers.h:323
size_t target_name_maxlength
Definition: IPlayerHelpers.h:466
Provides callbacks for important client events.
Definition: IPlayerHelpers.h:302
int admin
Definition: IPlayerHelpers.h:461
virtual unsigned int GetClientListenerVersion()
Returns the current client listener version.
Definition: IPlayerHelpers.h:310
unsigned int GetInterfaceVersion()
Must return an integer defining the interface's version.
Definition: IPlayerHelpers.h:496
Holds the many command target info parameters.
Definition: IPlayerHelpers.h:458
virtual void OnClientDisconnected(int client)
Called when a client has fully disconnected.
Definition: IPlayerHelpers.h:360
int flags
Definition: IPlayerHelpers.h:464
Intercepts a command target operation.
Definition: IPlayerHelpers.h:475
const char * pattern
Definition: IPlayerHelpers.h:460
Abstracts some Half-Life 2 and SourceMod properties about clients.
Definition: IPlayerHelpers.h:59
Defines the interface to manage the Admin Users/Groups and Override caches.
virtual bool OnClientPreAdminCheck(int client)
Called once a client is authorized and fully in-game, but before admin checks are done...
Definition: IPlayerHelpers.h:398
virtual void OnClientPutInServer(int client)
Called when a client is put in server.
Definition: IPlayerHelpers.h:342
virtual void OnClientSettingsChanged(int client)
Notifies the extension that a clients settings changed.
Definition: IPlayerHelpers.h:430
virtual void OnServerActivated(int max_clients)
Called when the server is activated.
Definition: IPlayerHelpers.h:377
unsigned int num_targets
Definition: IPlayerHelpers.h:469
virtual void OnClientAuthorized(int client, const char *authstring)
Called when a client has received authorization.
Definition: IPlayerHelpers.h:370
virtual void OnMaxPlayersChanged(int newvalue)
Notifies the extension that the maxplayers value has changed.
Definition: IPlayerHelpers.h:421
virtual void OnClientPostAdminCheck(int client)
Called once a client is authorized and fully in-game, and after all post-connection authorizations ha...
Definition: IPlayerHelpers.h:412
const char * GetInterfaceName()
Must return a string defining the interface's unique name.
Definition: IPlayerHelpers.h:492