شوف
امتلمة من ويكي
SetTimer
function mainFunction()
outputChatBox ("Instant text!")
setTimer ( function()
outputChatBox ( "5 second delay text!" )
end, 5000, 1 )
end
mainFunction() --call function
===========
guiGridListClear
======
function clientsideResourceStart ()
-- Create the grid list element
local testList = guiCreateGridList ( 0.45, 0.45, 0.15, 0.15, true )
-- Create a column in the list and add 2 rows displaying "Hello" text and "world" text
local column = guiGridListAddColumn( testList, "test", 0.85 )
guiGridListSetItemText ( testList, guiGridListAddRow ( testList ), column, "Hello", false, false )
guiGridListSetItemText ( testList, guiGridListAddRow ( testList ), column, "World", false, false )
-- Set a timer to call the guiGridListClear function to clear the grid list items in 5 seconds
setTimer ( guiGridListClear, 5000, 1, testList )
end
addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart )