Edit signs
#4
(10-02-2014, 08:00 AM)LO1ZB Wrote: Have a look here: http://mc-server.xoft.cz/LuaAPI/cSignEntity.html
"This class is only used when generating chunks, so that the plugins may generate signs within new chunks"

I wonna edit sign in existing world, so cSignEntity itself it's not for me Smile

(10-02-2014, 03:57 PM)xoft Wrote: Usually you need to do something like this:
-- World is the cWorld of the sign, X, Y, Z are the sign's coords
World:DoWithBlockEntityAt(X, Y, Z,
  function (a_CBBlockEntity)
    local BlockType = a_CBBlockEntity:GetBlockType()
    if ((BlockType == E_BLOCK_WALLSIGN) or (BlockType == E_BLOCK_SIGNPOST)) then
      local Sign = tolua.cast(a_CBBlockEntity, "cSignEntity")
      Sign:SetLines("line1", "line2", "line3", "line4")
    end
  end
)
Note that I wrote this code off of my head, might not work Smile
Thank, I'll try it.
Reply
Thanks given by:


Messages In This Thread
Edit signs - by misiek - 10-02-2014, 07:08 AM
RE: Edit signs - by LO1ZB - 10-02-2014, 08:00 AM
RE: Edit signs - by xoft - 10-02-2014, 03:57 PM
RE: Edit signs - by misiek - 10-03-2014, 04:24 AM
RE: Edit signs - by NiLSPACE - 10-03-2014, 04:29 AM
RE: Edit signs - by xoft - 10-03-2014, 04:52 AM



Users browsing this thread: 2 Guest(s)