Jump to content

Loading map image animation!!


brad

Recommended Posts

Posted

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!

xD I'm new to lua

:D

Posted

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.

Posted

It is possible, but you'll need some scripting knowledge, and many images to simulate a kind of GIF image.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 xD 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 ) 

Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I just added the variable MaxFrame = 32, you'd forgot about it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

:D:D

THANX

Posted

Ok, if you can post the whole resource it would be highly helpfull to us.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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)

sinttulolfm.png

Posted

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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

mtascreen20110831234851.png

thank you very much you helped me be your slave could finally xD

Have a nice day greetings and thank you very much for your help thanks enverdad

:D:D:D:D:D:lol:

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...