SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
767 B

  1. #include <a_samp>
  2. forward OneSecTimer();
  3. new lasttick = 0;
  4. main()
  5. {
  6. print("\n----------------------------------");
  7. print(" This is a blank GameModeScript");
  8. print("----------------------------------\n");
  9. }
  10. public OnGameModeInit()
  11. {
  12. // Set timer of 1 second.
  13. SetTimer("OneSecTimer", 1000, 1);
  14. print("GameModeInit()");
  15. SetGameModeText("Timer Test");
  16. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  17. return 1;
  18. }
  19. public OneSecTimer() {
  20. if(lasttick == 0) {
  21. lasttick = GetTickCount();
  22. return;
  23. }
  24. new sText[256];
  25. format(sText,sizeof(sText),"GetTickCountOffset = %d",GetTickCount() - lasttick);
  26. print(sText);
  27. SendClientMessageToAll(0xFF0000, sText);
  28. lasttick = GetTickCount();
  29. }