function nazwa()
local shader, tec = dxCreateShader ( "roadshine.fx" )
if not shader then
else
outputChatBox( "Using technique " .. tec )
engineApplyShaderToWorldTexture ( shader, "*" )
end
end
addEventHandler ("onClientResourceStart", resourceRoot,nazwa)
nie mo?esz jednocze?nie zaczyna? od addEventHandlera i deklarowa? nazwy funkcji.
function nazwa()
local shader, tec = dxCreateShader ( "roadshine.fx" )
if not shader then
else
engineApplyShaderToWorldTexture ( shader, "*" )
end
end
addEventHandler ("onClientResourceStart", resourceRoot,nazwa)
function wylaczauta1()
engineRemoveShaderFromWorldTexture (shader, "*" )
destroyElement(shader)
autoshader=nil
end
Tutaj jest jak checkbox oznaczony jest to dzia?a shader a jak nie jesto to nie dzia?a :
addEventHandler ( "onClientGUIClick",root,
function()
if source==GUIEditor.checkbox[2] then
if guiCheckBoxGetSelected(GUIEditor.checkbox[2])==true then
nazwa()
elseif guiCheckBoxGetSelected(GUIEditor.checkbox[2])==false then
wylaczauta1()
end
end
end)
Co zrobi? by dzia?a?o bo si? m?cz? troch? z tym ju?
shader, tec = nil
function nazwa()
local shader, tec = dxCreateShader ( "roadshine.fx" )
if not shader then
else
engineApplyShaderToWorldTexture ( shader, "*" )
end
end
addEventHandler ("onClientResourceStart", resourceRoot,nazwa)
function wylaczauta1()
if shader then
engineRemoveShaderFromWorldTexture (shader, "*" )
destroyElement(shader)
autoshader=nil
end
end
addEventHandler ( "onClientGUIClick",root,
function()
if source == GUIEditor.checkbox[2] then
if guiCheckBoxGetSelected(GUIEditor.checkbox[2]) then
nazwa()
else
wylaczauta1()
end
end
end)
shader, tec = nil
function nazwa()
local shader, tec = dxCreateShader ( "roadshine.fx" )
if engineApplyShaderToWorldTexture ( shader, "*" ) then return true end
return false
end
function wylaczauta1()
if shader then
engineRemoveShaderFromWorldTexture (shader, "*" )
destroyElement(shader)
shader = nil
return true
end
return false
end
addEventHandler ( "onClientGUIClick",root,
function()
if source == GUIEditor.checkbox[2] then
if guiCheckBoxGetSelected(source) then
if nazwa() then
outputChatBox("daje shader")
end
else
if wylaczauta1() then
outputChatBox("usuwa shader")
end
end
end
end)
jak to nie podzia?a to nie wiem
Ostatnio zmieniony przez _Haze 2017-02-04, 21:13, w całości zmieniany 1 raz
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach