Random timers - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random timers (
/showthread.php?tid=460194)
Random timers -
DarkB0y - 27.08.2013
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 ?
Re: Random timers -
DarkB0y - 27.08.2013
Any help ?
Re: Random timers -
Scrillex - 27.08.2013
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....
Re: Random timers -
Alexis1999 - 27.08.2013
This could be simply
pawn Код:
new rand = random(60000);
SetTimerEx("Action" , rand , false, "i", playerid);
Re: Random timers -
DarkB0y - 28.08.2013
Hmm ok, But why its crashing pawno when i add this code ? I added YSI\y_timers include but still the same