/report command help
#9

Here's a small report system.

pawn Код:
enum pInfo
{
     pAdmin
};
new PlayerInfo[MAX_PLAYERS][pInfo];

stock SendAdminMessage(color, string[]);
{
     Foreach(Player,i)
     {
          if(PlayerInfo[i][pAdmin] >= 1)
          {
               SendClientMessage(i, color, string);
          }
     }
}

CMD:report(playerid, params[])
{
     new string[256], reason;
     if(sscanf(params, "s[60]", reason)) return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /report [reason]");

     SendClientMessage(playerid,0xFFFFFFA, "Message sent to online administrators!");
     new pname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, pname,sizeof(pname));
     format(string, sizeof(string), "[REPORT] %s has reported: %s",pname, reason);
     SendAdminMessage(0xFFFF00AA, string);
     return 1;
}
Reply


Messages In This Thread
/report command help - by jakejohnsonusa - 24.04.2013, 21:44
Re: /report command help - by Skyrise - 24.04.2013, 23:40
Re: /report command help - by jakejohnsonusa - 25.04.2013, 00:20
Re: /report command help - by arakuta - 25.04.2013, 00:22
Re: /report command help - by Skyrise - 25.04.2013, 00:25
Re: /report command help - by jakejohnsonusa - 25.04.2013, 00:26
Re: /report command help - by Onfroi - 25.04.2013, 01:02
Re: /report command help - by jakejohnsonusa - 25.04.2013, 01:05
Re: /report command help - by Tom Kingston - 25.04.2013, 05:47
Re: /report command help - by yaron0600 - 25.04.2013, 05:57
Re: /report command help - by jakejohnsonusa - 25.04.2013, 11:14

Forum Jump:


Users browsing this thread: 10 Guest(s)