diff options
| author | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-02-17 23:42:09 +0100 |
| commit | 5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch) | |
| tree | 054acff1113270a9cd07933df760f3768c1b6853 /source/sourcemod/scripting/include/gamechaos/isvalidclient.inc | |
| parent | 341db13a008dc12bb22ceb50452d93d01476308c (diff) | |
move source stuff to its own folder
Diffstat (limited to 'source/sourcemod/scripting/include/gamechaos/isvalidclient.inc')
| -rw-r--r-- | source/sourcemod/scripting/include/gamechaos/isvalidclient.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/sourcemod/scripting/include/gamechaos/isvalidclient.inc b/source/sourcemod/scripting/include/gamechaos/isvalidclient.inc new file mode 100644 index 0000000..bf80246 --- /dev/null +++ b/source/sourcemod/scripting/include/gamechaos/isvalidclient.inc @@ -0,0 +1,16 @@ + +#if defined _gamechaos_isvalidclient_client_included + #endinput +#endif +#define _gamechaos_isvalidclient_client_included + +/** + * Checks if a client is valid. + * + * @param client Client index. + * @return True if valid, false otherwise. + */ +stock bool IsValidClient(int client) +{ + return (client >= 0 && client <= MaxClients && IsValidEntity(client) && IsClientConnected(client) && IsClientInGame(client)); +}
\ No newline at end of file |
