What parameters would you change in the fgets, to change which line is read. Also, when I tried using feof, it says "undefined symbol: feof".
I'm trying to make a plugin where on round start, if someone's steamid is in the steamids.ini file, they will get kicked. I know, basically a ban, just trying to learn basics.
here's code
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "AutoSteamID Kicker"
#define VERSION "1.0"
#define AUTHOR "H3avY Ra1n"
public plugin_init() {
//Register Plugin
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_start", 2, "1=Round_Start")
}
public round_start()
{
if(file_exists("addons/amxmodx/configs/steamids.ini"))
{
new fp = fopen("addons/amxmodx/configs/steamids.ini", "a"), buffer[100]
fgets(fp, buffer, charsmax(buffer))
new players[32], player, num
get_players(players, num)
for(new i;i<num;i++)
{
player=players[i]
new userid=get_user_userid(player)
new authid[32]
get_user_authid(player, authid, 19)
if(equali(buffer, authid))
{
server_cmd("kick #%s", userid)
// Close file handle
fclose(fp)
}
}
}
}