Sorinel

Seizure Of Weapons

Apr 17th, 2018
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include < amxmodx >
  2. #include < hamsandwich >
  3.  
  4. new bool:g_Enable[33]
  5.  
  6. new const restricted_maps[ ] =
  7. {
  8.     "fy_snow"        
  9. }
  10.  
  11. public plugin_init() {
  12.  
  13.        register_plugin( "Seizure Of Weapons", "1.0", "Sorinel")
  14.        RegisterHam( Ham_Touch, "armoury_entity", "FwdHamPlayerPickup")
  15.        RegisterHam( Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)  
  16. }
  17.  
  18. public fwHamPlayerSpawnPost(id) {
  19.  
  20.        if(!(is_user_alive(id)))
  21.                return
  22.  
  23.        new map_name[32], i;
  24.        get_mapname(map_name, charsmax(map_name));
  25.    
  26.        for(i = 0; i < sizeof(restricted_maps); i++)
  27.        {
  28.         if(equali(map_name, restricted_maps[i]))
  29.         {
  30.             g_Enable[id] = true
  31.         }
  32.        }
  33. }
  34.  
  35. public FwdHamPlayerPickup( iEntity, id ) {
  36.  
  37.        if(!(is_user_alive(id)))
  38.                return HAM_IGNORED
  39.  
  40.        return g_Enable[ id ] ? HAM_SUPERCEDE : HAM_IGNORED
  41. }
RAW Paste Data