You have a lot of redundant code and it is poorly organized. This makes it easier to make mistakes and harder to find and fix those mistakes.
Here is a much better way to organize the code:
PHP Code:
public checkMsg(id, bool:teamSay)
{
static tags[][] = {"", xOWNER, xHEADMIN, xADMIN, xVIP}
new type
if( OWNER(id) )
type = 1
else if( HEADMIN(id) )
type = 2
else if( ADMIN(id) )
type = 3
else if( VIP(id) )
type = 4
else
type = 0
setMsg(id, is_user_admin(id), tags[type], is_user_alive(id), teamSay)
return PLUGIN_HANDLED
}
Also note that returning PLUGIN_HANDLED or PLUGIN_HANDLED_MAIN in a subfunction doesn't actually do anything. Only the top-level function matters. I.e. returning different values in setMsg() doesn't do anything unless you actually use that return value (which you don't).
Also, if you are meaning to not do anything (and let the message continue like normal) when they are not one of the ones that needs a tag then you can simply return PLUGIN_CONTINUE if type == 0 instead of PLUGIN_HANDLED in checkMsg().
__________________