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

Wysłany: 2017-08-02, 15:02


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Czmu gdy chc? stworzy? plik pasy.xml nic si? nie dzieje?
Doda?em skrypt do acl admin, ale dalej nic sie nie tworzy
kod:
if getElementData(localPlayer"player:uid"then return end
local pasyCreate xmlCreateFile("pasy.xml"," newroot")

local root getRootElement()
local resourceRoot getResourceRootElement(getThisResource())
local sxidthsyeight guiGetScreenSize()


local blurStrength 20


local myScreenSource dxCreateScreenSource(sxidthsyeight)
blurShaderblurTec dxCreateShader("shaders/BlurShader.fx")


function renderblur()
    if blur == true then
        dxUpdateScreenSource(myScreenSource)
        
        dxSetShaderValue(blurShader"ScreenSource"myScreenSource);
        dxSetShaderValue(blurShader"BlurStrength"blurStrength);
        dxSetShaderValue(blurShader"UVSize"sxidthsyeight);

        dxDrawImage(00sxidthsyeightblurShader)
    end
end
addEventHandler("onClientRender"rootrenderblur)

addEventHandler("onClientResourceStop"resourceRoot,
function()
    if (blurShaderthen
        destroyElement(blurShader)
        blurShader nil
    end
end)

x,y=2313.581282.80-- my width
intro_step=math.random(0,850)

local sx,sy=guiGetScreenSize()
local data={ showed=nilbutton={}, info=nilmisc=nil, }

function isMouseIn(psx,psy,pssx,pssy,abx,aby)
    if not isCursorShowing() then return end
    cx,cy=getCursorPosition()
    cx,cy=cx*sx,cy*sy
    if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
        return true,cx,cy
    else
        return false
    end
end
local dist 100
local angler 0
function getPointFromDistanceRotation(xydistangler)
    local a math.rad(90 angler)
    local dx math.cos(a) * dist;
    local dy math.sin(a) * dist;
    return x+dxy+dy;
end

function renderLoginBox()
    blur true
    dxDrawRectangle(sx*270/1025sy*150/769sx*500/1025sy*458/767tocolor(000135), false)
    dxDrawImage(sx 0.0000sy 0.0000sx 1.0000sy 1.0000":ogrpg-logging/misc/panel.png"000tocolor(255255255255), false)
    dxDrawImage(sx 0.1948sy 0.7593sx 0.2583sy 0.0870":ogrpg-logging/misc/log_button.png"000tocolor(255255255255), false)
    dxDrawImage(sx 0.5240sy 0.7593sx 0.2583sy 0.0870":ogrpg-logging/misc/rej_button.png"000tocolor(255255255255), false)
    if data.info then dxDrawText(data.infosx 0.1646sy 0.6630sx 0.8208sy 0.7472tocolor(25400255), 1.70"bankgothic""left""top"falsefalsefalsefalsefalseend
    local x,y=getPointFromDistanceRotation(2313.581282.80distangler)
    setCameraMatrix(x,y,107.72+0.9,2323.691285.66107.72+0.9)
    angler=(angler+0.1)
end





addEventHandler("onClientClick"root, function(btn,state)
    if btn=="left" and state=="down" then
        if isMouseIn(sx 0.1948sy 0.7593sx 0.2583sy 0.0870) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) < or string.len(pass) < 2 then
                data.info="Wype?nij wszystkie pola!"
                return
            end
            triggerServerEvent("logging:checkAccount"resourceRootloginpass)
        end
        if isMouseIn(sx 0.5240sy 0.7593sx 0.2583sy 0.0870) and data.showed then
            local login=guiGetText(data.button[1])
            local pass=guiGetText(data.button[2])
            if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < or string.len(pass) < 3 then
                data.info="Login/Has?o musz? mie? mniej ni? od 3 do 22 znak?w."
                return
            end
            triggerServerEvent("logging:newAccount"resourceRootloginpass)
        end
    end
end)

addEvent("logging:result"true)
addEventHandler("logging:result"resourceRoot, function(value,info)
    if not info then info="" end
    if value then
        data.showed=false
        showZones(data.misc)
        
        -- Usuwamy elementy
        destroyElement(data.button[1])
        destroyElement(data.button[2])
        removeEventHandler("onClientRender"rootrenderLoginBox)
    else
        data.info=tostring(info)
        setTimer(function() data.info=nil end30001)
    end
end)

addEventHandler("onClientResourceStart"resourceRoot, function()
    showChat(false)
    showCursor(true)
    fadeCamera(true)
    data.showed=true
    setElementAlpha(localPlayer,0)
    data.misc=playSound("misc/intro.mp3",true)
    setSoundVolume(data.misc1.0)
    showPlayerHudComponent("all",false)
    guiSetInputMode("no_binds_when_editing")
    setElementData(localPlayer,"status","Loguje si?")
    --setElementData(localPlayer,"player:logged",false)
    addEventHandler("onClientRender"rootrenderLoginBox)
    data.button[1]=guiCreateEdit(0.370.370.220.06""true)
    data.button[2]=guiCreateEdit(0.370.590.220.06""true)   
    guiEditSetMasked(data.button[2],true)
end)

Za pomoc stawiam :piwo:

Podpis
c***
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-02, 15:55


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3434 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120


Więcej informacji znajdziesz w Wikipedii MTA:

xmlSaveFile


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-02, 16:02


Kuksss

guwno






Wiek: 22
Na forum: 3781 dni
Posty: 102
Nick w MP: guwnp

Piwa: 732

Respekt: 70,5

Ostrzeżeń: 100%
Szymczu, by?o dodane
local pasyCreate xmlCreateFile("pasy.xml"," newroot")


Podpis
c***
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-08-02, 16:09


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3434 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

No ale masz u?y? jeszcze funkcji "xmlSaveFile".

Postaw piwo autorowi tego posta
 

 
Tagi: zapisywanie :: hasł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 Odpowiedz do tematu

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