If you input "^n" in steamid string, then you can't try to compare to connected players steamids, won't work.
Also fprintf allow formatting, use it.
Your get_players usage is not correct, you have to loop the array.
Also you could add to get_players flags c and h so you don't collect bots and you don't collect hltvs
PHP Code:
public cmd_add_costum_ban(id, level, cid)
{
if(cmd_access(id, level, cid, 2))
{
new new_steam_id[32]
read_argv(1, new_steam_id, charsmax(new_steam_id))
new File = fopen(path, "wt")
fprintf(File, new_steam_id)
fprintf(File, "^n^"%s^"", new_steam_id);
fclose(File)
new players[32], num, steamid[32], user
get_players(players, num, "ch")
for(--num; num>=0; num--)
{
user = players[num]
get_user_authid(user, steamid, charsmax(steamid))
if(equal(new_steam_id, steamid))
{
// code
break // we have a match, don't continue the loop for nothing
}
}
}
}
__________________