Raised This Month: $32 Target: $400
 8% 

Solved read messages from messagemode


Post New Thread Reply   
 
Thread Tools Display Modes
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 02-08-2019 , 21:59   Re: read messages from messagemode
Reply With Quote #21

Quote:
Originally Posted by DjSoftero View Post
You're wrong. Other way would be for a client to use console command, which is less convenient..
Really no

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

new g_Tags[MAX_PLAYERS+1][32];

public plugin_init()
{
	register_plugin("Test","0.1","SmileY");

	register_clcmd("say","SayHandle");
	register_clcmd("say_team","SayHandle");

	register_clcmd("/tag","cmdTag",ADMIN_ALL,"<tag> - Register a tag in chat");
}

public SayHandle(id)
{
	new Args[192];
	read_args(Args,charsmax(Args));
	remove_quotes(Args);
	
	if(Args[0] == '/')
	{
		client_cmd(id,Args);
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_CONTINUE;
}

public cmdTag(id,level,cid)
{
	if(!cmd_access(id,level,cid,2))
	{
		return PLUGIN_HANDLED;
	}

	read_argv(1,g_Tags[id],charsmax(g_Tags[]));

	client_print(id,print_chat,"[TAG] %s tag was set.",Tag);

	return PLUGIN_CONTINUE;
}
A simple example, no messagemode here
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-09-2019 , 06:27   Re: read messages from messagemode
Reply With Quote #22

Your code does the same basically. Anyway, there's no problem with messagemod, I don't know why you're avoiding using it.
__________________








CrazY. is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 02-11-2019 , 11:32   Re: read messages from messagemode
Reply With Quote #23

Quote:
Originally Posted by CrazY. View Post
Your code does the same basically. Anyway, there's no problem with messagemod, I don't know why you're avoiding using it.
People can bypass messagemode to change tag or something else, and you do not need to create a global to store who open the command or not, only store tags
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 09:17.


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