Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pflanzen = {}
- -- Beim Erstellen --
- function createPflanze()
- local objekt = createObject(...) -- Die Pflanze
- local col = createColRectangle(x, y, 3, 3) -- Die Colshape
- attachElements(col, objekt) -- Colshape an Objekt attachen
- pflanzen[col] = objekt -- Verbinde Colshape mit dem Objekt
- addEventHandler("onClientColShapeHit", col, function(thePlayer)
- if(thePlayer == localPlayer) then
- destroyElement(pflanzen[source]) -- Zerstoert die Pflanze des Colshapes
- destroyElement(source) -- Zerstoert die Colshape
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement