DgsDetachFromAutoDestroy
Jump to navigation
Jump to search
This function allows you to detach element from dgsElement
Syntax
bool dgsDetachFromAutoDestroy(element, dgsElement)
Required Arguments
- element: Element you want to detach attached dgsElement
- dgsElement: dgsElement you want to detach attached element
Returns
Returns element detached from dgsElement
Example
This example create a vehicle attached to window, then detach and destroy only window
DGS = exports.dgs local window = dgsCreateWindow(200,200,200,200,"test",false) local vehicle = createVehicle(411,0,0,3) dgsAttachToAutoDestroy(vehicle,window) setTimer(function() dgsDetachFromAutoDestroy(vehicle, window) -- detach vehicle from window destroyElement(window) -- destroy only window end,2000,1)