only level above or equal to 3 to see the reports??
#1

only level above or equal to 3 to see the reports??

Code:
dcmd_report(playerid,params[]) {
  new reported, tmp[256], tmp2[256], Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
  if(!strlen(params)) return SendClientMessage(playerid, red, "USO: /report [playerid] [motivo]");
	reported = strval(tmp);

 	if(IsPlayerConnected(reported) && reported != INVALID_PLAYER_ID) {
		if(PlayerInfo[reported][Level] == ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERRO: Vocк nгo pode relatar este administrador");
		if(playerid == reported) return SendClientMessage(playerid,red,"ERRO: Vocк nгo pode relatar vocк mesmo");
		if(strlen(params) > 7) {
			new reportedname[MAX_PLAYER_NAME], reporter[MAX_PLAYER_NAME], str[128], hour,minute,second; gettime(hour,minute,second);
			GetPlayerName(reported, reportedname, sizeof(reportedname));	GetPlayerName(playerid, reporter, sizeof(reporter));
			format(str, sizeof(str), "||Novo Relato|| %s(%d) relatou %s(%d) Motivo: %s |%d:%d:%d|", reporter,playerid, reportedname, reported, params[strlen(tmp)+1], hour,minute,second);
			MessageToAdmins(red,str);
			SaveToFile("ReportLog",str);
			format(str, sizeof(str), "Relato(%d:%d:%d): %s(%d) relatou %s(%d) Motivo: %s", hour,minute,second, reporter,playerid, reportedname, reported, params[strlen(tmp)+1]);
			for(new i = 1; i < MAX_REPORTS-1; i++) Reports[i] = Reports[i+1];
			Reports[MAX_REPORTS-1] = str;
			return SendClientMessage(playerid,yellow, "O seu relato foi enviado para os administradores online");
		} else return SendClientMessage(playerid,red,"ERRO: Deve ter uma razгo vбlida");
	} else return SendClientMessage(playerid, red, "Jogador nгo estб conectado");
}
thanks!
Reply
#2

You would need to edit the MessageToAdmins command. It contains the code that you're using to actually send the message to the admins.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)