This isn't working.
#1

I used this code from GF:

Код:
	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;
	}
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
Reply
#2

You have OOCOff disabled. Remove the // from that line.
Reply
#3

You made a string, but you don't send it to the server:

pawn Код:
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
    //      OOCOff(COLOR_OOC,string);
just remove the comment line:

pawn Код:
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
            OOCOff(COLOR_OOC,string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)