HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*
  2. *
  3. * Change Score
  4. * Version 2.0.5
  5. * Author: Freecode; freecode@hotmail.com (MSN) FCunnClan (AIM)
  6. *
  7. * This plugin will will change persons Frags and Deaths.
  8. *
  9. * Requirements:
  10. * AMXX 1.55
  11. *
  12. * Admin Commands:
  13. * amx_chscore <nick/@CT/@TERRORIST> <frags #> <deaths #>
  14. *
  15. * To Do:
  16. * Nothing :)
  17. *
  18. */
  19. #include <amxmodx>
  20. #include <amxmisc>
  21. #include <cstrike>
  22. #include <fun>
  23. new gmsgScoreInfo
  24.  
  25.  
  26. public chscore(id,level,cid)
  27. {
  28. if (!cmd_access(id,level,cid,2))
  29. {
  30. return PLUGIN_HANDLED
  31. }
  32. new victim[32],deathsI[32],fragsI[32]
  33. read_argv(1,victim,31)
  34.  
  35. read_argv(2,fragsI,31)
  36. new frags = str_to_num(fragsI)
  37.  
  38. read_argv(3,deathsI,31)
  39. new deaths = str_to_num(deathsI)
  40.  
  41. if (victim[0]=='@')
  42. {
  43. new team[32], inum
  44. get_players(team,inum,"e",victim[1])
  45. if (inum==0)
  46. {
  47. console_print(id,"[AMXX]Nincs jatekos az adott csapatban.")
  48. return PLUGIN_HANDLED
  49. }
  50. for (new i=0;i<inum;++i)
  51. {
  52. new teams = get_user_team(team[i])
  53. set_user_frags(team[i],frags)
  54. cs_set_user_deaths(team[i],deaths)
  55. message_begin(MSG_ALL,gmsgScoreInfo)
  56. write_byte( team[i] )
  57. write_short(frags)
  58. write_short(deaths)
  59. write_short(0)
  60. write_short(teams)
  61. message_end()
  62. }
  63. }
  64. else
  65. {
  66. new user = cmd_target(id,victim,0)
  67. new authid[32]
  68. get_user_authid(user,authid,31)
  69. if (!user)
  70. {
  71. console_print(id,"[AMXX]Jatekos nem talalhato.")
  72. return PLUGIN_HANDLED
  73. }
  74. new teams = get_user_team(user)
  75. set_user_frags(user,frags)
  76. cs_set_user_deaths(user,deaths)
  77. message_begin(MSG_ALL,gmsgScoreInfo)
  78. write_byte(user)
  79. write_short(frags)
  80. write_short(deaths)
  81. write_short(0)
  82. write_short(teams)
  83. message_end()
  84. }
  85. return PLUGIN_HANDLED
  86. }
  87.  
  88.  
  89. public plugin_init()
  90. {
  91. register_plugin("Change Score","2.0.5","Freecode")
  92. register_clcmd("amx_chscore","chscore",ADMIN_CVAR," - amx_chscore <nev/@CT/@TERRORIST> <olesek #> <halalok #>")
  93. gmsgScoreInfo = get_user_msgid("ScoreInfo")
  94. }