24.04.2010, 01:08
Hey, great FS. Its working fine for me, exept i cant figure out about the GameMode cmds..
I made an /toirc command in my gamemode that sends msg to all admin ig and added this in the cmd:
I dont get any errors or warns on compile but i dont get the toirc msg up in the irc client.
Is there something i forgot to do since it dosent show?
I made an /toirc command in my gamemode that sends msg to all admin ig and added this in the cmd:
Code:
if(strcmp(cmd, "/toirc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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_GRAD2, "USAGE: /toirc [text]");
return 1;
}
new data[256];
format(data, 256, "0,4*[(ToIRC) %s(%d): %s]", sendername, playerid, (result));
SendMessageToIrc(data);
format(string, sizeof(string), "[(ToIRC) %s(%d): %s]", sendername, playerid, (result));
ABroadCast(COLOR_IRC,string,1);
SendClientMessage(playerid, COLOR_IRC, "[IRC] Message sent to the admins..");
}
return 1;
}
Is there something i forgot to do since it dosent show?

