Advertisement
Noneatme

Untitled

Nov 27th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.96 KB | None | 0 0
  1. ---------------------------------
  2. -- COPYRIGHT[C], NOVEMBER 2012 --
  3. ------- MADE BY NONEATME --------
  4. ---------------------------------
  5.  
  6. local cFunc = {}
  7. local cSetting = {}
  8.  
  9.  
  10. -- FUNCTIONS --
  11.  
  12.  
  13. cFunc["createExplosion"] = function(x, y, z)
  14.     local ob = {}
  15.     local rz = z
  16.     triggerClientEvent("playExploSound", getRootElement(), x, y, z)
  17.     local oldExplo = createExplosion(x, y, z, 5)
  18.     -- SCHWARZER RAUCH --
  19.         ob[1] = createObject(2054, x, y, z)
  20.         for i2 = 1, #ob, 1 do
  21.             if(isElement(ob[i2])) then
  22.                 setTimer(destroyElement, 3000, 1, ob[i2])
  23.                 setElementCollisionsEnabled(ob[i2], false)
  24.             end
  25.         end
  26.         ob = {}
  27.     -- EXPLOSION --
  28.     for i = 0, 5, 0.5 do
  29.         ob[1] = createObject(2013, x+i, y, z)
  30.         ob[2] = createObject(2013, x-i, y, z)
  31.         ob[3] = createObject(2013, x, y+i, z)
  32.         ob[4] = createObject(2013, x, y-i, z)
  33.         ob[5] = createObject(2013, x, y, z)
  34.         ob[6] = createObject(2013, x-i, y+i, z)
  35.         ob[7] = createObject(2013, x+i, y-i, z)
  36.         ob[8] = createObject(2013, x+i, y+i, z)
  37.         ob[9] = createObject(2013, x-i, y-i, z)
  38.        
  39.         ob[10] = createObject(2013, x+i, y, z+2)
  40.         ob[12] = createObject(2013, x-i, y, z+2)
  41.         ob[13] = createObject(2013, x, y+i, z+2)
  42.         ob[14] = createObject(2013, x, y-i, z+2)
  43.    
  44.         ob[15] = createObject(2013, x, y, z+4)
  45.         for i2 = 1, #ob, 1 do
  46.             if(isElement(ob[i2])) then
  47.                 setTimer(destroyElement, 1005, 1, ob[i2])
  48.                 setElementCollisionsEnabled(ob[i2], false)
  49.             end
  50.         end
  51.         ob = {}
  52.     end
  53.     -- RAUCH --
  54.     setTimer(function()
  55.         for i = 0, 5, 0.5 do
  56.             local id = 2011
  57.             z = z+0.1
  58.             ob[1] = createObject(id, x+i, y, z)
  59.             ob[2] = createObject(id, x-i, y, z)
  60.             ob[3] = createObject(id, x, y+i, z)
  61.             ob[4] = createObject(id, x, y-i, z)
  62.  
  63.             for i2 = 1, #ob, 1 do
  64.                 if(isElement(ob[i2])) then
  65.                     setTimer(destroyElement, 1004, 1, ob[i2])
  66.                     setElementCollisionsEnabled(ob[i2], false)
  67.                 end
  68.             end
  69.             ob = {}
  70.         end
  71.    
  72.     end, 200, 1)
  73.     -- FUNKTEN --
  74.     setTimer(function()
  75.         local id = 2059
  76.         z = z+0.1
  77.         ob[1] = createObject(id, x-2, y+4, z)
  78.         ob[2] = createObject(id, x+2, y-4, z)
  79.         ob[3] = createObject(id, x+4, y-2, z)
  80.         ob[4] = createObject(id, x-4, y+2, z)
  81.         for i2 = 1, #ob, 1 do
  82.             if(isElement(ob[i2])) then
  83.                 setTimer(destroyElement, 1003, 1, ob[i2])
  84.                 setElementCollisionsEnabled(ob[i2], false)
  85.             end
  86.         end
  87.         ob = {}
  88.        
  89.     end, 50, 1)
  90.     -- RAUCHBETT --
  91.    
  92.         local id = 2075
  93.         z = rz
  94.         ob[1] = createObject(id, x, y-1, z)
  95.         ob[2] = createObject(id, x, y-2, z)
  96.         ob[3] = createObject(id, x, y+1, z)
  97.         ob[4] = createObject(id, x, y+2, z)
  98.         for i2 = 1, #ob, 1 do
  99.             if(isElement(ob[i2])) then
  100.                 setTimer(destroyElement, 2000, 1, ob[i2])
  101.                 setElementCollisionsEnabled(ob[i2], false)
  102.             end
  103.         end
  104.    
  105.     for index, obj in pairs(ob) do
  106.         setElementCollisionsEnabled(obj, false)
  107.     end
  108. end
  109.  
  110.  
  111.  
  112.  
  113. addCommandHandler("expo", function(thePlayer, cmd, x, y, z)
  114.     if(x) then
  115.         cFunc["createExplosion"](x, y, z)
  116.     else
  117.         cFunc["createExplosion"](getElementPosition(thePlayer))
  118.     end
  119. end)
  120.  
  121. -- EVENT HANDLERS --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement