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

Wysłany: 2021-01-19, 19:10


Panasonic_PL_







Wiek: 25
Na forum: 2026 dni
Posty: 16
Nick w MP: Tolek



Respekt: 50

Witam, Panel Logowania/Rejestracji nie chce dzia?a?, Gdy wpisuje sw?j login i Has?o czy to w Rejestracji czy to w Logowaniu wyskakuje mi w debugscript 3 b??d...

B??d: stories-logging/s_logging.lua:40: exports: Call to non-running server resource (pystories-notifications) [string "?"]

kod:
Kod:

--[[
Panel Logowania by Kurianusz @2016 .
Regulamin /Licencja
Korzystanie z tego kodu tylko je?eli posiadasz tzw. copyrights. Zakaz usuwania tej notatki!
Pami?taj ?e nielegalne korzystanie z kodu podpada pod kodeks karny :> Tak samo jak usuni?cie tej notatki!
]]

addEvent("logging:checkAccount", true)
addEventHandler("logging:checkAccount", resourceRoot, function(login,pass)
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE login=?", login)
if result and #result > 0 then
if result[1].login == login and result[1].pass == teaEncode(pass,"*****") then
for i,player in pairs(getElementsByType("player")) do
if getElementData(player,"player:sid") == result[1].id then
triggerClientEvent(client, "logging:result", resourceRoot, false, "Ju? zalogowany!","blad")
return
end
end
--local result2=exports['ogrpg-db']:dbGet("SELECT login2 from ogrpg_users where id=?",result[1].id)
if not result[1].login2 == false then
setPlayerName(client, result[1].login2)
outputChatBox("* U?y?e? komendy na zmiane nicku, tw?j nick zmieniono na: "..result[1].login2.."", client, 255, 255, 255)
else
setPlayerName(client, login)
end
setElementData(client, "player:sid", result[1].id)
triggerClientEvent(client, "logging:result", resourceRoot, true, "Zalogowano pomy?lnie.","git")
exports["pystories-notifications"]:createAlert(client, "Pomy?lnie si? zalogowa?e?.", "success")
triggerEvent("SprawdzDom",root,client)
if result[1].register_serial == false then
local query=exports["pystories-db"]:dbSet("UPDATE pystories_users SET register_serial=? WHERE login=?",getPlayerSerial(client),login)
end
local logs=exports["pystories-db"]:dbSet("INSERT INTO pystories_logs_login (name,serial,data) VALUES (?,?,NOW())", string.format(login.."("..result[1].id..")"),getPlayerSerial(client))
else
triggerClientEvent(client, "logging:result", resourceRoot, false, "Podane dane s? nie prawid?owe.","blad")
exports["pystories-notifications"]:createAlert(client, "Podane przez Ciebie dane s? nieprawid?owe.", "error")
end
else
triggerClientEvent(client, "logging:result", resourceRoot, false, "Podany login ju? istnieje w bazie danych. Wymy?l inny.","blad")
exports["pystories-notifications"]:createAlert(client, "Podany login jest z?y b?d? nie istnieje.", "error")
end
end)
local maks_ilosc_kont = 2 -- Maksymalna ilosc kont do rejestracji
addEvent("logging:newAccount", true)
addEventHandler("logging:newAccount", resourceRoot, function(login,pass)
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE register_serial=?", getPlayerSerial(client))
if result and #result >= maks_ilosc_kont then
triggerClientEvent(client, "logging:result", resourceRoot, false, "Osi?gn??e? ju? limit kont.","blad")
exports["pystories-notifications"]:createAlert(client, "Osi?gn??e? limit kont.", "error")
return end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_users WHERE login=?", login)
if result and #result > 0 then
triggerClientEvent(client, "logging:result", resourceRoot, false, "Podany login ju? istnieje w bazie danych. Wymy?l inny.","blad")
exports["pystories-notifications"]:createAlert(client, "Podany login ju? zosta? stworzony, wymy?l inny.", "error")
else
local query=exports["pystories-db"]:dbSet("INSERT INTO pystories_users (login,pass,register_serial,changedpw,znajdzki,pjB) VALUES (?,?,?,??,?,1)", login, teaEncode(pass,"*****"),getPlayerSerial(client),1, toJSON({}))
if query then
triggerClientEvent(client, "logging:result", resourceRoot, false, "Pomy?lnie zarejestrowa?e?(a?) si?","git")
exports["pystories-notifications"]:createAlert(client, "Pomy?lnie si? zarejestrowa?e?(a?).", "success")
setElementData(client, "player:logged", true)
end
end
end)

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

sx, sy = guiGetScreenSize()
hudMaskShader = dxCreateShader("shaders/hud_mask.fx")
maskTexture = dxCreateTexture("misc/mask.png")
maskrt = dxCreateRenderTarget(sx, sy, true)
maska = dxCreateRenderTarget(sx, sy, true)

local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=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

sx, sy = guiGetScreenSize()

local baseX = 1920
local zoom = 1
local minZoom = 2
if sx < baseX then
zoom = math.min(minZoom, baseX/sx)
end

setAnimation("mapX", 0, 0, 1, "Linear")
setAnimation("mapY", 0, 0, 1, "Linear")
local mapZoom, targetZoom = 0, 1
local mapSize = 1500
controls = dxCreateTexture("controls.png", "argb", true, "clamp")
mapTarget = dxCreateRenderTarget(1500, 1500, false)

local spawns = {
["Spawn LS"] = {1479.631, -1714.955, 14.047, 0, 0, 180},
["OSK LS"] = {1085.847, -1839.05, 13.565, 0, 0, 295.463},
["Przebieralnia"] = {1412.529, -1701.854, 13.547, 0, 0, 341.091},
["Cygan"] = {1875.052, -1857.77, 13.578, 0, 0, 303.224},
["Przechowalnia"] = {1943.382, -2030.407, 13.547, 0, 0, 179.581},
["Przechowalnia Vinewood"] = {1038.249, -1090.932, 23.828, 0, 0, 280.138},
}

function renderZoneBox()
dxDrawImage( 0, 0, sx, sy, "bg.png" )
local x, y = a["mapX"] + mapSize/2, a["mapY"] + mapSize/2
local x, y = math.max(math.min(x, mapSize-300*mapZoom), 300*mapZoom), math.max(math.min(y, mapSize-300), 300)
dxSetRenderTarget(mapTarget)
dxDrawImage(0, 0, 1500, 1500, "map.png")
local progress = getTickCount() / 2000
local g = interpolateBetween(0, 0, 0, 255, 0, 0, progress, "CosineCurve")
for k,v in pairs(spawns) do
local x, y = (v[1] + 3000)/4, (3000 - v[2])/4
if spawnSelected == k then
gColor = g
else
gColor = 255
end
dxDrawImage(x - 20 - (255 - gColor)/40, y - 40 - (255 - gColor)/20, 40 + (255 - gColor)/20, 40 + (255 - gColor)/20, "mark.png", 0, 0, 0, tocolor(255, gColor, 0, 255))
end
dxSetRenderTarget()
dxSetRenderTarget(maskrt, true)
dxDrawImageSection(sx/2 - 300/zoom*mapZoom, sy/2 - 300/zoom, 600/zoom*mapZoom, 600/zoom, x - 300*mapZoom, y - 300, 600*mapZoom, 600, mapTarget)
dxSetRenderTarget()
dxSetRenderTarget(maska, true)
dxDrawImage(sx/2 - 250/zoom*mapZoom, sy/2 - 250/zoom, 500/zoom*mapZoom, 500/zoom, "misc/mask.png")
dxSetRenderTarget()
dxSetShaderValue( hudMaskShader, "sPicTexture", maskrt )
dxSetShaderValue( hudMaskShader, "sMaskTexture", maska )
dxDrawImage(0, 0, sx, sy, hudMaskShader)
--dxDrawImage( sx/2 - 300/zoom*mapZoom, sy/2 - 300/zoom, 600/zoom*mapZoom, 600/zoom, "border.png" )
dxDrawImage( sx - 250/zoom, sy - 150/zoom, 200/zoom, 100/zoom, controls )

local spawny = 0
for k,v in pairs(spawns) do
spawny = spawny + 1
end
local x, y = sx/2 - (210/zoom * spawny)/2, 100/zoom
for k,v in pairs(spawns) do
local cy, w, h = sy - y, 200/zoom, 70/zoom
dxDrawImage( x, cy, w, h, isMouseIn(x, cy, w, h) and "spawn_hover.png" or "spawn.png" )
dxDrawText(k, x + w/2, cy + h/2, x + w/2, cy + h/2, white, 1/zoom, font, "center", "center")
x = x + 210/zoom
end

if movingMap then
local cx, cy = getCursorPosition()
local cx, cy = cx * sx, cy * sy
local mx, my = cx - movingMap[1], cy - movingMap[2]
mapX, mapY = a["mapX"] - mx, a["mapY"] - my
setAnimation("mapX", a["mapX"], mapX, 1, "Linear")
setAnimation("mapY", a["mapY"], mapY, 1, "Linear")
movingMap = {cx, cy}
spawnSelected = false
end

mapZoom = mapZoom+(targetZoom - mapZoom)*0.05
end

bindKey("mouse_wheel_up", "down", function()
targetZoom = math.max(targetZoom - 0.2, 0.5)
end)

bindKey("mouse_wheel_down", "down", function()
targetZoom = math.min(targetZoom + 0.2, 2)
end)

addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and data.showed then
if state=="down" then
if isMouseIn(sx/2 - 300/zoom*mapZoom, sy/2 - 300/zoom, 600/zoom*mapZoom, 600/zoom) then
local cx, cy = getCursorPosition()
local cx, cy = cx * sx, cy * sy
movingMap = {cx, cy}
end

local spawny = 0
for k,v in pairs(spawns) do
spawny = spawny + 1
end
local x, y = sx/2 - (210/zoom * spawny)/2, 100/zoom
for k,v in pairs(spawns) do
local cy, w, h = sy - y, 200/zoom, 70/zoom
if isMouseIn(x, cy, w, h) then
local x, y = v[1]/4, (-v[2])/4
setAnimation("mapX", a["mapX"], x, 1000, "InOutQuad")
setAnimation("mapY", a["mapY"], y, 1000, "InOutQuad")
if spawnSelected == k then
setElementData(localPlayer,"player:spawn", {v[1], v[2], v[3]})
closeZones()
else
spawnSelected = k
end
end
x = x + 210/zoom
end
else
movingMap = false
end
end
end)

function closeZones()
showChat(true)
showCursor(false)
fadeCamera(false)
setElementAlpha(localPlayer,255)
setElementData(localPlayer,"status","Zalogowany(a)")
stopSound(data.misc)
showPlayerHudComponent("all",false)
showPlayerHudComponent("radar",true)
showPlayerHudComponent("crosshair",true)
showPlayerHudComponent("weapon",true)
showPlayerHudComponent("radar",true)
showPlayerHudComponent("health",true)
showPlayerHudComponent("breath",true)
showPlayerHudComponent("clock",true)
showPlayerHudComponent("ammo",true)
data.showed=false
destroyElement(blurShader)
-- Usuwamy elementy
triggerServerEvent("core:spawnPlayer", localPlayer)
setTimer(triggerEvent, 250, 1, "gui:start", localPlayer)
removeEventHandler("onClientRender", root, renderZoneBox)
blur = false
end

function showZones(misc)
data.misc=misc
data.showed=true
showPlayerHudComponent("all",false)
guiSetInputMode("no_binds_when_editing")
addEventHandler("onClientRender", root, renderZoneBox)
end

-----------------------------------------------------------------------------------------------------------------------
--[[x,y=36.63,82.19 -- my width
intro_step=math.random(0,850)

local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=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

function renderZoneBox()
--dxDrawRectangle(sx*0/1024, sy*201/768, sx*1024/1024, sy*308/768, tocolor(0, 0, 0, 188), false)
if data.info then dxDrawText(data.info, sx*252/1024, sy*232/768, sx*800/1024, sy*255/768, tocolor(237, 0, 0, 255), 1.00, "default", "center", "center", false) end
--dxDrawLine(sx*0/1024, sy*199/768, sx*1022/1024, sy*200/768, tocolor(31, 111, 193, 255), 5, false)
--dxDrawLine(sx*0/1024, sy*509/768, sx*1022/1024, sy*510/768, tocolor(31, 111, 193, 255), 5, false)
--dxDrawText("Your Adventure RPG", sx*0/1024, sy*157/768, sx*1024/1024, sy*237/768, white, 2.00, "pricedown", "center", "center", false)

if not isMouseIn(sx*10/1024, sy*48/768, sx*225/1024, sy*62/768) then dxDrawRectangle(sx*10/1024, sy*48/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 170), false)
else dxDrawRectangle(sx*10/1024, sy*48/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 230), false) end
if not isMouseIn(sx*10/1024, sy*212/768, sx*225/1024, sy*62/768) then dxDrawRectangle(sx*10/1024, sy*212/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 170), false)
else dxDrawRectangle(sx*10/1024, sy*212/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 230), false) end
if not isMouseIn(sx*10/1024, sy*356/768, sx*225/1024, sy*62/768) then dxDrawRectangle(sx*10/1024, sy*356/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 170), false)
else dxDrawRectangle(sx*10/1024, sy*356/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 230), false) end
if not isMouseIn(sx*10/1024, sy*500/768, sx*225/1024, sy*62/768) then dxDrawRectangle(sx*10/1024, sy*500/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 170), false)
else dxDrawRectangle(sx*10/1024, sy*500/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 230), false) end
if not isMouseIn(sx*10/1024, sy*644/768, sx*225/1024, sy*62/768) then dxDrawRectangle(sx*10/1024, sy*644/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 170), false)
else dxDrawRectangle(sx*10/1024, sy*644/768, sx*225/1024, sy*62/768, tocolor(255,255,255, 230), false) end

dxDrawText("Spawn LV", sx*-80/1024, sy*-188/768, sx*323/1024, sy*386/768, tocolor(0,0,0,255), 1.00, "default-bold", "center", "center", false)
dxDrawText("Przechowywalnia pojazd?w LV", sx*-380/1024, sy*92/768, sx*641/1024, sy*386/768, tocolor(0,0,0,255), 1.00, "default-bold", "center", "center", false)
dxDrawText("Dom", sx*-700/1024, sy*373/768, sx*937/1024, sy*386/768, tocolor(0,0,0,255), 1.00, "default-bold", "center", "center", false)
dxDrawText("Baza organizacji", sx*-700/1024, sy*660/768, sx*937/1024, sy*386/768, tocolor(0,0,0,255), 1.00, "default-bold", "center", "center", false)
dxDrawText("Spawn FC", sx*-80/1024, sy*957/768, sx*323/1024, sy*386/768, tocolor(0,0,0,255), 1.00, "default-bold", "center", "center", false)
-- dxDrawImage(sx * 0.3118, sy * 0.0313, sx * 0.3838, sy * 0.1549, "logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)


local zone1=math.sin(intro_step/500)*9000
local zone2=math.cos(intro_step/500)*9000
setCameraMatrix (2019.56, 1343.03, 54.00, zone1, zone2, 2)
--setCameraMatrix(zone1, zone2, 120, zone1, zone2, 120)
intro_step=intro_step-1.5

end

addEventHandler("onClientClick", root, function(btn,state)
if btn=="left" and state=="down" then
if isMouseIn(sx*10/1024, sy*54/768, sx*225/1024, sy*92/768) and data.showed then
setElementData(localPlayer,"player:spawn",{1479.51, -1713.07, 14.05+0.1})
closeZones()
end
if isMouseIn(sx*10/1024, sy*198/768, sx*225/1024, sy*92/768) and data.showed then
setElementData(localPlayer,"player:spawn",{1588.83, -1406.00, 13.82+0.1})
closeZones()
end
if isMouseIn(sx*10/1024, sy*624/768, sx*225/1024, sy*92/768) and data.showed then
setElementData(localPlayer,"player:spawn",{2597.44, 1889.67, 11.03+0.1})
closeZones()
end
if isMouseIn(sx*10/1024, sy*342/768, sx*225/1024, sy*92/768) and data.showed then
local domek=getElementData(localPlayer,"player:house")
if not domek then
setElementData(localPlayer,"player:spawn",{1479.51, -1713.07, 14.05+0.1})
outputChatBox("* Nie posiadasz domku!")
end
closeZones()
end
if isMouseIn(sx*10/1024, sy*480/768, sx*225/1024, sy*92/768) and data.showed then
local org=getElementData(localPlayer,"player:organization:spawn")
if not org then
setElementData(localPlayer,"player:spawn",{1479.51, -1713.07, 14.05+0.1})
outputChatBox("* Nie posiadasz organizacji/Lub nie posiada ona spawnu!")
closeZones()
else
setTimer(outputChatBox,1500,1,"* Pomy?lnie zrespi?e?(a?) si? w organizacji.")
setElementData(localPlayer,"player:spawn",{tonumber(org[1]),tonumber(org[2]),tonumber(org[3])})
closeZones()
end
end
end
end)


function closeZones()
showChat(true)
showCursor(false)
fadeCamera(false)
setElementAlpha(localPlayer,255)
stopSound(data.misc)
showPlayerHudComponent("all",false)
showPlayerHudComponent("radar",true)
showPlayerHudComponent("crosshair",true)
showPlayerHudComponent("weapon",true)
showPlayerHudComponent("health",true)
showPlayerHudComponent("breath",true)
showPlayerHudComponent("ammo",true)
data.showed=false
destroyElement(blurShader)
-- Usuwamy elementy
triggerServerEvent("core:spawnPlayer", localPlayer)
setTimer(triggerEvent, 250, 1, "gui:start", localPlayer)
removeEventHandler("onClientRender", root, renderZoneBox)
blur = false
end

function showZones(misc)
data.misc=misc
data.showed=true
showPlayerHudComponent("all",false)
guiSetInputMode("no_binds_when_editing")
addEventHandler("onClientRender", root, renderZoneBox)
end--]]

--if getPlayerName(localPlayer) ~= "Liberty" then return end
if getElementData(localPlayer, "player:sid") then return end

local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()


local blurStrength = 20
font = dxCreateFont("normal.ttf", 12)
local shamal = createVehicle(519, 0, 0, 100)
local ped = createPed(0, 0, 0, 0)
warpPedIntoVehicle(ped, shamal)
setPedControlState(ped, "accelerate", true)
setElementVelocity(shamal, 0, 0.5, 0)

local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")

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

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

local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=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(x, y, dist, angler)
local a = math.rad(90 - angler)
local dx = math.cos(a) * dist;
local dy = math.sin(a) * dist;
return x+dx, y+dy;
end

function renderblur()
dxUpdateScreenSource(myScreenSource)
dxSetShaderValue(blurShader, "screenSource", myScreenSource)
dxDrawImage(0, 0, sx, sy, blurShader, 0, 0, 0)
end
ypos = 0

canClick = getTickCount()

title = ''

sound = math.random(1,3)
if sound == 1 then
title = 'Shine On (remix)'
elseif sound == 2 then
title = 'Piece of your heart'
elseif sound == 3 then
title = 'Juice WRLD Type'
end

function renderLoginBox()
renderblur()
w, h = 170, 40
soundPp = 0
if isElement(data.misc) then
local soundFFT = getSoundFFTData ( data.misc, 16384, 256 )
if ( soundFFT ) then
for i = 0, 255 do
soundPp = soundPp + math.sqrt ( soundFFT[i] ) / 100
end
end
else
soundPp = 1
end
if not soundPp then soundPp = 0 end
color = soundPp * 1000
if color > 255 then color = 255 end
dxDrawText( "", 5, sy - 20, sx, sy, tocolor( 255, 255-color, 0, 255 ), 1, font )
cc = color
dxDrawImage( 0, 0, sx, sy, "effects.png", 0, 0, 0, tocolor( 255, 100, 0, cc/3 ) )
dxDrawImageSection( 0, 0, sx, sy, 0, ypos, 1366, 768, "particles.png", 0, 0, 0, tocolor( 255, 100, 0, cc / 2 ) )
dxDrawImageSection( -50, -50, sx+100, sy+100, 0, ypos*0.5, 1366, 768, "particles.png", 0, 0, 0, tocolor( 255, 100, 0, cc / 3 ) )
dxDrawImage( 100 - (color / 10/2), sy/2 - 300 - (color / 10/2), 200 + color / 10, 200 + color / 10, "logo.png" )
if isMouseIn( 200 - w/2, sy/2 - h/2 + 80, w, h ) then
dxDrawImage( 200 - w/2, sy/2 - h/2 + 80, w, h, "buttonhover.png" )
else
dxDrawImage( 200 - w/2, sy/2 - h/2 + 80, w, h, "button.png" )
end
w, h = 170, 40
if isMouseIn( 200 - w/2, sy/2 - h/2 + 130, w, h ) then
dxDrawImage( 200 - w/2, sy/2 - h/2 + 135, w, h, "buttonhover.png" )
else
dxDrawImage( 200 - w/2, sy/2 - h/2 + 135, w, h, "button.png" )
end
x, y = 200, sy/2 + 80
dxDrawBorderedText( 1, "Zaloguj", x, y, x, y, tocolor( 255, 255, 255, 255 ), 0.8, font, "center", "center" )
x, y = 200, sy/2 + 135
dxDrawBorderedText( 1, "Zarejestruj", x, y, x, y, tocolor( 255, 255, 255, 255 ), 0.8, font, "center", "center" )
x, y = sx - 200, sy/2
dxDrawBorderedText( 1, "Aktualizacje:\n\n19.11.2020 - Poprawiono balans zarobkow", x, y, x, y, tocolor( 255, 255, 255, 255 ), 1, font, "center", "center" )
w, h = 200, 40
x, y, w, h = (200 - w/2), (sy/2 - h/2 - 50), w, h
dxDrawImage( x, y, w, h, "editbox.png", 0, 0, 0, tocolor( 255, 255, 255, 255 ) )
w, h = 200, 40
x, y, w, h = (200 - w/2), (sy/2 - h/2 + 15), w, h
dxDrawImage( x, y, w, h, "editbox.png", 0, 0, 0, tocolor( 255, 255, 255, 255 ) )
if shamal and isElement(shamal) then
x1, y1, z1 = getPositionFromElementOffset(shamal, -20, -70, 10)
x2, y2, z2 = getPositionFromElementOffset(shamal, -20, -10, 10)
setCameraMatrix(x1, y1, z1, x2, y2, z2)
end
ypos = ypos + 1
rx, ry, rz = getElementRotation(shamal)
x, y, z = getElementPosition(shamal)
setPedAnalogControlState(ped, "steer_back", 0)
setPedAnalogControlState(ped, "steer_forward", 0)
setPedAnalogControlState(ped, "vehicle_left", 0)
setPedAnalogControlState(ped, "vehicle_right", 0)
ground = getGroundPosition(x, y, z + 10)
if ground < 0 then ground = 0 end
diffrent = ground+100 - z
diffrent = diffrent * 0.25
if diffrent > 1 then
setPedAnalogControlState(ped, "steer_back", diffrent / 100)
elseif diffrent < -1 then
setPedAnalogControlState(ped, "steer_forward", -diffrent / 100)
end
if (math.floor(getTickCount() / 10000)) % 2 == 0 then
setPedAnalogControlState(ped, "vehicle_left", 0.01)
else
setPedAnalogControlState(ped, "vehicle_right", 0.01)
end
vx, vy, vz = getElementVelocity(shamal)
local speed = math.ceil((vx^2+vy^2+vz^2) ^ (0.5) * 161)
if x < -2500 or x > 2500 or y < -2500 or y > 2500 or speed < 70 then
x, y = math.random(-1500, 1500), math.random(-1500, 1500)
z = getGroundPosition(x, y, 999)
setElementPosition(shamal, x, y, z + 100)
setElementRotation(shamal, 0, 0, 0)
setElementVelocity(shamal, 0, 0.5, 0)
end
dxDrawText("♪ "..title, 0, 0, screenWidth, screenHeight, tocolor( 255, 255, 255, 255 ), 1, font, "left", "bottom" )
end

function dxDrawBorderedText (outline, text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY)
for oX = (outline * -1), outline do
for oY = (outline * -1), outline do
dxDrawText (text, left + oX, top + oY, right + oX, bottom + oY, tocolor(0, 0, 0, 100), scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY)
end
end
dxDrawText (text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, fRotation, fRotationCenterX, fRotationCenterY)
end

addEventHandler("onClientClick", root, function(btn,state)
if getTickCount() < canClick then return end
canClick = getTickCount() + 2000
if btn=="left" and state=="down" then
w, h = 170, 40
if isMouseIn(200 - w/2, sy/2 - h/2 + 80, w, h) and data.showed then
local login=exports["pystories-editbox"]:getText( "Login" )
local pass=exports["pystories-editbox"]:getText( "Haslo" )
if string.len(login) < 2 or string.len(pass) < 2 then
exports["pystories-notifications"]:createAlert("Nale?y wype?ni? wszystkie pola.", "info")
return
end
triggerServerEvent("logging:checkAccount", resourceRoot, login, pass)
end
if isMouseIn(200 - w/2, sy/2 - h/2 + 135, w, h) and data.showed then
local login=exports["pystories-editbox"]:getText( "Login" )
local pass=exports["pystories-editbox"]:getText( "Haslo" )
if string.len(login) > 22 or string.len(pass) > 22 and string.len(login) < 3 or string.len(pass) < 3 then
exports["pystories-notifications"]:createAlert("Zbyt krotkie lub dlugie dane.", "info")
return
end
triggerServerEvent("logging:newAccount", resourceRoot, login, pass)
end
end
end)

function result(value)
if value then
data.showed=false
showZones(data.misc)
destroyElement(shamal)
destroyElement(ped)

-- Usuwamy elementy
exports["pystories-editbox"]:deleteEditBox( "Login" )
exports["pystories-editbox"]:deleteEditBox( "Haslo" )
removeEventHandler("onClientRender", root, renderLoginBox)
end
end

addEvent("logging:result", true)
addEventHandler("logging:result", resourceRoot, result)

addEventHandler("onClientResourceStart", resourceRoot, function()
showChat(false)
showCursor(true)
fadeCamera(true)
data.showed=true
setElementAlpha(localPlayer,0)
data.misc=playSound("misc/"..sound..".mp3",true)
showPlayerHudComponent("radar",false)
setSoundVolume(data.misc, 1.0)
showPlayerHudComponent("all",false)
guiSetInputMode("no_binds_when_editing")
setElementData(localPlayer,"status","Loguje si?")
--setElementData(localPlayer,"player:logged",false)
addEventHandler("onClientRender", root, renderLoginBox)
local nick = getPlayerName( localPlayer )
exports["pystories-editbox"]:deleteEditBox( "Login" )
w, h = 200, 30
x, y, w, h = (200 - w/2) / sx, (sy/2 - h/2 - 50) / sy, w / sx, h / sy
exports["pystories-editbox"]:createEditBox( "Login", x, y, w, h, true, "", false, 25, font, false, 0, { 255, 255, 255, 180 }, true, { 0, 0, 0, 0 }, 0.55, true, 60, true, "Login", { 255, 255, 0, 255 }, true, 0.55, font, true, true, {255, 255, 0, 0}, false )
exports["pystories-editbox"]:deleteEditBox( "Haslo" )
w, h = 200, 30
x, y, w, h = (200 - w/2) / sx, (sy/2 - h/2 + 15) / sy, w / sx, h / sy
exports["pystories-editbox"]:createEditBox( "Haslo", x, y, w, h, true, "", true, 25, font, false, 0, { 255, 255, 255, 180 }, true, { 0, 0, 0, 0 }, 0.55, true, 60, true, "Has?o", { 255, 255, 0, 255 }, true, 0.55, font, true, true, {255, 255, 0, 0}, false )
end)

function getPositionFromElementOffset(element,offX,offY,offZ)
local m = getElementMatrix ( element ) -- Get the matrix
local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform
local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2]
local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3]
return x, y, z -- Return the transformed point
end

potrzebowa? bym Szybkiej odpowiedzi, Daje zimne :piwo: za pomoc :P


Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-19, 19:43


Mikołajj







Wiek: 22
Na forum: 2885 dni
Posty: 303
Nick w MP: Mikołaj

Piwa: 132

Respekt: 91

Ten b??d co wys?a?e? ?wiadczy o tym, ?e pr?bujesz wywo?a? export ze skryptu, kt?ry jest wy??czony. Baza danych mysql podpi?ta?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-19, 20:03


Panasonic_PL_







Wiek: 25
Na forum: 2026 dni
Posty: 16
Nick w MP: Tolek



Respekt: 50

"Miko?ajj" napisał/a:

Ten b??d co wys?a?e? ?wiadczy o tym, ?e pr?bujesz wywo?a? export ze skryptu, kt?ry jest wy??czony. Baza danych mysql podpi?ta?


tak zosta?a Podpi?ta

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-19, 20:37


SamsungPLL

Programista lodówek






Wiek: 23
Na forum: 3805 dni
Posty: 123
Nick w MP: SamsungPLL

Piwa: 135

Respekt: 55,3

Do dzia?ania tego panelu logowania jest potrzebny dodatkowy skrypt zapewne do notyfikacji jak jego nazwa ?wiadczy. Wi?c uruchom skrypt o nazwie "pystories-notifications"

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-19, 20:57


Panasonic_PL_







Wiek: 25
Na forum: 2026 dni
Posty: 16
Nick w MP: Tolek



Respekt: 50

"SamsungPLL" napisał/a:

Do dzia?ania tego panelu logowania jest potrzebny dodatkowy skrypt zapewne do notyfikacji jak jego nazwa ?wiadczy. Wi?c uruchom skrypt o nazwie "pystories-notifications"


Takiego Pliku nie by?o w paczce... Jest on gdzie? do Pobrania?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2021-01-19, 22:55


SamsungPLL

Programista lodówek






Wiek: 23
Na forum: 3805 dni
Posty: 123
Nick w MP: SamsungPLL

Piwa: 135

Respekt: 55,3

Musia? by? w paczce
Masz tutaj jaki? z oryginalnej paczki PYS'a chocia? to mo?e dzia?a? nie prawid?owo z tym panelem logowania poszukaj dobrze w paczce kt?r? pobra?e?
https://www113.zippyshare.com/v/wAPFa6yf/file.html

Postaw piwo autorowi tego posta
 

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