Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-12-08, 18:39


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Pomo?ecie zrobi?, ?eby podczas zalogowania znika?y te napisy i ?eby podczas ?adowania by? black screen ?

--[[
@author Lukasz Biegaj <wielebny@bestplay.pl>
@copyright 2011-2013 Lukasz Biegaj <wielebny@bestplay.pl>
@license Dual GPLv2/MIT
]]--



local T_OPIS="Trwa pobieranie zasobow serwera"
local T_STOPKA="Loose Gaming - Innowacyjny serwer RPG"

intro_watchers={}

addEventHandler "onPlayerJoin"getRootElement(), function()
    showPlayerHudComponent(source"all"false)
    showChat(sourcefalse)
    intro_watchers[source]={}

    intro_watchers[source].introTextDisplay textCreateDisplay()
    intro_watchers[source].serverText={}
    intro_watchers[source].serverText[1] = textCreateTextItem "Loose Gaming"0.50.12255,255,2552553.0"center""center",127 )    -- create a text item for the display

    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[1] )

    intro_watchers[source].serverText[2] = textCreateTextItem (  T_OPIS0.50.52255,255,2552551.2"center""center",127 )    -- create a text item for the display
    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[2] )
    intro_watchers[source].serverText[3] = textCreateTextItem (  T_STOPKA0.50.89255,55,2552551.2"center""bottom",127 )
    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[3] )

    fadeCamera(sourcetrue)
    textDisplayAddObserver intro_watchers[source].introTextDisplaysource )
end)

function onResourcesDownloaded()
--    intro_watchers[client]=nil
    if (intro_watchers[source]) then
        textDisplayRemoveObserver intro_watchers[source].introTextDisplaysource )
        introRemoveWatcher(source)
        onPlayerDownloadFinished(source)
    end
    
end

addEvent("onResourcesDownloaded"true)
addEventHandler("onResourcesDownloaded"getRootElement(), onResourcesDownloaded)

function introRemoveWatcher(plr)
    textDestroyTextItem(intro_watchers[plr].serverText[1])
    textDestroyTextItem(intro_watchers[plr].serverText[2])
    textDestroyTextItem(intro_watchers[plr].serverText[3])
    textDestroyDisplay(intro_watchers[plr].introTextDisplay)
    intro_watchers[plr]=nil
    showPlayerHudComponent(plr,"all",true)
    fadeCamera(plr,true)
    showChat(plrtrue)
end


addEventHandler "onPlayerQuit"getRootElement(), function()
    if (intro_watchers[source] and intro_watchers[source].introTextDisplaythen
        textDestroyTextItem(intro_watchers[source].serverText[1])
        textDestroyTextItem(intro_watchers[source].serverText[2])
        textDestroyTextItem(intro_watchers[source].serverText[3])
        textDestroyDisplay(intro_watchers[source].introTextDisplay)
    end
    intro_watchers[source]=nil
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 19:04


krystek77







Wiek: 27
Na forum: 4031 dni
Posty: 135
Nick w MP: Krystek

Piwa: 176

Respekt: 125,3
Respekt: 125,3

Jakie napisy ?
wyt?umacz bardziej o co ci chodzi.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 19:06


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Dodaj to
addEventHandler("onPlayerLogin"getRootElement(), onResourcesDownloaded)
i powinno by? ok.

A ?eby mie? black screena to usu? to
fadeCamera(sourcetrue)


Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 19:18


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Ale black screen podczas ?adowania plik?w, a jak sie zaloguje to nie ? Wiesz, pytam si? bo nie mog? sprawdzi? bo mi si? ju? wszystkie pliki za?adowa?y :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 19:42


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"GamerHD11" napisał/a:

Ale black screen podczas ?adowania plik?w, a jak sie zaloguje to nie ? Wiesz, pytam si? bo nie mog? sprawdzi? bo mi si? ju? wszystkie pliki za?adowa?y :)

Tak. Black screen jest tylko w trakcie pobierania pliku.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 20:10


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

No w?a?nie nie ma Black Screena :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 20:22


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"GamerHD11" napisał/a:

No w?a?nie nie ma Black Screena :(

To w takim masz tutaj gotowy kod z poprawkami:

--[[
@author Lukasz Biegaj <wielebny@bestplay.pl>
@copyright 2011-2013 Lukasz Biegaj <wielebny@bestplay.pl>
@license Dual GPLv2/MIT
]]--



local T_OPIS="Trwa pobieranie zasobow serwera"
local T_STOPKA="Loose Gaming - Innowacyjny serwer RPG"

intro_watchers={}

addEventHandler "onPlayerJoin"getRootElement(), function()
    showPlayerHudComponent(source"all"false)
    showChat(sourcefalse)
    intro_watchers[source]={}

    intro_watchers[source].introTextDisplay textCreateDisplay()
    intro_watchers[source].serverText={}
    intro_watchers[source].serverText[1] = textCreateTextItem "Loose Gaming"0.50.12255,255,2552553.0"center""center",127 )    -- create a text item for the display

    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[1] )

    intro_watchers[source].serverText[2] = textCreateTextItem (  T_OPIS0.50.52255,255,2552551.2"center""center",127 )    -- create a text item for the display
    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[2] )
    intro_watchers[source].serverText[3] = textCreateTextItem (  T_STOPKA0.50.89255,55,2552551.2"center""bottom",127 )
    textDisplayAddText intro_watchers[source].introTextDisplayintro_watchers[source].serverText[3] )

    fadeCamera(sourcefalse)
    textDisplayAddObserver intro_watchers[source].introTextDisplaysource )
end)

function onResourcesDownloaded()
--    intro_watchers[client]=nil
    if (intro_watchers[source]) then
        textDisplayRemoveObserver intro_watchers[source].introTextDisplaysource )
        introRemoveWatcher(source)
        onPlayerDownloadFinished(source)
    end
    
end

addEvent("onResourcesDownloaded"true)
addEventHandler("onResourcesDownloaded"getRootElement(), onResourcesDownloaded)
addEventHandler("onPlayerLogin"getRootElement(), onResourcesDownloaded)

function introRemoveWatcher(plr)
    textDestroyTextItem(intro_watchers[plr].serverText[1])
    textDestroyTextItem(intro_watchers[plr].serverText[2])
    textDestroyTextItem(intro_watchers[plr].serverText[3])
    textDestroyDisplay(intro_watchers[plr].introTextDisplay)
    intro_watchers[plr]=nil
    showPlayerHudComponent(plr,"all",true)
    fadeCamera(plr,true)
    showChat(plrtrue)
end


addEventHandler "onPlayerQuit"getRootElement(), function()
    if (intro_watchers[source] and intro_watchers[source].introTextDisplaythen
        textDestroyTextItem(intro_watchers[source].serverText[1])
        textDestroyTextItem(intro_watchers[source].serverText[2])
        textDestroyTextItem(intro_watchers[source].serverText[3])
        textDestroyDisplay(intro_watchers[source].introTextDisplay)
    end
    intro_watchers[source]=nil
end)


Jak to nie zadzia?a to po prostu jaki? inny skrypt odpala kamere.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-08, 21:30


GamerHD11







Wiek: 24
Na forum: 4260 dni
Posty: 259
Nick w MP: SzokoHD

Piwa: 23

Respekt: 50

Ooo git, dzia?a :) :piwo: Dzieki

Postaw piwo autorowi tego posta
 

 
Tagi: ładowanie :: zasobów
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku