Wysłany: 2018-03-01, 16:12
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
Witam, ostatnio sporo bawi? si? z dx' ami i dzisiaj przychodz? do was z jednym problemem. Chc? tutaj dobrze wyt?umaczy? wszystko, aby unikn?? nieporozumie?. Wygl?da to w taki spos?b, ?e mam skrypt na logowanie do PSP, przebieralnie, panel lidera. Tworz? obecnie panel lidera i spostrzeg?em bardzo okropny dla mnie b??d. Chodzi o to, ?e jak nawet nie mam tych dx' ?w pootwieranych, to i tak je?li klikn? w jakie? miejsce i panelu danego nie wida?, to da mi skina, lub zaloguje. W czym tkwi b??d? Do pokazywania i ukrywania dx'?w u?ywam takiego kodu funkcji kt?r? si? samemu tworzy, tak samo robi? z wykrywaniem czy rzeczywi?cie kursor znajduj? si? na danej pozycji. Za pomoc respekt i piwko psss. zimne .
Wysłany: 2018-03-01, 16:22
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Poka? kod
Wysłany: 2018-03-01, 16:40
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
To jest c_side, z tego co wiem tutaj siedzi ca?y problem
local blip = createBlip (- 1486.85925 , 763.91333 , 7.17936 , 20 )
local zaloguj = createMarker (- 1486.85925 , 763.91333 , 7.17936 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local wyloguj = createMarker (- 1485.67859 , 761.05945 , 7.17878 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local pojazd = createVehicle ( 407 ,- 1522.22595 , 744.42175 , 7.18750 )
local pojazd1 = createVehicle ( 544 ,- 1515.65552 , 743.12585 , 7.18750 )
function start ()
removeEventHandler ( "onClientResourceStart" , root , render )
showCursor ( false )
end
addEventHandler ( "onClientResourceStart" , getRootElement (), start )
function render ()
dxDrawLine ( 384 - 1 , 214 - 1 , 384 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 214 - 1 , 384 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 384 - 1 , 533 , 925 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 533 , 925 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 384 , 214 , 541 , 319 , tocolor ( 37 , 37 , 37 , 255 ), false )
dxDrawLine ( 410 - 1 , 214 - 1 , 410 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 214 - 1 , 410 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 410 - 1 , 533 , 900 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 533 , 900 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 410 , 214 , 490 , 319 , tocolor ( 128 , 128 , 128 , 255 ), false )
dxDrawImage ( 557 , 210 , 205 , 221 , ":lss-psp/images/logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawLine ( 424 - 1 , 466 - 1 , 424 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 466 - 1 , 424 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 424 - 1 , 523 , 602 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 523 , 602 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 424 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawLine ( 712 - 1 , 466 - 1 , 712 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 466 - 1 , 712 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 712 - 1 , 523 , 890 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 523 , 890 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 712 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawText ( "Zaloguj" , 423 , 465 , 602 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij" , 711 , 465 , 890 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
end
function logowanie ( hitElement )
if hitElement ~= localPlayer then return end
showGUI ( true )
end
addEventHandler ( "onClientMarkerHit" , zaloguj , logowanie )
function wylogowanie ( hitElement )
if hitElement ~= localPlayer then return end
triggerServerEvent ( "wyloguj" , localPlayer )
end
addEventHandler ( "onClientMarkerHit" , wyloguj , wylogowanie )
function zamknij ( btn , state )
if btn == "left" and state == "up" then
if isMouseInPosition ( 712 , 466 , 178 , 57 ) then
showGUI ( false )
end
end
end
addEventHandler ( "onClientClick" , root , zamknij )
function zaloguj ( btn , state )
local tak1 = getElementData ( localPlayer , "mozna:tak" )
if btn == "left" and state == "up" then
if isMouseInPosition ( 424 , 466 , 178 , 57 ) then
showGUI ( false )
triggerServerEvent ( "zaloguj" , localPlayer )
end
end
end
end
addEventHandler ( "onClientClick" , root , zaloguj )
function showGUI ( value )
if value then
addEventHandler ( "onClientRender" , root , render )
showCursor ( true )
else
removeEventHandler ( "onClientRender" , root , render )
showCursor ( false )
end
end
function isMouseInPosition ( x , y , width , height )
if not isCursorShowing () then return false end
local sx , sy = guiGetScreenSize ()
local cx , cy = getCursorPosition ()
local cx , cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
Podpis
Jeśli ci pomogłem wynagrodź mnie
Wysłany: 2018-03-01, 16:53
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
Zobacz,
local blip = createBlip (- 1486.85925 , 763.91333 , 7.17936 , 20 )
local zaloguj = createMarker (- 1486.85925 , 763.91333 , 7.17936 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local wyloguj = createMarker (- 1485.67859 , 761.05945 , 7.17878 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local pojazd = createVehicle ( 407 ,- 1522.22595 , 744.42175 , 7.18750 )
local pojazd1 = createVehicle ( 544 ,- 1515.65552 , 743.12585 , 7.18750 )
showGUI = false
function start ()
removeEventHandler ( "onClientResourceStart" , root , render )
showCursor ( false )
end
addEventHandler ( "onClientResourceStart" , getRootElement (), start )
function render ()
dxDrawLine ( 384 - 1 , 214 - 1 , 384 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 214 - 1 , 384 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 384 - 1 , 533 , 925 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 533 , 925 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 384 , 214 , 541 , 319 , tocolor ( 37 , 37 , 37 , 255 ), false )
dxDrawLine ( 410 - 1 , 214 - 1 , 410 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 214 - 1 , 410 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 410 - 1 , 533 , 900 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 533 , 900 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 410 , 214 , 490 , 319 , tocolor ( 128 , 128 , 128 , 255 ), false )
dxDrawImage ( 557 , 210 , 205 , 221 , ":lss-psp/images/logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawLine ( 424 - 1 , 466 - 1 , 424 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 466 - 1 , 424 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 424 - 1 , 523 , 602 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 523 , 602 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 424 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawLine ( 712 - 1 , 466 - 1 , 712 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 466 - 1 , 712 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 712 - 1 , 523 , 890 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 523 , 890 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 712 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawText ( "Zaloguj" , 423 , 465 , 602 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij" , 711 , 465 , 890 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
end
function logowanie ( hitElement )
if hitElement ~= localPlayer then return end
showGUI = true
addEventHandler ( "onClientRender" , getRootElement (), render )
end
addEventHandler ( "onClientMarkerHit" , zaloguj , logowanie )
function wylogowanie ( hitElement )
if hitElement ~= localPlayer then return end
triggerServerEvent ( "wyloguj" , localPlayer )
addEventHandler ( "onClientRender" , getRootElement (), render )
end
addEventHandler ( "onClientMarkerHit" , wyloguj , wylogowanie )
function zamknij ( btn , state )
if btn == "left" and state == "down" then
if isMouseInPosition ( 712 , 466 , 178 , 57 ) then
showGUI = false
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
addEventHandler ( "onClientClick" , root , zamknij )
function zaloguj ( btn , state )
local tak1 = getElementData ( localPlayer , "mozna:tak" )
if btn == "left" and state == "down" then
if isMouseInPosition ( 424 , 466 , 178 , 57 ) then
showGUI = false
triggerServerEvent ( "zaloguj" , localPlayer )
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
end
addEventHandler ( "onClientClick" , root , zaloguj )
function isMouseInPosition ( x , y , width , height )
if not isCursorShowing () then return false end
local sx , sy = guiGetScreenSize ()
local cx , cy = getCursorPosition ()
local cx , cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
Wysłany: 2018-03-01, 17:01
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
Poczekaj zaraz sprawdz?.
[ Dodano : 2018-03-01, 17:07 ]
No teraz to nawet markera usun??o, blipa itd.
Podpis
Jeśli ci pomogłem wynagrodź mnie
Wysłany: 2018-03-01, 17:08
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"manieks78" napisał/a :Poczekaj zaraz sprawdz?.
[ Dodano : 2018-03-01, 17:07 ]
No teraz to nawet markera usun??o, blipa itd.
Mo?e do??cz ca?y kod c i s to Sobie b?d? testowa? bo tak to pisa?em z g?owy
Wysłany: 2018-03-01, 17:10
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
c-side
local blip = createBlip (- 1486.85925 , 763.91333 , 7.17936 , 20 )
local zaloguj = createMarker (- 1486.85925 , 763.91333 , 7.17936 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local wyloguj = createMarker (- 1485.67859 , 761.05945 , 7.17878 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local pojazd = createVehicle ( 407 ,- 1522.22595 , 744.42175 , 7.18750 )
local pojazd1 = createVehicle ( 544 ,- 1515.65552 , 743.12585 , 7.18750 )
showGUI = false
function start ()
removeEventHandler ( "onClientResourceStart" , root , render )
showCursor ( false )
end
addEventHandler ( "onClientResourceStart" , getRootElement (), start )
function render ()
dxDrawLine ( 384 - 1 , 214 - 1 , 384 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 214 - 1 , 384 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 384 - 1 , 533 , 925 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 533 , 925 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 384 , 214 , 541 , 319 , tocolor ( 37 , 37 , 37 , 255 ), false )
dxDrawLine ( 410 - 1 , 214 - 1 , 410 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 214 - 1 , 410 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 410 - 1 , 533 , 900 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 533 , 900 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 410 , 214 , 490 , 319 , tocolor ( 128 , 128 , 128 , 255 ), false )
dxDrawImage ( 557 , 210 , 205 , 221 , ":lss-psp/images/logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawLine ( 424 - 1 , 466 - 1 , 424 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 466 - 1 , 424 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 424 - 1 , 523 , 602 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 523 , 602 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 424 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawLine ( 712 - 1 , 466 - 1 , 712 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 466 - 1 , 712 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 712 - 1 , 523 , 890 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 523 , 890 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 712 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawText ( "Zaloguj" , 423 , 465 , 602 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij" , 711 , 465 , 890 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
end
function logowanie ( hitElement )
if hitElement ~= localPlayer then return end
showGUI = true
addEventHandler ( "onClientRender" , getRootElement (), render )
end
addEventHandler ( "onClientMarkerHit" , zaloguj , logowanie )
function wylogowanie ( hitElement )
if hitElement ~= localPlayer then return end
triggerServerEvent ( "wyloguj" , localPlayer )
addEventHandler ( "onClientRender" , getRootElement (), render )
end
addEventHandler ( "onClientMarkerHit" , wyloguj , wylogowanie )
function zamknij ( btn , state )
if btn == "left" and state == "down" then
if isMouseInPosition ( 712 , 466 , 178 , 57 ) then
showGUI = false
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
addEventHandler ( "onClientClick" , root , zamknij )
function zaloguj ( btn , state )
if btn == "left" and state == "down" then
if isMouseInPosition ( 424 , 466 , 178 , 57 ) then
showGUI = false
triggerServerEvent ( "zaloguj" , localPlayer )
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
end
addEventHandler ( "onClientClick" , root , zaloguj )
function isMouseInPosition ( x , y , width , height )
if not isCursorShowing () then return false end
local sx , sy = guiGetScreenSize ()
local cx , cy = getCursorPosition ()
local cx , cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
s_side
addEvent ( "zaloguj" , true )
addEventHandler ( "zaloguj" , root , function()
local acc = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup ( "user." .. acc , aclGetGroup ( "PSP" ) ) then
setElementData ( source , "duty:PSP" , true )
outputChatBox ( "#272727*#FFFFFFZalogowano cie " .. acc .. " na duty...#272727*" , source , 67 , 67 , 67 , true )
else
if open == true then
outputChatBox ( "#272727*#FFFFFFNie jeste? pracownikiem frakcji PSP#272727*" , source , 67 , 67 , 67 , true )
if isObjectInACLGroup ( "user." .. acc , aclGetGroup ( "Admin" ) ) then
outputChatBox ( "#272727*#FFFFFFZalogowano ci? jako Administratora na duty PSP#272727*" , source , 255 , 255 , 255 , true )
end
end
end
end )
addEvent ( "wyloguj" , true )
addEventHandler ( "wyloguj" , root , function()
local duty = getElementData ( source , "duty:PSP" )
if duty == true then
setElementData ( source , "duty:PSP" , false )
outputChatBox ( "Wylogowano z duty PSP" , source )
else
outputChatBox ( "Nie jestes zalogowany na duty PSP!" , source )
end
end )
[ Dodano : 2018-03-01, 17:35 ]
Pomo?e kto??
Podpis
Jeśli ci pomogłem wynagrodź mnie
Wysłany: 2018-03-02, 14:40
SeveNiak
Wiek: 26 Na forum: 4076 dni Posty: 23
Piwa : 63
local blip = createBlip (- 1486.85925 , 763.91333 , 7.17936 , 20 )
local zaloguj = createMarker (- 1486.85925 , 763.91333 , 7.17936 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local wyloguj = createMarker (- 1485.67859 , 761.05945 , 7.17878 - 0.89 , "cylinder" , 1 , 27 , 27 , 27 , 130 )
local pojazd = createVehicle ( 407 ,- 1522.22595 , 744.42175 , 7.18750 )
local pojazd1 = createVehicle ( 544 ,- 1515.65552 , 743.12585 , 7.18750 )
showGUI = false
function start ()
removeEventHandler ( "onClientResourceStart" , root , render )
showCursor ( false )
end
addEventHandler ( "onClientResourceStart" , getRootElement (), start )
function render ()
dxDrawLine ( 384 - 1 , 214 - 1 , 384 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 214 - 1 , 384 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 384 - 1 , 533 , 925 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 925 , 533 , 925 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 384 , 214 , 541 , 319 , tocolor ( 37 , 37 , 37 , 255 ), false )
dxDrawLine ( 410 - 1 , 214 - 1 , 410 - 1 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 214 - 1 , 410 - 1 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 410 - 1 , 533 , 900 , 533 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 900 , 533 , 900 , 214 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 410 , 214 , 490 , 319 , tocolor ( 128 , 128 , 128 , 255 ), false )
dxDrawImage ( 557 , 210 , 205 , 221 , ":lss-psp/images/logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawLine ( 424 - 1 , 466 - 1 , 424 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 466 - 1 , 424 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 424 - 1 , 523 , 602 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 602 , 523 , 602 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 424 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawLine ( 712 - 1 , 466 - 1 , 712 - 1 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 466 - 1 , 712 - 1 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 712 - 1 , 523 , 890 , 523 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawLine ( 890 , 523 , 890 , 466 - 1 , tocolor ( 0 , 0 , 0 , 255 ), 1 , false )
dxDrawRectangle ( 712 , 466 , 178 , 57 , tocolor ( 74 , 74 , 74 , 255 ), false )
dxDrawText ( "Zaloguj" , 423 , 465 , 602 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij" , 711 , 465 , 890 , 523 , tocolor ( 255 , 255 , 255 , 255 ), 1.20 , "default-bold" , "center" , "center" , false , false , false , false , false )
end
function logowanie ( hitElement )
if hitElement ~= localPlayer then return end
showGUI = true
showCursor ( true )
addEventHandler ( "onClientRender" , getRootElement (), render )
end
addEventHandler ( "onClientMarkerHit" , zaloguj , logowanie )
function wylogowanie ( hitElement )
if hitElement ~= localPlayer then return end
triggerServerEvent ( "wyloguj" , localPlayer )
end
addEventHandler ( "onClientMarkerHit" , wyloguj , wylogowanie )
function zamknij ( btn , state )
if btn == "left" and state == "down" then
if logowanie then
if isMouseInPosition ( 712 , 466 , 178 , 57 ) then
showGUI = false
showCursor ( false )
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
end
addEventHandler ( "onClientClick" , root , zamknij )
function zaloguj ( btn , state )
if btn == "left" and state == "down" then
if logowanie then
if isMouseInPosition ( 424 , 466 , 178 , 57 ) then
showGUI = false
showCursor ( false )
triggerServerEvent ( "zaloguj" , localPlayer )
removeEventHandler ( "onClientRender" , getRootElement (), render )
end
end
end
end
addEventHandler ( "onClientClick" , root , zaloguj )
function isMouseInPosition ( x , y , width , height )
if not isCursorShowing () then return false end
local sx , sy = guiGetScreenSize ()
local cx , cy = getCursorPosition ()
local cx , cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
Niewiem czy o to chodzi?o , wi?c je?eli b?dziesz mia? czas to sprawd? i daj zna? [c-side]
Więcej szczegółów
Wystawiono 1 piw(a):manieks78
Wysłany: 2018-03-03, 20:33
manieks78
Lua ;)
Wiek: 25 Na forum: 3387 dni Posty: 97
Nick w MP: Hexan
Piwa : 5
Dzi?ki! O to mi w?a?nie chodzi?o.
Podpis
Jeśli ci pomogłem wynagrodź mnie
Tagi: dxrectangle
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: