Jump to content

Problem with table and guiSetText


Michcio

Recommended Posts

This script change newslbl text only once. I have no idea why. Will someone help me?

Here's my code:

addEventHandler("onClientRender", root, 
    function() 
        dxDrawRectangle(x*0.3078125, 0, x*0.4203125, y*0.0390625, tocolor(24, 24, 24, 219), false) 
    end 
) 
  
newsy = { "Nowe forum serwera! [url=http://www.truckworld.ugu.pl]www.truckworld.ugu.pl[/url] <-- Zapraszamy!", "Nowa wersja serwera juz niebawem!", "Filmik autorstwa sebaziola został dodany na forum! Zapraszamy!" }  
index = 0 
  
function HandleTheRendering ( ) 
newslbl = guiCreateLabel(0.32, 0.00, 0.40, 0.03, "Nowe forum serwera! [url=http://www.truckworld.ugu.pl]www.truckworld.ugu.pl[/url] <-- Zapraszamy!", true) 
guiSetFont(newslbl, "default-bold-small") 
guiLabelSetColor(newslbl, 255, 0, 0) 
guiLabelSetHorizontalAlign(newslbl, "center", false) 
guiLabelSetVerticalAlign(newslbl, "center") 
setTimer(guiSetText,20000,0,newslbl,newsy[math.random(1,3)]) 
end 
  
addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) 

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