Raised This Month: $ Target: $400
 0% 

admin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-17-2014 , 06:03   Re: admin
Reply With Quote #1

Here is how your if will think:

1. Let's translate it:
PHP Code:
if ( !is_user_aliveid ) ||   cs_get_user_teamid ) != CS_TEAM_CT ||  get_user_flagsid ) &ADMIN_BAN 
If ( user is dead ) OR ( he is not in the ct team ) OR ( he has acces to ban ) do something.

2. Let's see what we will receive: think that first and the second condition are false and the last one true ( or whatever you want ).

PHP Code:
false OR false OR true true 
If at last one of this conditons is true it will go to next step ( the one from { } ).

If we cange it to && ( mean AND ):

PHP Code:
if ( !is_user_aliveid ) && cs_get_user_teamid ) != CS_TEAM_CT  && get_user_flagsid ) & ADMIN_BAN 
If ( user is dead ) AND ( he is not in ct team ) AND ( he has acces to ban ) do something.
Now, think that just one is false. We will receive :

PHP Code:
true && true && false false 
If at last one of this conditions is false it won't do the instruction from { } and will probably go to the else ( if it's there ).
HamletEagle 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 13:11.


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