Advertisement
Combreal

OneShotWeap.lua

Mar 10th, 2016
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.38 KB | None | 0 0
  1. -- One shot Weapon --
  2. function GetRequiredVersion() return 200 end
  3.  
  4. function OnScriptLoad(processid, game, persistent) end
  5.  
  6. function OnNewGame(map)
  7.     LoadTags()
  8. end
  9.  
  10. function OnDamageLookup(receiving, causing, mapId, tagdata)
  11.     if mapId == pistolammo_tag_id then
  12.         writefloat(tagdata, 0x1D0, 500)
  13.         writefloat(tagdata, 0x1D4, 500)
  14.         writefloat(tagdata, 0x1D8, 500)
  15.     end
  16. end
  17.  
  18. function LoadTags()
  19.     -- Equipment
  20.     camouflage_tag_id = gettagid("eqip", "powerups\\active camouflage")
  21.     healthpack_tag_id = gettagid("eqip", "powerups\\health pack")
  22.     overshield_tag_id = gettagid("eqip", "powerups\\over shield")
  23.     doublespeed_tag_id = gettagid("eqip", "powerups\\double speed")
  24.     fullspec_tag_id = gettagid("eqip", "powerups\\full-spectrum vision")
  25.     fragnade_tag_id = gettagid("eqip", "weapons\\frag grenade\\frag grenade")
  26.     plasmanade_tag_id = gettagid("eqip", "weapons\\plasma grenade\\plasma grenade")
  27.     rifleammo_tag_id = gettagid("eqip", "powerups\\assault rifle ammo\\assault rifle ammo")
  28.     needlerammo_tag_id = gettagid("eqip", "powerups\\needler ammo\\needler ammo")
  29.     pistolammo_tag_id = gettagid("eqip", "powerups\\pistol ammo\\pistol ammo")
  30.     rocketammo_tag_id = gettagid("eqip", "powerups\\rocket launcher ammo\\rocket launcher ammo")
  31.     shotgunammo_tag_id = gettagid("eqip", "powerups\\shotgun ammo\\shotgun ammo")
  32.     sniperammo_tag_id = gettagid("eqip", "powerups\\sniper rifle ammo\\sniper rifle ammo")
  33.     flameammo_tag_id = gettagid("eqip", "powerups\\flamethrower ammo\\flamethrower ammo")
  34.     -- Weapons
  35.     assaultrifle_tag_id = gettagid("weap", "weapons\\assault rifle\\assault rifle")
  36.     oddball_tag_id = gettagid("weap", "weapons\\ball\\ball")
  37.     flag_tag_id = gettagid("weap", "weapons\\flag\\flag")
  38.     flamethrower_tag_id = gettagid("weap", "weapons\\flamethrower\\flamethrower")
  39.     gravityrifle_tag_id = gettagid("weap", "weapons\\gravity rifle\\gravity rifle")
  40.     needler_tag_id = gettagid("weap", "weapons\\needler\\mp_needler")
  41.     pistol_tag_id = gettagid("weap", "weapons\\pistol\\pistol")
  42.     plasmapistol_tag_id = gettagid("weap", "weapons\\plasma pistol\\plasma pistol")
  43.     plasmarifle_tag_id = gettagid("weap", "weapons\\plasma rifle\\plasma rifle")
  44.     plasmacannon_tag_id = gettagid("weap", "weapons\\plasma_cannon\\plasma_cannon")
  45.     rocketlauncher_tag_id = gettagid("weap", "weapons\\rocket launcher\\rocket launcher")
  46.     shotgun_tag_id = gettagid("weap", "weapons\\shotgun\\shotgun")
  47.     sniper_tag_id = gettagid("weap", "weapons\\sniper rifle\\sniper rifle")
  48.     -- Globals
  49.     global_distanceId = gettagid("jpt!", "globals\\distance")
  50.     global_fallingId = gettagid("jpt!", "globals\\falling")
  51.     -- Others
  52.     assaultrifle_melee_tag_id = gettagid("jpt!", "weapons\\assault rifle\\melee")
  53.     flag_melee_tag_id = gettagid("jpt!", "weapons\\flag\\melee")
  54.     flamethrower_melee_tag_id = gettagid("jpt!", "weapons\\flamethrower\\melee")
  55.     needler_melee_tag_id = gettagid("jpt!", "weapons\\ball\\melee")
  56.     pistol_melee_tag_id = gettagid("jpt!", "weapons\\pistol\\melee")
  57.     plasmapistol_melee_tag_id = gettagid("jpt!", "weapons\\plasma pistol\\melee")
  58.     plasmarifle_melee_tag_id = gettagid("jpt!", "weapons\\plasma rifle\\melee")
  59.     plasmacannon_melee_tag_id = gettagid("jpt!", "weapons\\effects\\plasma_cannon_melee")
  60.     rocketlauncher_melee_tag_id = gettagid("jpt!", "weapons\\rocket launcher\\melee")
  61.     shotgun_melee_tag_id = gettagid("jpt!", "weapons\\shotgun\\melee")
  62.     sniper_melee_tag_id = gettagid("jpt!", "weapons\\sniper rifle\\melee")
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement