hlmod.hu
https://hlmod.hu/

timeleft plugin szerkesztése
https://hlmod.hu/viewtopic.php?f=24&t=22557
Oldal: 1 / 1

Szerző:  *GrafitY* [2015.10.31. 21:18 ]
Hozzászólás témája:  timeleft plugin szerkesztése

Szevasztok!! :)
A következő timeleft pluginban valaki átírná, hogy ne a hátralevő kört, hanem a hátralévő időt írja ki?

Köszönöm előre!

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. new gSzamolas;
  4.  
  5. public plugin_init() {
  6. register_plugin("ido","1.0","mforce")
  7. register_clcmd("say thetime", "idodatum")
  8. register_clcmd("say timeleft", "kor")
  9. register_logevent("ElsoKor", 2, "0=World triggered", "1&Restart_Round_");
  10. register_logevent("ElsoKor", 2, "0=World triggered", "1=Game_Commencing");
  11. register_logevent("KorKezdes", 2, "0=World triggered", "1=Round_End");
  12. }
  13.  
  14. public idodatum() {
  15. new ido[32], datum[32];
  16. get_time("%H:%M:%S", ido, charsmax(ido));
  17. get_time("%Y.%m.%d", datum, charsmax(datum));
  18. print_color(0, "!g[maxFUN] !yDátum: !t%s !y|| Idő: !t%s", datum, ido);
  19. }
  20.  
  21. public ElsoKor()
  22. {
  23. gSzamolas = 35;
  24. }
  25. public KorKezdes()
  26. {
  27. gSzamolas--;
  28. }
  29.  
  30. public kor() {
  31. print_color(0, "!g[maxFUN] !yHátra van még!t %d!y kör.", gSzamolas)
  32. }
  33.  
  34. stock print_color(const id, const input[], any:...)
  35. {
  36. new count = 1, players[32];
  37. static msg[191];
  38. vformat(msg, 190, input, 3);
  39.  
  40. replace_all(msg, 190, "!g", "^4");
  41. replace_all(msg, 190, "!y", "^1");
  42. replace_all(msg, 190, "!t", "^3");
  43.  
  44. if (id) players[0] = id; else get_players(players, count, "ch");
  45. {
  46. for (new i = 0; i < count; i++)
  47. {
  48. if (is_user_connected(players[i]))
  49. {
  50. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
  51. write_byte(players[i]);
  52. write_string(msg);
  53. message_end();
  54. }
  55. }
  56. }
  57. return PLUGIN_HANDLED;
  58. }
  59.  
  60.  


------------------
-ez a kérés még nem volt
-mforce, remélem tetszik a témanév :roll:

Szerző:  cmd [2015.10.31. 21:29 ]
Hozzászólás témája:  Re: timeleft plugin szerkesztése

hanyszor irod mar ki?

Szerző:  BreakZ [2015.10.31. 21:35 ]
Hozzászólás témája:  Re: timeleft plugin szerkesztése

Ez az alap timeleft pluginba is benne van nem?

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/