PHP Code:
register_clcmd("say","rules")
public rules(id)
{
new arg[33]
read_argv(1,arg,32)
if(equali(arg,"/noriuvip"))
{
show_motd(id,"noriuvip.txt","Nori VIP?")
}
else if(equali(arg,"/viprules"))
{
show_motd(id,"viprules.txt","VIP taisykles")
}
else if(equali(arg,"/rules"))
{
show_motd(id,"rules.txt","Taisykles")
}
else
{
return PLUGIN_CONTINUE
}
return PLUGIN_HANDLED
}
Not sure how/what you're doing with flags on the clcmd, because I've never used them, but here's what I would do if you had to have it in a single function to satisfy yourself.
If the flags meant anything important, you'll have to add another check to the if statements.
__________________