#1

Hi, can some one explain how I can get the time of something? Like, some one is flying from LS-Airport to LV-Airport. How would I get the time it took them?
Reply
#2

Are you just trying to find the time once or have a script that gives you the time each time? You could use gettime when they start and then again when they finish.
Reply
#3

Use the function "GetTickCount()". When you leave the LS-Airport save in a variable a GetTickCount(). Example:

pawn Код:
new count = GetTickCount();
When you arrive at LV-Airport, you do this:

pawn Код:
new final_count = GetTickCount() - count, string[128];
format(string, 128, "Time: %d sec.", final_count / 1000);
SendClientMessage(playerid, -1, string);
return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)