View Single Post
  #5  
Old 04-04-2010, 09:57 AM
ChainGang_DX ChainGang_DX is offline
Animations Artist On Era
ChainGang_DX's Avatar
Join Date: Mar 2010
Location: Texas
Posts: 35
ChainGang_DX is an unknown quantity at this point
Send a message via AIM to ChainGang_DX
I've added a token for setting how long you want the timer to go off from. Instead of just using the Auto one by press 1.


NPC Code:
function onActionServerSide()
{
if (params[0] == "echo")
{
sendtorc("Timer Up!");
//echo("Hello World!");
}
}
//#CLIENTSIDE
function onKeyPressed(code,key)
{
if (key == "1")
{
for (i = 3; i > 0; i --)
{
player.chat = i;
sleep(1);
}

playlooped("beep2.wav");
player.chat = ":end";
//ECHO IS DONE SERVERSIDE
triggerserver("weapon",name,"echo");
sleep(5);
stopsound("beep2.wav");
play("goera3.wav");
}
}


function onPlayerChats(who,chat)

{
token = player.chat.tokenize();
if (token[0] == "/countdown" && token[1] != NULL)
{
for (i = token[1]; i > 0; i--)
{

player.chat = i;
sleep(1);
play("beep2.wav");




}
}
}

__________________



Scoper Zephlyn (Sat Oct 15 14:53:42 2011):
owned.
Reply With Quote