[Help] Bug Report
#1

I done a script witch players can report a bug to admins, with the command : "/Bug".

The script works perfectly, but.. i want that it will save the report to some file.. is it possible?

Here is the script if you need...

Код:
  forward SendBugReportToAdmins(color,const string[],adminlvl);
Код:
 	  if (strcmp(cmd, "/BUG", true) == 0) // SEND BUG TO ADMINS
	  {
	    new string[256], Name[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, Name, sizeof(Name));

  		  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)) return SendClientMessage(playerid, WHITEBLUE, "USE: /BUG [Description]");
	   	format(string, sizeof(string), "%s: Report a Bug: %s", Name, result);
      SendBugReportToAdmins(LIGHTBLUE, string, 1);
      return 1;
	  }
Код:
 public SendBugReportToAdmins(color,const string[],adminlvl)
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if (PlayerInfo[i][Admin] > 0 && PlayerInfo[i][Report] == 1)
		  SendClientMessage(i, color, string);
		}
	}
	return 1;
}
Reply


Messages In This Thread
[Help] Bug Report - by borisblat - 05.07.2009, 17:04
Re: [Help] Bug Report - by refshal - 05.07.2009, 18:17
Re: [Help] Bug Report - by Ignas1337 - 05.07.2009, 18:19
Re: [Help] Bug Report - by borisblat - 06.07.2009, 09:10

Forum Jump:


Users browsing this thread: 1 Guest(s)