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

Wysłany: 2017-12-23, 22:09


Grace

Kierowca Pralki






Wiek: 24
Na forum: 3578 dni
Posty: 168
Nick w MP: Grace

Piwa: 1039

Respekt: 35,8

Mam problem, ot?? event onClientResourceStart wgl sie nie wykonuje.
oto m?j kod:

function starts()
    outputChatBox("Resource started")
    setPlayerHudComponentVisible("all", false)
    showCursor(true)
    showChat(false)
    addEventHandler("onClientRender", getResourceRootElement(), drawPanel)
end
addEventHandler("onClientResourceStart", getResourceRootElement(), starts)


[ Dodano: 2017-12-23, 22:10 ]
Dodam, ?e zmienianie getResourceRootElement() na root, resourceRoot, getRootElement() nie dzia?a :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 22:44


koxpl2x22

MAPPER-ALLEREK






Wiek: 23
Na forum: 4697 dni
Posty: 375
Nick w MP: ALLEREK

Piwa: 1725

Respekt: 142,5
Respekt: 142,5

Do czego odnosi si?

    addEventHandler("onClientRender", getResourceRootElement(), drawPanel)

?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 22:52


Grace

Kierowca Pralki






Wiek: 24
Na forum: 3578 dni
Posty: 168
Nick w MP: Grace

Piwa: 1039

Respekt: 35,8


GUIEditor = {
    staticimage = {},
    label = {},
    button = {}
}
function drawPanel()
    GUIEditor.staticimage[1] = guiCreateStaticImage(sX*0/1280, sY*0/720, sX*1280/1280, sY*720/720, ":truck_login/images/tlo.png", false)
    GUIEditor.login = guiCreateEdit(sX*526/1280, sY*322/720, sX*228/1280, sY*52/720, "", false, GUIEditor.staticimage[1])
    GUIEditor.pass = guiCreateEdit(sX*525/1280, sY*414/720, sX*229/1280, sY*53/720, "", false, GUIEditor.staticimage[1])
    guiEditSetMasked(GUIEditor.pass, true)
    GUIEditor.button[1] = guiCreateStaticImage(sX*579/1280, sY*475/720, sX*124/1280, sY*32/720, ":truck_login/images/zaloguj.png", false, GUIEditor.staticimage[1])
    GUIEditor.button[2] = guiCreateStaticImage(sX*579/1280, sY*509/720, sX*124/1280, sY*32/720, ":truck_login/images/zarejestruj.png", false, GUIEditor.staticimage[1])
    if data.info then GUIEditor.label[1] = guiCreateLabel(sX*483, sY*248/720, sX*314/1280, sY*22/720, "Dokona?e? pomy?lnej rejestracji!", false, GUIEditor.staticimage[1]) end
    guiSetFont(GUIEditor.label[1], "default-bold-small")
    guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)    
end


to chyba nie chodzi o to, bo nawet wiadomo?? si? nie wysy?a ;c

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 22:57


koxpl2x22

MAPPER-ALLEREK






Wiek: 23
Na forum: 4697 dni
Posty: 375
Nick w MP: ALLEREK

Piwa: 1725

Respekt: 142,5
Respekt: 142,5


addEventHandler( "onClientResourceStart", getRootElement(),function()
  outputChatBox("Resource started")
    setPlayerHudComponentVisible("all", false)
    showCursor(true)
    showChat(false)
    addEventHandler("onClientRender", getResourceRootElement(), drawPanel)
end)

sprawd? to

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 22:58


Grace

Kierowca Pralki






Wiek: 24
Na forum: 3578 dni
Posty: 168
Nick w MP: Grace

Piwa: 1039

Respekt: 35,8

Nic mi to nie daje, probowalem z root, i resourceRoot, nic a nic :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 23:03


koxpl2x22

MAPPER-ALLEREK






Wiek: 23
Na forum: 4697 dni
Posty: 375
Nick w MP: ALLEREK

Piwa: 1725

Respekt: 142,5
Respekt: 142,5

Ale sprawdzi?e? to czy po prostu m?wisz z g?ry?
Je?li to nie dzia?a zmien
end)
na
end);
poniewa? tutaj widze co? takiego

Więcej informacji znajdziesz w Wikipedii MTA:

OnClientResourceStart


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 23:05


Grace

Kierowca Pralki






Wiek: 24
Na forum: 3578 dni
Posty: 168
Nick w MP: Grace

Piwa: 1039

Respekt: 35,8

Sprawdza?em ju? wszystko, nawet dodawalem do ko?ca ka?dej funckji ?rednik, nic nie pomaga?o

[ Dodano: 2017-12-23, 23:11 ]
Progress, wgl nie dzia?a mi strona client-side:
nawet jak mam:
 addCommandHandler("panel", function(plr, cmd)
    outputChatBox("Uzywasz /panel, "..name)
end)


Nie dzia?a nic, sprawdza?em mete, zmienialem nazwy, o co tu chodzi XD

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-23, 23:22


koxpl2x22

MAPPER-ALLEREK






Wiek: 23
Na forum: 4697 dni
Posty: 375
Nick w MP: ALLEREK

Piwa: 1725

Respekt: 142,5
Respekt: 142,5

poka? meta.xml to ci odpowiem :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-24, 16:30


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

xMaslo, po jakiego grzyba renderujesz obiekty CEGUI? Ich si? nie renderuje tylko funkcj? dx.......


GUIEditor = {
    staticimage = {},
    label = {},
    button = {}
}

    GUIEditor.staticimage[1] = guiCreateStaticImage(sX*0/1280, sY*0/720, sX*1280/1280, sY*720/720, ":truck_login/images/tlo.png", false)
    guiSetVisible( GUIEditor.staticimage[1], false )
    GUIEditor.login = guiCreateEdit(sX*526/1280, sY*322/720, sX*228/1280, sY*52/720, "", false, GUIEditor.staticimage[1])
    GUIEditor.pass = guiCreateEdit(sX*525/1280, sY*414/720, sX*229/1280, sY*53/720, "", false, GUIEditor.staticimage[1])
    guiEditSetMasked(GUIEditor.pass, true)
    GUIEditor.button[1] = guiCreateStaticImage(sX*579/1280, sY*475/720, sX*124/1280, sY*32/720, ":truck_login/images/zaloguj.png", false, GUIEditor.staticimage[1])
    GUIEditor.button[2] = guiCreateStaticImage(sX*579/1280, sY*509/720, sX*124/1280, sY*32/720, ":truck_login/images/zarejestruj.png", false, GUIEditor.staticimage[1])
    if data.info then GUIEditor.label[1] = guiCreateLabel(sX*483, sY*248/720, sX*314/1280, sY*22/720, "Dokona?e? pomy?lnej rejestracji!", false, GUIEditor.staticimage[1]) end
    guiSetFont(GUIEditor.label[1], "default-bold-small")
    guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)    


addEventHandler( "onClientResourceStart", getRootElement(),function()
  outputChatBox("Resource started")
    setPlayerHudComponentVisible("all", false)
    showCursor(true)
    showChat(false)
    guiSetVisible( GUIEditor.staticimage[1], true )
end)


Postaw piwo autorowi tego posta
 

 
Tagi: onclientresourcestart :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » onClientResourceStart nie działa 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