when do these get fired? becouse i am now working on a sign plugin where you can right-click on a sign to make the weather or time change but they both only get fired when i created a sign.
Yes, they both fire only when the sign is created (when its text is set).
If you want to catch a rightclick on a sign, you need to use OnPlayerRightClick() hook.
but how can the plugin know what text is on the sign?
Use the cWorld::GetSignLines() function.
how to use that function? i can't find it on the wiki.
should be as easy as calling:
Code:
local Line1, Line2, Line3, Line4 = World:GetSignLines(BlockX, BlockY, BlockZ);
it wants more parameters than only BlockX, BlockY and BlockZ. it wants 4 more in total.
Hmm, then the ToLua is generating wrong lua glue code. True, it cannot know that those 4 parameters are out-only.
Until we fix that, pass in 4 more empty strings:
Code:
local Line1, Line2, Line3, Line4 = World:GetSignLines(BlockX, BlockY, BlockZ, "", "", "", "");
i don't get the lines

when i do LOG(Line1) i get nothing :S
Then build a debug version of MCServer, put a breakpoint in cChunk::GetSignLines() and try to find out why it's not working

Debugging the problem is often the most fun, so why not try it?