Cze??. Przed chwil? pr?bowa?em doj?? do tego, jak zrobi?, aby po 5 sekundach dxDrawRectangle znika?. Wiem, ?e to przy u?yciu setTimer, ale jak go poprawnie u?y??
kamison,AsaXx, chce znikaj?ce dxDrawRectangle, a nie zwyk?e gui wi?c do rendera musi doda? tak jak napisa?em getTickCount.
Okej, jeszcze nie ogarniam do ko?ca
W takim razie like that
screenX,screenY = guiGetScreenSize()
function startTheClock ()
if not systemUpTime then
systemUpTime = getTickCount () --Store the system tick count, this will be 0 for us
end
currentCount = getTickCount ()
if currentCount - systemUpTime <= 5000 then
dxDrawRectangle (screenX *.40, screenY * .09, 250, 50, tocolor(0,0,0,150))
dxDrawText ( currentCount - systemUpTime, screenX * .48, screenY * .1, screenX, screenY, tocolor(255,255,255), 2)
end
end
addEventHandler ( "onClientRender", root, startTheClock )
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach