hlmod.hu
https://hlmod.hu/

Statisztika nullázás [máshogy]
https://hlmod.hu/viewtopic.php?f=29&t=8298
Oldal: 1 / 1

Szerző:  UlTiMaT3 [2013.04.28. 23:10 ]
Hozzászólás témája:  Statisztika nullázás [máshogy]

Sziasztok! Azt meglehet oldani hogy így írja ki ha valaki nullázza a statját: Ne[X]oR Az "X" alap sárga legyen. A többi INFO a .SMA -ban "//" után.

Előre is köszönöm!


SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <colorchat>
  6.  
  7. #define adtime 600.0 //Default of 10 minuites
  8.  
  9. new pcvar_Advertise
  10. new pcvar_Display
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin("Reset Score", "1.0", "Silenttt")
  15.  
  16.  
  17. register_clcmd("say /resetscore", "reset_score")
  18. register_clcmd("say /rs", "reset_score")
  19.  
  20.  
  21. pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  22. pcvar_Display = register_cvar("sv_rsdisplay", "0")
  23.  
  24. if(get_cvar_num("sv_rsadvertise") == 1)
  25. {
  26. set_task(adtime, "advertise", _, _, _, "b")
  27. }
  28. }
  29.  
  30. public reset_score(id)
  31. {
  32. cs_set_user_deaths(id, 0)
  33. set_user_frags(id, 0)
  34. cs_set_user_deaths(id, 0)
  35. set_user_frags(id, 0)
  36.  
  37. if(get_pcvar_num(pcvar_Display) == 1)
  38. {
  39. new name[33]
  40. get_user_name(id, name, 32)
  41. client_print(0, print_chat, "%s nullazta a statjat.", name) // A játékos neve team szín legyen mindíg, és ami utánna van, az zöld legyen
  42. }
  43. else
  44. {
  45. ColorChat(id, BLUE, "[Ne[XoR]-Stat] ^4Sikeresen nulláztad a statisztikádat!")
  46. }
  47. }
  48.  
  49. public advertise()
  50. {
  51. set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  52. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz") // nagy betűkkel írja ki, hogy lássák, és zöld színnel
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57. if(get_pcvar_num(pcvar_Advertise) == 1)
  58. {
  59. set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60. }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65. if(is_user_connected(id))
  66. {
  67. client_print(id, print_chat, "A statod nullazasahoz ird be Chatbe: /rs") // EZ -> "/rs" legyen pirossal írva, a többi lehet zöld.
  68. }
  69. }

Szerző:  laki5000 [2013.04.30. 15:10 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <colorchat>
  6.  
  7. #define adtime 600.0 //Default of 10 minuites
  8.  
  9. new pcvar_Advertise
  10. new pcvar_Display
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin("Reset Score", "1.0", "Silenttt")
  15.  
  16.  
  17. register_clcmd("say /resetscore", "reset_score")
  18. register_clcmd("say /rs", "reset_score")
  19.  
  20.  
  21. pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  22. pcvar_Display = register_cvar("sv_rsdisplay", "0")
  23.  
  24. if(get_cvar_num("sv_rsadvertise") == 1)
  25. {
  26. set_task(adtime, "advertise", _, _, _, "b")
  27. }
  28. }
  29.  
  30. public reset_score(id)
  31. {
  32. cs_set_user_deaths(id, 0)
  33. set_user_frags(id, 0)
  34. cs_set_user_deaths(id, 0)
  35. set_user_frags(id, 0)
  36.  
  37. if(get_pcvar_num(pcvar_Display) == 1)
  38. {
  39. new name[33]
  40. get_user_name(id, name, 32)
  41. client_print(0, print_chat, "^2[Ne[^4X]or] %s nullazta a statjat.", name) // A játékos neve team szín legyen mindíg, és ami utánna van, az zöld legyen
  42. }
  43. else
  44. {
  45. ColorChat(id, GREEN, "[Ne[^4X]or] ^4Sikeresen nulláztad a statisztikádat!")
  46. }
  47. }
  48.  
  49. public advertise()
  50. {
  51. set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  52. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz") // nagy betűkkel írja ki, hogy lássák, és zöld színnel
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57. if(get_pcvar_num(pcvar_Advertise) == 1)
  58. {
  59. set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60. }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65. if(is_user_connected(id))
  66. {
  67. client_print(id, print_chat, "A statod nullazasahoz ird be Chatbe: /rs") // EZ -> "/rs" legyen pirossal írva, a többi lehet zöld.
  68. }
  69. }






ENNEK JÓNAK KELL LENNI:p

Szerző:  UlTiMaT3 [2013.05.02. 13:35 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

laki5000 írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <colorchat>
  6.  
  7. #define adtime 600.0 //Default of 10 minuites
  8.  
  9. new pcvar_Advertise
  10. new pcvar_Display
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin("Reset Score", "1.0", "Silenttt")
  15.  
  16.  
  17. register_clcmd("say /resetscore", "reset_score")
  18. register_clcmd("say /rs", "reset_score")
  19.  
  20.  
  21. pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  22. pcvar_Display = register_cvar("sv_rsdisplay", "0")
  23.  
  24. if(get_cvar_num("sv_rsadvertise") == 1)
  25. {
  26. set_task(adtime, "advertise", _, _, _, "b")
  27. }
  28. }
  29.  
  30. public reset_score(id)
  31. {
  32. cs_set_user_deaths(id, 0)
  33. set_user_frags(id, 0)
  34. cs_set_user_deaths(id, 0)
  35. set_user_frags(id, 0)
  36.  
  37. if(get_pcvar_num(pcvar_Display) == 1)
  38. {
  39. new name[33]
  40. get_user_name(id, name, 32)
  41. client_print(0, print_chat, "^2[Ne[^4X]or] %s nullazta a statjat.", name) // A játékos neve team szín legyen mindíg, és ami utánna van, az zöld legyen
  42. }
  43. else
  44. {
  45. ColorChat(id, GREEN, "[Ne[^4X]or] ^4Sikeresen nulláztad a statisztikádat!")
  46. }
  47. }
  48.  
  49. public advertise()
  50. {
  51. set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  52. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz") // nagy betűkkel írja ki, hogy lássák, és zöld színnel
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57. if(get_pcvar_num(pcvar_Advertise) == 1)
  58. {
  59. set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60. }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65. if(is_user_connected(id))
  66. {
  67. client_print(id, print_chat, "A statod nullazasahoz ird be Chatbe: /rs") // EZ -> "/rs" legyen pirossal írva, a többi lehet zöld.
  68. }
  69. }






ENNEK JÓNAK KELL LENNI:p



Ez nem az amit kértem :S Én azt kértem hogy így legyen: Ne[X]oR

De te így csináltad:
SMA Forráskód: [ Mindet kijelol ]
  1. ColorChat(id, GREEN, "[Ne[^4X]or] ^4Sikeresen nulláztad a statisztikádat!")


Ha úgy lesz ahogy kértem, megy a KÖSZÖNÖM!

Szerző:  m0csy652 [2013.05.02. 13:39 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

SMA Forráskód: [ Mindet kijelol ]
  1. ColorChat(id, GREEN, "[Ne[^4X]^4or] Sikeresen nulláztad a statisztikádat!")

Szerző:  UlTiMaT3 [2013.05.03. 05:06 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

m0csy652 írta:
SMA Forráskód: [ Mindet kijelol ]
  1. ColorChat(id, GREEN, "[Ne[^4X]^4or] Sikeresen nulláztad a statisztikádat!")



Ez se jó :S

A leírás, a "//" után van hogy hogyan csináljátok meg :)

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <colorchat>
  6.  
  7. #define adtime 600.0 //Default of 10 minuites
  8.  
  9. new pcvar_Advertise
  10. new pcvar_Display
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin("Reset Score", "1.0", "Silenttt")
  15.  
  16.  
  17. register_clcmd("say /resetscore", "reset_score")
  18. register_clcmd("say /rs", "reset_score")
  19.  
  20.  
  21. pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  22. pcvar_Display = register_cvar("sv_rsdisplay", "0")
  23.  
  24. if(get_cvar_num("sv_rsadvertise") == 1)
  25. {
  26. set_task(adtime, "advertise", _, _, _, "b")
  27. }
  28. }
  29.  
  30. public reset_score(id)
  31. {
  32. cs_set_user_deaths(id, 0)
  33. set_user_frags(id, 0)
  34. cs_set_user_deaths(id, 0)
  35. set_user_frags(id, 0)
  36.  
  37. if(get_pcvar_num(pcvar_Display) == 1)
  38. {
  39. new name[33]
  40. get_user_name(id, name, 32)
  41. client_print(0, print_chat, "^2[Ne[^4X]or] %s nullazta a statjat.", name) // A játékos neve team szín legyen mindíg, és ami utánna van, az zöld legyen
  42. }
  43. else
  44. {
  45. ColorChat(id, GREEN, "[Ne[^4X]or] ^4Sikeresen nulláztad a statisztikádat!")
  46. }
  47. }
  48.  
  49. public advertise()
  50. {
  51. set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
  52. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz") // nagy betűkkel írja ki, hogy lássák, és zöld színnel
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57. if(get_pcvar_num(pcvar_Advertise) == 1)
  58. {
  59. set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60. }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65. if(is_user_connected(id))
  66. {
  67. client_print(id, print_chat, "A statod nullazasahoz ird be Chatbe: /rs") // EZ -> "/rs" legyen pirossal írva, a többi lehet zöld.
  68. }
  69. }

Szerző:  pixxa112 [2013.05.03. 13:25 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

Teszteltem és működőt:
SMA Forráskód: [ Mindet kijelol ]
  1. 1. ColorChat(0, GREEN, "[Ne[^1X^4]or] ^3%s ^4nullazta a statjat.", name)
  2. 2. ColorChat(id, GREEN, "[Ne[^1X^4]or] Sikeresen nullaztad a statisztikadat!")
  3. 3. ColorChat(id, GREEN, "A statod nullazasahoz ird be Chatbe: ^3/rs")


Hud:
SMA Forráskód: [ Mindet kijelol ]
  1. set_hudmessage(255, 0, 0, -1.0, 0.23, 2, 6.0, get_pcvar_float)
  2. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz"

Szerző:  UlTiMaT3 [2013.05.05. 02:16 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

pixxa112 írta:
Teszteltem és működőt:
SMA Forráskód: [ Mindet kijelol ]
  1. 1. ColorChat(0, GREEN, "[Ne[^1X^4]or] ^3%s ^4nullazta a statjat.", name)
  2. 2. ColorChat(id, GREEN, "[Ne[^1X^4]or] Sikeresen nullaztad a statisztikadat!")
  3. 3. ColorChat(id, GREEN, "A statod nullazasahoz ird be Chatbe: ^3/rs")


Hud:
SMA Forráskód: [ Mindet kijelol ]
  1. set_hudmessage(255, 0, 0, -1.0, 0.23, 2, 6.0, get_pcvar_float)
  2. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz"



És azt meg tudod csinálni hogy bele írod a forráskódba? Mert nem vágom nagyon hogy hova kell ezt bele írni..

SMA Forráskód: [ Mindet kijelol ]
  1. 1. ColorChat(0, GREEN, "[Ne[^1X^4]or] ^3%s ^4nullazta a statjat.", name)
  2. 2. ColorChat(id, GREEN, "[Ne[^1X^4]or] Sikeresen nullaztad a statisztikadat!")
  3. 3. ColorChat(id, GREEN, "A statod nullazasahoz ird be Chatbe: ^3/rs")


Előre is köszönöm..

Szerző:  crazy` [2013.05.05. 07:50 ]
Hozzászólás témája:  Re: Statisztika nullázás [máshogy]

beleírtam:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5. #include <colorchat>
  6.  
  7. #define adtime 600.0 //Default of 10 minuites
  8.  
  9. new pcvar_Advertise
  10. new pcvar_Display
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin("Reset Score", "1.0", "Silenttt")
  15.  
  16.  
  17. register_clcmd("say /resetscore", "reset_score")
  18. register_clcmd("say /rs", "reset_score")
  19.  
  20.  
  21. pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
  22. pcvar_Display = register_cvar("sv_rsdisplay", "0")
  23.  
  24. if(get_cvar_num("sv_rsadvertise") == 1)
  25. {
  26. set_task(adtime, "advertise", _, _, _, "b")
  27. }
  28. }
  29.  
  30. public reset_score(id)
  31. {
  32. cs_set_user_deaths(id, 0)
  33. set_user_frags(id, 0)
  34. cs_set_user_deaths(id, 0)
  35. set_user_frags(id, 0)
  36.  
  37. if(get_pcvar_num(pcvar_Display) == 1)
  38. {
  39. new name[33]
  40. get_user_name(id, name, 32)
  41. ColorChat(0, GREEN, "[Ne[^1X^4]or] ^3%s ^4nullazta a statjat.", name) // A játékos neve team szín legyen mindíg, és ami utánna van, az zöld legyen
  42. }
  43. else
  44. {
  45. ColorChat(id, GREEN, "[Ne[^1X^4]or] Sikeresen nullaztad a statisztikadat!")
  46. }
  47. }
  48.  
  49. public advertise()
  50. {
  51. set_hudmessage(255, 0, 0, -1.0, 0.23, 2, 6.0, get_pcvar_float)
  52. show_hudmessage(0, "Csak ird be chatbe, hogy /rs a statod nullazasahoz" // nagy betukkel írja ki, hogy lássák, és zöld színnel
  53. }
  54.  
  55. public client_putinserver(id)
  56. {
  57. if(get_pcvar_num(pcvar_Advertise) == 1)
  58. {
  59. set_task(10.0, "connectmessage", id, _, _, "a", 1)
  60. }
  61. }
  62.  
  63. public connectmessage(id)
  64. {
  65. if(is_user_connected(id))
  66. {
  67. ColorChat(id, GREEN, "A statod nullazasahoz ird be Chatbe: ^3/rs") // EZ -> "/rs" legyen pirossal írva, a többi lehet zöld.
  68. }
  69. }

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