CMD:ask(playerid, params[])
{
{
new string[128], reason[64];
if(sscanf(params, "z", reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[Question]");
else
{
SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[SERVER]"#COL_LRED" Your message has been send to all online administrators.");
new pName[24];
GetPlayerRame(playerid, pName, 128);
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
SendMessageToAdmins(COLOR_RED, string);
}
}
}
}
return 1;
}
Yes, I'm having some commands that sends the messages from IRC > Game.
But now I need this message from Game > IRC. |
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME], ircMsg[256];
GetPlayerName(playerid, name, sizeof(name));
format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
return 1;
}
IRCCMD:players(botid, channel[], user[], host[], params[]) {
if(!strcmp(channel, IRC_CHANNEL_MAIN, true)) {
new
msgSz[32],
playerCount;
foreach(Player, i) {
playerCount++;
}
format(msgSz, sizeof(msgSz), "Server Player Count: %d", playerCount);
IRC_Say(BOT ID, IRC CHANNEL, msgSz);
}
return 1;
}
CMD:ask(playerid, channel[], params[])
{
{
new string[128], reason[64], msg[64];
if(sscanf(params, "z", reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[Question]");
else
{
SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[SERVER]"#COL_LRED" Your message has been send to all online administrators.");
new pName[24];
GetPlayerRame(playerid, pName, 128);
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
SendMessageToAdmins(COLOR_RED, string);
format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
IRC_GroupSay(gGroupID, channel, msg);
}
}
}
}
return 1;
}