Raised This Month: $ Target: $400
 0% 

Blockmaker SteamID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-08-2013 , 12:20   Re: Blockmaker SteamID
Reply With Quote #1

No. You can't compare strings using == operator.
Why don't you just use flags?
PHP Code:
public some_function(id){
    if(!(
get_user_flags(id) & ADMIN_BAN)){
        return
    }
    
    
//do stuff here

Quote:
Originally Posted by P1raten View Post
How about defining a constant array with SteamID's defined and switching through them?
What?
__________________
Impossible is Nothing
Sylwester is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 12:24   Re: Blockmaker SteamID
Reply With Quote #2

Quote:
Originally Posted by Sylwester View Post
No. You can't compare strings using == operator.
Why don't you just use flags?
PHP Code:
public some_function(id){
    if(!(
get_user_flags(id) & ADMIN_BAN)){
        return
    }
    
    
//do stuff here

What?
Sorry, my terminology sucks.

PHP Code:
new const SteamIDs[][] =
{
    
"STEAMID",
    
"STEAMID",
    
"STEAMID",
    
"STEAMID",
    
"STEAMID",
    
"STEAMID"
}; 
__________________
No salvation. Only madness.
P1raten 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 11:11.


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