Raised This Month: $ Target: $400
 0% 

if elseif else?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-26-2013 , 23:04   Re: if elseif else?
Reply With Quote #1

this may not be best explanation but here goes.

PHP Code:
if( hasadmin1[id] ) {
    
execute command.... // if player hasadmin1 then command is done and others are ignored
}
else if( 
hasadmin2id ] ) {
    
execute command.... // if player does NOT have admin1 then this check is next....
}
else {
    
execute command... // if player does NOT have admin1 or admin2 then this command is executed.
}



if( 
hasadmin1id ] ) execute command....

if( 
hasadmin2id ] ) execute command....
// both of these checks will happen and if player has both admin1 and admin2 then both commands will execute . 
__________________
Blizzard_87 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 16:18.


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