if(strcmp(cmd,"/irc",true)==0){
{
if(ircenable==1){
new tmp[256];
new message[MAX_STRING];
tmp = strrest(cmdtext,idx);
if(!strlen(tmp)){
SendClientUsage(playerid, cmd, "[message]");
return 1;
}
format(message,sizeof(message),"[(ToIRC) %s[%d]: %s]",PlayerName(playerid),playerid,tmp);
SendClientMessage(playerid,COLOR_ADMIN_SPYREPORT,message);
for(new i=0;i<MAX_PLAYERS;i++){
if(adminlevel[i] > 1) SendClientMessage(i, COLOR_ADMIN_SPYREPORT, message);
}
format(message, sizeof(message), "05(ToIRC) %s[%d]: %s]", PlayerName(playerid), playerid, tmp);
IRC_GroupSay(IRC_Group,EchoChan,message);
//ircecho("irctalk %d %s %s",playerid,PlayerName(playerid),tmp);
return 1;
}
}
}
tmp = strrest(cmdtext,idx); |
#include a_samp
#define MAX_STRING 250 //the, '250' can be set to another value if you want to
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/irc",true)==0)
{
if(ircenable==1)
{
new tmp[256];
new message[MAX_STRING];
tmp = strrest(cmdtext,idx);
if(!strlen(tmp))
{
SendClientUsage(playerid, cmd, "[message]");
return 1;
}
format(message,sizeof(message),"[(ToIRC) %s[%d]: %s]",PlayerName(playerid),playerid,tmp);
SendClientMessage(playerid,COLOR_ADMIN_SPYREPORT,message);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(adminlevel[i] > 1)
{
SendClientMessage(i, COLOR_ADMIN_SPYREPORT, message);
}
return 1;
}
format(message, sizeof(message), "05(ToIRC) %s[%d]: %s]", PlayerName(playerid), playerid, tmp);
IRC_GroupSay(IRC_Group,EchoChan,message);
//ircecho("irctalk %d %s %s",playerid,PlayerName(playerid),tmp);
return 1;
}
return 1;
}
return 1;
}