Canneil Posted May 22, 2015 Share Posted May 22, 2015 Hey, i want remove forum_perms for roleplay server report-system how to? function handleReport(reportedPlayer, reportedReason, reportType) local staff, errors, name, abrv, r, g, b = getReportInfo(reportType) if not staff then outputChatBox(errors, source, 255, 0, 0) return end if getElementData(reportedPlayer, "loggedin") ~= 1 then outputChatBox("The player you are reporting is not logged in.", source, 255, 0, 0) return end -- Find a free report slot local slot = nil sortReports(false) for i = 1, getMaxPlayers() do if not reports[i] then slot = i break end end local hours, minutes = getTime() -- Fix hours if (hours<10) then hours = "0" .. hours end -- Fix minutes if (minutes<10) then minutes = "0" .. minutes end local timestring = hours .. ":" .. minutes --local alertTimer = setTimer(alertPendingReport, 123500, 2, slot) --local alertTimer = setTimer(alertPendingReport, 123500, 0, slot) --local timeoutTimer = setTimer(pendingReportTimeout, 300000, 1, slot) -- Store report information reports[slot] = { } reports[slot][1] = source -- Reporter reports[slot][2] = reportedPlayer -- Reported Player reports[slot][3] = reportedReason -- Reported Reason reports[slot][4] = timestring -- Time reported at reports[slot][5] = nil -- Admin dealing with the report reports[slot][6] = alertTimer -- Alert timer of the report reports[slot][7] = reportType -- Report Type, table row for new report types / Chaos reports[slot][8] = slot -- Report ID/Slot, used in rolling queue function / Maxime local playerID = getElementData(source, "playerid") local reportedID = getElementData(reportedPlayer, "playerid") exports['anticheat']:changeProtectedElementDataEx(source, "adminreport", slot, true) exports['anticheat']:changeProtectedElementDataEx(source, "reportadmin", false) local count = 0 local nigger = 0 local skipadmin = false local gmsTold = false local playergotit = false local alreadyCalled = { } for _, usergroup in ipairs(staff) do if string.find(SUPPORTER, usergroup) then -- Supporters exports['anticheat']:changeProtectedElementDataEx(source, "gmreport", slot, true) local GMs = exports.global:getGameMasters() for key, value in ipairs(GMs) do local gmDuty = getElementData(value, "duty_supporter") if (gmDuty == 1) then nigger = nigger + 1 outputChatBox(" ["..abrv.." #" .. slot .."] (" .. playerID .. ") " .. tostring(getPlayerName(source)) .. " asked for assistance.", value, r, g, b) outputChatBox("Question: " .. reportedReason, value, 200, 240, 120) -- if reason2 and #reason2 > 0 then -- outputChatBox(reason2, value, 70, 220, 30) -- end skipadmin = true end count = count + 1 end -- No GMS online if not skipadmin then local GMs = exports.global:getAdmins() -- Show to GMs --local reason1 = reportedReason:sub( 0, 70 ) --local reason2 = reportedReason:sub( 71 ) for key, value in ipairs(GMs) do local gmDuty = getElementData(value, "duty_admin") if (gmDuty == 1) then outputChatBox(" ["..abrv.." #" .. slot .."] (" .. playerID .. ") " .. tostring(getPlayerName(source)) .. " asked for assistance.", value, r, g, b)--200, 240, 120) outputChatBox("Question: " .. reportedReason, value, 200, 240, 120) skipadmin = true -- if reason2 and #reason2 > 0 then -- outputChatBox(reason2, value, 200, 240, 120) -- end end count = count - 1 end end outputChatBox("Paldies kad iesūtijāt reportu. (Reporta ID: #" .. tostring(slot) .. ").", source, 70, 200, 30) outputChatBox("Jūs varat aizvērt reportu izmantojot /er.", source, 70, 200, 30) elseif string.find(auxiliaryTeams, usergroup) then -- Auxiliary Teams for key, value in ipairs(getElementsByType("player")) do if getElementData(value, "loggedin") == 1 then if string.find(getElementData(value, "forum_perms"), usergroup) then -- Opens up functionality to have reports ONLY go to leaders or only members outputChatBox(" ["..abrv.." #" .. slot .."] (" .. playerID .. ") " .. tostring(getPlayerName(source)) .. " reportēja (" .. reportedID .. ") " .. tostring(getPlayerName(reportedPlayer)) .. " at " .. timestring .. ".", value, r, g, b)--200, 240, 120) outputChatBox("Iemesls: " .. reportedReason, value, 200, 240, 120) end end end outputChatBox("Paldies kad iesūtijāt "..name.." reportu. (Reporat ID: #" .. tostring(slot) .. ").", source, 200, 240, 120) outputChatBox("Jūs reportējāt (" .. reportedID .. ") " .. tostring(getPlayerName(reportedPlayer)) .. ". Iemesls: ", source, 237, 145, 33 ) outputChatBox(reportedReason, source, 200, 240, 120) outputChatBox("Jūs varat aizvērt reportu izmantojot /er.", source, 200, 240, 120) break else -- Admins local admins = exports.global:getAdmins() local count = 0 local faggots = 0 if not skipadmin then for key, value in ipairs(admins) do local adminduty = getElementData(value, "duty_admin") local forum_perms = getElementData(value, "forum_perms") if (adminduty==1) and string.find(forum_perms, usergroup) and not alreadyCalled[value] then faggots = faggots + 1 outputChatBox(" ["..abrv.." #" .. slot .."] (" .. playerID .. ") " .. tostring(getPlayerName(source)) .. " reported (" .. reportedID .. ") " .. tostring(getPlayerName(reportedPlayer)) .. " at " .. timestring .. ".", value, r, g, b)--200, 240, 120) outputChatBox("Reason: " .. reportedReason, value, 200, 240, 120) alreadyCalled[value] = true end if getElementData(value, "hiddenadmin") ~= 1 then count = count + 1 end end if not gmsTold then local GMs = exports.global:getGameMasters() for key, value in ipairs(GMs) do local gmDuty = getElementData(value, "duty_supporter") if (gmDuty == 1) and getElementData(value, "report-system:subcribeToAdminReports") then outputChatBox(" ["..abrv.." #" .. slot .."] (" .. playerID .. ") " .. tostring(getPlayerName(source)) .. " reported (" .. reportedID .. ") " .. tostring(getPlayerName(reportedPlayer)) .. " at " .. timestring .. ".", value, r, g, b)--200, 240, 120) outputChatBox("Reason: " .. reportedReason, value, 200, 240, 120) gmsTold = true end end end if not playergotit then outputChatBox("Paldies kad iesūtijāt "..name.." reportu. (Reporta ID: #" .. tostring(slot) .. ").", source, 200, 240, 120) outputChatBox("Jūs reportējāt (" .. reportedID .. ") " .. tostring(getPlayerName(reportedPlayer)) .. ". Iemesls: ", source, 237, 145, 33 ) outputChatBox(reportedReason, source, 200, 240, 120) -- if reason2 and #reason2 > 0 then -- outputChatBox(reason2, source, 200, 240, 120) -- end outputChatBox("Drīzumā administrātori izskatīs jūsu reportu, pašlaik " .. faggots .. " admini" .. ( count == 1 and "" or "s" ) .. " Pieejami.", source, 200, 240, 120) outputChatBox("Jūs varat aizvērt reportu izmantojot /er.", source, 200, 240, 120) playergotit = true end end end end updateReportCount() end Link to comment
~Mr.Hassan Posted May 22, 2015 Share Posted May 22, 2015 I think that's Mod stolen How else will you do, do Link to comment
tosfera Posted May 22, 2015 Share Posted May 22, 2015 If you're able to write a report system with things like this included, you should also be able to remove some of it. This script is most likely not scripted by you. If this resource is from the community, please give us a link. If you're unable to give us a link the scripts are most likely leaked and therefore you'll not receive any support from the MTA community. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now