Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new count;
- new timer;
- main(){}
- public OnGameModeInit()
- {
- SetGameModeText("TIMER");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- count = (gettime() + 36000);
- //
- timer = SetTimer("UpdateTimer", 1000, true);
- return 1;
- }
- forward UpdateTimer();
- public UpdateTimer()
- {
- if(!--count)
- {
- KillTimer(timer);
- }
- new hh, mm, ss;
- Convert(count - gettime(), hh, mm, ss);
- printf("TIMER: %d:%d:%d", hh, mm, ss);
- return 1;
- }
- Convert(seconds, &hh = 0, &mm = 0, &ss = 0)
- {
- hh = seconds / (60 * 60);
- mm = (seconds % (60 * 60)) / 60;
- ss = (seconds % (60 * 60)) % 60;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement