View Single Post
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 04-29-2018 , 08:49   Re: [INC] Client MethodMap
Reply With Quote #3

Quote:
Originally Posted by Crasher_3637 View Post
I'm gonna start using this. Thanks!

Side note:

I noticed that in your .inc file, there is an IsValidClient stock and that you have both IsClientConnected and IsClientInGame. You only really need to use IsClientInGame since it already implies that IsClientConnected is true. Using both is redundant.

Change:
PHP Code:
stock bool IsValidClient(int client)
{
    return 
client && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client);

To this:
PHP Code:
stock bool IsValidClient(int client)
{
    return 
client && client <= MaxClients && IsClientInGame(client);

Thanks for the suggestion!
ThatKidWhoGames is offline