Report system...
#1

When I use /readreport it just gives me
Quote:

Reported nothing for: nothing
Nothing is that it doesn't tells me anything. I got absolute no errors. But this is the code of /report and /read report:
/report:
Код:
	else if(strcmp(cmd, "/report", true) == 0) {
	new tmp[256], tmp2[256];
	tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx);
	if(!strlen(tmp2)) SendClientMessage(playerid, COLOR_RED, "USAGE: /report [ID] [Reason]");
	else if(!IsPlayerConnected(strval(tmp))) SendClientMessage(playerid, COLOR_RED, "Invalid ID");
	else {
	PlayerInfo[playerid][activereport] = 1, PlayerInfo[playerid][reporttext] = strval(tmp2), PlayerInfo[playerid][reportname] = strval(tmp);
	new name[256], name2[256];
	GetPlayerName(playerid, name, 256);
	GetPlayerName(playerid, name2, 256);
	printf("Player %s has just reported %s", name, name2);
	new string[256];
	format(string, 256, "Player %s has just reported %s", name, name2);
	SendClientMessage(playerid, COLOR_DARKGREEN, string);
	}
	return 1;
	}
/readreport:
Код:
    else if(strcmp(cmd, "/readreport", true) == 0)
    {
	   new tmp[256];
	   tmp = strtok(cmdtext, idx);
	   if(PlayerInfo[playerid][Level] == 1) return 1;
	   else if(!strlen(tmp)) SendClientMessage(playerid, COLOR_RED, "USAGE: /readreport [playerid]");
	   else if(!IsPlayerConnected(strval(tmp))) SendClientMessage(playerid, COLOR_RED, "Invalid player ID");
	   else
	   {
		  new string[256], string2[256], name[256], name2[256], reportname2, reporttext2;
		  GetPlayerName(playerid, name, sizeof(name)), GetPlayerName(strval(tmp), name2, sizeof(name2));
		  format(string, sizeof(string), "%s is checking your report", name);
		  SendClientMessage(strval(tmp), COLOR_GREEN, string);
		  reportname2 = PlayerInfo[playerid][reportname];
		  reporttext2 = PlayerInfo[playerid][reporttext];
		  format(string2, sizeof(string2), "Reported %s for: %s", reportname2, reporttext2);
		  SendClientMessage(playerid, COLOR_GREEN, string2);
	   }
	   return 1;
    }
Reply


Messages In This Thread
Report system... - by sabreman - 02.04.2011, 06:33
Re: Report system... - by armyoftwo - 02.04.2011, 06:37
Re: Report system... - by Joe Staff - 02.04.2011, 06:37
Re: Report system... - by armyoftwo - 02.04.2011, 06:39
Re: Report system... - by sabreman - 02.04.2011, 11:17
Re: Report system... - by sabreman - 02.04.2011, 16:53
Respuesta: Report system... - by Alex_Obando - 02.04.2011, 17:07
Re: Report system... - by sabreman - 03.04.2011, 05:38
Re: Report system... - by Max_Coldheart - 03.04.2011, 07:00
Re: Report system... - by Tee - 03.04.2011, 07:34
Re: Report system... - by sabreman - 03.04.2011, 13:09
Re: Report system... - by armyoftwo - 03.04.2011, 13:16
Re: Report system... - by SchurmanCQC - 03.04.2011, 13:16
Re: Report system... - by sabreman - 04.04.2011, 13:54
Re: Report system... - by sabreman - 05.04.2011, 10:38
Re: Report system... - by sabreman - 07.04.2011, 12:13

Forum Jump:


Users browsing this thread: 3 Guest(s)