Race record
#3

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
pawn Код:
if ( ( m < rm || m == rm ) && ( s < rs || s == rs ) && ( ms < rms ) ) return SendClientMessage( playerid, -1, "Record." );
Thats wont work because as example your record is 2:10:00 and your new time is 1:55:50
pawn Код:
if ( ( 1 < 2 || 1 == 2 ) && ( 55 < 10 || 55 == 10 ) && ( 50 < 00 ) )

Solution
pawn Код:
if( ( m < rm ) || ( r == rm && (( s < rs ) || ( s == sr && ms < rms ))))
or
pawn Код:
if((((m * 60 + s) * 1000) + ms) < (((rm * 60 + rs) * 1000) + rms))
Reply


Messages In This Thread
Race record - by Msk. - 30.03.2013, 13:31
Re: Race record - by RajatPawar - 30.03.2013, 13:52
AW: Re: Race record - by Nero_3D - 30.03.2013, 14:11
Re: Race record - by RajatPawar - 30.03.2013, 14:12
Re: Race record - by Babul - 30.03.2013, 14:57
Re: Race record - by RajatPawar - 30.03.2013, 15:05
Re: Race record - by Msk. - 30.03.2013, 15:11

Forum Jump:


Users browsing this thread: 1 Guest(s)