hlmod.hu
https://hlmod.hu/

resetscore
https://hlmod.hu/viewtopic.php?f=29&t=8605
Oldal: 1 / 1

Szerző:  Joke [ 2013.05.22. 19:39 ]
Hozzászólás témája:  resetscore

Sziasztok...

Nekem az a /rs kellene ,hogy sayben kiirná: Pista nullázta a statját. Ne a petrik féle ,köszi...

[Létezik a keresés]

Szerző:  VirTuaL ~` [ 2013.05.22. 19:44 ]
Hozzászólás témája:  Re: resetscore

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", "1")
  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(id, NORMAL, "%s^x04 nullazta a statjat.", name)
  42. }
  43. else
  44. {
  45. client_print(id, print_chat, "A statod sikeresen lenullazva!")
  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 /resetscore vagy /rs a statod nullazasahoz")
  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, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz (nem kell reconnectelned)")
  68. }
  69. }
  70.  

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