Roundtimer

Started by teszan
04/06/2009 02:53
Page 1 of 1
teszan04/06/2009 02:53(edited 04/06/2009 02:59)

hey i didnt find any info anywhere on how to do this.
im writing my own kz plugin and all i have left is the timer.. i have no clue on how to get the climbtimer shown as on the roundtimer, any ideas?

Edit: I have a timer system and ive managed to get the timer shown on the round timer, but it goes from 0:00 to 0:59 then back to 0:00 again instead of 1:00

SchlumPF04/06/2009 07:28

you have to update the roundtime in a task, else your problem will always happen

teszan04/06/2009 19:21(edited 04/06/2009 19:23)

yea ive done that, still doesnt work.
heres what ive got for the timer:

set_task(0.5,"timer",_, _, _, "b") // in plugin_init

public timer() {
for(new i=1;i<=get_maxplayers();i++) {
if(is_user_connected(i) && is_user_alive(i) && showtimer[i-1]
&& timer_started[i-1]) {
new cltime = get_systime() - time[i-1], imin
if((kreedztime / 60.0) >= 1) {
imin = floatround(cltime / 60.0,floatround_floor)
cltime -= (floatround(cltime / 60.0,floatround_floor) * 60)
}
roundtimer(i, cltime+1)


}
}
}

public roundtimer(id, cltime)
{
message_begin(MSG_ONE, gmsgRoundTime, _, id)
write_short(cltime)
message_end()
}

Page 1 of 1

Please log in to post replies.