Jump to content

How to remove dxCreateShade?


Frost.DEV

Recommended Posts

Hello i creating a skin weapon system but dont working to removing a skin dont send debugscript 3 nothing just dont deleting skin

 

my code: 
(obs: i calling all into server side he can see my skin but can't take this skin just me)

spacer.png
```

local engineSET = {}
 
function SetarSkinAK(localPlayer)
 
    engineSET[localPlayer] = {}
    engineSET[localPlayer][1] = dxCreateShader("texturechanger.fx", 0, 100, false, "ped")
    engineSET[localPlayer][2] = dxCreateTexture("files/ak1.png")
           
    if engineSET[localPlayer][1] and engineSET[localPlayer][2] then
        dxSetShaderValue(engineSET[localPlayer][1], "TEXTURE", engineSET[localPlayer][2])
        engineApplyShaderToWorldTexture(engineSET[localPlayer][1], "T1", localPlayer)
    end
end
addEvent( "DarSkin", true)
addEventHandler("DarSkin", getRootElement(), SetarSkinAK)
 
function RemoverSkin(localPlayer)
    destroyElement(engineSET[localPlayer][1])
    destroyElement(engineSET[localPlayer][2])
    engineSET[localPlayer] = nil
end
addEvent( "DelSkin", true)
addEventHandler("DelSkin", getRootElement(), RemoverSkin)

```

Link to comment
  • Tut locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...