Raised This Month: $12 Target: $400
 3% 

Vip Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GaBy96
Member
Join Date: Oct 2012
Location: Spain
Old 09-13-2020 , 02:32   Vip Chat
Reply With Quote #1

Hello! i want this plugin to go through say_team * like admin chat say_team @.

Code:
/* VSVipChat v1.3 

Description:
	Adds a private chat for vips.
Access flag by default:
	VIP_FLAG_F.
Type:
	Constant.
Commands:
	say_vip - say in VIP chat.
Note:
	bind "<button>" "messagemode say_vip"
*/

#include <amxmodx>
#include <VIPSystem>

#define ACCESS_FLAG VIP_FLAG_F

new msgidSayText, maxPlayers;

public plugin_init() 
{
	register_plugin("VSVipChat", "1.3", "ZETA [M|E|N]");
	
	msgidSayText = get_user_msgid("SayText");
	maxPlayers = get_maxplayers();
	
	register_clcmd("say_vip", "ClcmdSayVip", ADMIN_ALL, "");
}

public ClcmdSayVip(id)
{
	if (!VSGetVipFlag(id, ACCESS_FLAG))
	{
		return PLUGIN_HANDLED;
	}
	
	new name[32];
	get_user_name(id, name, charsmax(name));
	
	new message[64]; 
	read_args(message, charsmax(message)); 
	remove_quotes(message);
	
	new chat[64];
	if (is_user_alive(id))
	{
		chat = "(VIP) %s1 :  %s2";
	}
	else
	{
		chat = "*DEAD*(VIP) %s1 :  %s2";
	}
	
	ClientPrint(chat, name, message);
	return PLUGIN_HANDLED;
}

public ClientPrint(chat[], name[], message[])
{
	for (new id = 1; id <= maxPlayers; ++id)
	{
		if (VSGetVipFlag(id, ACCESS_FLAG))
		{
			message_begin(MSG_ONE, msgidSayText, _, id);
			write_byte(id);
			write_string(chat);
			write_string(name);
			write_string(message);
			message_end();
		}
	}
}
__________________

We have over 400 skins on weapons and 5 types for hands!
Costumes for players!
New style for Top15 and stats!
Kill marks, molotov!
And many more are waiting for you to play!
GaBy96 is offline
Send a message via Skype™ to GaBy96
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 09-13-2020 , 05:36   Re: Vip Chat
Reply With Quote #2

Code:
register_clcmd("say_vip", "ClcmdSayVip", ADMIN_ALL, "");
-->>
Code:
register_clcmd("say_team !", "ClcmdSayVip", ADMIN_ALL, "");
This should work with '!' symbol instead '@'
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
GaBy96
Member
Join Date: Oct 2012
Location: Spain
Old 09-13-2020 , 06:29   Re: Vip Chat
Reply With Quote #3

I tried

Code:
register_clcmd("say_team *", "ClcmdSayVip", ADMIN_ALL, "");
but it doesn't work you have to write in the console say_team * message
__________________

We have over 400 skins on weapons and 5 types for hands!
Costumes for players!
New style for Top15 and stats!
Kill marks, molotov!
And many more are waiting for you to play!
GaBy96 is offline
Send a message via Skype™ to GaBy96
artYY
Member
Join Date: May 2020
Location: Brazil, Curitiba, PR
Old 09-13-2020 , 11:05   Re: Vip Chat
Reply With Quote #4

Something with * should blocking your code. Try to say something with * to test
__________________
artYY is offline
GaBy96
Member
Join Date: Oct 2012
Location: Spain
Old 09-13-2020 , 11:42   Re: Vip Chat
Reply With Quote #5


Code:
register_clcmd("say_team !", "ClcmdSayVip", ADMIN_ALL, "");
Don't work.


Quote:
Originally Posted by artYY View Post
Something with * should blocking your code. Try to say something with * to test
I tried and it gives me in the team chat exactly as I write with * at the beginning
__________________

We have over 400 skins on weapons and 5 types for hands!
Costumes for players!
New style for Top15 and stats!
Kill marks, molotov!
And many more are waiting for you to play!

Last edited by GaBy96; 09-13-2020 at 11:53.
GaBy96 is offline
Send a message via Skype™ to GaBy96
artYY
Member
Join Date: May 2020
Location: Brazil, Curitiba, PR
Old 09-13-2020 , 12:01   Re: Vip Chat
Reply With Quote #6

Try to put the plugin on the first of 3rd party. It could be some plugin changing the code.
__________________
artYY is offline
drakunovu6
Member
Join Date: Sep 2017
Old 09-13-2020 , 12:13   Re: Vip Chat
Reply With Quote #7

Didn't test it but try this one, uses the method of adminchat.sma but with the *, vip flags and say if it's dead or not

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

#define ACCESS_FLAG VIP_FLAG_F

public plugin_init() 
{
    
register_plugin("VSVipChat""1.3""ZETA [M|E|N]");
    
register_clcmd("say_team""cmdSayVip"ADMIN_ALL"");
}

public 
cmdSayVip(id)
{
    new 
said[2];
    
read_argv(1said1);
    
    if (
said[0] != '*' || !VSGetVipFlag(idACCESS_FLAG))
        return 
PLUGIN_CONTINUE;
    
    new 
message[192], name[32];
    new 
players[32], inum;
    
    
read_args(message191);
    
remove_quotes(message);
    
get_user_name(idname31);
    
    
format(message191"%s(VIP) %s :  %s"is_user_alive(id) ? "" "*DEAD* "namemessage[1]);

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        if (
players[i] != id && VSGetVipFlag(idACCESS_FLAG))
            
client_print(players[i], print_chat"%s"message);
    }
    
    
client_print(idprint_chat"%s"message);

    return 
PLUGIN_HANDLED;

drakunovu6 is offline
GaBy96
Member
Join Date: Oct 2012
Location: Spain
Old 09-13-2020 , 13:51   Re: Vip Chat
Reply With Quote #8

Quote:
Originally Posted by drakunovu6 View Post
Didn't test it but try this one, uses the method of adminchat.sma but with the *, vip flags and say if it's dead or not

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

#define ACCESS_FLAG VIP_FLAG_F

public plugin_init() 
{
    
register_plugin("VSVipChat""1.3""ZETA [M|E|N]");
    
register_clcmd("say_team""cmdSayVip"ADMIN_ALL"");
}

public 
cmdSayVip(id)
{
    new 
said[2];
    
read_argv(1said1);
    
    if (
said[0] != '*' || !VSGetVipFlag(idACCESS_FLAG))
        return 
PLUGIN_CONTINUE;
    
    new 
message[192], name[32];
    new 
players[32], inum;
    
    
read_args(message191);
    
remove_quotes(message);
    
get_user_name(idname31);
    
    
format(message191"%s(VIP) %s :  %s"is_user_alive(id) ? "" "*DEAD* "namemessage[1]);

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        if (
players[i] != id && VSGetVipFlag(idACCESS_FLAG))
            
client_print(players[i], print_chat"%s"message);
    }
    
    
client_print(idprint_chat"%s"message);

    return 
PLUGIN_HANDLED;


Thanks but it doesn't work
__________________

We have over 400 skins on weapons and 5 types for hands!
Costumes for players!
New style for Top15 and stats!
Kill marks, molotov!
And many more are waiting for you to play!
GaBy96 is offline
Send a message via Skype™ to GaBy96
drakunovu6
Member
Join Date: Sep 2017
Old 09-13-2020 , 13:54   Re: Vip Chat
Reply With Quote #9

Quote:
Originally Posted by GaBy96 View Post
Thanks but it doesn't work
What it's the problem? I did test it a bit in localhost with HLDS without Admin and if I used the "say_team *hi" it says "(Counter-Terrorist) Drakunovu : hi" but if I had Admin it works, I removed the VSGetVipFlag and changed it to a flag of admin and it worked.
drakunovu6 is offline
GaBy96
Member
Join Date: Oct 2012
Location: Spain
Old 09-13-2020 , 14:19   Re: Vip Chat
Reply With Quote #10

Quote:
Originally Posted by drakunovu6 View Post
What it's the problem? I did test it a bit in localhost with HLDS without Admin and if I used the "say_team *hi" it says "(Counter-Terrorist) Drakunovu : hi" but if I had Admin it works, I removed the VSGetVipFlag and changed it to a flag of admin and it worked.
Yes, but I want to use it for vip and if you have a vip degree it doesn't show you a message in vip chat but in team chat
__________________

We have over 400 skins on weapons and 5 types for hands!
Costumes for players!
New style for Top15 and stats!
Kill marks, molotov!
And many more are waiting for you to play!
GaBy96 is offline
Send a message via Skype™ to GaBy96
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 05:11.


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