JUNIORCEDE1

Untitled

Apr 11th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.63 KB | None | 0 0
  1. ----Lista de items
  2. itemTableSoldZombies = {
  3.     Armas={
  4.         {"AA-12",1,"Cargador de AA-12",25},
  5.         {"ACR",1,"Cargador de ACR",25},
  6.         {"AK-47 ASIIMOV",1,"Cargador de AK",25},
  7.         {"AK-74",1,"Cargador de AK",25},
  8.         {"AK-74 GP-25",1,"Cargador de AK",25},
  9.         {"AK-107",1,"Cargador de AK",25},
  10.         {"AKM",1,"Cargador de AKM",25},
  11.         {"AKS",1,"Cargador de AK",25},
  12.         {"AKS-74 Kobra",1,"Cargador de AK",25},
  13.         {"AKS Gold",1,"Cargador de AK",25},
  14.         {"G36K",1,"Cargador de G36",25},
  15.         {"M4A1",1,"Cargador STANAG",25},
  16.         {"M4A1 CCO",1,"Cargador STANAG",25},
  17.         {"M4A1 CCO SD",1,"Cargador STANAG SD",25},
  18.         {"M4A3 CCO",1,"Cargador STANAG",25},
  19.         {"AS50",1,"Cargador de AS50",25},
  20.         {"DMR",1,"Cargador de DMR",25},
  21.         {"M107",1,"Cargador de M107",25},
  22.         {"SVD Camo",1,"Cargador de SVD",25},
  23.         {"PKM",1,"Cargador de PKM",25},
  24.         {"PKP",1,"Cargador de PKM",25},
  25.         {"G17",1,"Cargador de G17",25},
  26.         {"M9",1,"Cargador de M9",25},
  27.         {"M1911",1,"Cargador de M1911",25},
  28.         {"MP5A5",1,"Cargador de MP5A5",25},
  29.         {"MP5SD6",1,"Cargador de MP5 SD",25},
  30.     },
  31.     Items = {
  32.         {"Gas lacrimogeno",2},
  33.         {"Granada",2},
  34.         {"Binoculares",2},
  35.         {"Cuchillo",1},
  36.         {"Hacha",1},
  37.         {"Machete",1},
  38.         {"Palanca",1},
  39.         {"Botella de agua",2},
  40.         {"Pasta enlatada",2},
  41.         {"Frijoles enlatados",2},
  42.         {"Carne cocida",2},
  43.         {"Madera",2},
  44.         {"Vendaje",2},
  45.         {"Bengala",2},
  46.         {"Botiquin",2},
  47.         {"Bolsa termica",2},
  48.         {"Analgésicos",2},
  49.         {"Morfina",2},
  50.         {"Bolsa de sangre",1},
  51.         {"Valla de alambre",1},    
  52.         {"Traje de superviviente",1},
  53.         {"Traje Militar",1},
  54.         {"Traje Civil",1},
  55.         {"Traje Camuflaje",1},
  56.         {"Traje Policial",1},
  57.         {"Mochila Alice",1},
  58.         {"Mochila de asalto",1},
  59.         {"Mochila Coyote",1},
  60.         {"Mochila Czech",1},
  61.         {"Mochila Gamespot",1},
  62.         {"Mochila militar",1},
  63.         {"Lentes de visión nocturna",1},
  64.         {"Lentes infrarrojos",1},
  65.         {"Mapa",1},
  66.         {"Caja de cerillas",2},
  67.         {"Reloj",2},
  68.         {"GPS",2},
  69.         {"Caja de herramientas",2},
  70.     }
  71. }
  72.  
  73. ---Cuando los zombies mueren sucede esto:
  74. repetidos = {}
  75.     rand = math.random(100)
  76.     if (rand < 17) then
  77.         num  = math.random(#itemTableSoldZombies.Armas)
  78.         local v = itemTableSoldZombies.Armas[num]
  79.         setElementData(pedCol, v[1], v[2])
  80.         if(v[3] and v[4])then
  81.             setElementData(pedCol, v[3], v[4])
  82.         end
  83.         for i=1,3 do
  84.             num  = math.random(#itemTableSoldZombies.Items)
  85.             while(repetidos[num]) do
  86.                 num  = math.random(#itemTableSoldZombies.Items)
  87.             end
  88.             repetidos[num] = true
  89.             local v = itemTableSoldZombies.Items[num]
  90.             setElementData(pedCol, v[1], v[2])
  91.             if(v[3] and v[4])then
  92.                 setElementData(pedCol, v[3], v[4])
  93.             end
  94.         end
  95.     end
  96.     if (rand <= 40) then
  97.         setElementData(pedCol,'Carne cruda',1)
  98.     end
Advertisement
Add Comment
Please, Sign In to add comment