Raised This Month: $ Target: $400
 0% 

Solved messagemode in menu doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-19-2019 , 23:25   Re: messagemode in menu doesn't work
Reply With Quote #1

This is why I also said that you should create a test plugin to make sure that you understand the logic required to implement the feature you are trying to implement in your plugin. I do this all the time. Create a simple plugin that does just that one feature to make sure that I know that what I'm doing it working in it's simplest form. See here:

Code:
#include <amxmodx>

public plugin_init()
{
	register_clcmd("say test", "cmdSayTest")
	register_clcmd("_testmm", "cmdTestMM")
}


public cmdSayTest(id)
{
	client_print(id, print_chat, "say test happened")
	client_cmd(id, "messagemode _testmm")
}

public cmdTestMM(id)
{
	new szString[32]
	read_args(szString, charsmax(szString))
	
	client_print(id, print_chat, "TestMM String:  %s", szString)
}
they "test" in chat and you should get the messagemode command and then type something. When you hit enter, it will display that text in chat. This shows that it's working. Then, you can compare that to what you're doing in your plugin.
__________________
fysiks is offline
Akka3223
Member
Join Date: Oct 2016
Old 08-20-2019 , 09:19   Re: messagemode in menu doesn't work
Reply With Quote #2

Quote:
Originally Posted by fysiks View Post
This is why I also said that you should create a test plugin to make sure that you understand the logic required to implement the feature you are trying to implement in your plugin. I do this all the time. Create a simple plugin that does just that one feature to make sure that I know that what I'm doing it working in it's simplest form. See here:

Code:
#include <amxmodx>

public plugin_init()
{
	register_clcmd("say test", "cmdSayTest")
	register_clcmd("_testmm", "cmdTestMM")
}


public cmdSayTest(id)
{
	client_print(id, print_chat, "say test happened")
	client_cmd(id, "messagemode _testmm")
}

public cmdTestMM(id)
{
	new szString[32]
	read_args(szString, charsmax(szString))
	
	client_print(id, print_chat, "TestMM String:  %s", szString)
}
they "test" in chat and you should get the messagemode command and then type something. When you hit enter, it will display that text in chat. This shows that it's working. Then, you can compare that to what you're doing in your plugin.
ok so, i tryed making different plugin for messagemode and that one worked when i tryed to implement it to the diablo2lod mod it doesn't work again mhm

*EDIT*
thanks i fixed it.

Last edited by Akka3223; 08-20-2019 at 10:01.
Akka3223 is offline
Reply



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 17:30.


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