This repository was archived by the owner on Apr 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
HookPoints: SignTextSet
D1G1T4L3CH0 edited this page Feb 13, 2015
·
4 revisions
When any sign text is edited and then saved, this event is triggered. It's only triggered on save.
Data Type | Object | Description |
---|---|---|
int | X | X coordinate of the sign. |
int | Y | Y coordinate of the sign. |
short | SignIndex | The sign index. |
string | Text | Text on the sign. |
Sign | OldSign | The old sign object |
C#
[Hook(HookOrder.NORMAL)]
void OnSignTextSet(ref HookContext ctx, ref HookArgs.SignTextSet args)
{
Tools.WriteLine(args.Text);
}
Lua
function YourPlugin:Initialized()
export.Hooks = {}
export.Hooks.SignTextSet =
{
Call = export.OnSignTextSet,
}
end
function YourPlugin:OnSignTextSet(ctx, args)
Tools.WriteLine(args.Text)
end