Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local state = false
- local nstate = false
- local sx = 0
- bindKey("Key", "down", function()
- state = true
- nstate = 1
- end)
- bindKey("Key", "up", function()
- state = false
- nstate = 0
- end)
- addEventHandler("onClientRender", getRootElement(), function()
- if(nstate == 1) then
- if(sx < 100) then
- sx = sx+2
- end
- end
- if(nstate == 0) then
- if(sx > 0) then
- sx = sx-2
- end
- end
- local x, y = guiGetScreenSize()
- dxDrawImage(x/2, y-sx, "dateiname.png")
- end)
Advertisement
Add Comment
Please, Sign In to add comment