hlmod.hu
https://hlmod.hu/

Kör üzenet.
https://hlmod.hu/viewtopic.php?f=9&t=21763
Oldal: 1 / 1

Szerző:  Be$t.# [ 2015.07.30. 11:59 ]
Hozzászólás témája:  Kör üzenet.

Sziasztok!

Valaki javítaná? mindig a kör számlálónál 0-át ír.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <amxmisc>
  4. #include <colorchat>
  5.  
  6. #define PLUGIN "KÖR ELEJI ÜZI"
  7. #define VERSION "0.1"
  8. #define AUTHOR "QUEX"
  9.  
  10. new g_roundCount
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. RegisterHam(Ham_Spawn, "player", "uzenet", 1)
  15. }
  16.  
  17. public uzenet(id)
  18. {
  19. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  20.  
  21. ++g_roundCount
  22. }
  23. new jatekos = get_playersnum()
  24. new maxjatekos = get_maxplayers()
  25. new kor = g_roundCount
  26.  
  27. ColorChat(id, RED, "^4[Információ] » ^3Kör: ^4%s ^1| ^3Játékosok ^4%d^1/^4%d", kor, jatekos, maxjatekos)
  28. }
  29.  
  30.  

Szerző:  Főnix [ 2015.07.30. 12:02 ]
Hozzászólás témája:  Re: Kör üzenet.

Szia nem csodálom, mert mindig akkor nullázódót amikor a játékosok újra éledtek.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <colorchat>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "author"
  7.  
  8. new korok = 0
  9.  
  10. public plugin_init() {
  11. register_plugin(PLUGIN, VERSION, AUTHOR)
  12. register_logevent("nullazas", 2, "1&Restart_Round_", "1=Game_Commencing")
  13. register_event("RoundTime", "roundcount", "bc")
  14. }
  15. public nullazas() {
  16. korok = 0
  17. }
  18. public roundcount() {
  19. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  20. ++korok
  21.  
  22. ColorChat(0, RED, "^4[Információ] » ^3Kör: ^4%s ^1| ^3Játékosok ^4%d^1/^4%d", korok, get_maxplayers() ,get_playersnum())
  23. }
  24. }

Szerző:  Be$t.# [ 2015.07.30. 12:13 ]
Hozzászólás témája:  Re: Kör üzenet.

Mostmeg semmit sem ír ki utánna.
Kör: és a többi szöveg.

Szerző:  PistaCFG [ 2015.07.30. 12:30 ]
Hozzászólás témája:  Re: Kör üzenet.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <amxmisc>
  4. #include <colorchat>
  5.  
  6. #define PLUGIN "KÖR ELEJI ÜZI"
  7. #define VERSION "0.1"
  8. #define AUTHOR "QUEX"
  9.  
  10. new g_roundCount
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. RegisterHam(Ham_Spawn, "player", "uzenet", 1)
  15. }
  16.  
  17. public uzenet(id)
  18. {
  19. if ( read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0) ) {
  20. }
  21. new jatekos = get_playersnum()
  22. new maxjatekos = get_maxplayers()
  23. new kor = g_roundCount
  24.  
  25. g_roundCount++
  26. ColorChat(id, RED, "^4[Információ] » ^3Kör: ^4%s ^1| ^3Játékosok ^4%d^1/^4%d", kor, jatekos, maxjatekos)
  27. }
  28.  
  29.  

Szerző:  Főnix [ 2015.07.30. 13:31 ]
Hozzászólás témája:  Re: Kör üzenet.

Be$t.# írta:
Mostmeg semmit sem ír ki utánna.
Kör: és a többi szöveg.


Előző javítva!

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