Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------------------------------------
- stock reactionRandom( Min, Max ){
- new Random;
- Random = Min + random( Max );
- return Random;
- }
- stock StartReaction( ) {
- reactionMessage[ 0 ][ 0 ] = EOS;
- reactionMessage[ 1 ][ 0 ] = EOS;
- reactionWinner[ 0 ] = EOS;
- reactionMoney = reactionRandom(.Min = 2000, .Max = 2000),
- reactionMessage[ 0 ][ 0 ] = '\0';
- for( new c; c < 7; ++c ) {
- reactionMessage[ 0 ][ c ] = random(2) ? ( '0' + random(9) ) : ( random(2) ? ( 'a' + random(26) ) : ( 'A' + random(26) ) );
- }
- reactionTest = 3;
- format( reactionMessage[ 1 ], 256, ""col_sanm"[TK] "col_white"Ko prvi upise u chat-u "col_sanm"%s"col_white" dobija nagradu od %i$. TRENUTNI REKORD: %s "col_sanm"%.2f.", reactionMessage[ 0 ], reactionMoney, ServerInfo[ ReactName ], ServerInfo[ ReactTime ] );
- SendClientMessageToAll( -1, reactionMessage[ 1 ] );
- reactionTime = GetTickCount( );
- }
- stock EndReaction( playerid ) {
- DajIgracuNovac( playerid, reactionMoney );
- new Float:stotinke,Float:sekunde;
- stotinke = ( GetTickCount( ) - reactionTime );
- sekunde = stotinke/1000;
- PlayerInfo[ playerid ][ xPodApoeni ]++;
- format( reactionMessage[ 1 ], 256, ""col_sanm"[TK]"col_white" Najbrzi je bio %s "col_sanm" %.2f sec. "col_white"osvaja nagradu od %d$ i sada ima"col_sanm" %d "col_white"TK Poena.", ImeIgraca( playerid ), sekunde, reactionMoney, PlayerInfo[ playerid ][ xPodApoeni ] );
- SendClientMessageToAll( 0xFFFFFFFF, reactionMessage[ 1 ] );
- reactionTest = 0;
- if( PlayerInfo[ playerid ][ xPodApoeni ] == 500 ) {
- PlayerInfo[ playerid ][ xApoeni ]++;
- PlayerInfo[ playerid ][ xPodApoeni ] = 0;
- SCM( playerid, ZUTA, "Dobili ste jedan BS Poen zbog 500 TK Poena." );
- }
- if( sekunde < ServerInfo[ ReactTime ] ) {
- format( reactionMessage[ 1 ], 256, ""col_sanm"[TK]"col_white" %s je postavio novi rekord "col_sanm" %.2f "col_white"CESTITAMO!", ImeIgraca( playerid ), sekunde );
- SendClientMessageToAll( 0xFFFFFFFF, reactionMessage[ 1 ] );
- ServerInfo[ ReactTime ] = sekunde;
- strmid( ServerInfo[ ReactName ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 32 );
- SaveServerStats( );
- }
- reactionWon = true;
- strmid( reactionWinner, ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), 32 );
- }
Advertisement
Add Comment
Please, Sign In to add comment