19.06.2009, 22:06
I have a OOC cmd that looks like "/o", I also have /l.
When I'm using /l, it appears on /o ingame...
It also happens on all my other cmds like /me and /do etc
The cmd's is.
OOC:
Local OOC:
I have added the Pawno functions, ProxDetector.
Thanks for your help
When I'm using /l, it appears on /o ingame...
It also happens on all my other cmds like /me and /do etc
The cmd's is.
OOC:
Код:
if(strcmp(cmd,"/o",true) == 0) { new name1[256]; GetPlayerName(playerid,name1,sizeof(name1)); if ((strlen(cmdtext) >= 1)&&(strlen(cmdtext) <= 3)) { SendClientMessage(playerid,COLOR_WHITE, "USAGE: /o [text]"); return 1; } format(string,sizeof(string),"(( OOC: %s: %s ))",name1,cmdtext[3]); SendClientMessageToAll(COLOR_WHITE,string); return 1; }
Код:
if(strcmp(cmd, "/l", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /l [text]"); return 1; } format(string, sizeof(string), "(( Local OOC: %s: %s ))", sendername, result); ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE); printf("%s", string); } return 1; }
Thanks for your help