17.10.2011, 02:05
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.
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; }