Jump to content

MTA DayZ pickups.lua


Recommended Posts

Witam,

wziąłem się ostatnio za edycje gamemoda DayZ i napotkałem "problem" w pliku pickups.lua. Jest tam podana jedna wartosc która nie wiem co definuje, i tutaj pojawia się moje pytanie, czy mógłby mi to ktoś wytłumaczyc.

{

"Wood Pile",

1463,

0.4,

0,

13

Chodzi mi to tę podkreśloną wartość.

PS. O ile strona tego nie zabrania moge wstawic cały plik

Link to comment
  • 6 months later...

Poszukałem w kodzie DayZ, jest to chyba wystepowanie itemu tu masz kod z pickups.lua,

item[5] to ta wartosc o ktora ci chodzi

  
function createItemLoot(lootPlace, x, y, z, id) 
  col = createColSphere(x, y, z, 1.25) 
  setElementData(col, "itemloot", true) 
  setElementData(col, "parent", lootPlace) 
  setElementData(col, "MAX_Slots", 12) 
  for i, item in ipairs(itemTable[lootPlace]) do 
    local value = math.percentChance(item[5], math.random(1, 2)) 
    setElementData(col, item[1], value) 
    local ammoData, weapID = getWeaponAmmoType(item[1], true) 
    if ammoData and value > 0 then 
      setElementData(col, ammoData, math.random(1, 2)) 
    end 
  end 
  refreshItemLoot(col, lootPlace) 
  return col 
end 
  

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