Advertisement
Noneatme

Untitled

Jul 2nd, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1.  
  2. function KeyBinds:CheckElement()
  3.     local x, y, z = getElementPosition(localPlayer)
  4.    
  5.     local col = createColSphere(x, y, z, 10);
  6.    
  7.     attachElements(col, localPlayer);
  8.    
  9.     setElementDimension(col, getElementDimension(localPlayer));
  10.     setElementInterior(col, getElementInterior(localPlayer));  
  11.    
  12.  
  13.     outputChatBox(tostring(col)..", "..tostring(x)..", "..tostring(y)..", "..tostring(z))
  14.    
  15.    
  16.     for index, object in pairs(getElementsWithinColShape(col, "object")) do
  17.         outputChatBox(object)
  18.         if(getElementModel(object) == 1581) then
  19.             local index = tonumber(getElementData(object, "key_index"));
  20.            
  21.             if(index) then
  22.                 destroyElement(object);
  23.                 setElementData(doors.doors[index], "locked", false, false);
  24.             end
  25.             break;
  26.         end
  27.     end
  28.    
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement