Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local get = gui.GetValue
- local localplayer = entities.GetLocalPlayer()
- local weaponIDlist = {
- taser = { 31 },
- pistol = { usp = 61, cz = 63, duel = 2, fs = 3, g18 = 4, p2000 = 32, p250 = 36, tek9 = 30 },
- hpistol = { deg = 1, rev = 64 },
- smg = { ump = 24, mp5 = 23, mp9 = 34, p90 = 19, mp7 = 33, pp = 26, mac = 17 },
- shotgun = { sawedoff = 29, mag7 = 27, nova = 35, xm = 25 },
- rifle = { ak = 7, aug = 8, fam = 10, galil = 13, m4a1s = 60, m4a4 = 16, sg = 39 },
- asniper = { scar = 38, g3sg1 = 11 },
- scout = { 40 },
- awp = { 9 },
- lmg = { m249 = 14, negev = 28 },
- grenades = { flashbang = 43, hegrenade = 44, smokegrenade = 45, molotov = 46, decoy = 47, incgrenade = 48 },
- knives = { m9 = 508, bayo = 500, ct_knife = 42, t_knife = 59, classic = 503, flip = 505, gut = 506, karam = 507, huntsman = 509, falch = 512, bowie = 514,
- butterfly = 515, shadow = 516, para = 517, survival = 518, ursus = 519, navaja = 520, nomad = 521, stilleto = 522, taon = 523, skeleton = 525 },
- }
- -- include filter for items by weapon types
- callbacks.Register("Draw", "Indicators", function()
- if not localplayer then
- return
- end -- if no local player stop/return here
- local act_wpn = localplayer:GetPropEntity("m_hActiveWeapon") -- get the current weapon of local player
- local act_gunid = act_wpn:GetWeaponID() -- check for weaponID of current weapon
- local act_guntype = act_wpn:GetWeaponType() -- check for the weapontypeID of current weapon
- -- filter weapongroups by weapontype IDs usage -- exclude full groups by weapontypeIDs, see ReturnList below
- local is_Utility = act_guntype == "0" or "9" or "7" or "11" or "nil" -- If current gears/items typeID matches one of those, it means
- if is_Utility then return end -- you are holding any kind of utility, so stop script and return again
- -- this is just an example of weapon IDs usage
- local hc = get("rbot.hitscan.accuracy." .. weaponIDlist[act_gunid] .. ".hitchance")
- local md = get("rbot.hitscan.accuracy." .. weaponIDlist[act_gunid] .. ".mindmg")
- draw.TextShadow(10, 555, "Hitchance of the " .. weaponIDlist[act_gunid] .. " is " .. hc)
- draw.TextShadow(10, 565, "MinDamage of the " .. weaponIDlist[act_gunid] .. " is " .. md)
- end)
- --[[####################################################################################################################--
- Weapontype IDs ReturnList - to exclude/filter full weapongroups from script by weapontype ids
- WEAPONTYPE_UNKNOWN = -1 | WEAPONTYPE_KNIFE = 0 | WEAPONTYPE_PISTOL = 1 | WEAPONTYPE_SUBMACHINEGUN = 2 | WEAPONTYPE_RIFLE = 3 | WEAPONTYPE_SHOTGUN = 4 |
- WEAPONTYPE_SNIPER_RIFLE = 5 | WEAPONTYPE_MACHINEGUN = 6 | WEAPONTYPE_C4 = 7 | WEAPONTYPE_TASER = 8 | WEAPONTYPE_GRENADE = 9 | WEAPONTYPE_HEALTHSHOT = 11
- --####################################################################################################################--]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement