I never used the new reading/writing system thingy, so I have no idea if this works.
Also, there's a tut here:
http://forums.alliedmods.net/showthread.php?t=46218
Edit: Wow, apparently what your asking for is already done in that thread.
Code:
#include <amxmodx>
#include <amxmisc>
new steamfile[256]
public plugin_init() {
register_plugin("Read SteamID","1.0","")
//Set the configs dir
get_configsdir(steamfile,255)
format(steamfile,255,"%s/steamids.ini",steamfile)
// If the file doesn't exist, make one.
if(!file_exists(steamfile))
{
write_file(steamfile,";SteamID File");
}
}
public client_putinserver(id)
{
if(valid_steamid(id)) {
//If valid ID
}
}
public valid_steamid(id) {
new valid = 0
new file = fopen(steamfile,"r")
if(file) {
new read[130],steamid[33],authid[33]
while(fgets(file,read,129)) {
parse(read,steamid,32)
get_user_authid(id,authid,32)
if(equal(authid,steamid)) {
valid = 1
}
else {
valid = 0
}
}
}
return valid
}