Jump to content

Loading map image animation!!


brad

Recommended Posts

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 ) 

Link to comment

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

Link to comment

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 ) 

Link to comment

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...