AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   change format (https://forums.alliedmods.net/showthread.php?t=100505)

One 08-15-2009 07:31

change format
 
1 Attachment(s)
PHP Code:

show_hudmessage(id"Lap: %d/%d (Time: %3.2f)                 Last Lap : %3.2f         Best Lap : %3.2f"laps[id] + 1get_pcvar_num(totalLaps), hlTime lapTime[id],kir1,bestlap); 

i want the time so : xx: xx: xx & in 60 format & not 100. any ideas?

Arkshine 08-15-2009 07:34

Re: change format
 
format_time()

Exolent[jNr] 08-15-2009 15:48

Re: change format
 
Quote:

Originally Posted by Arkshine (Post 900940)

That wouldn't help in his situaiton.

Code:
GetLapTime( Float:fTime, &iHours, &iMinutes, &Float:fSeconds ) {     new iSeconds = floatround( fTime, floatround_floor );     iMinutes = ( iSeconds / 60 ) % 60;     iHours = iSeconds / 3600;         fSeconds = fTime - float( iSeconds ) + float( iSeconds % 60 ); } // ... new iHours, iMinutes, Float:fSeconds; GetLapTime( hlTime - lapTime[ id ], iHours, iMinutes, fSeconds ); show_hudmessage(id,\     "Lap: %d/%d (Time: %i:%i:%f)                 Last Lap : %3.2f         Best Lap : %3.2f",\     laps[id] + 1, get_pcvar_num(totalLaps),\     iHours, iMinutes, fSeconds,kir1,bestlap     );

Arkshine 08-15-2009 17:03

Re: change format
 
Oops. :mrgreen:

One 08-15-2009 17:05

Re: change format
 
wow n1 exolent. i wanted ask again how with format_time but i tought again anyone will say "STOP CODING U ASSHOLE" or somthing like this. how i become 10000 time as -k :D

thank you again

Alka 08-15-2009 17:09

Re: change format
 
Mats PRO!
Quote:

Originally Posted by Exolent
iHours = iSeconds / 360;

Isn't 3600 ?

Exolent[jNr] 08-16-2009 05:16

Re: change format
 
Quote:

Originally Posted by Alka (Post 901516)
Mats PRO!
Isn't 3600 ?

Rawr. I didn't account for the other 0. :mrgreen:

I also left in the szDecimal part that I removed after rearranging the code.
It has been removed now.

One 08-16-2009 08:47

Re: change format
 
ty this works but after 60 seconds, the timer get again on 0:00 :(the problem is when i use for example :

%f , the lap time as ( fSeconds ) after 60 seconds this is not anymore fSeconds. this is iMinutes :shock:


All times are GMT -4. The time now is 15:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.