Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- weaponTable = {
- -- WeapName,WeapAmmo,WeapID,AmmoMag,Type,ModelID,Damage,AmmoOcSlots,AmmoModelID,SpawnLocationPercent{Residential,Industrial,Farm,Supermarket,Military},Description
- -- IDs disponíveis 1878-1882
- {"M4","M4 Mag",31,20,1,2726,3500,0.035,1271,{0,0,0,0,0},"ItemDesc"},
- {"CZ 550","CZ 550 Mag",34,5,1,2725,3500,0.035,1271,{0,0,0,0,0},"ItemDesc"},
- {"Winchester 1866","1866 Slug",25,7,1,2644,3500,0.035,1271,{0,0,0,0,0.06},"ItemDesc"},
- {"SPAZ-12 Combat Shotgun","SPAZ-12 Pellet",27,7,1,1950,2722,0.035,1271,{0,0,0,0,0.06},"ItemDesc"},
- {"Sawn-Off Shotgun","2Rnd. Slug",26,2,1,1314,2722,0.035,1271,{0,0,0,0,1.02},"ItemDesc"},
- {"AK-47","AK Mag",30,30,1,2832,3500,0.035,1271,{0,0,0,0,0},"ItemDesc"},
- {"Lee Enfield","Lee Enfield Mag",33,10,1,2833,3500,0.035,1271,{0,0,0,0,0.03},"ItemDesc"},
- {"M1911","M1911 Mag",22,7,1,2831,4500,0.035,1271,{0,0,0,0,1.04},"ItemDesc"},
- {"M9 SD","M9 SD Mag",23,15,1,1882,2835,0.035,1271,{0,0,0,0,1.04},"ItemDesc"},
- {"PDW","PDW Mag",28,30,1,14787,7700,0.1,2358,{0,0,0,0,0.5},"ItemDesc"},
- {"MP5A5","MP5A5 Mag",29,20,1,1875,8900,0.1,2358,{0,0,0,0,0.5},"ItemDesc"},
- {"Desert Eagle","Desert Eagle Mag",24,7,1,1272,8000,0.1,2358,{0,0,0,0,1.1},"ItemDesc"},
- {"Hunting Knife","others",4,0,1,1273,8200,0.1,2358,{0,0,0,0,2.1},"ItemDesc"},
- {"Golf Club","others",2,0,2,1852,1500,0,0,{3,2,4,3,2.1},"ItemDesc"},
- {"Baseball Bat","others",5,0,2,1855,800,0,0,{3,1.5,0,1.4,2.2},"ItemDesc"},
- {"Hatchet","others",8,0,2,1857,953,0,0,{3,1.5,0,1.9,3.4},"ItemDesc"},
- {"Shovel","others",6,0,2,1856,953,0,0,{3,1.5,0,0,2.1},"ItemDesc"}, -- NOT DAYZ WEAPON
- {"Grenade","others",16,0,3,342,17000,0,0,{0,0,0,0,2.1},"The Explosive Grenade is a explosive device that can be thrown. It is designed to eliminate big groups of hostiles"},
- {"Tear Gas","others",17,0,3,343,0,0,0,{0,0,0,0,2.1},"The Flashbang is a non-lethal explosive device used to temporarily disorient an enemy's senses"},
- {"Binoculars","others",43,0,3,367,0,0,0,{1,0,2,0,2.1},"The Binoculars is a hand-held device that can be used to view objects at a distance"},
- {"Parachute","others",46,0,3,371,0,0,0,{0,0,0,0,1.3},"ItemDesc"},
- {"Radio Device","others",1,0,1,1868,13000,0.1,2358,{0,0,0,0,1.7},"ItemDesc"},
- }
- function getAllWeapons(player)
- if not isElement(player) then
- player = getLocalPlayer()
- end
- for i,weaponData in pairs(weaponTable)do
- setElementData(player,weaponData[1],1)
- if weaponData[2] ~= "others" then
- setElementData(player,weaponData[2],100)
- end
- end
- end
- function isWeaponEquiped(weapType)
- for i,weaponData in pairs(weaponTable)do
- if getElementData(getLocalPlayer(),"currentweapon_"..weapType) == weaponData[1] then
- return true
- end
- end
- return false
- end
- function getWeaponAmmoType(weaponName)
- for i,weaponData in pairs(weaponTable)do
- if weaponName == weaponData[1] then
- if weaponData[2] == "others" then
- return weaponData[1],weaponData[3]
- else
- return weaponData[2],weaponData[3]
- end
- end
- end
- return false
- end
- function getDamageFromName(weapName)
- for i,weaponData in pairs(weaponTable)do
- if weaponData[1] == weapName then
- return weaponData[7]
- end
- end
- return false
- end
- function getAmmoPlus(ammo)
- for i,weaponData in pairs(weaponTable)do
- if weaponData[2] == ammo then
- return weaponData[4]
- end
- end
- return 1
- end
- function getWeaponDamage(weaponID,player)
- for i,weaponData in pairs(weaponTable)do
- local t,ID = getWeaponAmmoType(weaponData[1])
- if ID == weaponID and (getElementData(player,"currentweapon_1") == weaponData[1] or getElementData(player,"currentweapon_2") == weaponData[1] or getElementData(player,"currentweapon_3") == weaponData[1] or getElementData(player,"currentweapon_4") == weaponData[1]) then
- if getElementData(getLocalPlayer(),"humanity")== 5000 and(weaponData[5] == 4) then
- return weaponData[7] * 0.3
- end
- return weaponData[7]
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement