report system.
#4

//On top of your script:
Код:
new LastReport[MAX_PLAYERS];
//OnPlayerCommandText:
Код:
if(strcmp(cmdtext, "/report", true, 7)==0)
{
  if(!strlen(cmdtext[8])) return SendClientMessage(playerid, 0xFF0000AA, "Use /report [message]");
  new str[128];
  if((gettime()-LastReport[playerid]) < 30)
  {
    format(str, 128, "You have to wait %d seconds before you can send a new report!", (30-(gettime()-LastReport[playerid])));
	SendClientMessage(playerid, 0xFF0000AA, str); return 1;
  }
  format(str, 128, "[REPORT] Sender ID: %d. Message: %s", playerid, cmdtext[8]);
  for(new i; i<MAX_PLAYERS; i++){
  if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
    SendClientMessage(i, 0x00FFFFAA, str);
  }}
  SendClientMessage(playerid, 0x00FF00AA, "Report send to online admins!");
  LastReport[playerid] = gettime();
  return 1;
}
Reply


Messages In This Thread
report system. - by Nakash - 22.06.2008, 13:49
Re: report system. - by Yuval_Baruch - 22.06.2008, 13:54
Re: report system. - by Nakash - 22.06.2008, 13:57
Re: report system. - by Sandra18[NL] - 22.06.2008, 15:17
Re: report system. - by Blt950 - 23.07.2008, 17:39
Re: report system. - by Bogdan Cirstea - 23.07.2008, 18:40
Re: report system. - by Blt950 - 23.07.2008, 18:55
Re: report system. - by superbryanb - 13.06.2009, 18:51
Re: report system. - by Battlaman - 31.07.2009, 07:41

Forum Jump:


Users browsing this thread: 1 Guest(s)