View Single Post
michal123
Junior Member
Join Date: Feb 2011
Location: Poland
Old 01-26-2013 , 15:28   Re: [VIP] Tag in chat
Reply With Quote #3

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "speedkill"

public plugin_init(){
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_message(get_user_msgid("SayText"),"handleSayText");
}
public handleSayText(msgId, msgDest, msgEnt){
	new id = get_msg_arg_int(1);
	
	if(is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H){
		new szTmp[256],
			szTmp2[256];
			
		get_msg_arg_string(2, szTmp, charsmax(szTmp));
		
		new szPrefix[64] = "^x04[VIP]";
		
		if(!equal(szTmp, "#Cstrike_Chat_All")){
			add(szTmp2, charsmax(szTmp2), szPrefix);
			add(szTmp2, charsmax(szTmp2), " ");
			add(szTmp2, charsmax(szTmp2), szTmp);
		}
		else{
			add(szTmp2, charsmax(szTmp2), szPrefix);
			add(szTmp2, charsmax(szTmp2), "^x03 %s1^x01 :  %s2");
		}
		set_msg_arg_string(2, szTmp2);
	}
	return PLUGIN_CONTINUE;
}
michal123 is offline