Jump to content

what can i do if i don't need skin, and i want to set normal color


Recommended Posts

Sorry if the script is long :D

local bindDegisken = false
local clientSkin = function(arac,id)
if id == 1 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/1.png")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 2 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/2.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 3 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/3.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 4 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/4.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 5 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/5.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 6 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/6.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 7 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/7.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 8 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/8.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 9 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/9.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 10 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/10.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 11 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/11.jpg")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
elseif id == 12 then
shader = dxCreateShader("skin.fx")
texture= dxCreateTexture("data/12.png")
dxSetShaderValue(shader, "Tex0", texture)
engineApplyShaderToWorldTexture(shader, "hunterbody8bit256a",arac)
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256",arac)
end
end
addEvent("skinUygula",true)
addEventHandler("skinUygula", root, clientSkin)
local kayitliSkinAktifEt = function()
triggerServerEvent("skinAktifServer", getLocalPlayer())
end
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        ruzgarGUI = guiCreateWindow(460, 163, 442, 392, "D~Force~ Jármű kinézet panel", false)
        guiWindowSetSizable(ruzgarGUI, false)

        combobox = guiCreateComboBox(10, 36, 422, 140, "", false, ruzgarGUI)
        for i=1,12 do
        guiComboBoxAddItem(combobox, "Skin "..i)
        end
        resim = guiCreateStaticImage(10, 81, 422, 300, "data/1.png", false, ruzgarGUI)
        centerWindow (ruzgarGUI)
        kayitliSkinAktifEt()
        guiSetVisible(ruzgarGUI, false)        
    end
)
function centerWindow (center_window)
    local screenW, screenH = guiGetScreenSize()
    local windowW, windowH = guiGetSize(center_window, false)
    local x, y = (screenW - windowW) /2,(screenH - windowH) /2
    return guiSetPosition(center_window, x, y, false)
end
local tik = function()
local i = guiComboBoxGetSelected(combobox)
local metin = guiComboBoxGetItemText(combobox,i)
if metin == "Skin 1" then
guiStaticImageLoadImage(resim, "data/1.png",1)
triggerServerEvent("skinUygulaServer", getLocalPlayer(),1)
elseif metin == "Skin 2" then
guiStaticImageLoadImage(resim, "data/2.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),2)
elseif metin == "Skin 3" then
guiStaticImageLoadImage(resim, "data/3.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),3)
elseif metin == "Skin 4" then
guiStaticImageLoadImage(resim, "data/4.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),4)
elseif metin == "Skin 5" then
guiStaticImageLoadImage(resim, "data/5.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),5)
elseif metin == "Skin 6" then
guiStaticImageLoadImage(resim, "data/6.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),6)
elseif metin == "Skin 7" then
guiStaticImageLoadImage(resim, "data/7.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),7)
elseif metin == "Skin 8" then
guiStaticImageLoadImage(resim, "data/8.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),8)
elseif metin == "Skin 9" then
guiStaticImageLoadImage(resim, "data/9.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),9)
elseif metin == "Skin 10" then
guiStaticImageLoadImage(resim, "data/10.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),10)
elseif metin == "Skin 11" then
guiStaticImageLoadImage(resim, "data/11.jpg")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),11)
elseif metin == "Skin 12" then
guiStaticImageLoadImage(resim, "data/12.png")
triggerServerEvent("skinUygulaServer", getLocalPlayer(),12)
end
end
addEventHandler("onClientGUIClick", root, tik)
local skinAyarlaOyunBaslayinca = function()
kayitliSkinAktifEt()
end
addEvent( "onClientMapStarting", true ) 
addEventHandler("onClientMapStarting", root, skinAyarlaOyunBaslayinca)
bindDegiskeniFunc = function()
if bindDegisken == false then
showCursor(true)
guiSetVisible(ruzgarGUI,true)
bindDegisken = true
elseif bindDegisken == true then
showCursor(false)
guiSetVisible(ruzgarGUI,false)
bindDegisken = false
end
end
local bindKontrol = function()
bindDegiskeniFunc()
end
bindKey("F2","down", bindKontrol)

 

Edited by Patrick
place code inside code-block
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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