Команда /b позволяет писать в ООС чат.
Например: (( Vanya_Pupkin: хай всем ))
1. Ищем паблик: "public OnPlayerCommandText(playerid, cmdtext[])"
2. Добавляем:
Код:
if(strcmp(cmd, "/b", true) == 0 || strcmp(cmd, "/n", true) == 0)
{
if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "У вас бан чата!);
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;
new succ;
for(new i; i < strlen(result); i++)
{
if(PText[playerid][i] == result[i]) succ++;
}
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /b [текст]");
format(string, sizeof(string), "%s: (( %s ))", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
return true;
}