hlmod.hu
https://hlmod.hu/

Statisztika nullázó - Hibás
https://hlmod.hu/viewtopic.php?f=9&t=4994
Oldal: 1 / 1

Szerző:  norbee.16 [2012.06.30. 21:37 ]
Hozzászólás témája:  Statisztika nullázó - Hibás

Kód:
  1.  

  2.  

  3. #include <amxmodx>

  4. #include <amxmisc>

  5. #include <cstrike>

  6. #include <fun>

  7.  

  8. #define adtime   600.0 //Default of 10 minuites

  9.  

  10. new pcvar_Advertise

  11. new pcvar_Display

  12.  

  13. public plugin_init()

  14. {

  15.         register_plugin("Reset Score", "1.0", "Silenttt")

  16.  

  17.  

  18.         register_clcmd("say /resetscore", "reset_score")

  19.         register_clcmd("say /rs", "reset_score")

  20.  

  21.  

  22.         pcvar_Advertise = register_cvar("sv_rsadvertise", "0")

  23.         pcvar_Display = register_cvar("sv_rsdisplay", "0")

  24.  

  25.         if(get_cvar_num("sv_rsadvertise") == 1)

  26.         {

  27.                 set_task(adtime, "advertise", _, _, _, "b")

  28.         }

  29. }

  30.  

  31. public reset_score(id)

  32. {

  33.         cs_set_user_deaths(id, 0)

  34.         set_user_frags(id, 0)

  35.         cs_set_user_deaths(id, 0)

  36.         set_user_frags(id, 0)

  37.  

  38.         if(get_pcvar_num(pcvar_Display) == 1)

  39.         {

  40.                 new name[33]

  41.                 get_user_name(id, name, 32)

  42.                 client_print(0, print_chat, "%s nullazta a statjat.", name)

  43.         }

  44.         else

  45.         {

  46.                 client_print(id, print_chat, "A statod sikeresen lenullazva!")

  47.         }

  48. }

  49.  

  50. public advertise()

  51. {

  52.         set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)

  53.         show_hudmessage(0, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz")

  54. }

  55.  

  56. public client_putinserver(id)

  57. {

  58.         if(get_pcvar_num(pcvar_Advertise) == 1)

  59.         {

  60.                 set_task(10.0, "connectmessage", id, _, _, "a", 1)

  61.         }

  62. }

  63.  

  64. public connectmessage(id)

  65. {

  66.         if(is_user_connected(id))

  67.         {

  68.                 client_print(id, print_chat, "Csak ird be chatbe, hogy /resetscore vagy /rs a statod nullazasahoz (nem kell reconnectelned)")

  69.         }

  70. }

  71.  

Aki tudja mi a hiba benne az csinálja már meg léci :)

Szerző:  GhostRyder [2012.06.30. 21:44 ]
Hozzászólás témája:  Re: Statisztika nullázó - Hibás

Nekem lefordítja...

Szerző:  norbee.16 [2012.06.30. 22:15 ]
Hozzászólás témája:  Re: Statisztika nullázó - Hibás

de nekem logba hibásnak írja :S
de már m1 szedtem le 1 jót :)

Szerző:  oroszrulett [2012.07.01. 06:52 ]
Hozzászólás témája:  Re: Statisztika nullázó - Hibás

Olvasd el az aláírásom 4. sorát, és aszerint járj el, ha egy pluginod hibás.

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