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

Wysłany: 2016-01-19, 19:19


Shorn

Wariat lua






Wiek: 28
Na forum: 3884 dni
Posty: 41
Nick w MP: Szorn

Piwa: 537

Respekt: 0

Siemanko gtao.pl ot?? mam pewn? rozkine, jak doda? logo na panel logowania
za pomoc daje piwko i respekt.

tutaj kod:

Kod:

function panelek()
dxDrawRectangle(236*w, 140*h, 367*w, 318*h, tocolor(0, 0, 0, 227), false)
dxDrawText("Login:", 310*w, 200*h, 446*w, 206*h, tocolor(0, 170, 255, 227), 1.10*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Has?o:", 300*w, 280*h, 454*w, 296*h, tocolor(0, 170, 255, 227), 1.10*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Pol-Games.pl", 235*w, 80*h, 530*w, 154*h, tocolor(0, 170, 255, 227), 2*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Zapraszamy na Ts3 Pol-Games.pl", 251*w, 350*h, 365*w, 306*h, tocolor(255, 255, 255, 255), 1.00*w, "defual", "center", "top", false, true, true, false, false)
dxDrawRectangle(236*w, 458*h, 367*w, 18*h, tocolor(0, 170, 255, 227), false)
dxDrawText("", 236*w, 458*h, 603*w, 476*h, tocolor(255, 255, 255, 255), 1.00*w, "pricedown", "center", "center", false, false, true, false, false)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:21


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%

Więcej informacji znajdziesz w Wikipedii MTA:

dxDrawImage


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:24


Shorn

Wariat lua






Wiek: 28
Na forum: 3884 dni
Posty: 41
Nick w MP: Szorn

Piwa: 537

Respekt: 0

Mog?by? albo kto? inny mi to zrobi? bo nie ogarniam jak to zrobi?.
Tutaj daje ca?y kod Clienta.

Kod:



--SKALOWANIE
mojeW,mojeH = 800, 600
sW,sH = guiGetScreenSize()
w, h = (sW/mojeW), (sH/mojeH)

--FUNKCJA KAMERY
local sm = {}
sm.moov = 0
sm.object1,sm.object2 = nil,nil

local function removeCamHandler()
if(sm.moov == 1)then
sm.moov = 0
end
end

local function camRender()
if (sm.moov == 1) then
local x1,y1,z1 = getElementPosition(sm.object1)
local x2,y2,z2 = getElementPosition(sm.object2)
setCameraMatrix(x1,y1,z1,x2,y2,z2)
end
end
addEventHandler("onClientPreRender",root,camRender)

function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time)
if(sm.moov == 1)then return false end
sm.object1 = createObject(1337,x1,y1,z1)
sm.object2 = createObject(1337,x1t,y1t,z1t)
setElementAlpha(sm.object1,0)
setElementAlpha(sm.object2,0)
setObjectScale(sm.object1,0.01)
setObjectScale(sm.object2,0.01)
moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad")
moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad")
sm.moov = 1
setTimer(removeCamHandler,time,1)
setTimer(destroyElement,time,1,sm.object1)
setTimer(destroyElement,time,1,sm.object2)
return true
end

--MUZYKA
function musicSettings ( opcja )
if opcja == "on" then
sound = playSound ( "muzyka.mp3", true )
elseif opcja == "off" then
stopSound ( sound )
end
end

--GUI
loguj = guiCreateButton(379*w, 346*h, 210*w, 40*h, "Zaloguj ", false)
rejestruj = guiCreateButton(379*w, 396*h, 210*w, 40*h, "Zarejestruj", false)
login = guiCreateEdit(379*w, 206*h, 214*w, 32*h, "", false)
haslo = guiCreateEdit(379*w, 296*h, 214*w, 32*h, "", false)
guiEditSetMasked(haslo, true)
guiSetVisible(loguj, false)
guiSetVisible(haslo, false)
guiSetVisible(rejestruj, false)
guiSetVisible(login, false)

--DX

function panelek()
dxDrawRectangle(236*w, 140*h, 367*w, 318*h, tocolor(0, 0, 0, 227), false)
dxDrawText("Login:", 310*w, 200*h, 446*w, 206*h, tocolor(0, 170, 255, 227), 1.10*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Has?o:", 300*w, 280*h, 454*w, 296*h, tocolor(0, 170, 255, 227), 1.10*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Pol-Games.pl", 235*w, 80*h, 530*w, 154*h, tocolor(0, 170, 255, 227), 2*w, "pricedown", "left", "top", false, false, true, false, false)
dxDrawText("Zapraszamy na Ts3 Pol-Games.pl", 251*w, 350*h, 365*w, 306*h, tocolor(255, 255, 255, 255), 1.00*w, "defual", "center", "top", false, true, true, false, false)
dxDrawRectangle(236*w, 458*h, 367*w, 18*h, tocolor(0, 170, 255, 227), false)
dxDrawText("", 236*w, 458*h, 603*w, 476*h, tocolor(255, 255, 255, 255), 1.00*w, "pricedown", "center", "center", false, false, true, false, false)
end

--FUNKCJA WYCISZ
function wycisz ()
if getSoundVolume ( sound ) <= 0 then
stopSound ( sound )
killTimer ( timer )
return end
volume = tonumber ( getSoundVolume ( sound ) )
volume = volume - 0.05
setSoundVolume ( sound, volume )
end

addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()),
function()
addEventHandler ("onClientRender", getRootElement(), panelek)
fadeCamera (true)
guiSetVisible(loguj, true)
guiSetVisible(haslo, true)
guiSetVisible(rejestruj, true)
guiSetVisible(login, true)
showCursor (true)
musicSettings ( "on" )
smoothMoveCamera(-2007.1522216797, 34.679080963135, 52.299648284912, -2006.8447265625, 103.50186920166, 27.026756286621,-2006.1824951172, 262.62771606445, 45.796443939209,-1985.236328125, 286.99975585938, 40.668460845947, 5*70000 )
end
)

function zaloguj(button, state)
if button == "left" and state == "up" then
local username = guiGetText(login)
local password = guiGetText(haslo)
if username and password then
triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password)
else
outputChatBox ( "Wpisz login i has?o." )
end
end
end
addEventHandler("onClientGUIClick", loguj, zaloguj, false)

function zarejestuj(button, state)
if button == "left" and state == "up" then
local username = guiGetText(login)
local password = guiGetText(haslo)
if username and password then
if (string.len(username)>=4) then
if (string.len(password)>=4) then
triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password)
else
outputChatBox ( "[H-Life]Has?o musi zawiera? minimalnie 4 znaki" )
end
else
outputChatBox ( "[H-Life]Login musi zawiera? minimalnie 4 znaki." )
end
else
outputChatBox ( "[H-Life]Wpisz sw?j login i has?o" )
end
end
end
addEventHandler("onClientGUIClick", rejestruj, zarejestuj, false)

function hideLoginWindow()
removeEventHandler ("onClientRender", getRootElement(), panelek)
removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
guiSetVisible(loguj, false)
guiSetVisible(haslo, false)
guiSetVisible(rejestruj, false)
guiSetVisible(login, false)
fadeCamera ( true )
timer = setTimer ( wycisz, 150, 0 )
setElementPosition (localPlayer, -1919.921875, 883.08374023438, 35.3359375)
setCameraTarget ( localPlayer )
showCursor (false)
setElementFrozen ( localPlayer, false )
end
addEvent("schowajlogina", true)
addEventHandler("schowajlogina", getResourceRootElement(getThisResource()), hideLoginWindow)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:26


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
no dajesz to dxdrawimage w dx jak tam masz te wszystkie rzeczy a tu masz przyk?ad kodu:
dxDrawImage(screenW 0.7422screenH 0.0117screenW 0.1309screenH 0.1523"i/ikona.png"000tocolor(255255255255), false)


Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:27


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Przyk?ad :

dxDrawImage(170*w380*h300*w100*h"tlo.png"000tocolor(255255255255), true)


@UP Wyprzedzi?e? mnie :D

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:28


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
oczywi?cie jak dasz taki kod to nie zapomnij o zrobieniu do niego skalowania jak ty tam masz oznaczone bo ja mam to tak oznaczone a ty mo?esz mie? oznaczone sx,sy wi?c jak ogarniasz to b?dziesz wiedzia?

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-19, 19:31


Shorn

Wariat lua






Wiek: 28
Na forum: 3884 dni
Posty: 41
Nick w MP: Szorn

Piwa: 537

Respekt: 0

Dzieki za pomoc kumple :)

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: logowania
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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