handle nil
This commit is contained in:
parent
bd17c40abc
commit
35935c0fdc
@ -254,7 +254,7 @@ function onPlayerConnect()
|
||||
end
|
||||
|
||||
function onPlayerAction(player, action, targets)
|
||||
if action == Player.Action.Delete and player.admin == false then
|
||||
if action == Player.Action.Delete and not player.admin then
|
||||
for _, target in ipairs(targets) do
|
||||
local matColor = playermatApi.getMatColorByPosition(target.getPosition())
|
||||
local trash = guidReferenceApi.getObjectByOwnerAndType(matColor, "Trash")
|
||||
|
Loading…
Reference in New Issue
Block a user