Browse Source

Add camera privilege in order to use camera commands

master
sys4-fr 1 year ago
parent
commit
e106ac96f9
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      init.lua

+ 4
- 0
init.lua View File

@@ -1,3 +1,4 @@
minetest.register_privilege("camera", { description = "Can use camera commands" })
local recordings = {}

-- [function] Load recordings
@@ -251,6 +252,9 @@ minetest.register_chatcommand("camera", {
description = "Manipulate recording",
params = "<option> <value>",
func = function(name, param)
if not minetest.check_player_privs(name, { camera = true }) then
return false, "You need camera privilege!"
end
local player = minetest.get_player_by_name(name)
local param1, param2 = param:split(" ")[1], param:split(" ")[2]



Loading…
Cancel
Save