local shader
signTep = { }
signFirstTick = getTickCount ( )
signId1 = 1
addEventHandler( "onClientResourceStart", resourceRoot,
function()
shader, tec = dxCreateShader ( "texreplace.fx" )
if not shader then
outputChatBox( "Could not create shader. Please use debugscript 3" )
else
engineApplyShaderToWorldTexture ( shader, "heat_02" )
if not loadPrutTextures ( ) then
outputChatBox ( "Loading sign textures failed")
destroyElement ( shader )
return
end
dxSetShaderValue ( shader, "gTexture", signTep[1] )
addEventHandler ( "onClientHUDRender", getRootElement (), renderAap )
end
end
)
function loadPrutTextures ( )
for i = 0, 3 do
local tex = dxCreateTexture ( "stopbord/left/lframe"..i..".png" )
if not tex then
unloadPrutTextures ( )
return false
end
table.insert ( signTep, tex )
end
return true
end
function unloadPrutTextures ( )
for index, tex in ipairs ( signTep ) do
destroyElement ( tex )
end
end
function renderAap ( )
if getTickCount ( ) - signFirstTick < 100 then
return
end
signId1 = signId1 + 1
if signId1 > #signTep then
signId1 = signId1 - #signTep
end
dxSetShaderValue ( shader, "gTexture", signTep [ signId1 ] )
signFirstTick = getTickCount ( )
end
Replies to Untitled
Title |
Name |
Language |
When |
Re: Untitled |
Stained Cat |
lua |
11 Years ago. |
{"text":"text","html5":"html","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"lua","bash":"sh","erlang":"erlang","go":"golang","c":"c_cpp","cpp":"c_cpp","diff":"diff","latex":"latex","sql":"sql","xml":"xml","0":"text","abap":"abap","actionscript":"actionscript","actionscript3":"actionscript","ada":"ada","apache":"apache_conf","applescript":"applescript","asm":"assembly_x86","autohotkey":"autohotkey","closure":"closure","cobol":"cobol","coffeescript":"coffee","cpp-winapi":"c_cpp","c_loadrunner":"c_cpp","c_mac":"c_cpp","c_winapi":"c_cpp","csharp":"csharp","d":"d","dart":"dart","dot":"dot","eiffel":"eiffel","fortran":"fortran","groovy":"groovy","haskell":"haskell","haxe":"haxe","ini":"ini","io":"io","java":"java","java5":"java","make":"makefile","matlab":"matlab","mysql":"mysql","objc":"objectivec","ocaml":"ocaml","pascal":"pascal","perl":"perl","perl6":"perl","postgresql":"pgsql","powershell":"powershell","prolog":"prolog","properties":"properties","rails":"ruby","rust":"rust","scala":"scala","scheme":"scheme","smarty":"smarty","tcl":"tcl","vala":"vala","vb":"vbscript","verilog":"verilog","vhdl":"vhdl","yaml":"yaml"}