Raised This Month: $ Target: $400
 0% 

A way to read a admin access by steamid?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 04-17-2007 , 01:30   A way to read a admin access by steamid?
Reply With Quote #1

Hey there, I was wondering,...you can do get_user_flags(id), but can you get user flags by steamid without having to read the files and such?

Thanks
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-17-2007 , 02:40   Re: A way to read a admin access by steamid?
Reply With Quote #2

I don't understand the question. please re-prase.
Styles is offline
Send a message via AIM to Styles
pRED*
Join Date: Dec 2006
Old 04-17-2007 , 06:13   Re: A way to read a admin access by steamid?
Reply With Quote #3

He wants an equivalent to get_user_flags(id) that works with a steamid input instead of a player id. This would allow you to check for admin even if the player isn't connect.. not quite sure why you would want to do that but anyway..

The answer is no, you would have code it to read the admins.ini file yourself. I think..
pRED* is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 04-17-2007 , 13:20   Re: A way to read a admin access by steamid?
Reply With Quote #4

When the admin is offline I don't think you can get admin info from anything but the file.

Read the file, it's not a bad way.

Something like:
Code:
stock get_offline_flags(const SteamID[]) {         new file[64];     new len = get_localinfo("amxx_configsdir", file, 63);     copy(file[len], 63-len, "/users.ini");         new fh = fopen(file, "r");         new data[128];     new data2[32];         while( ! feof(fh) ) {                 fgets(fh, data, 127);                 trim(data);                 if ( ! data[0] || data[0] == '^n' || data[0] == ';' )             continue;                 if ( containi(data, SteamID) != -1 ) {             strbreak(data, data2, 31, data, 127);             strbreak(data, data2, 31, data, 127);             strbreak(data, data2, 31, data, 127);                         fclose(fh);             return read_flags(data2);         }     }         fclose(fh);     return 0; }

Last edited by [ --<-@ ] Black Rose; 04-17-2007 at 15:14.
[ --<-@ ] Black Rose is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 04-17-2007 , 21:40   Re: A way to read a admin access by steamid?
Reply With Quote #5

Alright thanks bud.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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 06:34.


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