[HELP] Admin Duty Color in main chat.
#6

Okay aldo, I am using a different public chat than pressing T and typing. so this might be the problem why i cant see red, and i see white when i type in main chat because i use a command to type in main chat using /p (/public)

Here is my public command, it sends message in COLOR_WHITE if you look at the bottom of the script.

Code:
	if(strcmp(cmd, "/public", true) == 0 || strcmp(cmd, "/p", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, pName, sizeof(pName));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_USAGE, "USAGE: /p [text]");
				return 1;
			}

			format(string, sizeof(string), "%s (%d): %s", RemoveUnderScore(playerid),playerid, result);
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
					SendCustomPlayerMessage(i, COLOR_WHITE, string);
				}
			}

		}
		return 1;
	}
Reply


Messages In This Thread
[HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 00:24
Re: [HELP] Admin Duty Color in main chat. - by Kingunit - 17.10.2011, 00:31
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 00:39
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 01:47
Re: [HELP] Admin Duty Color in main chat. - by Aldo. - 17.10.2011, 01:57
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 02:05
Re: [HELP] Admin Duty Color in main chat. - by Aldo. - 17.10.2011, 02:17

Forum Jump:


Users browsing this thread: 1 Guest(s)