HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <core>
  6.  
  7. #include <cstrike>
  8.  
  9. #include <fun>
  10.  
  11. #include <hamsandwich>
  12.  
  13.  
  14.  
  15. #define M4 90
  16.  
  17. #define AK47 90
  18.  
  19. #define DEAGLE 35
  20.  
  21.  
  22.  
  23. new g_onoff, g_kevlar, g_defkit
  24.  
  25.  
  26.  
  27. public plugin_init()
  28.  
  29. {
  30.  
  31. register_plugin("Public Jatekmod","0.1","RsN")
  32.  
  33. RegisterHam(Ham_Spawn, "player", "kezdes", 1)
  34.  
  35. g_onoff = register_cvar("amx_publicjatekmod","1")
  36.  
  37. g_kevlar = register_cvar("amx_kevlar","1")
  38.  
  39. g_defkit = register_cvar("amx_defkit","1")
  40.  
  41. }
  42.  
  43.  
  44.  
  45. public kezdes(id)
  46.  
  47. {
  48.  
  49. if(get_pcvar_num(g_onoff) == 1)
  50.  
  51. {
  52.  
  53. new CsTeams:userTeam = cs_get_user_team(id)
  54.  
  55.  
  56.  
  57. if (userTeam == CS_TEAM_CT)
  58.  
  59. {
  60.  
  61. give_item(id, "weapon_m4a1")
  62.  
  63. cs_set_user_bpammo(id, CSW_M4A1, M4)
  64.  
  65. give_item(id, "weapon_deagle")
  66.  
  67. cs_set_user_bpammo(id, CSW_DEAGLE, DEAGLE)
  68.  
  69. if(get_pcvar_num(g_kevlar) == 1)
  70.  
  71. {
  72.  
  73. give_item(id, "item_assaultsuit")
  74.  
  75. }
  76.  
  77. if(get_pcvar_num(g_defkit) == 1)
  78.  
  79. {
  80.  
  81. give_item(id, "item_thighpack")
  82.  
  83. }
  84.  
  85. }
  86.  
  87. else if (userTeam == CS_TEAM_T)
  88.  
  89. {
  90.  
  91. give_item(id, "weapon_ak47")
  92.  
  93. cs_set_user_bpammo(id, CSW_AK47, AK47)
  94.  
  95. give_item(id,"weapon_deagle")
  96.  
  97. cs_set_user_bpammo(id, CSW_DEAGLE, DEAGLE)
  98.  
  99. if(get_pcvar_num(g_kevlar) == 1)
  100.  
  101. {
  102.  
  103. give_item(id, "item_assaultsuit")
  104.  
  105. }
  106.  
  107. }
  108.  
  109. }
  110.  
  111. }
  112.  
  113.