Skip to content

Commit

Permalink
Update server.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsikNox committed Sep 24, 2019
1 parent c7cb10c commit 3dd1b5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resources/[esx]/[non-esx]/scriptpnj/server.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
local BlockedExplosions = {1, 2, 4, 5, 25, 32, 33, 35, 36, 37, 38}

AddEventHandler("explosionEvent", function(sender, ev)
AddEventHandler(
"explosionEvent",
function(sender, ev)
for _, v in ipairs(BlockedExplosions) do
if ev.explosionType == v then
print(GetPlayerName(sender), json.encode(ev))
CancelEvent()
--DropPlayer(source, 'Lua Execution/ModMenu')
-- ban the creator or so but be careful. always check owner id in some other ways to confirm he's cheating
return
end
end
end)
end
)

0 comments on commit 3dd1b5d

Please sign in to comment.