Random timers
#1

Im creating a system need random timers every 1 an timer work or some thing i created one but the pawno crashed when i compile it

pawn Код:
Timer:gTimers[60000]( )
{
     Timer = 0,
    Timer1   = 0,
    Timer2  = 0,
    Timer3    = 0,
    Timer4    = 0;
    new RandomTimer = random( 6 );
        if( Randomt == 0 ) { Timer( )    ; }
    if( RandomTimer == 1 ) { Timer1( ); }
    if( RandomTimer == 2 ) { Timer2( )     ; }
    if( RandomTimer == 3 ) { Timer3( )   ; }
    if( RandomTimer == 4 ) { Timer4()      ; }
    if( RandomTimer == 5 ) { Timer5()      ; }
}
Any idea how to make it work or some thing ?
Reply
#2

Any help ?
Reply
#3

you got some mistake with it I tried to find some help in ******.. but yeah I think you could try to use it as new timerrandom(); or something like that and put it as max and minimal time....
Reply
#4

This could be simply

pawn Код:
new rand = random(60000);

SetTimerEx("Action" , rand , false, "i", playerid);
Reply
#5

Hmm ok, But why its crashing pawno when i add this code ? I added YSI\y_timers include but still the same
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)