Raised This Month: $66 Target: $400
 16% 

[VIP] Tag in chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fanatix
Junior Member
Join Date: Feb 2012
Old 01-20-2013 , 15:26   [VIP] Tag in chat
Reply With Quote #1

I dont know how to set prefix [V.I.P] in chat for users who have flag "t" (ADMIN_LEVEL_H), can someone give me an idea, i want to learn the steps

Can i do it like this:

PHP Code:
#include <amxmodx>  
#include <amxmisc>  
#include <colorchat>  

public plugin_init() {  
    
register_plugin("VIP_say""1.0""uknown")  
    
register_clcmd("say""vip")  
}  

public 
vip(id){ 
    if(
get_user_flags(id) & ADMIN_LEVEL_H
    { 
        new 
said[192], name[30
        
get_user_name(id,name,29
        
read_args(said,191
        
remove_quotes(said
        
ColorChat(0GREEN,"[V.I.P] ^3%s ^1: %s",name,said
        return 
PLUGIN_HANDLED 
    



Last edited by fanatix; 01-20-2013 at 15:36.
fanatix is offline
fanatix
Junior Member
Join Date: Feb 2012
Old 01-26-2013 , 14:06   Re: [VIP] Tag in chat
Reply With Quote #2

Anyone little help, some hint ?
fanatix is offline
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:15.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode