Jump to content

[DayZ] Animations


1LoL1

Recommended Posts

Hell, where i can fix this error? :(

When i take items with "-" this say.

TesT = My name.

ERROR: Client (TesT) triggered serverside event :~, but event is not added serverside

And please how to stop animation? :( my code is here :( :

local vehicleDataTableForTent = { 
  {"Wood Pile"},
  {"Bandage"},
  {
    "Bouteille"
  },
  {"Pasta Can"},
  {"Beans Can"},
  {"Burger"},
  {
    "Box of Matches"
  },
  {"M911 Mag"},
  {"M9 SD Mag"},
  {
    "Desert Eagle Mag"
  },
  {"M911"},
  {"M9 SD"},
  {
    "Winchester 1866"
  },
  {"PDW"},
  {
    "Hunting Knife"
  },
  {"Morphine"},
  {"Hatchet"},
  {"Pizza"},
  {
    "Soda Bottle"
  },
  {
    "Empty Gas Canister"
  },
  {
    "Full Gas Canister"
  },
  {"Roadflare"},
  {"Milk"},
  {"PDW Mag"},
  {"MP5A5 Mag"},
  {"AK Mag"},
  {"M4 Mag"},
  {"Tear Gas"},
  {"Grenade"},
  {
    "Desert Eagle"
  },
  {
    "Sawn-Off Shotgun"
  },
  {
    "SPAZ-12 Combat Shotgun"
  },
  {"MP5A5"},
  {"Watch"},
  {"Medic Kit"},
  {"Heat Pack"},
  {
    "Lee Enfield"
  },
  {"AK-47"},
  {"Blood Bag"},
  {"GPS"},
  {"Map"},
  {"Toolbox"},
  {"Wire Fence"},
  {"Tire"},
  {"Engine"},
  {"Tank Parts"},
  {"CZ 550 Mag"},
  {
    "Lee Enfield Mag"
  },
  {"M4"},
  {"CZ 550"},
  {"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"},
  {"2Rnd. Slug"},
  {
    "SPAZ-12 Pellet"
  },
  {
    "Assault Pack (ACU)"
  },
  {"Alice Pack"},
  {
    "Radio Device"
  },
  {
    "Coyote Backpack"
  },
  {
    "Czech Backpack"
  },
  {
    "Baseball Bat"
  },
  {"Shovel"},
  {"Golf Club"}
}
weaponAmmoTable = {
  ["M1911 Mag"] = {
    {"M1911", 22}
  },
  ["M9 SD Mag"] = {
    {"M9 SD", 23}
  },
  ["Desert Eagle Mag"] = {
    {
      "Desert Eagle",
      24
    }
  },
  ["PDW Mag"] = {
    {"PDW", 28}
  },
  ["MP5A5 Mag"] = {
    {"MP5A5", 29}
  },
  ["AK Mag"] = {
    {"AK-47", 30}
  },
  ["M4 Mag"] = {
    {"M4", 31}
  },
  ["1866 Slug"] = {
    {
      "Winchester 1866",
      25
    }
  },
  ["2Rnd. Slug"] = {
    {
      "Sawn-Off Shotgun",
      26
    }
  },
  ["SPAZ-12 Pellet"] = {
    {
      "SPAZ-12 Combat Shotgun",
      27
    }
  },
  ["CZ 550 Mag"] = {
    {"CZ 550", 34}
  },
  ["Lee Enfield Mag"] = {
    {
      "Lee Enfield",
      33
    }
  },
  ["M136 Rocket"] = {
    {
      "Heat-Seeking RPG",
      36
    },
    {
      "M136 Rocket Launcher",
      35
    }
  },
  ["others"] = {
    {"Parachute", 46},
    {"Satchel", 39},
    {"Tear Gas", 17},
    {"Grenade", 16},
    {"Hunting Knife", 4},
    {"Hatchet", 8},
    {"Binoculars", 43},
    {"Baseball Bat", 5},
    {"Shovel", 6},
    {"Golf Club", 2},
    {"Radio Device", 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["M1911 Mag"]) do
    if weaponName == weaponData[1] then
      return "M1911 Mag", weaponData[2]
    end
  end
  for i, weaponData in ipairs(weaponAmmoTable["M9 SD Mag"]) do
    if weaponName == weaponData[1] then
      return "M9 SD Mag", weaponData[2]
    end
  end
  for i, weaponData in ipairs(weaponAmmoTable["Desert Eagle Mag"]) do
    if weaponName == weaponData[1] then
      return "Desert Eagle Mag", weaponData[2]
    end
  end
  for i, weaponData in ipairs(weaponAmmoTable["PDW Mag"]) do
    if weaponName == weaponData[1] then
      return "PDW Mag", weaponData[2]
    end
  end
  for i, weaponData in ipairs(weaponAmmoTable["MP5A5 Mag"]) do
    if weaponName == weaponData[1] then
      return "MP5A5 Mag", weaponData[2]
    end
  end
  for i, weaponData in ipairs(weaponAmmoTable["AK Mag"]) do
    if weaponName == weaponData[1] then
      return "AK Mag", weaponData[2]
    end
 
Link to comment
Your server side script is missing.

Which animation do you want to stop? You can stop animation by putting:

setPedAnimation(source, false) 

For example, when I eat something and start the animation and then stops but now it is that animates and it does not stop vobec still is on

Link to comment
Your server side script is missing.

Which animation do you want to stop? You can stop animation by putting:

setPedAnimation(source, false) 

For example, when I eat something and start the animation and then stops but now it is that animates and it does not stop vobec still is on

If you want stop the animation you should use:

setPedAnimation(source, false) 

as says GTX

Link to comment
Your server side script is missing.

Which animation do you want to stop? You can stop animation by putting:

setPedAnimation(source, false) 

For example, when I eat something and start the animation and then stops but now it is that animates and it does not stop vobec still is on

If you want stop the animation you should use:

setPedAnimation(source, false) 

as says GTX

Yes, i want stop but on interval 5 sec. :(

Link to comment
  
setTimer(setPedAnimation, 5000, 1, source, false) 
  

Where this i must used? :D Can you please used in this post? :( only where is animations :(

Well, this is a example, with command /anim you do a dance animation and after 5 seconds you stop doing the animation.

  
function test (thePlayer) 
setPedAnimation ( thePlayer, "DANCING", "dnce_m_b") -- animation 
setTimer(setPedAnimation, 5000, 1, thePlayer, false) -- after 5 seconds the animation is false. 
end 
addCommandHandler("anim", test) 
  

Link to comment

As you ca see in your cide you have those lines:

setPedAnimation(player, "WUZI", "CS_Dead_Guy", nil, true, false, false, true) 

Replace nil from your code with -1 like this

setPedAnimation(player, "WUZI", "CS_Dead_Guy", -1, true, false, false, true) 

Link to comment
As you ca see in your cide you have those lines:
setPedAnimation(player, "WUZI", "CS_Dead_Guy", nil, true, false, false, true) 

Replace nil from your code with -1 like this

setPedAnimation(player, "WUZI", "CS_Dead_Guy", -1, true, false, false, true) 

Not work :(

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...