Raised This Month: $ Target: $400
 0% 

access() broken?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bahr
Member
Join Date: Aug 2005
Old 09-07-2005 , 07:59   access() broken?
Reply With Quote #1

Is it me or something is wrong with access() ?

Code:
public client_putinserver(id) {     get_user_name(id, name, 32)     set_hudmessage(120, 120, 200, X, Y, Effects, FxTime, HoldTime, FadeIn, FadeOut, Channel)     if (access(id, ADMIN_ADMIN)) {         log_amx(rndSuperAdmin[random(NUM_MSG)], name)         show_hudmessage(0, rndSuperAdmin[random(NUM_MSG)], name)     } else if (is_user_admin(id)) {         log_amx(rndAdmin[random(NUM_MSG)], name)         show_hudmessage(0, rndAdmin[random(NUM_MSG)], name)     } else {         show_hudmessage(0, "%s is ready to fight!", name)     } }

I got the super-admin msg even if I dont have ADMIN_ADMIN (flag "y") access!? (Im using AmxmodX 1.01)
bahr is offline
Send a message via MSN to bahr
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 09-07-2005 , 08:45  
Reply With Quote #2

Try:
Code:
if(get_user_flags(id)&ADMIN_ADMIN) {     // .. }
Or
Code:
if(is_user_admin(id)) {     // .. }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
bahr
Member
Join Date: Aug 2005
Old 09-07-2005 , 10:01  
Reply With Quote #3

Thx!

But should we consider access() is broken then?
bahr is offline
Send a message via MSN to bahr
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-07-2005 , 15:12  
Reply With Quote #4

No, access is fine. is_user_admin and ADMIN_ADMIN is the exact same thing. If you have any admin flag then it will say you have access to ADMIN_ADMIN.

Code:
stock access(id,level) {   if ( level==ADMIN_ADMIN )     return is_user_admin(id)   return (get_user_flags(id) & level) }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:28.


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