 |
|
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
|

01-19-2013
, 00:22
Re: Announce
|
#3
|
Quote:
Originally Posted by aaarnas
str_to_num is for converting string with number to integer.
Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd("/anno", "cmdAnno")
register_clcmd(".anno", "cmdAnno")
}
public cmdAnno(id)
{
new MessageText[100], Left[1], Right[50]
read_argv(1, MessageText, charsmax(MessageText))
strtok(MessageText, Left, charsmax(Left), Right, charsmax(Right), ' ')
client_print(id, print_chat, "[prifix] %s", Right)
return PLUGIN_HANDLED
}
|
This code is not correct either. There are no spaces in "abc123" and if there were, your code would give undesirable results. You simply need to print the variable MessageText, that's it.
__________________
|
|
|
|