Welcome to phpBB3

Description of your first forum.
Post Reply
Tibers1337
Site Admin
Posts: 2
Joined: Mon Jul 29, 2024 7:27 am

This is an example post in your phpBB3 installation. Everything seems to be working. You may delete this post if you like and continue to set up your board. During the installation process your first category and your first forum are assigned an appropriate set of permissions for the predefined usergroups administrators, bots, global moderators, guests, registered users and registered COPPA users. If you also choose to delete your first category and your first forum, do not forget to assign permissions for all these usergroups for all new categories and forums you create. It is recommended to rename your first category and your first forum and copy permissions from these while creating new categories and forums. Have fun!
Tibers1337
Site Admin
Posts: 2
Joined: Mon Jul 29, 2024 7:27 am

  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <engine>
  5. #include <fakemeta>
  6. #include <hamsandwich>
  7. #include <fun>
  8.  
  9. // Înregistrarea forward-urilor și funcția nativă
  10. forward SR_PlayerOnFinish(id, iTime, bool:newRecord);
  11. forward SR_PlayerOnStart(id);
  12. native Float:sr_get_actual_time(id);
  13.  
  14. public plugin_init() {
  15.     register_plugin("x", "x", "x");
  16.  
  17.     // Alte inițializări și înregistrări din plugin-ul tău existent
  18. }
  19.  
  20. // Implementarea forward-urilor
  21. public SR_PlayerOnStart(id)
  22. {
  23.     // Aici poți adăuga cod pentru a gestiona evenimentul de start
  24.     client_print(id, print_chat, "Start timer!");
  25. }
  26.  
  27. public SR_PlayerOnFinish(id, iTime, bool:newRecord) {
  28.     if (newRecord) {
  29.         new szTime[32];
  30.         get_formated_time(iTime, szTime, charsmax(szTime));
  31.  
  32.         sr_get_actual_time(id);
  33.        
  34.         // Afișăm timpul în formatul dorit folosind sr_get_actual_time(id)
  35.         client_print(id, print_chat, "New record Time: %s", szTime);
  36.     }
  37. }
  38.  
  39. // Funcția get_formated_time care formatează timpul în secunde în formatul dorit
  40. get_formated_time(iTime, szTime[], size)
  41. {
  42.     new minutes = iTime / 60000;
  43.     new seconds = (iTime / 1000) % 60;
  44.     new milliseconds = iTime % 1000;
  45.  
  46.     formatex(szTime, size, "%d:%02d.%03ds", minutes, seconds, milliseconds);
  47. }
Post Reply