dasdasdasddsadsa2

autoraise

Oct 15th, 2022
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | Source Code | 0 0
  1. local PLUGIN = PLUGIN
  2. PLUGIN.name = "Auto weapon raise"
  3. PLUGIN.author = "Adrim"
  4. PLUGIN.description = "Various shit code of wep raise."
  5. local WeaponRaise = {
  6.     ["weapon_357"] = true,
  7.     ["weapon_pistol"] = true,
  8.     ["weapon_crossbow"] = true,
  9.     ["weapon_crowbar"] = true,
  10.     ["weapon_flaregun_beta"] = true,
  11.     ["weapon_frag"] = true,
  12.     ["weapon_physcannon"] = true,
  13.     ["weapon_iceaxe_beta"] = true,
  14.     ["weapon_immolator_beta_alt"] = true,
  15.     ["weapon_immolator_beta"] = true,
  16.     ["weapon_ar2"] = true,
  17.     ["weapon_rpg"] = true,
  18.     ["weapon_slam"] = true,
  19.     ["weapon_shotgun"] = true,
  20.     ["weapon_smg1"] = true,
  21.     ["weapon_stunstick"] = true,
  22.     ["weapon_cb_hopwire"] = true,
  23.     ["weapon_medkit"] = true,
  24.     ["swb_knife"] = true,
  25.     [""] = true,
  26. }
  27.  
  28. function PLUGIN:PlayerWeaponChanged(player,wep)
  29.     if(SERVER)then
  30.         local class = wep:GetClass()
  31.         local base = wep.Base or ""
  32.         if string.find(base,"simple") or string.find(base,"arccw") or WeaponRaise[class] then
  33.             timer.Simple( 0.05, function()
  34.                 player:SetWepRaised( true )            
  35.             end)
  36.         end
  37.     end
  38. end
Tags: #lua
Advertisement
Add Comment
Please, Sign In to add comment