Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function KeyBinds:CheckElement()
- local x, y, z = getElementPosition(localPlayer)
- local col = createColSphere(x, y, z, 4);
- attachElements(col, localPlayer);
- setElementDimension(col, getElementDimension(localPlayer));
- setElementInterior(col, getElementInterior(localPlayer));
- local x, y, z = getElementPosition(col)
- for index, object in pairs(getElementsWithinColShape(col, "object")) do
- outputChatBox(object)
- if(getElementModel(object) == 1581) then
- local index = tonumber(getElementData(object, "key_index"));
- if(index) then
- destroyElement(object);
- setElementData(doors.doors[index], "locked", false, false);
- end
- break;
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement