function
OnPlayerPlacingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType)
if
(BlockFace == -1)
then
return
false
end
if
( Player:HasPermission(
"core.build"
) == false )
then
return
true
else
if
Player:HasPermission(
"core.spawnprotect.bypass"
) == false
then
local
World = Player:GetWorld()
local
xcoord = World:GetSpawnX()
local
ycoord = World:GetSpawnY()
local
zcoord = World:GetSpawnZ()
if
not
((BlockX <= (xcoord + PROTECTRADIUS))
and
(BlockX >= (xcoord - PROTECTRADIUS)))
then
return
false
end
if
not
((BlockY <= (ycoord + PROTECTRADIUS))
and
(BlockY >= (ycoord - PROTECTRADIUS)))
then
return
false
end
if
not
((BlockZ <= (zcoord + PROTECTRADIUS))
and
(BlockZ >= (zcoord - PROTECTRADIUS)))
then
return
false
end
WriteLog(0, X, Y, Z, Player:GetName(), id, meta)
if
WARNPLAYER
then
WarnPlayer(Player)
end
return
true
else
if
g_BlockIsSolid[BlockType]
then
local
X = BlockX
local
Y = BlockY
local
Z = BlockZ
X, Y, Z = AddFaceDirection(X, Y, Z, BlockFace)
if
(Y >= 256
or
Y < 0)
then
return
true
end
... AND MORE