Quick weapon I made for Ducati. I figured someone might like it / use it

.
This goes in a weapon
PHP Code:
// Twinny's sign dropper
function onActionServerSide()
{
if (params[0] == "layblock")
{
temp.npc = putnpc2(params[1], params[2], "join(\"staffsign\");");
temp.npc.owner = player.account;
}
}
//#CLIENTSIDE
function onCreated()
setTimer(0.05);
function onKeyPressed(num1, code, num2)
{
if (code == "b")
this.block = !this.block; //Toggles on and off
}
function onTimeout()
{
if (this.block)
showimg(1, "block.png", mousex, mousey);
else
hideimg(1);
setTimer(0.05);
}
function onMouseDown(mode)
{
if (mode == "left")
{
if (this.block)
triggerserver("gui", this.name, "layblock", mousex, mousey);
}
else if (mode == "double")
triggeraction(mousex, mousey, "SetMsg", player.chat);
else if (mode == "right")
triggeraction(mousex, mousey, "KillSign", "");
}
and this goes in a class named staffsign
PHP Code:
function onCreated()
{
setimg("block.png"); //Replace with what you want
this.chat = "Placed by "@this.owner;
sleep(2);
this.chat = "";
}
function onActionSetMsg(msg)
this.chat = msg;
function onActionKillSign()
destroy();
Pretty straight forward. To turn it on, press b. While it is on, left click somewhere to drop a sign / staffblock. To set a message, say something then double click the dropped sign/block to set its text. right click to destroy it. The weapon doesn't need to be on to set a message or destroy it.