Raised This Month: $ Target: $400
 0% 

Finding miliseconds on prokreedz problem...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-20-2010 , 08:46   Finding miliseconds on prokreedz problem...
Reply With Quote #1

I tried for about 2 days to find out this problem and as usual I'm going to ask for your help...

This is the code for finish time

PHP Code:
if((equal(entname,"counter_off") || equal(entname,"clockstopbutton") || equal(entname,"clockstop")) && timer_started[id-1]) {
new 
name[32]
get_user_name(id,name,32)
new 
kreedztime get_systime() - timer_time[id-1]
new 
imin floatround(kreedztime 60.0,floatround_floor)
new 
isec floatround(kreedztime imin 60.0,floatround_floor)
new 
ims floatround( ( kreedztime - ( imin 60.0 isec ) ) * 100floatround_floor )
if (
isec >= 10)
   
ColorChat(0GREEN"[Kreedz]^x01 %s finished the map in^x03 %d:%d.%02i ^x01(%d CP%s)",name,imin,isec,checkpointnum[id-1],checkpointnum[id-1] == "" "s",ims)
if (
isec 9)
   
ColorChat(0GREEN"[Kreedz]^x01 %s finished the map in^x03 %d:0%d.%02i ^x01(%d CP%s)",name,imin,isec,checkpointnum[id-1],checkpointnum[id-1] == "" "s",ims)
timer_started[id-1] = false
if (checkpointnum[id-1] > 0)
     
topten_update(id)
 else 
     
proten_update(id)
            
  } 
I have no error, but the milisecond never go over 00. It's 00:01.00 , 00:02,00 (always it's 00 on ms... and i can't find how to "turn them on")

Last edited by NucL3ra; 03-20-2010 at 08:48.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-20-2010 , 09:35   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #2

Because prokreedz uses set_task wich is totally inaccurate
__________________
xPaw is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-20-2010 , 16:36   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #3

And isn't there any possibility you could adjust your xj_timer to this prokreedz i uploaded?

Or give me some clues , because i don't know what to delete and what to keep...

Also i don't need to add miliseconds to that Hud-Messaged showing time (just MM:SS there). I need mili seconds for end time and top15 update
Attached Files
File Type: sma Get Plugin or Get Source (prokreedz.sma - 715 views - 60.1 KB)

Last edited by NucL3ra; 03-21-2010 at 15:39.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
Old 03-21-2010, 09:55
NucL3ra
This message has been deleted by NucL3ra.
Old 03-21-2010, 14:11
NucL3ra
This message has been deleted by NucL3ra.
Old 03-21-2010, 14:59
KadiR
This message has been deleted by Exolent[jNr]. Reason: Spam.
Old 03-21-2010, 15:40
NucL3ra
This message has been deleted by Exolent[jNr]. Reason: Spam.
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-22-2010 , 15:11   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #4

Off:I didn't spam , i just asked him to stop spamming

On: Any help ? Exolent, instead of deleting messages how about helping a few
Any idea is welcomed
NucL3ra is offline
Send a message via Yahoo to NucL3ra
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-22-2010 , 15:50   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #5

Your problem is that you use get_systime() which does not return any milliseconds.
Therefore, you won't get any milliseconds results.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-22-2010 , 20:26   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #6

so i should use get_gametime () (as kz-arg does?)
NucL3ra is offline
Send a message via Yahoo to NucL3ra
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-23-2010 , 18:42   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #7

Ok, after 3 hours of editing i solved 1/2 of the problem. At the end of the climb it shows me real time (according to kz-arg and xj_timer ,both were ON). But the top 15 is broken now. It shows me really annoying values. Any idea how to fix it?

Example: i finish the map in 00:06.41 and the top15 shows me ... "nucLeaR" "1269384168"

...

I uploaded the code

Last edited by NucL3ra; 03-24-2010 at 22:10.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 03-24-2010 , 22:13   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #8

Ok, i finished 1/2 of the top 15 problem. It saves good now but i can only read minutes and seconds, and if i make a Float variable for kz time i get some freaky errors.. so i can save the times in this format:

Full time is 1:05.55 , it saves me 65.55


The question is: How to read the top15 in mm:ss.msms

Last edited by NucL3ra; 03-25-2010 at 20:40.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 03-24-2010 , 22:30   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #9

If you are saving/loading as a float you can use this:

PHP Code:
// The time you saved/loaded
new Float:yourTime;

// Format time
new nowhourminutesecondmilisecond;

now floatround(yourTimefloatround_floor);
hour = (now 3600) % 24;
minute = (now 60) % 60;
second now 60;
milisecond floatround(floatsub(yourTimefloat(now)) * 100floatround_floor); 
hlstriker is offline
Ryokin
Senior Member
Join Date: Jan 2010
Old 03-25-2010 , 00:36   Re: Finding miliseconds on prokreedz problem...
Reply With Quote #10

Can you make prize for finishing map like kz-arg ?

Last edited by Ryokin; 03-26-2010 at 09:09.
Ryokin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:36.


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