Advertisement
Akc3n7

Seizure Of Weapons

Feb 10th, 2023 (edited)
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.90 KB | None | 0 0
  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", "A k c 3n 7");
  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.        if(!(is_user_alive(id)))
  37.                return HAM_IGNORED;     
  38.        return g_Enable[ id ] ? HAM_SUPERCEDE : HAM_IGNORED
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement