brad Posted September 1, 2011 Posted September 1, 2011 mta hello friends I have come today with a question yaque change my race, which script or script you add to race_client for loading a moving image? as animation? Thanks! I'm new to lua
Neukfout Posted September 1, 2011 Posted September 1, 2011 I don't really understand you, are you asking how to put an animation in your race resource? If that's it, I don't think that's possible... Never seen it before in any server, though I'm not an expert.
Castillo Posted September 1, 2011 Posted September 1, 2011 It is possible, but you'll need some scripting knowledge, and many images to simulate a kind of GIF image.
NotAvailable Posted September 1, 2011 Posted September 1, 2011 You can experiment with Gamesnert's cinema resource
brad Posted September 1, 2011 Author Posted September 1, 2011 In the race clan server amg 1.1 is an example: it is a wheel that turns and my point is also simulate a gif image I have this script but do not know much about lua and nose is missing this is the case This script should play 32 images taken from a gif, please tell me if they know thanks! : D: D local index = 1 addEventHandler("onClientRender" , root , function ( ) dxDrawImage ( screenWidth/2 - 50, 0, 642, 204, , "imageName"..index..".png" ) index = index + 1 if index >= MaxFrame then index = 1 end end )
Castillo Posted September 1, 2011 Posted September 1, 2011 local index = 1 local MaxFrame = 32 addEventHandler("onClientRender" , root , function ( ) dxDrawImage ( screenWidth/2 - 50, 0, 642, 204, , "imageName"..index..".png" ) index = index + 1 if index >= MaxFrame then index = 1 end end )
Castillo Posted September 1, 2011 Posted September 1, 2011 I just added the variable MaxFrame = 32, you'd forgot about it.
brad Posted September 1, 2011 Author Posted September 1, 2011 I tried it and could not help me I will pass the resource to verify it? I'm noob in lua and sorry for bothering THANX
Castillo Posted September 1, 2011 Posted September 1, 2011 Ok, if you can post the whole resource it would be highly helpfull to us.
brad Posted September 1, 2011 Author Posted September 1, 2011 ok gracias this is the client.lua local index = 1 local MaxFrame = 11 addEventHandler("onClientRender" , root , function ( ) dxDrawImage ( screenWidth/2 - 50, 0, 642, 204, "nyancat/nyan"..index..".png" ) index = index + 1 if index >= MaxFrame then index = 1 end end ) this is the meta.xml "brad" description="nyan" info="mod" type="script"/> ying to PNG images contain fewer frames yaque nyan and this is a image of the folder (images)
Castillo Posted September 1, 2011 Posted September 1, 2011 You got missing a function there. local index = 1 local MaxFrame = 11 local screenWidth, screenHeight = guiGetScreenSize() addEventHandler("onClientRender" , root , function ( ) dxDrawImage ( screenWidth/2 - 50, 0, 642, 204, "nyancat/nyan"..index..".png" ) index = index + 1 if index >= MaxFrame then index = 1 end end )
brad Posted September 1, 2011 Author Posted September 1, 2011 thank you very much you helped me be your slave could finally Have a nice day greetings and thank you very much for your help thanks enverdad
brad Posted September 1, 2011 Author Posted September 1, 2011 sorry but now my question is the time I change the time of Media?
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