Raised This Month: $ Target: $400
 0% 

messagemode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-30-2010 , 06:23   messagemode
Reply With Quote #1

Hello guys,

I wanna do a Plugin, that when you say /option (register_clcmd), you return to the chat, and you can write a number and after that i can handle with this number, the Player wrote.

Like the Amxbans costumbannreason thing!

I read something about messagemod but i dont get it. I also found a Thread about this but the code there didnt work for me. So i hope you guys can help me.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-30-2010 , 17:59   Re: messagemode
Reply With Quote #2

PHP Code:
#include <amxmodx>
public plugin_init()
{
    
register_clcmd("say /wordhere""cmdWord")
    
register_clcmd("_mm_wordhere""mmWord")
}

public 
cmdWord(id)
{
    
client_cmd(id"messagemode _mm_wordhere")
}

public 
mmWord(id)
{
    new 
szTemp[64]
    
read_args(szTempcharsmax(szTemp))
    
client_print(idprint_chat"You just said: %s"szTemp)

__________________

Last edited by fysiks; 08-07-2010 at 13:27.
fysiks is online now
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-30-2010 , 18:34   Re: messagemode
Reply With Quote #3

Hey i realy thank u but one more question

If i type something like: Hello

the output is: °hello°

something like quotes. i tried that:

PHP Code:
#include <amxmodx> 
public plugin_init() 

    
register_clcmd("say /wordhere""cmdWord"
    
register_clcmd("_mm_wordhere""mmWord"


public 
cmdWord(id

    
client_cmd(id"messagemode _mm_wordhere"


public 
mmWord(id

    new 
szTemp[64
    
read_args(szTempcharsmax(szTemp)) 
    
client_print(idprint_chat"You just said: %s"remove_quotes(szTemp)) //<------------------- HERE

Look in comment, but it didnt work the it just remove the output.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-30-2010 , 19:05   Re: messagemode
Reply With Quote #4

In my code, add remove_quotes(szTemp) after read_args() and before client_print().
__________________
fysiks is online now
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-30-2010 , 20:11   Re: messagemode
Reply With Quote #5

gonna try it thanks
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
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 00:06.


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