Author Topic: help  (Read 1914 times)

Kevin

  • Newbie
  • *
  • Posts: 32
  • Karma: +9/-36
    • View Profile
    • www.edgarcain.zz.mu
help
« on: February 10, 2013, 05:58:59 pm »
how to count MESSAGES for example 3,2,1 race, now :'( :'( :'(
Kevin  ;)

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: help
« Reply #1 on: February 10, 2013, 06:11:04 pm »
You Mean This

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "start" )
     {
   NewTimer( "Start", 1000, 1);
     }
}

function Start()
{
   BigMessage( "~y~ race will start in 3", 1500, 3 );
   NewTimer( "Start1", 2000, 1);
}

function Start1()
{
   BigMessage( "~y~  race will start in 2", 1500, 3 );
   NewTimer( "Start2", 2000, 1);
}

function Start2()
{
   BigMessage( "~y~  race will start in 1", 1500, 3 );
   NewTimer( "Start3", 2000, 1);
}

function Start3()
{
   BigMessage( "~y~  Go Go Go ", 3000, 3 );
}

« Last Edit: February 10, 2013, 06:13:24 pm by Mido_Pop »



Kevin

  • Newbie
  • *
  • Posts: 32
  • Karma: +9/-36
    • View Profile
    • www.edgarcain.zz.mu
Re: help
« Reply #2 on: February 10, 2013, 06:29:47 pm »
thank mipo_pop because help me
Kevin  ;)

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: help
« Reply #3 on: February 10, 2013, 06:36:56 pm »
thanks Mido_Pop because help me

 ;)  :)



Vortrex

  • Full Member
  • ***
  • Posts: 264
  • Karma: +54/-74
    • View Profile
Re: help
« Reply #4 on: February 11, 2013, 01:09:15 am »
Mido, maybe it would help if you put your code into the appropriate BB tag?

Also, I think having 3 different functions for this is a bit "much" and this only allows for 3 "ticks" before ending.

Something like this would work a little better in my opinion:
Code: [Select]
function CountdownTimer( delay, currenttick )
{
if( currenttick > 0 )
{
BigMessage( "~y~ Race will start in " + currenttick, delay, 3 );
currenttick--;
return NewTimer( "CountDownTimer", delay, 1, delay, currenttick );
}
else
{
return BigMessage( "~y~ Go Go Go", delay, 3 );
}
}

To use, just start a timer. The one shown below will start a 5 tick countdown, each count occuring after 1500 milliseconds (one and a half second):
Code: [Select]
NewTimer( "CountDownTimer", 1500, 1, 1500, 5 );

EDIT:
OR, just use the command to start without a delay:
Code: [Select]
CountDownTimer( 1500, 5 );

EDITED AGAIN:
I forgot to change the message for the "Go Go Go" part, it was shown as the actual counting message lulz).
« Last Edit: February 11, 2013, 01:12:43 am by Vortrex »

Kevin

  • Newbie
  • *
  • Posts: 32
  • Karma: +9/-36
    • View Profile
    • www.edgarcain.zz.mu
Re: help
« Reply #5 on: February 12, 2013, 08:41:57 pm »
teacher thank ;) ;) ;)
Kevin  ;)

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: help
« Reply #6 on: February 13, 2013, 06:37:27 pm »
Nice Vortrex  :-[ . :(



 

© Liberty Unleashed Team.