Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySQL.createCommand("vRP/ples_raport", "UPDATE `vrp_users` SET `raport` = `raport` + 1 WHERE `id` = @sender_id")
- MySQL.createCommand("vRP/ples_resetraport", "UPDATE `vrp_users` SET `raport` = 0")
- MySQL.createCommand("vRP/ples_getraport", "SELECT `raport`, `id` FROM `vrp_users` WHERE `raport` != 0")
- RegisterCommand('resetraport', function(source, args, msg)
- local user_id = vRP.getUserId(source)
- if vRP.hasGroup(user_id, "Fondator") then
- vRPclient.notify(source, {"~g~Rapoartele au fost resetate cu succes"})
- MySQL.execute("vRP/ples_resetraport")
- end
- end)
- RegisterCommand('rapoarte', function(source, args, msg)
- local user_id = vRP.getUserId(source)
- if vRP.hasGroup(user_id, "Fondator") then
- MySQL.query("vRP/ples_getraport", {}, function(rows, affected)
- local content = "<em><b>RAPORT STAFF</b></em>"
- for i, v in pairs(rows) do
- content = content .. "<br/><em>ID: " .. v.id .. " -> " .. v.raport .. " rapoarte</em>"
- end
- vRPclient.setDiv(source,{"ples_raport",".div_ples_raport{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
- Wait(10000)
- vRPclient.removeDiv(source,{"ples_raport"})
- end)
- end
- end)
- local function ch_calladmin(player,choice)
- local user_id = vRP.getUserId(player)
- if user_id ~= nil then
- vRP.prompt(player,"Describe your problem:","",function(player,desc)
- desc = desc or ""
- if desc ~= nil and desc ~= "" then
- local answered = false
- local players = {}
- for k,v in pairs(vRP.rusers) do
- local player = vRP.getUserSource(tonumber(k))
- if vRP.hasPermission(k,"admin.tickets") and player ~= nil then
- table.insert(players,player)
- end
- end
- for k,v in pairs(players) do
- vRP.request(v,"Admin ticket (user_id = "..user_id..") take/TP to ?: "..htmlEntities.encode(desc), 60, function(v,ok)
- if ok then -- take the call
- if not answered then
- -- answer the call
- vRPclient.notify(player,{"An admin took your ticket."})
- vRPclient.getPosition(player, {}, function(x,y,z)
- vRPclient.teleport(v,{x,y,z})
- end)
- answered = true
- local sender_id = vRP.getUserId(v)
- MySQL.query("vRP/ples_raport", {sender_id = sender_id})
- else
- vRPclient.notify(v,{"Ticket already taken."})
- end
- end
- end)
- end
- else
- vRPclient.notify(player,{"Empty Admin Call."})
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement