The issue was majorly because I didn't use a set_task in client_infochanged, and that was messing up the functionality. I wanted to make it a simple plugin with less lines of code and this was the best I could do. I hope this helps others out!
PHP Code:
#include <amxmodx>
#include <amxmisc>
new name[32], tag[12];
new amx_forcetag, amx_tag;
public plugin_init()
{
register_plugin("Tags", "1.2", "BigBaller Edit")
amx_forcetag = register_cvar("amx_forcetag", "1")
amx_tag = register_cvar("amx_tag", "[AlliedModders]");
get_pcvar_string(amx_tag, tag, 12);
}
public client_putinserver(id) set_task(2.0,"admin_entered",id);
public admin_entered(id) if(is_user_admin(id)) force_tag(id);
public force_tag(id)
{
get_user_name(id, name, 31);
if (get_pcvar_num(amx_forcetag) && (containi(name, tag) == -1))
{
format(name, 31, "%s %s", tag, name);
set_user_info(id, "name", name);
}
return PLUGIN_CONTINUE;
}
public client_infochanged(id) set_task(2.0,"admin_entered",id)
__________________