Global chat help!
#1

Hello, I'm having trouble with my /o chat. When I write /o hi it says (([OOC Global] Richard_Wright: ))
It should be (([OOC Global] Richard_Wright: hi))

This is my command

Code:
if(!strcmp(cmdtext, "/o", true, 2)) 
  {
    if(!cmdtext[2])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /o [message]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "(([OOC Global] %s: %s))", str, cmdtext[18]);
    SendClientMessageToAll(COLOR_RED, str);
    return 1;
		}
Reply
#2

Try this:
Code:
if(!strcmp(cmdtext, "/o", true, 2)) 
  {
    if(!cmdtext[2])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /o [message]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "(([OOC Global] %s: %s))", str, cmdtext[3]);
    SendClientMessageToAll(COLOR_RED, str);
    return 1;
		}
Or something like that.
Reply
#3

Thanks, but why is it cmdtext[3] instead of cmdtext[18]?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)