HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*
  2. *
  3. * Pontszám változtató
  4. * Verzió: 2.0.5
  5. * Készítő: Freecode; freecode@hotmail.com (MSN) FCunnClan (AIM)
  6. * Magyarosítás: *GrafitY*
  7. *
  8. * Leírás: A plugin segítségével meg tudjuk vátoztatni a játékosok/csapatok Ölés - Halál pontszámait.
  9. *
  10. *
  11. * Admin Parancs:
  12. * amx_chscore <nick/@CT/@TERRORIST> <frags #> <deaths #>
  13. *
  14. *
  15. */
  16. #include <amxmodx>
  17. #include <amxmisc>
  18. #include <cstrike>
  19. #include <fun>
  20. new gmsgScoreInfo
  21.  
  22.  
  23. public chscore(id,level,cid)
  24. {
  25. if (!cmd_access(id,level,cid,2))
  26. {
  27. return PLUGIN_HANDLED
  28. }
  29. new victim[32],deathsI[32],fragsI[32]
  30. read_argv(1,victim,31)
  31.  
  32. read_argv(2,fragsI,31)
  33. new frags = str_to_num(fragsI)
  34.  
  35. read_argv(3,deathsI,31)
  36. new deaths = str_to_num(deathsI)
  37.  
  38. if (victim[0]=='@')
  39. {
  40. new team[32], inum
  41. get_players(team,inum,"e",victim[1])
  42. if (inum==0)
  43. {
  44. console_print(id,"[ChangeScore] Nem talalhato a jatekos, ebben a csapatban.")
  45. return PLUGIN_HANDLED
  46. }
  47. for (new i=0;i<inum;++i)
  48. {
  49. new teams = get_user_team(team[i])
  50. set_user_frags(team[i],frags)
  51. cs_set_user_deaths(team[i],deaths)
  52. message_begin(MSG_ALL,gmsgScoreInfo)
  53. write_byte( team[i] )
  54. write_short(frags)
  55. write_short(deaths)
  56. write_short(0)
  57. write_short(teams)
  58. message_end()
  59. }
  60. }
  61. else
  62. {
  63. new user = cmd_target(id,victim,0)
  64. new authid[32]
  65. get_user_authid(user,authid,31)
  66. if (!user)
  67. {
  68. console_print(id,"[ChangeScore] Nincs talalat.")
  69. return PLUGIN_HANDLED
  70. }
  71. new teams = get_user_team(user)
  72. set_user_frags(user,frags)
  73. cs_set_user_deaths(user,deaths)
  74. message_begin(MSG_ALL,gmsgScoreInfo)
  75. write_byte(user)
  76. write_short(frags)
  77. write_short(deaths)
  78. write_short(0)
  79. write_short(teams)
  80. message_end()
  81. }
  82. return PLUGIN_HANDLED
  83. }
  84.  
  85.  
  86. public plugin_init()
  87. {
  88. register_plugin("Change Score","2.0.5","Freecode")
  89. register_clcmd("amx_chscore","chscore",ADMIN_CVAR," - amx_chscore <nick/@CT/@TERRORIST> <frags #> <deaths #>")
  90. gmsgScoreInfo = get_user_msgid("ScoreInfo")
  91. }
  92.