[STM]Metalhero Posted May 30, 2010 Posted May 30, 2010 function showClientImage() k1=guiCreateStaticImage( 0, 544, 500, 100, "winner.png", false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) move1_1 () end addEventHandler ( "onResourceStart", getRootElement(), recourse_says_hai ) function move1_1 () moveObject ( k1, 5000, 780, 544, ) setTimer ( move1_2, 5000, 1 ) end i want that the image fly from right to left why it dont work
dzek (varez) Posted May 30, 2010 Posted May 30, 2010 image is not an object! its gui element.. you have no idea about it.. re-read everything Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
kevin11 Posted May 30, 2010 Posted May 30, 2010 edit a billboard with youre image and everything will be ok : ) also like varez said its gui element nog createobject
dzek (varez) Posted May 31, 2010 Posted May 31, 2010 billboard, lol, he wants a gui element, not object.. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Jason_Gregory Posted June 2, 2010 Posted June 2, 2010 I hope i can You should use DirectX Pictures because its difficult moving GUI Images. This example should work. And btw. you should work with guiSetPosition instead of setElementPosition /movepic local k1= {} k1["xPos"] = 0 -- Startposition of the Picture k1["EventAdded"] = 0 k1["Picspeed"] = 1 -- The Speed of the Moving Picture k1["Picture"] = "winner.png" -- Filename k1["screenWidth"], k1["screenHeight"] = guiGetScreenSize() function moveClientImage(filename) if k1["EventAdded"] == 0 then addEventHandler ( "onClientRender", getRootElement(), moveClientImage ) k1["EventAdded"] = 1 end k1["xPos"] = k1["xPos"] + k1["Picspeed"] k1["image"] = dxDrawImage( k1["xPos"], 544, 500, 100, filename ) if k1["xPos"] > k1["screenWidth"] then k1["xPos"] = 0 k1["EventAdded"] = 0 removeEventHandler ( "onClientRender", getRootElement(), moveClientImage ) end end function cmdMoveClientImage(cmd, speed) if speed then if tonumber(speed) > 0 then k1["Picspeed"] = tonumber(speed) else return outputChatBox("Please use a Speed over 0. Syntax: /movepic ") end end outputChatBox("Moving Picture '"..k1["Picture"].."' with "..speed.."/Frame per Second !") moveClientImage(k1["Picture"]) end addCommandHandler("movepic", cmdMoveClientImage) edit a billboard with youre image and everything will be ok : ) kevin11 stop talking bull sh it you f*cking nolifer Contact me if you need a Website / Signature ↑ / Mapuploadsystem (HTML5, JS, PHP, ASP.NET, MySQL / Sybase)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now