Guest User

Untitled

a guest
Dec 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.09 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fun>
  4.  
  5. new maxplayers
  6.  
  7. public plugin_init() {
  8.     maxplayers = get_maxplayers()
  9.     register_cvar("amx_nobombhos","1")
  10.     register_plugin("No bomb/hostages","1.00","NL)Ramon(NL")
  11.     register_event("RoundTime", "nohos", "bc")
  12.     removeit()
  13.     nohos()
  14. }
  15.  
  16. public removeit() {
  17.     new fhosr = find_ent_by_class(-1, "func_hostage_rescue")
  18.     while(fhosr > maxplayers)
  19.         {
  20.         entity_set_int(fhosr, EV_INT_flags, FL_KILLME)
  21.         fhosr = find_ent_by_class(fhosr, "func_hostage_rescue")
  22.     }
  23.     new doneonce = 0
  24.     new fbombt = find_ent_by_class(-1, "func_bomb_target")
  25.     while(fbombt > maxplayers)
  26.         {
  27.         entity_set_int(fbombt, EV_INT_flags, FL_KILLME)
  28.         doneonce = 1
  29.         fbombt = find_ent_by_class(fbombt, "func_bomb_target")
  30.     }
  31.     if(doneonce == 1)server_cmd("sv_restartround 1")
  32.     new ibombt = find_ent_by_class(-1, "info_bomb_target")
  33.     while(ibombt > maxplayers)
  34.         {
  35.         entity_set_int(ibombt, EV_INT_flags, FL_KILLME)
  36.         ibombt = find_ent_by_class(ibombt, "info_bomb_target")
  37.     }  
  38.     new fescape = find_ent_by_class(-1, "func_escapezone")
  39.     while(fescape > maxplayers)
  40.         {
  41.         entity_set_int(fescape, EV_INT_flags, FL_KILLME)
  42.         fescape = find_ent_by_class(fescape, "func_escapezone")
  43.     }  
  44.     new fvips = find_ent_by_class(-1, "func_vip_safteyzone")
  45.     while(fvips > maxplayers)
  46.         {
  47.         entity_set_int(fvips, EV_INT_flags, FL_KILLME)
  48.         fvips = find_ent_by_class(fvips, "func_vip_safteyzone")
  49.     }  
  50.     new fvipst = find_ent_by_class(-1, "func_vip_start")
  51.     while(fvipst > maxplayers)
  52.         {
  53.         entity_set_int(fvipst, EV_INT_flags, FL_KILLME)
  54.         fvipst = find_ent_by_class(fvipst, "func_vip_start")
  55.     }  
  56.     return PLUGIN_CONTINUE
  57. }
  58.  
  59. public nohos() {
  60.     if(get_cvar_num("amx_nobombhos") == 1)
  61.         {
  62.         new iHos = find_ent_by_class(-1, "hostage_entity")
  63.         while(iHos > maxplayers)
  64.             {
  65.             entity_set_int(iHos, EV_INT_flags, FL_KILLME)
  66.             iHos = find_ent_by_class(iHos, "hostage_entity")
  67.         }
  68.         new jHos = find_ent_by_class(-1, "monster_scientist")
  69.         while(iHos > maxplayers)
  70.             {
  71.             entity_set_int(jHos, EV_INT_flags, FL_KILLME)
  72.             iHos = find_ent_by_class(jHos, "monster_scientist")
  73.         }
  74.     }
  75. }
Add Comment
Please, Sign In to add comment