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

Wysłany: 2021-01-01, 15:56


xyzzz^

A nic






Wiek: 19
Na forum: 2134 dni
Posty: 319
Nick w MP: Aspyk21

Piwa: 310

Respekt: 81

Ostrzeżeń: 100%
Mam problem i? ?aduje akcje "main" lecz po kliknieciu przycisku od akcji "register" ?aduje strone, lecz nic sie na niej nie wy?wietla ( opr?cz tego, co nie ma przypisanej ?adnej akcji ), macie mo?e jakie? pomys?y?
local action = "main"
 -- <-- LOGIN RENDER-- >
function render()    
    Fog:setFogRectangleColor(159, 159, 159, 9)
    dxDrawImage(pos["bg"].x, pos["bg"].y, pos["bg"].w, pos["bg"].h, textures["bg"])
    local anim_log = interpolateBetween(-400, 0, 0, 0, 0, 0,(getTickCount()-tick)/1000, "OutQuad")
    local anim_reg = interpolateBetween(400, 0, 0, 0, 0, 0,(getTickCount()-tick)/1000, "OutQuad")

   setTimer(function()
    animation = false
end, 1000, 1)
Fog:renderFogRectangle(pos["bg"].x, pos["bg"].y, pos["bg"].w, pos["bg"].h, false)
   if action == "main" then 

   dxDrawImage(pos["button_reg"].x + anim_reg, pos["button_reg"].y, pos["button_reg"].w, pos["button_reg"].h, textures["button_reg_off"])
   dxDrawImage(pos["button_log"].x + anim_log, pos["button_log"].y, pos["button_log"].w, pos["button_log"].h, textures["button_log_off"])
if not animation then

    if isMouseIn(pos["mLog"].x, pos["mLog"].y, pos["mLog"].w, pos["mLog"].h) then 
    dxDrawImage(pos["button_log"].x, pos["button_log"].y, pos["button_log"].w, pos["button_log"].h, textures["button_log_on"])
end 

if isMouseIn(pos["mReg"].x, pos["mReg"].y, pos["mReg"].w, pos["mReg"].h) then 
    dxDrawImage(pos["button_reg"].x, pos["button_reg"].y, pos["button_reg"].w, pos["button_reg"].h, textures["button_reg_on"])
end

elseif action == "register" then 
  dxDrawImage(pos["button_reg"].x + anim_reg, pos["button_reg"].y, pos["button_reg"].w, pos["button_reg"].h, textures["button_reg_off"])

if isMouseIn(pos["mReg"].x, pos["mReg"].y, pos["mReg"].w, pos["mReg"].h) then 
    dxDrawImage(pos["button_reg"].x, pos["button_reg"].y, pos["button_reg"].w, pos["button_reg"].h, textures["button_reg_on"])
end
end
end


addEventHandler("onClientClick", root, function(btn,state)
    if btn=="left" and state=="down" and isMouseIn(pos["mReg"].x, pos["mReg"].y, pos["mReg"].w, pos["mReg"].h) and action == "main" then
        action = "register"
        tick = getTickCount()
    end
end)


Podpis

Znajdź mnie na:
Steamie
GitHubie

Postaw piwo autorowi tego posta
 

 
Tagi: ladowanie :: akcji
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » ladowanie akcji 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