Wysłany: 2016-02-17, 19:58
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
Mam proble, mam kod: function sendError ( msg )
if ( not guiGetVisible ( window ) ) then
dxDrawText ( "B??D" , pX + 200 , pY + 270 , 506 , 368 , tocolor ( 255 , 0 , 0 , 255 ), 1 , "bankgothic" , "left" , "top" , false , false , false , false , false )
setTimer ( 700 , 2 )
end
end
Problem jest w tym, ?e napis pojawia sie na u?amek sekundy i znika, jak to zrobic zeby znika? po 10s?
Wysłany: 2016-02-17, 20:03
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
Więcej informacji znajdziesz w Wikipedii MTA: setTimer
Wysłany: 2016-02-18, 10:11
Axmell
E-Commerce
Wiek: 24 Na forum: 3810 dni Posty: 279
Nick w MP: %Axmell
Piwa : 224
function sendError ( msg )
if ( not guiGetVisible ( window ) ) then
dxDrawText ( "B??D" , pX + 200 , pY + 270 , 506 , 368 , tocolor ( 255 , 0 , 0 , 255 ), 1 , "bankgothic" , "left" , "top" , false , false , false , false , false )
setTimer (function ()
dxDrawText ( "B??D" , pX + 200 , pY + 270 , 506 , 368 , tocolor ( 255 , 0 , 0 , 255 ), 1 , "bankgothic" , "left" , "top" , false , false , false , false , false )
end , 5000 , 1 )
end
sendError ()
Nie dzia?a, co jest ?le
Wysłany: 2016-02-18, 12:02
AteX
Wiek: 26 Na forum: 4015 dni Posty: 927
Nick w MP: #AteX
Piwa : 8360
function tekst ()
dxDrawText ( "B??D" , pX + 200 , pY + 270 , 506 , 368 , tocolor ( 255 , 0 , 0 , 255 ), 1 , "bankgothic" , "left" , "top" , false , false , false , false , false )
end
function sendError ( msg )
if ( not guiGetVisible ( window )) then
addEventHandler ( "onClientRender" , root , tekst )
setTimer (function()
removeEventHandler ( "onClientRender" , root , tekst )
end , 5000 , 1 )
end
end
Tagi: pojawia :: sie :: znika
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: