Getting total time
#1

hello
i need some help in getting the total times...
e.g.
the total time played by a player..etc..
Reply
#2

Alright, I use a timer to determine how long a player has been online and also how long he's been online in total. By using PVars which are updated every second, minute, hour, days, weeks & years even... But only create the according PVars which you care to measure for Player's Total Time etc.
Reply
#3

i dont really understand..
Reply
#4

bump*

and i will add more here..

as i think that SetTimer is a function which creates something like a countdown
so i want something that keeps increasing..
please someone could explain that,, or give me a link to some tut or something..
Reply
#5

bump**
Reply
#6

I think this may work, what you want is a variable that gets saved to their file with their total seconds. When they login you have another variable in your array/enum that you use to hold the playerdata and you do
pawn Код:
variable = gettime();
then when they log out you do
pawn Код:
variableToBeSaved += (gettime() - variable);
and that will add the seconds they just played to their total seconds. Then when you want to display this information you can manipulate it however you want.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)