Commit 8e404281 authored by Jordan Allard's avatar Jordan Allard

Fix IsValidClient so plugin will not error if an invalid index is checked with IsPlayerAlive

parent 684aaed4
This diff was suppressed by a .gitattributes entry.
#define SM_PREFIX " \x07[SM]\x01"
#define PLUGIN_AUTHOR "Urbana"
#define PLUGIN_VERSION "1.3.1"
#define PLUGIN_AUTHOR "Urbana, Jordan Allard (LolZ)"
#define PLUGIN_VERSION "1.3.2"
#include <sourcemod>
#include <sdktools>
bool IsValidClient(int client, bool alive = true)
return (1 <= client <= MaxClients) && IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client) && (!alive || IsPlayerAlive(client));
if (client <= 0 || client > MaxClients || !IsClientConnected(client) || IsFakeClient(client) || !IsClientInGame(client))
return false;
return (!alive || IsPlayerAlive(client));
int[] StringToColorArray(const char[] info)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment