Help me ,with a timer forumule
#1

1.
Hi i have a server , i made a expire license system , but i want a "formule"
, when i type /lincenses show me "Expired in: 10days (equivalent a 240hours , equivalent a 14400 minutes)" but i want formule tu calculate days , hours minutes and show me (E.g) "Expired in: 10 Days , 11hours , 59 minutes" ,when an hour has elapsed show me " Expired in:10days , 10hours, 59mintes" .. What should I do?

2.
In my system expire license i made a timer, but if player is offline timer was stopped,i want to make this timer if player is offline timer continue processing when server is online . What should I do?
Reply
#2

nobody?
Reply
#3

Please help me!
Reply
#4

You can create a variable for all players.
Check when the seconds one reaches 60, change it to 0 and add 1 to the minutes variable.
Same for hours
Reply
#5

You can help me? a give you a vps 128mb ram, 10gb space , centos 5
Reply
#6

help m3?
Reply
#7

need help urgently please help
Reply
#8

bump
Reply
#9

Bump
Reply
#10

Heres an example..
customize to ur needs
pawn Код:
new totaltime = 34000; // this is your initial value, here for reference
new remaining; // temporary storage

remaining = totaltime % 3600; // remaining seconds after subtracting hours

new hours = (totaltime - remaining) / 3600;
new seconds = remaining % 60;
new minutes = (remaining - seconds) / 60;

// will give: 9 hours, 26 minutes, 40 seconds
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)