HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #define PLUGINNAME "Pistol Rounds"
  2. #define VERSION "1.6"
  3. #define AUTHOR "zp"
  4.  
  5. #include <amxmodx>
  6. #include <fakemeta>
  7. #include <fakemeta_util>
  8. #include <hamsandwich>
  9. #include <cstrike>
  10.  
  11. new pistolrounds
  12.  
  13. public plugin_init(){
  14. register_plugin(PLUGINNAME, VERSION, AUTHOR);
  15.  
  16. pistolrounds = register_cvar("amx_pistolrounds", "0")
  17.  
  18. RegisterHam(Ham_Spawn, "player", "reset_weapons", 1);
  19. }
  20.  
  21. public reset_weapons(id){
  22. if(get_pcvar_num(pistolrounds)!=1){
  23. return PLUGIN_HANDLED
  24. }
  25.  
  26. if(is_user_alive(id)){
  27.  
  28. fm_strip_user_weapons(id);
  29. cs_set_user_money(id, 800, 0);
  30. fm_give_item(id, "weapon_knife");
  31. cs_set_user_armor(id, 0, CS_ARMOR_NONE);
  32.  
  33. switch(get_user_team(id)){
  34. case CS_TEAM_T:
  35. {
  36. fm_give_item(id, "weapon_glock18");
  37. cs_set_user_bpammo(id, CSW_GLOCK18, 40);
  38. }
  39. case CS_TEAM_CT:
  40. {
  41. fm_give_item(id, "weapon_usp");
  42. cs_set_user_bpammo(id, CSW_USP, 24);
  43. cs_set_user_defuse(id, 0);
  44. }
  45. }
  46. }
  47. return HAM_IGNORED;
  48. }
  49.  
  50.