Placing blocks in lua
#4
The function that will be called for the hook, contains the param Player. With it you can get the world the player is in:

Code:
Player:GetWorld():SetBlock(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), E_BLOCK_CAKE, 0)

API:
Player
World
World:SetBlock()
E_BLOCK_CAKE

If you want I could write a example plugin, that would place a block if a player breaks a block.
Reply
Thanks given by: yoboykai


Messages In This Thread
Placing blocks in lua - by yoboykai - 02-25-2017, 03:56 AM
RE: Placing blocks in lua - by Seadragon91 - 02-25-2017, 06:02 AM
RE: Placing blocks in lua - by yoboykai - 02-25-2017, 09:32 AM
RE: Placing blocks in lua - by Seadragon91 - 02-25-2017, 06:18 PM
RE: Placing blocks in lua - by yoboykai - 02-26-2017, 08:40 AM
RE: Placing blocks in lua - by Seadragon91 - 02-27-2017, 11:51 PM
RE: Placing blocks in lua - by yoboykai - 02-28-2017, 10:11 AM
RE: Placing blocks in lua - by yoboykai - 03-12-2017, 09:45 AM
RE: Placing blocks in lua - by NiLSPACE - 03-12-2017, 06:20 PM
RE: Placing blocks in lua - by yoboykai - 03-13-2017, 04:30 AM
RE: Placing blocks in lua - by NiLSPACE - 03-13-2017, 05:00 AM
RE: Placing blocks in lua - by yoboykai - 03-13-2017, 05:59 AM
RE: Placing blocks in lua - by ThuGie - 03-13-2017, 08:22 AM
RE: Placing blocks in lua - by yoboykai - 03-13-2017, 12:27 PM
RE: Placing blocks in lua - by xoft - 03-13-2017, 06:23 PM



Users browsing this thread: 2 Guest(s)