How do i record the amount of time player has spent in the server?
#10

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Who records milliseconds? It would just be a more wasteful calculation. Unix is in straight up seconds. Not to mention, you wouldn't be able to apply it directly to measure from the time of login to disconnect, because it starts counting at OnPlayerConnect which isn't always what people want.

@Type-R - PM me your script and I will just add it straight in to save us both time.

EDIT: By the way, Gettime() is a SA-MP function, so I'm not quite sure what you're trying to prove :l
Have you read the title? "How do i record the amount of time player has spent in the server?" It clearly says "amount of time player has spent in the server", it doesn't say "amount of time player has spent in the server after authentication", Type-R said "unless you have played for 5 hours in total" so I'm guessing he want's the total time not until the player logins.

I meant that SA-MP already has a function that is dedicated to get the time that a player has been connected to the server.

You just divide the time by 1000, and you get seconds.
pawn Код:
NetStats_GetConnectedTime(playerid) / 1000; // Seconds.
"Who records milliseconds?" I guess, SA-MP team does :P

Anyways, it's up to Type-R to choose witch method he wants to use.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)