Raised This Month: $32 Target: $400
 8% 

Solved [CS GO] IsValidClient, this cod true??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-14-2018 , 04:04   [CS GO] IsValidClient, this cod true??
Reply With Quote #1

hi guys!

this function is true ??

PHP Code:
#pragma newdecls required
#pragma semicolon 1

if (IsValidClient(client))
{
    
//Cod Here
}

/*********************************
 *  IsValidClient
 *********************************/
stock bool IsValidClient(int client)
{
    if(
client <= 0)
        return 
false;
    if(
client MaxClients)
        return 
false;
    if(!
IsClientInGame(client))
        return 
false;
    if(
IsFakeClient(client))
        return 
false;
    return 
true;


Last edited by Dr.Mohammad; 12-14-2018 at 05:24. Reason: update cod | thank you Bacardi !!!
Dr.Mohammad is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-14-2018 , 05:06   Re: [CS GO] IsValidClient, this cod true??
Reply With Quote #2

Well yes.

You can skip IsClientConnected part, because IsClientInGame is enough before IsFakeClient.
Bacardi is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-14-2018 , 05:24   Re: [CS GO] IsValidClient, this cod true??
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Well yes.

You can skip IsClientConnected part, because IsClientInGame is enough before IsFakeClient.
Thank you

Dr.Mohammad is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-14-2018 , 12:37   Re: [CS GO] IsValidClient, this cod true??
Reply With Quote #4

Take an important note. I might be wrong but generally speaking, you never really need IsValidClient.

It's either you need IsClientInGame or IsEntityPlayer ( entity >= 1 && entity <= MaxClients )
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 12-14-2018 , 13:37   Re: [CS GO] IsValidClient, this cod true??
Reply With Quote #5

Quote:
Originally Posted by eyal282 View Post
Take an important note. I might be wrong but generally speaking, you never really need IsValidClient.

It's either you need IsClientInGame or IsEntityPlayer ( entity >= 1 && entity <= MaxClients )
Yes, he doesn't need at all this function. Also, he can skip IsClientInGame for some cases.
__________________
Ilusion9 is offline
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 12-14-2018 , 14:18   Re: [CS GO] IsValidClient, this cod true??
Reply With Quote #6

Quote:
Originally Posted by eyal282 View Post
Take an important note. I might be wrong but generally speaking, you never really need IsValidClient.

It's either you need IsClientInGame or IsEntityPlayer ( entity >= 1 && entity <= MaxClients )
i must use then IsClientInGame and enough this ??
Dr.Mohammad is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode