Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
8 years ago
Diff never expires
Clear
Export
Share
Explain
18 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
428 lines
Copy
30 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
428 lines
Copy
local htmlEntities = module("lib/htmlEntities")
local htmlEntities = module("lib/htmlEntities")
local Tools = module("lib/Tools")
local Tools = module("lib/Tools")
-- this module define some admin menu functions
-- this module define some admin menu functions
local player_lists = {}
local player_lists = {}
local function ch_list(player,choice)
local function ch_list(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then
if player_lists[player] then -- hide
if player_lists[player] then -- hide
player_lists[player] = nil
player_lists[player] = nil
vRPclient.removeDiv(player,{"user_list"})
vRPclient.removeDiv(player,{"user_list"})
else -- show
else -- show
local content = ""
local content = ""
local count = 0
local count = 0
for k,v in pairs(vRP.rusers) do
for k,v in pairs(vRP.rusers) do
count = count+1
count = count+1
local source = vRP.getUserSource(k)
local source = vRP.getUserSource(k)
vRP.getUserIdentity(k, function(identity)
vRP.getUserIdentity(k, function(identity)
if source ~= nil then
if source ~= nil then
content = content.."<br />"..k.." => <span class=\"pseudo\">"..vRP.getPlayerName(source).."</span> <span class=\"endpoint\">"..vRP.getPlayerEndpoint(source).."</span>"
content = content.."<br />"..k.." => <span class=\"pseudo\">"..vRP.getPlayerName(source).."</span> <span class=\"endpoint\">"..vRP.getPlayerEndpoint(source).."</span>"
if identity then
if identity then
content = content.." <span class=\"name\">"..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).."</span> <span class=\"reg\">"..identity.registration.."</span> <span class=\"phone\">"..identity.phone.."</span>"
content = content.." <span class=\"name\">"..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).."</span> <span class=\"reg\">"..identity.registration.."</span> <span class=\"phone\">"..identity.phone.."</span>"
end
end
end
end
-- check end
-- check end
count = count-1
count = count-1
if count == 0 then
if count == 0 then
player_lists[player] = true
player_lists[player] = true
local css = [[
local css = [[
.div_user_list{
.div_user_list{
margin: auto;
margin: auto;
padding: 8px;
padding: 8px;
width: 650px;
width: 650px;
margin-top: 80px;
margin-top: 80px;
background: black;
background: black;
color: white;
color: white;
font-weight: bold;
font-weight: bold;
font-size: 1.1em;
font-size: 1.1em;
}
}
Copy
Copied
Copy
Copied
.div_user_list .pseudo{
.div_user_list .pseudo{
color: rgb(0,255,125);
color: rgb(0,255,125);
}
}
Copy
Copied
Copy
Copied
.div_user_list .endpoint{
.div_user_list .endpoint{
color: rgb(255,0,0);
color: rgb(255,0,0);
}
}
Copy
Copied
Copy
Copied
.div_user_list .name{
.div_user_list .name{
color: #309eff;
color: #309eff;
}
}
Copy
Copied
Copy
Copied
.div_user_list .reg{
.div_user_list .reg{
color: rgb(0,125,255);
color: rgb(0,125,255);
}
}
.div_user_list .phone{
.div_user_list .phone{
color: rgb(211, 0, 255);
color: rgb(211, 0, 255);
}
}
]]
]]
vRPclient.setDiv(player,{"user_list", css, content})
vRPclient.setDiv(player,{"user_list", css, content})
end
end
end)
end)
end
end
end
end
end
end
end
end
local function ch_whitelist(player,choice)
local function ch_whitelist(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.whitelist") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.whitelist") then
vRP.prompt(player,"User id to whitelist: ","",function(player,id)
vRP.prompt(player,"User id to whitelist: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.setWhitelisted(id,true)
vRP.setWhitelisted(id,true)
vRPclient.notify(player,{"whitelisted user "..id})
vRPclient.notify(player,{"whitelisted user "..id})
end)
end)
end
end
end
end
local function ch_unwhitelist(player,choice)
local function ch_unwhitelist(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.unwhitelist") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.unwhitelist") then
vRP.prompt(player,"User id to un-whitelist: ","",function(player,id)
vRP.prompt(player,"User id to un-whitelist: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.setWhitelisted(id,false)
vRP.setWhitelisted(id,false)
vRPclient.notify(player,{"un-whitelisted user "..id})
vRPclient.notify(player,{"un-whitelisted user "..id})
end)
end)
end
end
end
end
local function ch_addgroup(player,choice)
local function ch_addgroup(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.group.add") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.group.add") then
vRP.prompt(player,"User id: ","",function(player,id)
vRP.prompt(player,"User id: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.prompt(player,"Group to add: ","",function(player,group)
vRP.prompt(player,"Group to add: ","",function(player,group)
vRP.addUserGroup(id,group)
vRP.addUserGroup(id,group)
vRPclient.notify(player,{group.." added to user "..id})
vRPclient.notify(player,{group.." added to user "..id})
end)
end)
end)
end)
end
end
end
end
local function ch_removegroup(player,choice)
local function ch_removegroup(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.group.remove") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.group.remove") then
vRP.prompt(player,"User id: ","",function(player,id)
vRP.prompt(player,"User id: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.prompt(player,"Group to remove: ","",function(player,group)
vRP.prompt(player,"Group to remove: ","",function(player,group)
vRP.removeUserGroup(id,group)
vRP.removeUserGroup(id,group)
vRPclient.notify(player,{group.." removed from user "..id})
vRPclient.notify(player,{group.." removed from user "..id})
end)
end)
end)
end)
end
end
end
end
local function ch_kick(player,choice)
local function ch_kick(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.kick") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.kick") then
vRP.prompt(player,"User id to kick: ","",function(player,id)
vRP.prompt(player,"User id to kick: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.prompt(player,"Reason: ","",function(player,reason)
vRP.prompt(player,"Reason: ","",function(player,reason)
local source = vRP.getUserSource(id)
local source = vRP.getUserSource(id)
if source ~= nil then
if source ~= nil then
vRP.kick(source,reason)
vRP.kick(source,reason)
vRPclient.notify(player,{"kicked user "..id})
vRPclient.notify(player,{"kicked user "..id})
end
end
end)
end)
end)
end)
end
end
end
end
local function ch_ban(player,choice)
local function ch_ban(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.ban") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.ban") then
vRP.prompt(player,"User id to ban: ","",function(player,id)
vRP.prompt(player,"User id to ban: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.prompt(player,"Reason: ","",function(player,reason)
vRP.prompt(player,"Reason: ","",function(player,reason)
local source = vRP.getUserSource(id)
local source = vRP.getUserSource(id)
if source ~= nil then
if source ~= nil then
vRP.ban(source,reason)
vRP.ban(source,reason)
vRPclient.notify(player,{"banned user "..id})
vRPclient.notify(player,{"banned user "..id})
end
end
end)
end)
end)
end)
end
end
end
end
local function ch_unban(player,choice)
local function ch_unban(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.unban") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.unban") then
vRP.prompt(player,"User id to unban: ","",function(player,id)
vRP.prompt(player,"User id to unban: ","",function(player,id)
id = parseInt(id)
id = parseInt(id)
vRP.setBanned(id,false)
vRP.setBanned(id,false)
vRPclient.notify(player,{"un-banned user "..id})
vRPclient.notify(player,{"un-banned user "..id})
end)
end)
end
end
end
end
local function ch_emote(player,choice)
local function ch_emote(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_emote") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_emote") then
vRP.prompt(player,"Animation sequence ('dict anim optional_loops' per line): ","",function(player,content)
vRP.prompt(player,"Animation sequence ('dict anim optional_loops' per line): ","",function(player,content)
local seq = {}
local seq = {}
for line in string.gmatch(content,"[^\n]+") do
for line in string.gmatch(content,"[^\n]+") do
local args = {}
local args = {}
for arg in string.gmatch(line,"[^%s]+") do
for arg in string.gmatch(line,"[^%s]+") do
table.insert(args,arg)
table.insert(args,arg)
end
end
table.insert(seq,{args[1] or "", args[2] or "", args[3] or 1})
table.insert(seq,{args[1] or "", args[2] or "", args[3] or 1})
end
end
vRPclient.playAnim(player,{true,seq,false})
vRPclient.playAnim(player,{true,seq,false})
end)
end)
end
end
end
end
local function ch_sound(player,choice)
local function ch_sound(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_sound") then
if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_sound") then
vRP.prompt(player,"Sound 'dict name': ","",function(player,content)
vRP.prompt(player,"Sound 'dict name': ","",function(player,content)
local args = {}
local args = {}
for arg in string.gmatch(content,"[^%s]+") do
for arg in string.gmatch(content,"[^%s]+") do
table.insert(args,arg)
table.insert(args,arg)
end
end
vRPclient.playSound(player,{args[1] or "", args[2] or ""})
vRPclient.playSound(player,{args[1] or "", args[2] or ""})
end)
end)
end
end
end
end
local function ch_coords(player,choice)
local function ch_coords(player,choice)
vRPclient.getPosition(player,{},function(x,y,z)
vRPclient.getPosition(player,{},function(x,y,z)
vRP.prompt(player,"Copy the coordinates using Ctrl-A Ctrl-C",x..","..y..","..z,function(player,choice) end)
vRP.prompt(player,"Copy the coordinates using Ctrl-A Ctrl-C",x..","..y..","..z,function(player,choice) end)
end)
end)
end
end
local function ch_tptome(player,choice)
local function ch_tptome(player,choice)
vRPclient.getPosition(player,{},function(x,y,z)
vRPclient.getPosition(player,{},function(x,y,z)
vRP.prompt(player,"User id:","",function(player,user_id)
vRP.prompt(player,"User id:","",function(player,user_id)
local tplayer = vRP.getUserSource(tonumber(user_id))
local tplayer = vRP.getUserSource(tonumber(user_id))
if tplayer ~= nil then
if tplayer ~= nil then
vRPclient.teleport(tplayer,{x,y,z})
vRPclient.teleport(tplayer,{x,y,z})
end
end
end)
end)
end)
end)
end
end
local function ch_tpto(player,choice)
local function ch_tpto(player,choice)
vRP.prompt(player,"User id:","",function(player,user_id)
vRP.prompt(player,"User id:","",function(player,user_id)
local tplayer = vRP.getUserSource(tonumber(user_id))
local tplayer = vRP.getUserSource(tonumber(user_id))
if tplayer ~= nil then
if tplayer ~= nil then
vRPclient.getPosition(tplayer,{},function(x,y,z)
vRPclient.getPosition(tplayer,{},function(x,y,z)
vRPclient.teleport(player,{x,y,z})
vRPclient.teleport(player,{x,y,z})
end)
end)
end
end
end)
end)
end
end
local function ch_tptocoords(player,choice)
local function ch_tptocoords(player,choice)
vRP.prompt(player,"Coords x,y,z:","",function(player,fcoords)
vRP.prompt(player,"Coords x,y,z:","",function(player,fcoords)
local coords = {}
local coords = {}
for coord in string.gmatch(fcoords or "0,0,0","[^,]+") do
for coord in string.gmatch(fcoords or "0,0,0","[^,]+") do
table.insert(coords,tonumber(coord))
table.insert(coords,tonumber(coord))
end
end
local x,y,z = 0,0,0
local x,y,z = 0,0,0
if coords[1] ~= nil then x = coords[1] end
if coords[1] ~= nil then x = coords[1] end
if coords[2] ~= nil then y = coords[2] end
if coords[2] ~= nil then y = coords[2] end
if coords[3] ~= nil then z = coords[3] end
if coords[3] ~= nil then z = coords[3] end
vRPclient.teleport(player,{x,y,z})
vRPclient.teleport(player,{x,y,z})
end)
end)
end
end
local function ch_givemoney(player,choice)
local function ch_givemoney(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil then
if user_id ~= nil then
vRP.prompt(player,"Amount:","",function(player,amount)
vRP.prompt(player,"Amount:","",function(player,amount)
amount = parseInt(amount)
amount = parseInt(amount)
vRP.giveMoney(user_id, amount)
vRP.giveMoney(user_id, amount)
end)
end)
end
end
end
end
Copy
Copied
Copy
Copied
local function ch_revive_stn(player,choice) -- Admin Revive By Sul6an
local user_id = vRP.getUserId(player)
if user_id ~= nil then
vRP.prompt(player,"Revive:","",function(player,user_id)
vRPclient.varyHealth(user_id, {100})
end)
end
end
local function ch_giveitem(player,choice)
local function ch_giveitem(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil then
if user_id ~= nil then
vRP.prompt(player,"Id name:","",function(player,idname)
vRP.prompt(player,"Id name:","",function(player,idname)
idname = idname or ""
idname = idname or ""
vRP.prompt(player,"Amount:","",function(player,amount)
vRP.prompt(player,"Amount:","",function(player,amount)
amount = parseInt(amount)
amount = parseInt(amount)
vRP.giveInventoryItem(user_id, idname, amount,true)
vRP.giveInventoryItem(user_id, idname, amount,true)
end)
end)
end)
end)
end
end
end
end
local function ch_calladmin(player,choice)
local function ch_calladmin(player,choice)
local user_id = vRP.getUserId(player)
local user_id = vRP.getUserId(player)
if user_id ~= nil then
if user_id ~= nil then
vRP.prompt(player,"Describe your problem:","",function(player,desc)
vRP.prompt(player,"Describe your problem:","",function(player,desc)
desc = desc or ""
desc = desc or ""
Copy
Copied
Copy
Copied
if desc ~= nil and desc ~= "" then
local answered = false
local answered = false
local players = {}
local players = {}
for k,v in pairs(vRP.rusers) do
for k,v in pairs(vRP.rusers) do
local player = vRP.getUserSource(tonumber(k))
local player = vRP.getUserSource(tonumber(k))
-- check user
-- check user
if vRP.hasPermission(k,"admin.tickets") and player ~= nil then
if vRP.hasPermission(k,"admin.tickets") and player ~= nil then
table.insert(players,player)
table.insert(players,player)
end
end
end
end
-- send notify and alert to all listening players
-- send notify and alert to all listening players
for k,v in pairs(players) do
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)
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 ok then -- take the call
if not answered then
if not answered then
-- answer the call
-- answer the call
vRPclient.notify(player,{"An admin took your ticket."})
vRPclient.notify(player,{"An admin took your ticket."})
vRPclient.getPosition(player, {}, function(x,y,z)
vRPclient.getPosition(player, {}, function(x,y,z)
vRPclient.teleport(v,{x,y,z})
vRPclient.teleport(v,{x,y,z})
end)
end)
answered = true
answered = true
else
else
vRPclient.notify(v,{"Ticket already taken."})
vRPclient.notify(v,{"Ticket already taken."})
end
end
end
end
end)
end)
end
end
Copy
Copied
Copy
Copied
else
vRPclient.notify(player,{"Empty Admin Call."})
end
end)
end)
end
end
end
end
local player_customs = {}
local player_customs = {}
local function ch_display_custom(player, choice)
local function ch_display_custom(player, choice)
vRPclient.getCustomization(player,{},function(custom)
vRPclient.getCustomization(player,{},function(custom)
if player_customs[player] then -- hide
if player_customs[player] then -- hide
player_customs[player] = nil
player_customs[player] = nil
vRPclient.removeDiv(player,{"customization"})
vRPclient.removeDiv(player,{"customization"})
else -- show
else -- show
local content = ""
local content = ""
for k,v in pairs(custom) do
for k,v in pairs(custom) do
content = content..k.." => "..json.encode(v).."<br />"
content = content..k.." => "..json.encode(v).."<br />"
end
end
player_customs[player] = true
player_customs[player] = true
vRPclient.setDiv(player,{"customization",".div_customization{ margin: auto; padding: 8px; width: 500px; margin-top: 80px; background: black; color: white; font-weight: bold; ", content})
vRPclient.setDiv(player,{"customization",".div_customization{ margin: auto; padding: 8px; width: 500px; margin-top: 80px; background: black; color: white; font-weight: bold; ", content})
end
end
end)
end)
end
end
local function ch_noclip(player, choice)
local function ch_noclip(player, choice)
vRPclient.toggleNoclip(player, {})
vRPclient.toggleNoclip(player, {})
end
end
Copy
Copied
Copy
Copied
-- Hotkey Open Admin Menu 1/2
function vRP.openAdminMenu(source)
vRP.buildMenu("admin", {player = source}, function(menudata)
menudata.name = "Admin"
menudata.css = {top="75px",header_color="rgba(0,125,255,0.75)"}
vRP.openMenu(source,menudata)
end)
end
-- Hotkey Open Admin Menu 2/2
function tvRP.openAdminMenu()
vRP.openAdminMenu(source)
end
vRP.registerMenuBuilder("main", function(add, data)
vRP.registerMenuBuilder("main", function(add, data)
local user_id = vRP.getUserId(data.player)
local user_id = vRP.getUserId(data.player)
if user_id ~= nil then
if user_id ~= nil then
local choices = {}
local choices = {}
-- build admin menu
-- build admin menu
choices["Admin"] = {function(player,choice)
choices["Admin"] = {function(player,choice)
vRP.buildMenu("admin", {player = player}, function(menu)
vRP.buildMenu("admin", {player = player}, function(menu)
menu.name = "Admin"
menu.name = "Admin"
menu.css={top="75px",header_color="rgba(200,0,0,0.75)"}
menu.css={top="75px",header_color="rgba(200,0,0,0.75)"}
menu.onclose = function(player) vRP.openMainMenu(player) end -- nest menu
menu.onclose = function(player) vRP.openMainMenu(player) end -- nest menu
if vRP.hasPermission(user_id,"player.list") then
if vRP.hasPermission(user_id,"player.list") then
menu["User list"] = {ch_list,"Show/hide user list."}
menu["User list"] = {ch_list,"Show/hide user list."}
end
end
if vRP.hasPermission(user_id,"player.whitelist") then
if vRP.hasPermission(user_id,"player.whitelist") then
menu["Whitelist user"] = {ch_whitelist}
menu["Whitelist user"] = {ch_whitelist}
end
end
if vRP.hasPermission(user_id,"player.group.add") then
if vRP.hasPermission(user_id,"player.group.add") then
menu["Add group"] = {ch_addgroup}
menu["Add group"] = {ch_addgroup}
end
end
if vRP.hasPermission(user_id,"player.group.remove") then
if vRP.hasPermission(user_id,"player.group.remove") then
menu["Remove group"] = {ch_removegroup}
menu["Remove group"] = {ch_removegroup}
end
end
if vRP.hasPermission(user_id,"player.unwhitelist") then
if vRP.hasPermission(user_id,"player.unwhitelist") then
menu["Un-whitelist user"] = {ch_unwhitelist}
menu["Un-whitelist user"] = {ch_unwhitelist}
end
end
if vRP.hasPermission(user_id,"player.kick") then
if vRP.hasPermission(user_id,"player.kick") then
menu["Kick"] = {ch_kick}
menu["Kick"] = {ch_kick}
end
end
if vRP.hasPermission(user_id,"player.ban") then
if vRP.hasPermission(user_id,"player.ban") then
menu["Ban"] = {ch_ban}
menu["Ban"] = {ch_ban}
end
end
if vRP.hasPermission(user_id,"player.unban") then
if vRP.hasPermission(user_id,"player.unban") then
menu["Unban"] = {ch_unban}
menu["Unban"] = {ch_unban}
end
end
if vRP.hasPermission(user_id,"player.noclip") then
if vRP.hasPermission(user_id,"player.noclip") then
menu["Noclip"] = {ch_noclip}
menu["Noclip"] = {ch_noclip}
end
end
if vRP.hasPermission(user_id,"player.custom_emote") then
if vRP.hasPermission(user_id,"player.custom_emote") then
menu["Custom emote"] = {ch_emote}
menu["Custom emote"] = {ch_emote}
end
end
if vRP.hasPermission(user_id,"player.custom_sound") then
if vRP.hasPermission(user_id,"player.custom_sound") then
menu["Custom sound"] = {ch_sound}
menu["Custom sound"] = {ch_sound}
end
end
if vRP.hasPermission(user_id,"player.coords") then
if vRP.hasPermission(user_id,"player.coords") then
menu["Coords"] = {ch_coords}
menu["Coords"] = {ch_coords}
end
end
if vRP.hasPermission(user_id,"player.tptome") then
if vRP.hasPermission(user_id,"player.tptome") then
menu["TpToMe"] = {ch_tptome}
menu["TpToMe"] = {ch_tptome}
end
end
if vRP.hasPermission(user_id,"player.tpto") then
if vRP.hasPermission(user_id,"player.tpto") then
menu["TpTo"] = {ch_tpto}
menu["TpTo"] = {ch_tpto}
end
end
if vRP.hasPermission(user_id,"player.tpto") then
if vRP.hasPermission(user_id,"player.tpto") then
menu["TpToCoords"] = {ch_tptocoords}
menu["TpToCoords"] = {ch_tptocoords}
end
end
if vRP.hasPermission(user_id,"player.givemoney") then
if vRP.hasPermission(user_id,"player.givemoney") then
menu["Give money"] = {ch_givemoney}
menu["Give money"] = {ch_givemoney}
end
end
Copy
Copied
Copy
Copied
if vRP.hasPermission(user_id,"admin.tickets") then -- new
menu["Admin Revive"] = {ch_revive_stn}
end
if vRP.hasPermission(user_id,"player.giveitem") then
if vRP.hasPermission(user_id,"player.giveitem") then
menu["Give item"] = {ch_giveitem}
menu["Give item"] = {ch_giveitem}
end
end
if vRP.hasPermission(user_id,"player.display_custom") then
if vRP.hasPermission(user_id,"player.display_custom") then
menu["Display customization"] = {ch_display_custom}
menu["Display customization"] = {ch_display_custom}
end
end
if vRP.hasPermission(user_id,"player.calladmin") then
if vRP.hasPermission(user_id,"player.calladmin") then
menu["Call admin"] = {ch_calladmin}
menu["Call admin"] = {ch_calladmin}
end
end
vRP.openMenu(player,menu)
vRP.openMenu(player,menu)
end)
end)
end}
end}
add(choices)
add(choices)
Copy
Copied
Copy
Copied
end
end
end)
end)
-- admin god mode
-- admin god mode
Copy
Copied
Copy
Copied
function task_god()
--
function task_god()
SetTimeout(10000, task_god)
--
SetTimeout(10000, task_god)
Copy
Copied
Copy
Copied
for k,v in pairs(vRP.getUsersByPermission("admin.god")) do
--
for k,v in pairs(vRP.getUsersByPermission("admin.god")) do
vRP.setHunger(v, 0)
--
vRP.setHunger(v, 0)
vRP.setThirst(v, 0)
--
vRP.setThirst(v, 0)
Copy
Copied
Copy
Copied
local player = vRP.getUserSource(v)
--
local player = vRP.getUserSource(v)
if player ~= nil then
--
if player ~= nil then
vRPclient.setHealth(player, {200})
--
vRPclient.setHealth(player, {200})
end
--
end
end
--
end
end
--
end
Copy
Copied
Copy
Copied
task_god()
--
task_god()
Saved diffs
Original text
Open file
local htmlEntities = module("lib/htmlEntities") local Tools = module("lib/Tools") -- this module define some admin menu functions local player_lists = {} local function ch_list(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then if player_lists[player] then -- hide player_lists[player] = nil vRPclient.removeDiv(player,{"user_list"}) else -- show local content = "" local count = 0 for k,v in pairs(vRP.rusers) do count = count+1 local source = vRP.getUserSource(k) vRP.getUserIdentity(k, function(identity) if source ~= nil then content = content.."<br />"..k.." => <span class=\"pseudo\">"..vRP.getPlayerName(source).."</span> <span class=\"endpoint\">"..vRP.getPlayerEndpoint(source).."</span>" if identity then content = content.." <span class=\"name\">"..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).."</span> <span class=\"reg\">"..identity.registration.."</span> <span class=\"phone\">"..identity.phone.."</span>" end end -- check end count = count-1 if count == 0 then player_lists[player] = true local css = [[ .div_user_list{ margin: auto; padding: 8px; width: 650px; margin-top: 80px; background: black; color: white; font-weight: bold; font-size: 1.1em; } .div_user_list .pseudo{ color: rgb(0,255,125); } .div_user_list .endpoint{ color: rgb(255,0,0); } .div_user_list .name{ color: #309eff; } .div_user_list .reg{ color: rgb(0,125,255); } .div_user_list .phone{ color: rgb(211, 0, 255); } ]] vRPclient.setDiv(player,{"user_list", css, content}) end end) end end end end local function ch_whitelist(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.whitelist") then vRP.prompt(player,"User id to whitelist: ","",function(player,id) id = parseInt(id) vRP.setWhitelisted(id,true) vRPclient.notify(player,{"whitelisted user "..id}) end) end end local function ch_unwhitelist(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.unwhitelist") then vRP.prompt(player,"User id to un-whitelist: ","",function(player,id) id = parseInt(id) vRP.setWhitelisted(id,false) vRPclient.notify(player,{"un-whitelisted user "..id}) end) end end local function ch_addgroup(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.group.add") then vRP.prompt(player,"User id: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Group to add: ","",function(player,group) vRP.addUserGroup(id,group) vRPclient.notify(player,{group.." added to user "..id}) end) end) end end local function ch_removegroup(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.group.remove") then vRP.prompt(player,"User id: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Group to remove: ","",function(player,group) vRP.removeUserGroup(id,group) vRPclient.notify(player,{group.." removed from user "..id}) end) end) end end local function ch_kick(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.kick") then vRP.prompt(player,"User id to kick: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Reason: ","",function(player,reason) local source = vRP.getUserSource(id) if source ~= nil then vRP.kick(source,reason) vRPclient.notify(player,{"kicked user "..id}) end end) end) end end local function ch_ban(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.ban") then vRP.prompt(player,"User id to ban: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Reason: ","",function(player,reason) local source = vRP.getUserSource(id) if source ~= nil then vRP.ban(source,reason) vRPclient.notify(player,{"banned user "..id}) end end) end) end end local function ch_unban(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.unban") then vRP.prompt(player,"User id to unban: ","",function(player,id) id = parseInt(id) vRP.setBanned(id,false) vRPclient.notify(player,{"un-banned user "..id}) end) end end local function ch_emote(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_emote") then vRP.prompt(player,"Animation sequence ('dict anim optional_loops' per line): ","",function(player,content) local seq = {} for line in string.gmatch(content,"[^\n]+") do local args = {} for arg in string.gmatch(line,"[^%s]+") do table.insert(args,arg) end table.insert(seq,{args[1] or "", args[2] or "", args[3] or 1}) end vRPclient.playAnim(player,{true,seq,false}) end) end end local function ch_sound(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_sound") then vRP.prompt(player,"Sound 'dict name': ","",function(player,content) local args = {} for arg in string.gmatch(content,"[^%s]+") do table.insert(args,arg) end vRPclient.playSound(player,{args[1] or "", args[2] or ""}) end) end end local function ch_coords(player,choice) vRPclient.getPosition(player,{},function(x,y,z) vRP.prompt(player,"Copy the coordinates using Ctrl-A Ctrl-C",x..","..y..","..z,function(player,choice) end) end) end local function ch_tptome(player,choice) vRPclient.getPosition(player,{},function(x,y,z) vRP.prompt(player,"User id:","",function(player,user_id) local tplayer = vRP.getUserSource(tonumber(user_id)) if tplayer ~= nil then vRPclient.teleport(tplayer,{x,y,z}) end end) end) end local function ch_tpto(player,choice) vRP.prompt(player,"User id:","",function(player,user_id) local tplayer = vRP.getUserSource(tonumber(user_id)) if tplayer ~= nil then vRPclient.getPosition(tplayer,{},function(x,y,z) vRPclient.teleport(player,{x,y,z}) end) end end) end local function ch_tptocoords(player,choice) vRP.prompt(player,"Coords x,y,z:","",function(player,fcoords) local coords = {} for coord in string.gmatch(fcoords or "0,0,0","[^,]+") do table.insert(coords,tonumber(coord)) end local x,y,z = 0,0,0 if coords[1] ~= nil then x = coords[1] end if coords[2] ~= nil then y = coords[2] end if coords[3] ~= nil then z = coords[3] end vRPclient.teleport(player,{x,y,z}) end) end local function ch_givemoney(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil then vRP.prompt(player,"Amount:","",function(player,amount) amount = parseInt(amount) vRP.giveMoney(user_id, amount) end) end end local function ch_revive_stn(player,choice) -- Admin Revive By Sul6an local user_id = vRP.getUserId(player) if user_id ~= nil then vRP.prompt(player,"Revive:","",function(player,user_id) vRPclient.varyHealth(user_id, {100}) end) end end local function ch_giveitem(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil then vRP.prompt(player,"Id name:","",function(player,idname) idname = idname or "" vRP.prompt(player,"Amount:","",function(player,amount) amount = parseInt(amount) vRP.giveInventoryItem(user_id, idname, amount,true) end) 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 "" local answered = false local players = {} for k,v in pairs(vRP.rusers) do local player = vRP.getUserSource(tonumber(k)) -- check user if vRP.hasPermission(k,"admin.tickets") and player ~= nil then table.insert(players,player) end end -- send notify and alert to all listening players 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 else vRPclient.notify(v,{"Ticket already taken."}) end end end) end end) end end local player_customs = {} local function ch_display_custom(player, choice) vRPclient.getCustomization(player,{},function(custom) if player_customs[player] then -- hide player_customs[player] = nil vRPclient.removeDiv(player,{"customization"}) else -- show local content = "" for k,v in pairs(custom) do content = content..k.." => "..json.encode(v).."<br />" end player_customs[player] = true vRPclient.setDiv(player,{"customization",".div_customization{ margin: auto; padding: 8px; width: 500px; margin-top: 80px; background: black; color: white; font-weight: bold; ", content}) end end) end local function ch_noclip(player, choice) vRPclient.toggleNoclip(player, {}) end vRP.registerMenuBuilder("main", function(add, data) local user_id = vRP.getUserId(data.player) if user_id ~= nil then local choices = {} -- build admin menu choices["Admin"] = {function(player,choice) vRP.buildMenu("admin", {player = player}, function(menu) menu.name = "Admin" menu.css={top="75px",header_color="rgba(200,0,0,0.75)"} menu.onclose = function(player) vRP.openMainMenu(player) end -- nest menu if vRP.hasPermission(user_id,"player.list") then menu["User list"] = {ch_list,"Show/hide user list."} end if vRP.hasPermission(user_id,"player.whitelist") then menu["Whitelist user"] = {ch_whitelist} end if vRP.hasPermission(user_id,"player.group.add") then menu["Add group"] = {ch_addgroup} end if vRP.hasPermission(user_id,"player.group.remove") then menu["Remove group"] = {ch_removegroup} end if vRP.hasPermission(user_id,"player.unwhitelist") then menu["Un-whitelist user"] = {ch_unwhitelist} end if vRP.hasPermission(user_id,"player.kick") then menu["Kick"] = {ch_kick} end if vRP.hasPermission(user_id,"player.ban") then menu["Ban"] = {ch_ban} end if vRP.hasPermission(user_id,"player.unban") then menu["Unban"] = {ch_unban} end if vRP.hasPermission(user_id,"player.noclip") then menu["Noclip"] = {ch_noclip} end if vRP.hasPermission(user_id,"player.custom_emote") then menu["Custom emote"] = {ch_emote} end if vRP.hasPermission(user_id,"player.custom_sound") then menu["Custom sound"] = {ch_sound} end if vRP.hasPermission(user_id,"player.coords") then menu["Coords"] = {ch_coords} end if vRP.hasPermission(user_id,"player.tptome") then menu["TpToMe"] = {ch_tptome} end if vRP.hasPermission(user_id,"player.tpto") then menu["TpTo"] = {ch_tpto} end if vRP.hasPermission(user_id,"player.tpto") then menu["TpToCoords"] = {ch_tptocoords} end if vRP.hasPermission(user_id,"player.givemoney") then menu["Give money"] = {ch_givemoney} end if vRP.hasPermission(user_id,"admin.tickets") then -- new menu["Admin Revive"] = {ch_revive_stn} end if vRP.hasPermission(user_id,"player.giveitem") then menu["Give item"] = {ch_giveitem} end if vRP.hasPermission(user_id,"player.display_custom") then menu["Display customization"] = {ch_display_custom} end if vRP.hasPermission(user_id,"player.calladmin") then menu["Call admin"] = {ch_calladmin} end vRP.openMenu(player,menu) end) end} add(choices) end end) -- admin god mode function task_god() SetTimeout(10000, task_god) for k,v in pairs(vRP.getUsersByPermission("admin.god")) do vRP.setHunger(v, 0) vRP.setThirst(v, 0) local player = vRP.getUserSource(v) if player ~= nil then vRPclient.setHealth(player, {200}) end end end task_god()
Changed text
Open file
local htmlEntities = module("lib/htmlEntities") local Tools = module("lib/Tools") -- this module define some admin menu functions local player_lists = {} local function ch_list(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.list") then if player_lists[player] then -- hide player_lists[player] = nil vRPclient.removeDiv(player,{"user_list"}) else -- show local content = "" local count = 0 for k,v in pairs(vRP.rusers) do count = count+1 local source = vRP.getUserSource(k) vRP.getUserIdentity(k, function(identity) if source ~= nil then content = content.."<br />"..k.." => <span class=\"pseudo\">"..vRP.getPlayerName(source).."</span> <span class=\"endpoint\">"..vRP.getPlayerEndpoint(source).."</span>" if identity then content = content.." <span class=\"name\">"..htmlEntities.encode(identity.firstname).." "..htmlEntities.encode(identity.name).."</span> <span class=\"reg\">"..identity.registration.."</span> <span class=\"phone\">"..identity.phone.."</span>" end end -- check end count = count-1 if count == 0 then player_lists[player] = true local css = [[ .div_user_list{ margin: auto; padding: 8px; width: 650px; margin-top: 80px; background: black; color: white; font-weight: bold; font-size: 1.1em; } .div_user_list .pseudo{ color: rgb(0,255,125); } .div_user_list .endpoint{ color: rgb(255,0,0); } .div_user_list .name{ color: #309eff; } .div_user_list .reg{ color: rgb(0,125,255); } .div_user_list .phone{ color: rgb(211, 0, 255); } ]] vRPclient.setDiv(player,{"user_list", css, content}) end end) end end end end local function ch_whitelist(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.whitelist") then vRP.prompt(player,"User id to whitelist: ","",function(player,id) id = parseInt(id) vRP.setWhitelisted(id,true) vRPclient.notify(player,{"whitelisted user "..id}) end) end end local function ch_unwhitelist(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.unwhitelist") then vRP.prompt(player,"User id to un-whitelist: ","",function(player,id) id = parseInt(id) vRP.setWhitelisted(id,false) vRPclient.notify(player,{"un-whitelisted user "..id}) end) end end local function ch_addgroup(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.group.add") then vRP.prompt(player,"User id: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Group to add: ","",function(player,group) vRP.addUserGroup(id,group) vRPclient.notify(player,{group.." added to user "..id}) end) end) end end local function ch_removegroup(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.group.remove") then vRP.prompt(player,"User id: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Group to remove: ","",function(player,group) vRP.removeUserGroup(id,group) vRPclient.notify(player,{group.." removed from user "..id}) end) end) end end local function ch_kick(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.kick") then vRP.prompt(player,"User id to kick: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Reason: ","",function(player,reason) local source = vRP.getUserSource(id) if source ~= nil then vRP.kick(source,reason) vRPclient.notify(player,{"kicked user "..id}) end end) end) end end local function ch_ban(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.ban") then vRP.prompt(player,"User id to ban: ","",function(player,id) id = parseInt(id) vRP.prompt(player,"Reason: ","",function(player,reason) local source = vRP.getUserSource(id) if source ~= nil then vRP.ban(source,reason) vRPclient.notify(player,{"banned user "..id}) end end) end) end end local function ch_unban(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.unban") then vRP.prompt(player,"User id to unban: ","",function(player,id) id = parseInt(id) vRP.setBanned(id,false) vRPclient.notify(player,{"un-banned user "..id}) end) end end local function ch_emote(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_emote") then vRP.prompt(player,"Animation sequence ('dict anim optional_loops' per line): ","",function(player,content) local seq = {} for line in string.gmatch(content,"[^\n]+") do local args = {} for arg in string.gmatch(line,"[^%s]+") do table.insert(args,arg) end table.insert(seq,{args[1] or "", args[2] or "", args[3] or 1}) end vRPclient.playAnim(player,{true,seq,false}) end) end end local function ch_sound(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil and vRP.hasPermission(user_id,"player.custom_sound") then vRP.prompt(player,"Sound 'dict name': ","",function(player,content) local args = {} for arg in string.gmatch(content,"[^%s]+") do table.insert(args,arg) end vRPclient.playSound(player,{args[1] or "", args[2] or ""}) end) end end local function ch_coords(player,choice) vRPclient.getPosition(player,{},function(x,y,z) vRP.prompt(player,"Copy the coordinates using Ctrl-A Ctrl-C",x..","..y..","..z,function(player,choice) end) end) end local function ch_tptome(player,choice) vRPclient.getPosition(player,{},function(x,y,z) vRP.prompt(player,"User id:","",function(player,user_id) local tplayer = vRP.getUserSource(tonumber(user_id)) if tplayer ~= nil then vRPclient.teleport(tplayer,{x,y,z}) end end) end) end local function ch_tpto(player,choice) vRP.prompt(player,"User id:","",function(player,user_id) local tplayer = vRP.getUserSource(tonumber(user_id)) if tplayer ~= nil then vRPclient.getPosition(tplayer,{},function(x,y,z) vRPclient.teleport(player,{x,y,z}) end) end end) end local function ch_tptocoords(player,choice) vRP.prompt(player,"Coords x,y,z:","",function(player,fcoords) local coords = {} for coord in string.gmatch(fcoords or "0,0,0","[^,]+") do table.insert(coords,tonumber(coord)) end local x,y,z = 0,0,0 if coords[1] ~= nil then x = coords[1] end if coords[2] ~= nil then y = coords[2] end if coords[3] ~= nil then z = coords[3] end vRPclient.teleport(player,{x,y,z}) end) end local function ch_givemoney(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil then vRP.prompt(player,"Amount:","",function(player,amount) amount = parseInt(amount) vRP.giveMoney(user_id, amount) end) end end local function ch_giveitem(player,choice) local user_id = vRP.getUserId(player) if user_id ~= nil then vRP.prompt(player,"Id name:","",function(player,idname) idname = idname or "" vRP.prompt(player,"Amount:","",function(player,amount) amount = parseInt(amount) vRP.giveInventoryItem(user_id, idname, amount,true) end) 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)) -- check user if vRP.hasPermission(k,"admin.tickets") and player ~= nil then table.insert(players,player) end end -- send notify and alert to all listening players 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 else vRPclient.notify(v,{"Ticket already taken."}) end end end) end else vRPclient.notify(player,{"Empty Admin Call."}) end end) end end local player_customs = {} local function ch_display_custom(player, choice) vRPclient.getCustomization(player,{},function(custom) if player_customs[player] then -- hide player_customs[player] = nil vRPclient.removeDiv(player,{"customization"}) else -- show local content = "" for k,v in pairs(custom) do content = content..k.." => "..json.encode(v).."<br />" end player_customs[player] = true vRPclient.setDiv(player,{"customization",".div_customization{ margin: auto; padding: 8px; width: 500px; margin-top: 80px; background: black; color: white; font-weight: bold; ", content}) end end) end local function ch_noclip(player, choice) vRPclient.toggleNoclip(player, {}) end -- Hotkey Open Admin Menu 1/2 function vRP.openAdminMenu(source) vRP.buildMenu("admin", {player = source}, function(menudata) menudata.name = "Admin" menudata.css = {top="75px",header_color="rgba(0,125,255,0.75)"} vRP.openMenu(source,menudata) end) end -- Hotkey Open Admin Menu 2/2 function tvRP.openAdminMenu() vRP.openAdminMenu(source) end vRP.registerMenuBuilder("main", function(add, data) local user_id = vRP.getUserId(data.player) if user_id ~= nil then local choices = {} -- build admin menu choices["Admin"] = {function(player,choice) vRP.buildMenu("admin", {player = player}, function(menu) menu.name = "Admin" menu.css={top="75px",header_color="rgba(200,0,0,0.75)"} menu.onclose = function(player) vRP.openMainMenu(player) end -- nest menu if vRP.hasPermission(user_id,"player.list") then menu["User list"] = {ch_list,"Show/hide user list."} end if vRP.hasPermission(user_id,"player.whitelist") then menu["Whitelist user"] = {ch_whitelist} end if vRP.hasPermission(user_id,"player.group.add") then menu["Add group"] = {ch_addgroup} end if vRP.hasPermission(user_id,"player.group.remove") then menu["Remove group"] = {ch_removegroup} end if vRP.hasPermission(user_id,"player.unwhitelist") then menu["Un-whitelist user"] = {ch_unwhitelist} end if vRP.hasPermission(user_id,"player.kick") then menu["Kick"] = {ch_kick} end if vRP.hasPermission(user_id,"player.ban") then menu["Ban"] = {ch_ban} end if vRP.hasPermission(user_id,"player.unban") then menu["Unban"] = {ch_unban} end if vRP.hasPermission(user_id,"player.noclip") then menu["Noclip"] = {ch_noclip} end if vRP.hasPermission(user_id,"player.custom_emote") then menu["Custom emote"] = {ch_emote} end if vRP.hasPermission(user_id,"player.custom_sound") then menu["Custom sound"] = {ch_sound} end if vRP.hasPermission(user_id,"player.coords") then menu["Coords"] = {ch_coords} end if vRP.hasPermission(user_id,"player.tptome") then menu["TpToMe"] = {ch_tptome} end if vRP.hasPermission(user_id,"player.tpto") then menu["TpTo"] = {ch_tpto} end if vRP.hasPermission(user_id,"player.tpto") then menu["TpToCoords"] = {ch_tptocoords} end if vRP.hasPermission(user_id,"player.givemoney") then menu["Give money"] = {ch_givemoney} end if vRP.hasPermission(user_id,"player.giveitem") then menu["Give item"] = {ch_giveitem} end if vRP.hasPermission(user_id,"player.display_custom") then menu["Display customization"] = {ch_display_custom} end if vRP.hasPermission(user_id,"player.calladmin") then menu["Call admin"] = {ch_calladmin} end vRP.openMenu(player,menu) end) end} add(choices) end end) -- admin god mode -- function task_god() -- SetTimeout(10000, task_god) -- for k,v in pairs(vRP.getUsersByPermission("admin.god")) do -- vRP.setHunger(v, 0) -- vRP.setThirst(v, 0) -- local player = vRP.getUserSource(v) -- if player ~= nil then -- vRPclient.setHealth(player, {200}) -- end -- end -- end -- task_god()
Find difference