Author Topic: /count  (Read 1323 times)

88nateatx

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +2/-7
  • Doesn't give a damn about his bad reputation.
    • View Profile
/count
« on: October 25, 2011, 03:03:14 am »
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
Just a colorful little counting script snippet.
Useful for DMs.
« Last Edit: October 29, 2011, 04:07:29 am by 88nateatx »


Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 533
  • Karma: +26/-13
    • View Profile
Re: /count
« Reply #1 on: October 28, 2011, 01:12:28 pm »
That snippet wont work :P
You start of with an elseif while you need to use if first.

This should work:
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
   if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}

88nateatx

  • Jr. Member
  • **
  • Posts: 60
  • Karma: +2/-7
  • Doesn't give a damn about his bad reputation.
    • View Profile
Re: /count
« Reply #2 on: October 29, 2011, 04:04:19 am »
Here's your solution! ( Kinda lazy of me, but who cares?  :P )

First add:

Code: [Select]
function Count ( player )
{
BigMessage( player ,"=3=" , 5000, 3 );
}
function Count2 ( player )
{
BigMessage( player ,"=2=" , 5000, 3 );
}
function Count3 ( player )
{
BigMessage( player ,"=1=" , 5000, 3 );
}
function CountGO ( player )
{
BigMessage( player ,"=GO!=" , 5000, 3 );
}

Then:
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
 if ( cmd == "count" )
{
NewTimer( Count, 1000, 1, player );
NewTimer( Count2, 2000, 1, player );
NewTimer( Count3, 3000, 1, player );
NewTimer( CountGO, 4000, 1, player );
}
}

Enjoy!

BTW, Thijn, got that fixed, thanks for reminding me ;D
« Last Edit: October 29, 2011, 04:07:13 am by 88nateatx »


Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 533
  • Karma: +26/-13
    • View Profile
Re: /count
« Reply #3 on: October 29, 2011, 01:55:36 pm »
Here's your solution! ( Kinda lazy of me, but who cares?  :P )

First add:

Code: [Select]
function Count ( player )
{
BigMessage( player ,"=3=" , 5000, 3 );
}
function Count2 ( player )
{
BigMessage( player ,"=2=" , 5000, 3 );
}
function Count3 ( player )
{
BigMessage( player ,"=1=" , 5000, 3 );
}
function CountGO ( player )
{
BigMessage( player ,"=GO!=" , 5000, 3 );
}

Then:
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
 if ( cmd == "count" )
{
NewTimer( Count, 1000, 1, player );
NewTimer( Count2, 2000, 1, player );
NewTimer( Count3, 3000, 1, player );
NewTimer( CountGO, 4000, 1, player );
}
}

Enjoy!

BTW, Thijn, got that fixed, thanks for reminding me ;D
Just use
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
   if ( cmd == "count" )
{
NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 );
NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 );
NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 );
NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 );
}
}

Ankit

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-2
    • View Profile
Re: /count
« Reply #4 on: February 20, 2012, 01:04:01 pm »
Code: [Select]
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "count" )
{
NewTimer( Message, 1000, 1, "=3=", 200, 0, 0 );
NewTimer( Message, 2000, 1, "=2=", 200, 0, 0 );
NewTimer( Message, 3000, 1, "=1=", 200, 200, 0 );
NewTimer( Message, 4000, 1, "=GO!=", 0, 200, 0 );
}
}
Just a colorful little counting script snippet.
Useful for DMs.
I Have Did It Like /count not like /c count
look:
Code: [Select]
else if ( szCommand == "count" )
{
              NewTimer( "BigMessage", 1000, 1, player ,"=3=" , 5000, 3 );
              NewTimer( "BigMessage", 2000, 1, player ,"=2=" , 5000, 3 );
              NewTimer( "BigMessage", 3000, 1, player ,"=1=" , 5000, 3 );
              NewTimer( "BigMessage", 4000, 1, player ,"=GO!=" , 5000, 3 );
}
so when i type /count nothing happens why? do i have to define a pPlayer too?

 

© Liberty Unleashed Team.