Jump to content

Filex

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Filex

  1. please refer the mta discord server script-help channel so we can have a more smooth conversation
  2. https://streamable.com/a1tl4z that's how it's supposed to work using your two images
  3. best thing to do is to store your images paths in a table and use a current index variable for example local currentImageIndex = 1 local myImages = { "path1.png", "path2.png" } and use dxDrawImage with the player Screen Width/Height ( guiGetScreenSize() ) to get the image on full screen, set your image to myImages[currentImageIndex] to set the image path with the current index in the table local screenW, screenH = guiGetScreenSize() function draw() dxDrawImage(0, 0, screenW, screenH, myImages[currentImageIndex]) end addEventHandler("onClientRender", getRootElement(), draw) in order for your image to change after a specific time use a timer to update the current index as following: local changeDuration = 2000 -- this will set my image to change every 2s function updateCurrentImageIndex() if ( currentImageIndex == #myImages) then return currentImageIndex = 1 end -- this is set to avoid having the index higher than the table count currentImageIndex = currentImageIndex + 1 end local myTimer = setTimer( updateCurrentImageIndex, changeDuration, 0) with this way your image will be changing every 2s and make sure to destroy the timer and remove the onClientRender event. please note this is just the concept of how i'd personally do it, try to replicate it your way, you can also possibly set a fade effect to make it look better
×
×
  • Create New...