/**
* Checks if an entity index is a player and ingame
*
* @param entity An entity index
* @return true if the specified entity index is a player ingame, false otherwise
*/
stock bool:Client_IsPlayer(entity) {
if (entity > GetMaxEntities()) {
entity = EntRefToEntIndex(entity);
}
if (entity >= 1 && entity <= MaxClients) {
if (IsValidEntity(entity) && IsClientInGame(entity)) {
return true;
}
}
return false;
}