Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: timery
1. [Kurs-Lua#2] Timery, Zmienne, Operatory
[center][b]Witaj [you]![/b]

W tym poradniku pokr?tce przedstawi? Wam: timery, zmienne, operatory oraz instrukcje warunkowe oraz postanowi? je wyt?umaczy?! Zapraszam do kr?tkiej lektury ;v[/center]
[line]
[center][b]Zacznijmy od wyja?nienia czym jest Timer. S?u?y on do nadawania czasu dla czego?. Np po jakim czasie ma si? co? wykona?. Poni?ej stworzymy kr?tk? komend?, kt?ra wy?wietli Nam nasz nick:[/b][/center][center][lua]function nick(plr)
setTimer(function(plr)
outputChatBox(getPlayerName(plr),255,255,255,true)
end, 1000,1,plr)
end
addComandHandler("nick",nick)[/lua][/center][center][b]Troch? ja?niej:[/b][/center][center][code]function nick(plr) --tworzymy funkcj? 'nick' z argumentem plr czyli graczem, kt?ry wpisa? komende
setTimer(function(plr) --funkcja na kt?r? nadajemy 'czasownik'
outputChatBox(getPlayerName(plr),255,255,255,true) -- pokazujemy graczowi jego nick i zamykamy czasownik
end, 1000,1,plr) --end zamyka nasz czasownik, 1000 to ilosc milisekund, '1' to ilo?? wykonania
end --end zamyka nasz czasownik
addComandHandler("nick",nick) --tworzymy komende[/code][/center][center][b]Je?eli chcemy aby co? si? nam wy?wietla?o co jaki? czas, mo?emy zrobi? to w ten spos?b:[/b][/center][center][lua]setTimer(function()
outputChatBox("Min??y 3 minuty")
end, 180*1000,0)[/lua][/center][center][b]Przy czym "180" s? to sekundy. Gdy dodamy np 60 do 180 otrzymamy 240 i b?dzie Nam wy?wietla? co 4 minuty.[/b][/center]
[center][b...
2. Timery
G?upio mi zadawa? to pytanie jako moderator, ale brakuje mi ju? pomys??w co mo?e by? nie tak.


Nie sprawdza mi w og?le czy jest timer ( isTimer ) pomimo, ?e jest :)


http://wklej.se/6af9
3. [INNE] Timery
Witam, mam problem z timerami, ot??:
[code]
[21:33:34] (TimerFix) WARNING: The function "CheckMySQL" took 24ms to execute! This will affect other timers.
[21:33:39] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to execute! This will affect other timers.
[21:33:44] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to execute! This will affect other timers.
[21:33:50] (TimerFix) WARNING: The function "AutomaticallyRespawnVehicles" took 1355ms to execute! This will affect other timers.
[21:33:50] (TimerFix) WARNING: The function "CheckMySQL" took 22ms to execute! This will affect other timers.
[21:33:55] (TimerFix) WARNING: The function "CheckMySQL" took 24ms to execute! This will affect other timers.
[21:34:00] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to execute! This will affect other timers.
[21:34:36] (TimerFix) WARNING: The function "CheckMySQL" took 24ms to execute! This will affect other timers.
[21:34:41] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to execute! This will affect other timers.
[21:34:46] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to execute! This will affect other timers.
[21:34:52] (TimerFix) WARNING: The function "AutomaticallyRespawnVehicles" took 1352ms to execute! This will affect other timers.
[21:34:52] (TimerFix) WARNING: The function "CheckMySQL" took 23ms to exe...
4. [INNE] Timery
Witam czy w samp jest jaki? limit timer?w w mapie ?

Jak b?d? mia? np. 20 timer?w nie zlaguje mi serwa ?
5. [INNE] Timery
Witam.Mam problem z timerami chce, ?eby co 1 minute zmienialo textdraw.