(01-30-2016, 08:56 PM)Xanland Wrote: /report is already made for use with the LVP Command Processor but also needs to be made known to IRC. WIP atm!
Code:
COMMAND:report(playerid,params[])
{
new Reporter[30], Hacker[30], HackerID, Report[128], Reason[50];
if(sscanf(params,"us",Hacker,Reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /report [ID] [Reason]");
if(HackerID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"This player Is not Connected or Invalid ID.");
SendClientMessage(playerid,COLOR_GREEN,"Your Report has been sent to the Online Administrators, please bear with us.");
GetPlayerName(playerid,Reporter,sizeof(Reporter));
GetPlayerName(HackerID,Hacker,sizeof(Hacker));
new Hour,Minute,Second;
gettime(Hour,Minute,Second);
format(Report, sizeof(Report), "[%d:%d:%d][Report] %s[%i] has reported %s[%i], Reason:%s.", Hour, Minute, Second, Reporter, playerid, Hacker, HackerID, Reason);
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) && IsPlayerAdmin(i)/*Or use if(pInfo[i][Adminlevel] >= 1)*/) SendClientMessage(i,COLOR_BLUE, Report);
}
if(IRC_IsOp(BotID/*bot's ID*/, Channel/*Channel's Name*/, user/*User name*/)) //You guys will have all these information.
{
IRC_GroupSay(GroupID/*ID of the group*/, Channel/*Channel's Name*/, Report/*I put it already*/); //these too.
}
return 1;
}[UNTESTED]
