03.11.2009, 17:39
I used this code from GF:
I had to change some stuff, but it isn't working... If I type: /ooc, it tells me the propper usage, but it doesnt work as OOC. maybe someone can help? thanks
Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) { new string[256]; 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_GREEN, "USAGE: (/o)oc [ooc chat]"); return 1; } format(string, sizeof(string), "(( %s: %s ))", sendername, result); // OOCOff(COLOR_OOC,string); printf("%s", string); return 1; }
