Jump to content

NEED HELP


s1mple

Recommended Posts

in this i have problem: local ammoData,weapID = getWeaponAmmoType (weaponName)

if getElementData(source,ammoData) <= 1 then triggerClientEvent (source, "displayClientInfo", source,"Rearm",shownInfos["nomag"],255,22,0) return end

setElementData(source,"currentweapon_"..slot,weaponName)

Link to comment
he don't ecuip my weapon!

Try this:

local ammoData,weapID = getWeaponAmmoType (weaponName) 
if getElementData(source,ammoData) <= 0 then triggerClientEvent (source, "displayClientInfo", source,"Rearm",shownInfos["nomag"],255,22,0) return end 
setElementData(source,"currentweapon_"..slot,weaponName) 

Link to comment
local vehicleDataTableForTent = { 
{"Wood Pile"},
{"Bandage"},
{"Water Bottle"},
{"Pasta Can"},
{"Beans Can"},
{"Burger"},
{"Box of Matches"},
{"M911 Mag"},
{"Pistol Ammo"},
{"Pistol Ammo"},
{"M911"},
{"Silenced Pistol"},
{"Shotgun"},
{"Uzi"},
{"Knife"},
{"Morphine"},
{"Katana"},
{"Pizza"},
{"Soda Bottle"},
{"Empty Gas Canister"},
{"Full Gas Canister"},
{"Roadflare"},
{"Milk"},
{"Smg Ammo"},
{"Smg Ammo"},
{"Assault Ammo"},
{"Assault Ammo"},
{"Tear Gas"},
{"Grenade"},
{"Desert Eagle"},
{"Sawn-Off Shotgun"},
{"SPAZ-12 Combat Shotgun"},
{"MP5"},
{"Watch"},
{"Medic Kit"},
{"Heat Pack"},
{"Country Rifle"},
--{"TEC-9"},
{"AK-47"},
--{"Rocket Ammo Launcher"},
{"Blood Bag"},
{"GPS"},
{"Map"},
{"Toolbox"},
{"Wire Fence"},
{"Tire"},
{"Engine"},
--{"Rocket Ammo"},
{"Sniper Ammo"},
{"Sniper Ammo"},
{"M4"},
{"Sniper Rifle"},
--{"Heat-Seeking RPG"},
{"Satchel"},
{"Infrared Goggles"},
{"Night Vision Goggles"},
{"Tent"},
{"Raw Meat"},
{"Cooked Meat"},
{"Camouflage Clothing"},
{"Ghillie Suit"},
{"Civilian Clothing"},
{"Survivor Clothing"},
{"Painkiller"},
{"Binoculars"},
{"Empty Water Bottle"},
{"Empty Soda Cans"},
{"Scruffy Burgers"},
{"1866 Slug"},
{"Shotgun Ammo"},
{"Shotgun Ammo"},
{"Assault Pack (ACU)"},
{"Alice Pack"},
{"Radio Device"},
{"Coyote Backpack"},
{"Czech Backpack"},
--{"Thermal GPS"},
--{"GPS Jammer"},
{"Baseball Bat"},
{"Shovel"},
{"Golf Club"},
--[[
{"Diary, Page 1"},
{"Diary, Page 2"},
{"Diary, Page 3"},
{"Diary, Page 4"},
{"Diary, Page 5"},
{"Diary, Page 6"},
{"Diary, Page 7"},
{"Diary, Page 8"},
{"Small Note 1"},
{"Small Note 2"},
{"Small Note 3"},
{"Research Report 1"},
{"Research Report 2"},
{"Letter to Mum"},
]]
}
 
weaponAmmoTable = {
 
["Pistol Ammo"] = {
{"Pistol",22},
{"Silenced Pistol",23},
{"Desert Eagle",24},
},
 
 
 
["Pistol Ammo"] = {
{"Pistol",22},
},
 
["Pistol Ammo"] = {
{"Silenced Pistol",23},
},
 
["Pistol Ammo"] = {
{"Desert Eagle",24},
},
 
 
 
["Smg Ammo"] = {
{"Uzi",28},
{"TEC-9",32},
{"MP5",29},
},
 
 
 
["Smg Ammo"] = {
{"Uzi",28},
},
 
["Smg Ammo"] = {
{"MP5",29},
},
 
 
["Assault Ammo"] = {
{"AK-47",30},
{"M4",31},
},
 
 
 
["Assault Ammo"] = {
{"AK-47",30},
},
 
["Assault Ammo"] = {
{"M4",31},
},
 
 
 
["Shotgun Ammo"] = {
{"Shotgun",25},
{"Sawn-Off Shotgun",26},
{"SPAZ-12 Combat Shotgun",27},
},
 
 
["1866 Slug"] = {
{"Shotgun",25},
},
 
["Shotgun Ammo"] = {
{"Sawn-Off Shotgun",26},
},
 
["Shotgun Ammo"] = {
{"SPAZ-12 Combat Shotgun",27},
},
 
 
 
["Sniper Ammo"] = {
{"Country Rifle",33},
{"Sniper Rifle",34},
},
 
 
["Sniper Ammo"] = {
{"Sniper Rifle",34},
},
 
["Sniper Ammo"] = {
{"Country Rifle",33},
},
 
 
 
["Rocket Ammo"] = {
{"Heat-Seeking RPG",36},
{"Rocket Launcher",35},
},
 
 
 
["Rocket Ammo"] = {
{"Heat-Seeking RPG",36},
{"Rocket Ammo Launcher",35},
},
 
 
["others"] = {
{"Parachute",46},
{"Satchel",39},
{"Tear Gas",17},
{"Grenade",16},
{"Knife",4},
{"Katana",8},
{"Binoculars",43},
{"Baseball Bat",5},
{"Shovel",6},
{"Golf Club",2},
{"Radio Device",1},
--[[
{"Diary, Page 1",1},
{"Diary, Page 2",1},
{"Diary, Page 3",1},
{"Diary, Page 4",1},
{"Diary, Page 5",1},
{"Diary, Page 6",1},
{"Diary, Page 7",1},
{"Diary, Page 8",1},
{"Small Note 1",1},
{"Small Note 2",1},
{"Small Note 3",1},
{"Research Report 1",1},
{"Research Report 2",1},
{"Letter to Mum",1},
]]
},
}
 
function getWeaponAmmoType (weaponName,notOthers)
if not notOthers then
    for i,weaponData in ipairs(weaponAmmoTable["others"]) do
        if weaponName == weaponData[1] then
            return weaponData[1],weaponData[2]
        end
    end
end 
    for i,weaponData in ipairs(weaponAmmoTable["Pistol Ammo"]) do
        if weaponName == weaponData[1] then
            return "Pistol Ammo",weaponData[2]
        end
   
Link to comment
HOW TO FIX IT? ITS IN THIS SCRIPT

What's wrong with it? and open new topic if you have new problem

By the way ,it's not your script , it's vave dayz server's script

  
{"website","what","","The URL is: [url=http://www.community.vavegames.net]http://www.community.vavegames.net[/url].}, 
 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...