AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   messagemode (https://forums.alliedmods.net/showthread.php?t=133928)

mottzi 07-30-2010 06:23

messagemode
 
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.

fysiks 07-30-2010 17:59

Re: messagemode
 
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)



mottzi 07-30-2010 18:34

Re: messagemode
 
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.

fysiks 07-30-2010 19:05

Re: messagemode
 
In my code, add remove_quotes(szTemp) after read_args() and before client_print().

mottzi 07-30-2010 20:11

Re: messagemode
 
gonna try it thanks


All times are GMT -4. The time now is 00:06.

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