I have tried my best and still haven't got it to work. I'm trying make a script that if your steam id is in the steam.ini then it lets you use a certain command. I just need to find out how I can get it to work this is what I think it my be similar to.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
new bool:g_command = true
new filepath[64],filename[101],readdata[64],readsteam[32],steamid[32],len=0,line=0
public plugin_init()
{
register_plugin("command","1.0","UND3RDAWG")
register_clcmd("+command","client_authorized",ADMIN_KICK,"bind [key] +command")
if (g_command==true)
set_task(1.0,"check")
}
public check(id)
{
get_configsdir(filepath,63)
format(filename,100,"%s/steam.ini",filepath)
}
public client_authorized(id)
{
get_user_authid(id, steamid, 31)
while(read_file(filename, line++, readdata, 63, len))
{
parse(readdata,readsteam,31)
if(equali(steamid,readsteam))
{
if(!is_user_alive(id))
//command
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}