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

Wysłany: 2017-05-02, 11:36


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Witam gdy gdy naciskam Rejestruj si? wyskakuje Warning co robi?

DB3:
Kod:


WARNING: YL-Logowanie\client/lua:333/299/19/13: Bad usage @ 'dxSetShaderValuve'/'addEventHndler' [onClientRender/Expected nuber,bool,table or texture at argument 3]


Tu jest wszystko w jedno z??czone


Skrypt po Client

sw,sh guiGetScreenSize()
screenWscreenH guiGetScreenSize()
mxmy sw 0.122sw 0.244
sy 0
ssy sh
myy 0


font dxCreateFont"Img/font.ttf"17 )

time getTickCount()
= -1472.30
y = -2126.25
z 135.37
x2 = -1444.44
y2 = -2188.25
z2 127.37
function anim()
 y+0.4
 setCameraMatrix(x,y,zx2y2z2)
 if (getTickCount() - time >= 35000then 
  removeEventHandler("onClientPreRender"getRootElement(), anim) 
 end
end

logopanel false

local data={ misc=nil, }

function createLoginPanel()
    addEventHandler("onClientRender",getRootElement(),renderLoginPanel)
    addEventHandler("onClientRender",getRootElement(),renderLoginContent)
    addEventHandler("onClientPreRender"getRootElement(), anim)
    czas getTickCount()
    setPlayerHudComponentVisible ("all"false)
    showCursor(true,true)
     --guiSetInputMode("no_binds_when_editing")
    showChat(false)
    fadeCamera(true)
    setElementAlpha(localPlayer,255)
    logopanel true
    xml xmlLoadFile("userdata.xml")
    loadXML()
    data.misc playSound("Muzyka/muzaaa.mp3",true)
    setSoundVolume(data.misc 1.0)
end
addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), createLoginPanel)

      
  



function loadXML()
  if not xml then
    xml xmlCreateFile("userdata.xml","login")
    usernameChild xmlCreateChild(xml,"login")
    passwordChild xmlCreateChild(xml,"pass")
    checkboxChild xmlCreateChild(xml,"state")
    xmlSaveFile(xml)
  else
    usernameChild xmlFindChild(xml,"login",0)
    passwordChild xmlFindChild(xml,"pass",0)
    checkboxChild xmlFindChild(xml,"state",0)
  end
  if xmlNodeGetValue(checkboxChild) == "true" then
    checkboxs[1].state true
  end
    usernameLoad xmlNodeGetValue(usernameChild)
    passwordLoad xmlNodeGetValue(passwordChild)
    for w in string.gmatch(usernameLoad".") do
      for i,ebox in ipairs(editbox) do
        if ebox.name == "Loglogin" then
          table.insert(text[i], w)
        end
      end
    end
    for w in string.gmatch(passwordLoad".") do
      for i,ebox in ipairs(editbox) do
        if ebox.name == "Logpass" then
          table.insert(text[i], w)
        end
      end
    end
end
function saveXML(login,pass,checkboxState)
  if checkboxs[1].state == true then
    xmlNodeSetValue(usernameChild,login)
    xmlNodeSetValue(passwordChild,pass)
    xmlNodeSetValue(checkboxChild,tostring(checkboxState))
    xmlSaveFile(xml)
  else
    xmlNodeSetValue(usernameChild,"")
    xmlNodeSetValue(passwordChild,"")
    xmlNodeSetValue(checkboxChild,"")
    xmlSaveFile(xml)
  end
end
addEvent("saveXML",true)
addEventHandler("saveXML",getRootElement(),saveXML)

field = {
{ typ "login"sw 0.5sh 0.5 - ( sh 0.400)/20sw 0.244colorS tocolor(000), erbox "bialy"text "Panel Logowania!"messageBox "1"}
}



buttons = {
{ typ "login"sw 0.5 sw 0.0290sh 0.5 - ( sh 0.405)/sw 0.0854 sw 0.0530 sw 0.0244 sw 0.0122 +  sw 0.0244 sw 0.244 0.02sw 0.370 0.3sw 0.0290color tocolor000AlphaButton), text "Zaloguj si?!"func "pressLogin"},
{ typ "login"sw 0.5 sw 0.1400 sw 0.0005sh 0.5 - ( sh 0.405)/sw *  0.1145 +  sw 0.0244 sw 0.0122 +  sw 0.0244 sw 0.0244 sw 0.244 0.02sw 0.370 0.3sw 0.0290color tocolor000AlphaButton), text "Rejestruj si?!"func "pressRegisterBut"},
{ typ "register"sw 0.5 sw 0.0290sh 0.5 - ( sh 0.405)/sw 0.0854 sw 0.0530 sw 0.0244 sw 0.0122 +  sw 0.0244 sw 0.244 0.02sw 0.370 0.3sw 0.0290color tocolor000160), text "Rejestruj si?!"func "pressRegister"},
{ typ "register"sw 0.5 sw 0.1400 sw 0.0005sh 0.5 - ( sh 0.405)/sw *  0.1145 +  sw 0.0244 sw 0.0122 +  sw 0.0244 sw 0.0244 sw 0.244 0.02sw 0.370 0.3sw 0.0290color tocolor000160), text "Cofnij"func "pressBack"},
}


editbox = {
{ typ "login"sw 0.5 sw 0.244 sw 0.545 0.3sh 0.5 - ( sh 0.405)/sw 0.244 0.34sw 0.270 0.6sw 0.0270image "Img/ebox.png"color tocolor252525AlphaEditBox), text ""textup "Login:"name "Loglogin"},
{ typ "login"sw 0.5 sw 0.244 sw 0.545 0.3sh 0.5 - ( sh 0.405)/sw 0.270 0.34 sw 0.0244 sw 0.0122sw 0.270 0.6sw 0.0270image "Img/ebox.png"color tocolor252525AlphaEditBox), text ""textup "Has?o:"name "Logpass"hide true},
{ typ "register"sw 0.5 sw 0.244 sw 0.545 0.3sh 0.5 - ( sh 0.405)/sw 0.244 0.34sw 0.270 0.6sw 0.0270image "Img/ebox.png"color tocolor252525AlphaEditBox), text ""textup "Login:"name "loginRej"},
{ typ "register"sw 0.5 sw 0.244 sw 0.545 0.3sh 0.5 - ( sh 0.405)/sw 0.270 0.34 sw 0.0244 sw 0.0122sw 0.270 0.6sw 0.0270image "Img/ebox.png"color tocolor252525AlphaEditBox), text ""textup "Has?o:"name "passRej"hide true}
}
checkboxs = {
  { =  sw 0.6 sw 0.900 0.06sh 0.5 - ( sh 0.405)/sw 0.320 0.34 sw 0.0244 sw 0.0122 sw 0.0244 sw 0.0122wh sw 0.244 0.05state falsetext "Zapami?taj" }
} 
text = {}
for i,ebox in ipairs(editbox) do
table.insert(text,{})
end
bindKey("backspace""down", function ()
  table.remove(text[eboxClickI], #text[eboxClickI])
end)
function getCharacter(character)
  for i,ebox in ipairs(editbox) do
    if eboxClickI == i then
      table.insert(text[i], character)
    end
  end
end
function renderLoginPanel()
local AlphaAlpha2 interpolateBetween(0001582550, ((getTickCount() - czas) / 2500), "Linear"dxDrawImage(screenW 0.2262screenH 0.1823screenW 0.5483screenH 0.6549"Img/okn.png"000tocolor(000Alpha), false)
dxDrawImage(screenW 0.2387screenH 0.090screenW 0.4219screenH 0.2418"Img/Logo.png"000tocolor(255255255Alpha2), false)
    for indexlogin in ipairs field ) do
      if login.typ then 
        if (login.typ == "login"then
            if login.erbox then 
              if (login.erbox == "green"then
                login.colorS tocolor 02000210 )
              elseif ( login.erbox == "red"then 
                login.colorS tocolor20000210 )
              elseif ( login.erbox == "bialy"then 
                login.colorS tocolor255255255210 )
              end
            end
              if login.text then 
                dxDrawTextlogin.textlogin.xlogin.login.0.2  login.login.wlogin.login.h  login.colorSsw/1700font"center")
              end
            end
        end 
    end
end 

function renderLoginContent()
AlphaEditBoxAlphaButton interpolateBetween(0001901600, ((getTickCount() - czas) / 2500), "Linear")
if logopanel == true then
  for i,ebox in ipairs(editbox) do
    if ebox.typ then 
      if ( ebox.typ == "login" then 
        dxDrawImageebox.xebox.sy  ebox.webox.hebox.image000ebox.color )
          if ebox.textup then
            dxDrawTextebox.textupebox.ebox.0.12ebox.ebox.0.25 sy  ebox.ebox.webox.ebox.h  tocolor230,230,230), sw/1600font)
          end
            if isMouseWithinRangeOf(ebox.xebox.sy  ebox.webox.hthen
              ebox.color tocolor(252525240)
            else
              ebox.color tocolor(252525170)
            end
              if ebox.text then
                ebox.text table.concat(text[i],"")
                  if ebox.hide == true then
                    dxDrawText (string.rep("•",#text[i],""), ebox.x + 10, ebox.y + sy  , ebox.x + ebox.w, ebox.y + ebox.h + sy  , tocolor( 230,230,230), sw/1700, font, "left", "center", true)
                  else
                    dxDrawText table.concat(text[i],""), ebox.10ebox.sy  ebox.ebox.webox.ebox.sy  tocolor230,230,230), sw/1600font"left""center",true)
                  end
              end
                if eboxClickI == i then
                  dxDrawImageebox.xebox.y  ebox.webox.h"Img/border.png"000tocolor(000))
                end
      elseif ( ebox.typ == "register" then 
        dxDrawImageebox.xebox.ssy  ebox.webox.hebox.image000ebox.color )
          if ebox.textup then
            dxDrawTextebox.textupebox.ebox.0.12ebox.ebox.0.25 ssy  ebox.ebox.webox.ebox.h  tocolor230,230,230), sw/1600font)
          end
            if isMouseWithinRangeOf(ebox.xebox.ssy  ebox.webox.hthen
              ebox.color tocolor252525240)
            else
              ebox.color tocolor252525170)
            end
              if ebox.text then
                ebox.text table.concat(text[i],"")
                  if ebox.hide == true then
                    dxDrawText (string.rep("•",#text[i],""), ebox.x + 10, ebox.y + ssy  , ebox.x + ebox.w, ebox.y + ebox.h + ssy  , tocolor( 230,230,230), sw/1600, font, "left", "center", true)
                  else
                    dxDrawText table.concat(text[i],""), ebox.10ebox.ssy  ebox.ebox.webox.ebox.ssy  tocolor230,230,230), sw/1600font"left""center",true)
                  end
              end
                if eboxClickI == i then
                  dxDrawImageebox.xebox.y  ebox.webox.h"Img/border.png"000tocolor(00))
                end
      end 
    end 
  end
    for indexcbox in ipairs checkboxs ) do 
    if ( cbox.state == true then 
      dxDrawImage(cbox.cbox.y  sy  cbox.whcbox.wh"Img/accept.png")
      else
        dxDrawImage(cbox.cbox.y  sy  cbox.whcbox.wh"Img/decline.png")
      end
    if cbox.text then
        dxDrawText (cbox.textcbox.cbox.wh 5cbox.sy  cbox.cbox.wh*10cbox.cbox.wh  sy  tocolor230,230,230), sw/2000font"left""center",true)
      end
  end 
  for indexbut in ipairs buttons ) do
    if but.typ then 
      if ( but.typ == "login" then 
        dxDrawImagebut.xbut.sy  but.wbut.h"Img/ebox.png"000but.color)
          if isMouseWithinRangeOf(but.xbut.y  sy  but.wbut.hthen
            but.color tocolor000240)
          else
            but.color tocolor000170)
          end
            if but.text then 
              dxDrawTextbut.textbut.xbut.sy  but.but.wbut.but.sy  tocolor230,230,230), sw/1600font"center""center")
            end
      elseif ( but.typ == "register" then 
        dxDrawImagebut.xbut.ssy  but.wbut.h"Img/ebox.png"000but.color)
          if isMouseWithinRangeOf(but.xbut.y  ssy  but.wbut.hthen
            but.color tocolor000240)
          else
            but.color tocolor000170)
          end
            if but.text then 
              dxDrawTextbut.textbut.xbut.ssy  but.but.wbut.but.ssy  tocolor230,230,230), sw/1600font"center""center")
            end               
      end      
    end
  end 
end
end 
addEventHandler("onClientCharacter"getRootElement(), getCharacter)

function pressLogin()
  for iebox in ipairs(editbox) do
    if ebox.name == "Loglogin" then
      login ebox.text
    elseif ebox.name == "Logpass" then
      pass ebox.text
    end
  end 
triggerServerEvent "onLogin"getLocalPlayer(), loginpasscheckboxs[1].state)
end
function pressRegister()
  for iebox in ipairs(editbox) do
    if ebox.name == "loginRej" then
      rejlogin ebox.text
    elseif ebox.name == "passRej" then
      rejpass ebox.text
    end
  end 
triggerServerEvent "onRegister"getLocalPlayer(), rejloginrejpass)
end

function pressRegisterBut()
  p_Move = {}
  p_Move.startTime getTickCount()
  p_Move.endTime p_Move.startTime 450
  p_Move.easingFunction "InOutQuad"
  addEventHandler("onClientRender"getRootElement(), movePanelOut)
end
function pressBack()
  p_Move = {}
  p_Move.startTime getTickCount()
  p_Move.endTime p_Move.startTime 450
  p_Move.easingFunction "InOutQuad"
  addEventHandler("onClientRender"getRootElement(), movePanelIn)
end
addEvent("pressBack",true)
addEventHandler("pressBack",getRootElement(),pressBack)
function movePanelOut()
  local now getTickCount()
  local elapsedTime now p_Move.startTime
  local duration p_Move.endTime p_Move.startTime
  local progress elapsedTime duration
 
  local fAnimationTime getEasingValue(progressp_Move.easingFunction)
 
  local move fAnimationTime*sw 0.122
  removeEventHandler("onClientRender"getRootElement(), renderLoginContent)
  setTimer( function() addEventHandler("onClientRender"getRootElement(), renderLoginContentend1200)
  removeEventHandler("onClientClick",getRootElement(),onClick)
  for i,v in ipairs field ) do 
   if v.text then 
    v.text ""
    v.erbox "bialy"
   end
  end 
  setTimer( function()
    for i,v in ipairs field ) do 
      if v.text then 
        v.text "Panel Rejestracji!"
      end 
    end 
   end1200)
  mx move
  my move 2
  sy sh
  ssy 0
  if now p_Move.endTime then
    removeEventHandler("onClientRender"getRootElement(), movePanelOut)
    addEventHandler("onClientClick",getRootElement(),onClick)
  end
end
function movePanelIn()
  local now getTickCount()
  local elapsedTime now p_Move.startTime
  local duration p_Move.endTime p_Move.startTime
  local progress elapsedTime duration
 
  local fAnimationTime getEasingValue(progressp_Move.easingFunction)
 
  local move fAnimationTimesw 0.122
  removeEventHandler("onClientRender"getRootElement(), renderLoginContent)
  setTimer( function() addEventHandler("onClientRender"getRootElement(), renderLoginContentend1200)
  removeEventHandler("onClientClick",getRootElement(),onClick)
  for i,v in ipairs field ) do 
   if v.text then 
    v.text ""
    v.erbox "bialy"
   end
  end 
  setTimer( function()
    for i,v in ipairs field ) do 
      if v.text then 
        v.text "Panel Logowania!"
      end 
    end 
   end1200)
  mx = -move
  my = -move 2
  sy 0
  ssy sh

  if now p_Move.endTime then
    removeEventHandler("onClientRender"getRootElement(), movePanelIn)
    addEventHandler("onClientClick",getRootElement(),onClick)
  end
end


function changeMessage(mesBoxnewMessageboxColor)
  for i,box in ipairs(field) do
    if box.messageBox ==  mesBox then
      box.text newMessage
      box.erbox boxColor
    end
  end
end
addEvent("changeMessage",true)
addEventHandler("changeMessage",getRootElement(),changeMessage)

function onClick(mButton,state,ax,ay)
if logopanel == true then
  if not (state == "down" and mButton == "left"then
    return false
  end
  for i,b in pairs(buttons) do
    if b.typ then 
      if ( b.typ == "login" then 
        if isMouseWithinRangeOf(b.xb.syb.wb.hthen
          outputDebugString("Pressed "..b.text)
            if b.func then
              loadstring("return "..b.func.."()")()
            end
        end
      elseif ( b.typ == "register" then
        if isMouseWithinRangeOf(b.xb.ssyb.wb.hthen
          outputDebugString("Pressed "..b.text)
            if b.func then
              loadstring("return "..b.func.."()")()
            end
        end
      end 
    end
  end 
  for i,ebox in pairs(editbox) do
    if ebox.typ then 
      if ( ebox.typ == "login" then 
        if isMouseWithinRangeOf(ebox.xebox.syebox.webox.hthen
          outputDebugString("Pressed "..ebox.textup)
          eboxClickI i
          return true
        end 
      elseif ( ebox.typ == "register" then 
        if isMouseWithinRangeOf(ebox.xebox.ssyebox.webox.hthen
          outputDebugString("Pressed "..ebox.textup)
          eboxClickI i
            return true
        end 
      end 
    end
  end
  for i,cbox in pairs(checkboxs) do
    if isMouseWithinRangeOf(cbox.xcbox.sycbox.whcbox.whthen
      outputDebugString("Pressed "..i.." checkbox")
      if cbox.state == false then
      cbox.state true
      else
      cbox.state false
      end
    end
  end
  eboxClickI nil
  return false
end
end
addEventHandler("onClientClick",getRootElement(),onClick)

function isMouseWithinRangeOf(posXposYsizeXsizeY)
  if isCursorShowing() == false then
    return false
  end
  local cx,cy getCursorPosition()
  cx,cy cx*sw,cy*sh
  if cx >= posX and cx <= posX+sizeX and cy >= posY and cy <= posY+sizeY then
    return true,cx,cy
  else
    return false
  end
end


function hideLoginPanel()
  addEventHandler("onClientRender"getRootElement(), hidePanelOut)
end
function hidePanelOut()
    setTimer( function() 
    --removeEventHandler("onClientRender"getRootElement(), onClick)
    --removeEventHandler("onClientRender"getRootElement(), hidePanelOut)
    --removeEventHandler("onClientRender"getRootElement(), getCharacter)
    removeEventHandler("onClientRender",getRootElement(),renderLoginPanel)
    removeEventHandler("onClientRender",getRootElement(),renderLoginContent)
     if (getTickCount() - time >= 2000then 
  removeEventHandler("onClientPreRender"getRootElement(), anim) 
 end
    logopanel false
    end2000)
  end
addEvent("hideLoginPanel",true)
addEventHandler("hideLoginPanel",getRootElement(),hideLoginPanel)

function muzaoff()
    stopSound(data.misc)
end
addEvent("stop:muzaLogin",true)
addEventHandler("stop:muzaLogin",getRootElement(),muzaoff)

function apagarScript()
    if fileExists("client.lua"then
        fileDelete("client.lua")
    end
end
addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()), apagarScript)
addEventHandler("onClientPlayerQuit"getRootElement(), apagarScript)
addEventHandler("onClientPlayerJoin"getRootElement(), apagarScript)


SS b??du DB3;
http://imgur.com/a/I5yYk
Za pomoc :piwo:



I jeszcze pytanko jaki Program do lua robie w notpad++ ale tam nawet db3 nie podaje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 12:30


neku^







Wiek: 24
Na forum: 3521 dni
Posty: 461
Nick w MP: neku^

Piwa: 1186

Respekt: 320,5
Respekt: 320,5Respekt: 320,5Respekt: 320,5


dxSetShaderValuve

na:

dxSetShaderValue


W mta najlepiej Notepad++, zainstaluj se jezyk od Atex'a masz na g?rze dzia?u.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 14:36


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Szukam tego dxSetShaderValuve I nwm czemu nie umiem tego znale??

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 14:47


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

... ten db3 jest z pliku 'BilbordyGrafika'...

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-02, 21:09


Krzemo1234







Wiek: 26
Na forum: 3751 dni
Posty: 387
Nick w MP: Krzemo

Piwa: 16

Respekt: 40

Ten jeden no fakt Addevent od panelu

Podpis
Jeśli ci pomogłem zostaw zimne :piwo:
Postaw piwo autorowi tego posta
 

 
Tagi: panel :: logowania :: waring
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