-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhooks.lua
35 lines (32 loc) · 1.26 KB
/
hooks.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function OnPlayerBreakingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, BlockType, BlockMeta)
if (UsersIni:GetValue(Player:GetName(), "Jailed") == "true") and (IsDiggingEnabled == false) then
Player:SendMessage(cChatColor.Red .. "You are jailed")
return true
else
return false
end
end
function OnPlayerPlacingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType)
if (UsersIni:GetValue(Player:GetName(), "Jailed") == "true") and (IsPlaceEnabled == false) then
Player:SendMessage(cChatColor.Red .. "You are jailed")
return true
else
return false
end
end
function OnExecuteCommand(Player, CommandSplit)
if (UsersIni:GetValue(Player:GetName(), "Jailed") == "true") and (AreCommandsEnabled == false) then
Player:SendMessage(cChatColor.Red .. "You are jailed")
return true
else
return false
end
end
function OnChat(Player, Message)
if (UsersIni:GetValue(Player:GetName(), "Jailed") == "true") and (IsChatEnabled == false) then
Player:SendMessage(cChatColor.Red .. "You are jailed")
return true
else
return false
end
end