Hello,
I created a command which takes one argument and prints this argument to the chat.
PHP Code:
public Action:chatCommand(client, args) {
if(args < 1) {
PrintToConsole(client, "usage: chatmessage <message>");
return Plugin_Handled;
}
new String:Arg1[256];
GetCmdArg(1, Arg1, sizeof(Arg1));
PrintToChatAll("Admin: %s", Arg1);
return Plugin_Handled;
}
If I use the command like
PHP Code:
chatmessage "this is my message"
it prints the whole message.
But if I do
PHP Code:
chatmessage this is my message
it splits at the first space and only prints "Admin: this".
Is there any way to fix this? Thank you very much for your help!