How to substract one integer value from other one
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Don't they teach you this in primary school? Seriously ...
Your seriously is not seriously for me. Maybe something is fucked up, but I'm trying to substract it for 2 days.

When player logs in I'm setting his onlineTime using gettime():

Код:
	playerInfo[pid][onlineTime] = gettime();
	printf("Time logged in: %i", playerInfo[pid][onlineTime]);
It's fine until I won't compare it with real time later.

Код:
new time = gettime();
printf("%i %i", playerInfo[id][onlineTime], time);
format(formats, sizeof(formats), "Czas gry: %i m", (playerInfo[id][onlineTime] - time));
TextDrawSetString(specShowInfo[id][1], formats);
[14:20:40] Time logged in: 1359206440
[14:20:44] 0 1359206444
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 7 Guest(s)