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

Wysłany: 2019-06-02, 21:05


Logic







Wiek: 28
Na forum: 2559 dni
Posty: 1
Nick w MP: Logic



Respekt: 50

Witam!
Mam problem ze skrypter z paczki WestRPG a m?j problem polega na tym ?e jak si? tego u?ywa to w konsoli ca?y czas wyskakuje co? takiego a wyskakuje to w tych skryptach w ktorych zostalo zastosowana funkcja z dxLibrary.

[19-06-02 20:57] DIAGNOSTIC: JazzySwan96 #1013 HTTP server file mismatch (notifications) pasek.png [Got size:0 MD5:00000000000000000000000000000000, wanted MD5:ED0A6697B7F258AC908304066285396E]

Kod:

--[[
Skrypt zostawykonany przez:
   -Asper (nezymr69@gmail.com).

Na potrzeby serwera:
   -WestRPG (2018).

Jedyne i wy??czone prawo do u?ywania kodu ma serwer WestRPG oraz autor skryptu. (Asper)
]]

local sw,sh guiGetScreenSize()
local baseX 1920
local scale 1
local minScale 1.1
if sw baseX then
    scale math.min(minScalebaseX/sw)
end

local dxLibary = {}

function isMouseIn(xywh)
    if not isCursorShowing() then return end

    local pos = {getCursorPosition()}
    pos[1],pos[2] = (pos[1]*sw),(pos[2]*sh)

    if pos[1] >= and pos[1] <= (x+w) and pos[2] >= and pos[2] <= (y+hthen
        return true
    end
    return false
end

function dxLibary:Load()
  self['font_quality'] = 'cleartype_natural'
  self['font_bold'] = false
  self['fonts'] = {
    [0] = dxCreateFont('fonts/czcionka.ttf'9/scaleself['font_bold'], self['font_quality']),
    [1] = dxCreateFont('fonts/czcionka.ttf'10/scaleself['font_bold'], self['font_quality']),
    [2] = dxCreateFont('fonts/czcionka.ttf'11/scaleself['font_bold'], self['font_quality']),
    [3] = dxCreateFont('fonts/czcionka.ttf'12/scaleself['font_bold'], self['font_quality']),
    [4] = dxCreateFont('fonts/czcionka.ttf'13/scaleself['font_bold'], self['font_quality']),
    [5] = dxCreateFont('fonts/czcionka.ttf'14/scaleself['font_bold'], self['font_quality']),
    [6] = dxCreateFont('fonts/czcionka.ttf'15/scaleself['font_bold'], self['font_quality']),
    [7] = dxCreateFont('fonts/czcionka.ttf'16/scaleself['font_bold'], self['font_quality']),
    [8] = dxCreateFont('fonts/czcionka.ttf'17/scaleself['font_bold'], self['font_quality']),
    [9] = dxCreateFont('fonts/czcionka.ttf'18/scaleself['font_bold'], self['font_quality']),
    [10] = dxCreateFont('fonts/czcionka.ttf'19/scaleself['font_bold'], self['font_quality']),
    [11] = dxCreateFont('fonts/czcionka.ttf'20/scaleself['font_bold'], self['font_quality']),
    [12] = dxCreateFont('fonts/czcionka.ttf'21/scaleself['font_bold'], self['font_quality']),
    [13] = dxCreateFont('fonts/czcionka.ttf'22/scaleself['font_bold'], self['font_quality']),
    [14] = dxCreateFont('fonts/czcionka.ttf'23/scaleself['font_bold'], self['font_quality']),
    [15] = dxCreateFont('fonts/czcionka.ttf'24/scaleself['font_bold'], self['font_quality']),
    [16] = dxCreateFont('fonts/czcionka.ttf'25/scaleself['font_bold'], self['font_quality']),
    [17] = dxCreateFont('fonts/czcionka.ttf'26/scaleself['font_bold'], self['font_quality']),
    [18] = dxCreateFont('fonts/czcionka.ttf'27/scaleself['font_bold'], self['font_quality']),
  }

  self['tick'] = getTickCount()
  self['click'] = false

  self['txd_rectangle'] = createTexture('images/rectangle.png')
  self['txd_window'] = createTexture('images/window.png')
  self['txd_window-small'] = createTexture('images/window_small.png')
  self['txd_window-max-small'] = createTexture('images/window_max_small.png')
  self['txd_pasek'] = createTexture('images/pasek.png')
end

function dxLibary:Window(xywh)
  local txd <= 150 and self['txd_window-max-small'] or 150 and <= 300 and self['txd_window-small'] or self['txd_window']
  dxDrawImage(xywhtxd000tocolor(255255255255), false)
  dxDrawImage(x, (h), w2self['txd_pasek'], 000tocolor(255255255255), false)
end

function dxLibary:WindowAlpha(xywhalpha)
  dxDrawImage(xywhself['txd_window'], 000tocolor(255255255alpha), false)
  dxDrawImage(x, (h), w2self['txd_pasek'], 000tocolor(255255255alpha), false)
end

function dxLibary:Button(textxywhsize)
  if isMouseIn(xywhthen
    if getKeyState('mouse1') and self['click'] ~= true then
      playSoundFrontEnd(20)
      self['click'] = true
    elseif not getKeyState('mouse1') and self['click'] == true then
      self['click'] = false
    end

    local a interpolateBetween(1250017500, (getTickCount() - self['tick'])/1500'SineCurve')
    dxDrawImage(xywhself['txd_rectangle'], 000tocolor(075255a), false)
  else
    dxDrawImage(xywhself['txd_rectangle'], 000tocolor(303030230), false)
  end

  dxLibary_shadowText(textxy, (x), (y), tocolor(255255255255), size'default''center''center'falsetruefalse)
end

function dxLibary:ButtonAlpha(textxywhsizealphafocus)
  if isMouseIn(xywhthen
    if getKeyState('mouse1') and self['click'] ~= true then
      playSoundFrontEnd(20)
      self['click'] = true
    elseif not getKeyState('mouse1') and self['click'] == true then
      self['click'] = false
    end

    if alpha >= 175 then
        a interpolateBetween(1250017500, (getTickCount() - self['tick'])/1500'SineCurve')
    else
        alpha
    end
        
    dxDrawImage(xywhself['txd_rectangle'], 000tocolor(075255a), false)
  else
    if not focus then
      dxDrawImage(xywhself['txd_rectangle'], 000tocolor(303030alpha), false)
    elseif focus then
        if alpha >= 175 then
            a interpolateBetween(1250017500, (getTickCount() - self['tick'])/1500'SineCurve')
        else
            alpha
        end

        dxDrawImage(xywhself['txd_rectangle'], 000tocolor(075255a), false)
    end
  end

  self:ShadowTextAlpha(textxy, (x), (y), alphasize'default''center''center'falsetruefalse)
end

function dxLibary:Text(textxywhcolorsize_alignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  size size or 1
  font self['fonts'][size] or self['fonts'][1]
  alignX alignX or 'left'
  alignY alignY or 'top'

  dxDrawText(textxywhcolor1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
end

function dxLibary:ShadowText(textxywhcolorsize_alignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  size size or 1
  font self['fonts'][size] or self['fonts'][1]
  alignX alignX or 'left'
  alignY alignY or 'top'

  dxDrawText(text1111tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1y1htocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1y1htocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(textx1w1tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(textx1w1tocolor(00050), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)

  dxDrawText(textxywhcolor1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
end

function dxLibary:ShadowTextAlpha(textxywhasize_alignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  size size or 1
  font self['fonts'][size] or self['fonts'][1]
  alignX alignX or 'left'
  alignY alignY or 'top'

  local _a 205 and a-205 or 0

  dxDrawText(text1111tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1111tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1y1htocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(text1y1htocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(textx1w1tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(textx1w1tocolor(000_a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)

  dxDrawText(textxywhtocolor(255255255a), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
end

function dxLibary:ShadowText_New(textxywhcolorsize_alignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  size size or 1
  font self['fonts'][size] or self['fonts'][1]
  alignX alignX or 'left'
  alignY alignY or 'top'

  dxDrawText(text1111tocolor(000255), 1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
  dxDrawText(textxywhcolor1fontalignXalignYclipwordBreakpostGUIcolorCodedsubPixelPositioningfRotationfRotationCenterXfRotationCenterY)
end

function dxLibary_shadowText(...)
  dxLibary:ShadowText(...)
end

function dxLibary_shadowText2(...)
  dxLibary:ShadowText_New(...)
end

function dxLibary_text(...)
  dxLibary:Text(...)
end

function dxLibary_createButton(...)
  dxLibary:Button(...)
end

function dxLibary_createButtonAlpha(...)
  dxLibary:ButtonAlpha(...)
end

function dxLibary_createWindow(...)
   dxLibary:Window(...)
end

function dxLibary_createWindowAlpha(...)
  dxLibary:WindowAlpha(...)
end

function dxLibary_formatTextPosition(xywh)
  return xyxy
end

function dxLibary_getFont(size)
  return dxLibary['fonts'][size] or dxLibary['fonts'][1]
end

function createTexture(filePathtextureFormatmipmapstextureEdge)
  if not filePath then return false end

  textureFormat textureFormat or 'dxt5'
  mipmaps mipmaps or false
  textureEdge textureEdge or 'clamp'

  local texture dxCreateTexture(filePathtextureFormatmipmapstextureEdge) -- create texture
  if texture and fileExists(filePaththen -- check if texture successfully created and file exists then
    fileDelete(filePath) -- delete file from user computer
  end

  return texture -- send texture
end

addEventHandler('onClientResourceStart'resourceRoot, function()
  dxLibary:Load()
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-06-05, 18:19


.RiV







Wiek: 25
Na forum: 3588 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

Istnieje plik pasek.png w katalogu images?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-06-06, 11:47


DylemaT929

Nikt






Wiek: 28
Na forum: 4041 dni
Posty: 333
Nick w MP: dylemat929

Piwa: 3195

Respekt: 165,8
Respekt: 165,8Respekt: 165,8

".WhiteBlue" napisał/a:

Istnieje plik pasek.png w katalogu images?


Istnieje na pewno, bo sam sprawdza?em tego gma, ?cie?ki r?wnie? prawid?owe i faktycznie ci?gle to wyskakiwa?o co napisa?.

Postaw piwo autorowi tego posta
 

 
Tagi: dxlibrary :: west :: rpg
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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