Quote:
Originally Posted by Ihsan_Cingisiz
Hello,
i have a (/o)oc command, but i have a problem.
So when i type /o Hello, i see in the chatbox :
(([OOC] [NAME] : ello ))
I just see 'ello' so the first letter don't show up.
Here is the script, i edited 10 times, still i can't
find anything.
Quote:
if(strcmp(cmd, "/o", true) == 0){
new dir[256];
dir = strtok(cmdtext, idx);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(dir)) {
SendClientMessage(playerid,COLOR_RED,"USAGE: /o [message]");
return 1;
}
dir = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string),"(([OOC] [%s]: %s ))",sendername,tmp);
SendClientMessageToAll(COLOR_LIGHTBLUE,string);
format(string, sizeof(string),"(([OOC] [%s]: %s ))",sendername,tmp);
print(string);
return 1;
}
|
|
Quick question: Why are you using 256 for a string? SA:MP can only send 128 as a Client Message.