10.05.2010, 01:03
only level above or equal to 3 to see the reports??
thanks!
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"); }