PHP Code:
#include <amxmodx>
#define PLUGIN "Tagger"
#define VERSION "1.0"
#define AUTHOR "Gullu Bhai"
new const g_tag[] = "~=NarC^^()~";
new g_ig[][] = {
"~=NarC^^(S)~",
"~=NarC^^(P)~",
"~=NarC^^(FuN)~",
"~=NarC^^(O)~",
"~=NarC^^(C)~"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(client){
static szName[32];
get_user_name(client,szName,charsmax(szName)) ;
if (!ContainsTag(szName))
{
format(szName,charsmax(szName),"%s %s",g_tag,szName);
set_user_info(client,"name",szName);
}
}
bool:ContainsTag(const name[])
{
for (new i; i < sizeof(g_ig); i++)
{
if (containi(name, g_ig[i]) == 0) // Check if tag starts at beginning of name.
return true;
}
return false;
}
__________________