Jump to content

Banner Help


Machine

Recommended Posts

Posted

hello i wanna to creat banner that show and hide from

GUIEditor_Window = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(800,124,96,48,"",false) 
  
GUIEditor_Window[2] = guiCreateWindow(569,134,231,450,"",false) 
GUIEditor_Image[1] = guiCreateStaticImage(9,43,193,145,"images/mtalogo.png",false,GUIEditor_Window[2]) 
GUIEditor_Image[2] = guiCreateStaticImage(29,236,193,164,"images/mtalogo.png",false,GUIEditor_Window[2]) 
  
  
  

how i make it show and hide from it self

like automatic

pls really need help

i wanna it show and hide from the right side

Posted

What i mean by show and hide

is it shaw for 1 sec and hide1 sec

its banner man

like what you see in news

some thing come from left or right and then go hide again?

Posted (edited)
GUIEditor_Window = {} 
GUIEditor_Image = {} 
  
GUIEditor_Window[1] = guiCreateWindow(800,124,96,48,"",false) 
GUIEditor_Window[2] = guiCreateWindow(569,134,231,450,"",false) 
GUIEditor_Image[1] = guiCreateStaticImage(9,43,193,145,"images/mtalogo.png",false,GUIEditor_Window[2]) 
GUIEditor_Image[2] = guiCreateStaticImage(29,236,193,164,"images/mtalogo.png",false,GUIEditor_Window[2]) 
  
function blinkElement(element) 
    setTimer(function () 
        guiSetVisible(element, not guiGetVisible(element)) 
    end, 500, 0) 
end 
blinkElement(GUIEditor_Window[1]) 
blinkElement(GUIEditor_Window[2]) 

Edited by Guest
Posted

getfile.php?id=90926&a=1c15cf1a374bea7432f6d221520ccdf7&t=4e33225c&o=E987E1D37CC352357E604C31D5C5266EE09FB6DA61C64C2A7F0F106F9ED95F12F49BF8D37C&n=picutre.png&i=1

it work but its dont hide its stay like this

man i wanna it set time for hiding

so it show sec and hide sec show sec and hide sec

hide sec means make it invisble

and show mean visible

  • MTA Team
Posted
  
col = {} 
col.black = tocolor(0,0,0,200) 
col.npctitle = tocolor(142,196,131,255) 
  
newsMsg = { 
"Welcome to XtremeRoleplay (0.1a)!", 
"right mouse hold = rotate camera, scroll = zoom.", 
"This server has been built upon the LineageII gamemode that never released and was developed by Aibo." 
} 
text = newsMsg[1] 
  
local start = getTickCount() 
function drawInfoBox() 
  --[[dxDrawRectangle(0,sh-24,sw,sh,col.black) 
  dxDrawText(test, 10,sh-20,sw,sh,col.npctitle, 1,"default")]] 
   
  local now = getTickCount() 
  local time = now - start 
  local scale = 0.6 
  local font = "bankgothic" 
  local duration = 30000 
  local width = dxGetTextWidth(text, scale, font) 
  
  dxDrawRectangle(0, sh-24, sw, sh, col.black) 
  
  if time > duration then 
    start = now 
  
    text = newsMsg[math.random(1, table.getn(newsMsg))] 
  end 
  
  dxDrawText(text, math.mod(time, duration) / duration * (sw + width) - width, sh-20, sw, sh, col.npctitle, scale, font) 
end 
  
addEventHandler("onClientPreRender", drawInfoBox) 

This script is NOT stolen from Jesseunit's Fallout Roleplay, this script was scripted by The_GTA and Jesseunit, this script is an open script. Portion taken from LineageII by Aibo (the colours part)

It will be very easy to edit to make it show an image, try it yourself.

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