SA-MP Forums Archive
[Tutorial] Recorded over time TempTime - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Recorded over time TempTime (/showthread.php?tid=454891)



Recorded over time TempTime - EmpireSk - 30.07.2013

Hi, I'm new here and I bring you my new Tutorial
Uploaded by Time Timer is a simple but gets wasted ... It's beautifully without them ...
Declare variables:
Code:
new TempTime[MAX_PLAYERS char];

public OnPlayerConnect( playerid )
{
TempTime{ playerid } = gettime(); //Set the current value of the variable unix tajm
return 1;
}
Code:
public OnPlayerDisconnect( playerid ,reason)
{
new TimeToTemp = gettime() - TempTime{ playerid } ;// Variable Time Temp will now contain the number of seconds that the player was online
/ / Variable we add to the player's timestamp file (DUdb, Dini, DOF2)
return 1;
}
Thank you to all the lovely evening: D


Re: Recorded over time TempTime - Macluawn - 30.07.2013

This isnt a tutorial, everyone will end up just copy pasting it without learning anything.
Your english is quite bad. Sometimes its acceptable, but not in this case - I couldnt understand what you were saying.
And for f**** sake, use [pawn] tags


Re: Recorded over time TempTime - EmpireSk - 30.07.2013

translations via translate.******.com


Re: Recorded over time TempTime - Pottus - 30.07.2013

I sense -Rep


Re: Recorded over time TempTime - Macluawn - 30.07.2013

Thats no excuse. Its great that you're trying, but next time have a friend proofread your text.


Re: Recorded over time TempTime - Vince - 30.07.2013

You can't even use char because timestamps will always be greater than 255. Current timestamp is 1375220117 and counting. Conclusion: NOT TESTED.


Re: Recorded over time TempTime - EmpireSk - 31.07.2013

Quote:
Originally Posted by Vince
View Post
You can't even use char because timestamps will always be greater than 255. Current timestamp is 1375220117 and counting. Conclusion: NOT TESTED.
Tested it....