Wysłany: 2021-02-09, 09:00
!ryzee
rebornMTA
Wiek: 19 Na forum: 2253 dni Posty: 111
Nick w MP: drakovskyy
Piwa : 55
Siemka! Mam problem, po zalogowaniu si? nie widz? radaru, dopiero bo w??czeniu dashboardu pod f5 i wy??czenie go si? pojawia. M?g?by kto? ogarn???
Client :
if getElementData ( localPlayer , "player:sid" ) then return end
local root = getRootElement ()
local resourceRoot = getResourceRootElement ( getThisResource ())
local screenWidth , screenHeight = guiGetScreenSize ()
local screenW , screenH = guiGetScreenSize ()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource ( screenWidth , screenHeight )
blurShader , blurTec = dxCreateShader ( "shaders/BlurShader.fx" )
function renderblur ()
if blur == true then
dxUpdateScreenSource ( myScreenSource )
dxSetShaderValue ( blurShader , "ScreenSource" , myScreenSource );
dxSetShaderValue ( blurShader , "BlurStrength" , blurStrength );
dxSetShaderValue ( blurShader , "UVSize" , screenWidth , screenHeight );
dxDrawImage ( 0 , 0 , screenWidth , screenHeight , blurShader )
end
end
addEventHandler ( "onClientRender" , root , renderblur )
addEventHandler ( "onClientResourceStop" , resourceRoot ,
function()
if blurShader and isElement ( 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 cursorPosition ( x , y , w , h )
if ( not isCursorShowing ()) then
return false
end
local mx , my = getCursorPosition ()
local fullx , fully = guiGetScreenSize ()
cursorx , cursory = mx * fullx , my * fully
if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
return true
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
ALPHA = 0
local dxfont00_normal = dxCreateFont ( "normal.ttf" , 28 )
local dxfont0_normal = dxCreateFont ( "normal.ttf" , 15 )
local dxfont1_normal = dxCreateFont ( "normal.ttf" , 10 )
local dxfont2_normal = dxCreateFont ( "normal.ttf" , 25 )
local screenW , screenH = guiGetScreenSize ()
function renderLoginBox ()
triggerEvent ( "usunPobieranie" , localPlayer )
dxDrawImage ( screenW * 0.0000 , screenH * 0.0000 , screenW * 1.0000 , screenH * 1.0000 , "tlo1.png" , 0 , 0 , 0 , tocolor ( 225 , 225 , 225 , 255 ), false )
-- dxDrawImage ( screenW * 0.4417 , screenH * 0.0381 , screenW * 0.1190 , screenH * 0.1905 , ":ReDsKill_przewodnik/grafy/logo.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), true )
if cursorPosition ( screenW * 0.4453 , screenH * 0.3583 , screenW * 0.1589 , screenH * 0.0352 ) then
-- dxDrawImage ( screenW * 0.4453 , screenH * 0.3583 , screenW * 0.1589 , screenH * 0.0352 , "misc/editbox.png" , 0 , 0 , 0 , tocolor ( 50 , 50 , 50 , 250 ), false )
else
-- dxDrawImage ( screenW * 0.4453 , screenH * 0.3583 , screenW * 0.1589 , screenH * 0.0352 , "misc/editbox.png" , 0 , 0 , 0 , tocolor ( 153 , 153 , 153 , 250 ), false )
end
if cursorPosition ( screenW * 0.4453 , screenH * 0.4028 , screenW * 0.1589 , screenH * 0.0352 ) then
-- dxDrawImage ( screenW * 0.4453 , screenH * 0.4028 , screenW * 0.1589 , screenH * 0.0352 , "misc/editbox.png" , 0 , 0 , 0 , tocolor ( 50 , 50 , 50 , 250 ), false )
else
-- dxDrawImage ( screenW * 0.4453 , screenH * 0.4028 , screenW * 0.1589 , screenH * 0.0352 , "misc/editbox.png" , 0 , 0 , 0 , tocolor ( 153 , 153 , 153 , 250 ), false )
end
-- dxDrawText ( "Login" , ( screenW * 0.4734 ) + 1 , ( screenH * 0.6102 ) + 1 , ( screenW * 0.1370 ) + 1 , ( screenH * 0.0315 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , true , true , false , false )
-- dxDrawText ( "Login" , screenW * 0.4734 , screenH * 0.6102 , screenW * 0.1370 , screenH * 0.0315 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , true , true , false , false )
-- dxDrawText ( "Haslo" , ( screenW * 0.3363 ) + 1 , ( screenH * 0.3714 ) + 1 , ( screenW * 0.3881 ) + 1 , ( screenH * 0.4210 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , true , true , false , false )
-- dxDrawText ( "Haslo" , screenW * 0.3363 , screenH * 0.3714 , screenW * 0.3881 , screenH * 0.4210 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , true , true , false , false )
-- dxDrawText ( guiGetText ( data . button [ 1 ]), ( screenW * 0.4734 ) + 1 , ( screenH * 0.6991 ) + 1 , ( screenW * 0.1370 ) + 1 , ( screenH * 0.0315 ) + 1 , tocolor ( 30 , 30 , 30 , 250 ), 1.00 , dxfont1_normal , "left" , "center" , false , false , true , false , false )
-- dxDrawText ( guiGetText ( data . button [ 1 ]), screenW * 0.4458 , screenH * 0.3602 , screenW * 0.6016 , screenH * 0.3917 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont1_normal , "left" , "center" , false , false , true , false , false )
-- dxDrawText ( guiGetText ( data . button [ 2 ]), ( screenW * 0.4734 ) + 1 , ( screenH * 0.6102 ) + 1 , ( screenW * 0.1370 ) + 1 , ( screenH * 0.0315 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont1_normal , "left" , "center" , false , false , true , false , false )
-- dxDrawText ( guiGetText ( data . button [ 2 ]), screenW * 0.4458 , screenH * 0.4046 , screenW * 0.6016 , screenH * 0.4361 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont1_normal , "left" , "center" , false , false , true , false , false )
if cursorPosition ( screenW * 0.2859 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 ) then
dxDrawImage ( screenW * 0.2859 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 , "misc/buttons_on.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
else
dxDrawImage ( screenW * 0.2859 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 , "misc/buttons.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
end
if cursorPosition ( screenW * 0.5094 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 ) then
dxDrawImage ( screenW * 0.5094 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 , "misc/buttons_on.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
else
dxDrawImage ( screenW * 0.5094 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 , "misc/buttons.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
end
dxDrawText ( "Nazwa uzytkownika" , screenW * 0.4047 , screenH * 0.2972 , screenW * 0.5958 , screenH * 0.3370 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Haslo" , screenW * 0.3995 , screenH * 0.4306 , screenW * 0.5906 , screenH * 0.4704 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Zaloguj" , ( screenW * 0.3719 ) + 1 , ( screenH * 0.6630 ) + 1 , ( screenW * 0.4745 ) + 1 , ( screenH * 0.686 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , true , false , false )
dxDrawText ( "Zaloguj" , screenW * 0.2953 , screenH * 0.5861 , screenW * 0.4474 , screenH * 0.6352 , tocolor ( 255 , 255 , 255 , 255 ), 1.50 , dxfont0_normal , "center" , "center" , false , false , true , false , false )
-- dxDrawText ( "Zarejestruj" , ( screenW * 0.3905 ) + 1 , ( screenH * 0.6143 ) + 1 , ( screenW * 0.6119 ) + 1 , ( screenH * 0.6771 ) + 1 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , true , false , false )
dxDrawText ( "Zarejestruj" , screenW * 0.5203 , screenH * 0.5861 , screenW * 0.6724 , screenH * 0.6352 , tocolor ( 255 , 255 , 255 , 255 ), 1.50 , dxfont0_normal , "center" , "center" , false , false , false , false , false )
end
addEventHandler ( "onClientClick" , root , function( btn , state )
if btn == "left" and state == "down" then
if cursorPosition ( screenW * 0.2859 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 ) and data . showed then
local login = guiGetText ( data . button [ 1 ])
local pass = guiGetText ( data . button [ 2 ])
if string . len ( login ) < 2 or string . len ( pass ) < 2 then
data . info = "Uzupelnij wszystkie pola!"
return
end
triggerServerEvent ( "logging:checkAccount" , resourceRoot , login , pass )
end
if cursorPosition ( screenW * 0.5094 , screenH * 0.5769 , screenW * 0.1734 , screenH * 0.0676 ) and data . showed then
local login = guiGetText ( data . button [ 1 ])
local pass = guiGetText ( data . button [ 2 ])
if string . len ( login ) > 25 or string . len ( pass ) > 25 and string . len ( login ) < 3 or string . len ( pass ) < 3 then
data . info = "Login i has?o powinno zawierac od 3 do 15 znakow!"
return
end
triggerServerEvent ( "logging:newAccount" , resourceRoot , login , pass )
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" , root , renderLoginBox )
else
data . info = tostring ( info )
setTimer (function() data . info = nil end , 3000 , 1 )
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 )
setPlayerHudComponentVisible ( "radar" , true )
setElementData ( localPlayer , "notshowhud" , false )
setPlayerHudComponentVisible ( "radar" , true )
setElementData ( localPlayer , "showhud" , true )
setSoundVolume ( data . misc , 2.5 )
guiSetInputMode ( "no_binds_when_editing" )
setElementData ( localPlayer , "status" , "Loguje si?" )
setElementData ( localPlayer , "loguje" , true )
addEventHandler ( "onClientRender" , root , renderLoginBox )
local nick = getPlayerName ( localPlayer )
data . button [ 1 ] = guiCreateEdit ( 0.44 , 0.36 , 0.16 , 0.03 , nick , true )
guiSetAlpha ( data . button [ 1 ], 0.00 )
guiEditSetMaxLength ( data . button [ 1 ], 15 )
data . button [ 2 ] = guiCreateEdit ( 0.44 , 0.41 , 0.16 , 0.03 , "" , true )
guiEditSetMasked ( data . button [ 2 ], true )
guiSetAlpha ( data . button [ 2 ], 0.00 )
guiEditSetMaxLength ( data . button [ 2 ], 25 )
end )
]]
addEventHandler ( "onClientResourceStart" , resourceRoot , function()
showChat ( false )
showCursor ( true )
fadeCamera ( true )
data . showed = true
setElementAlpha ( localPlayer , 0 )
data . misc = playSound ( "misc/intro.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 )
data . button [ 1 ] = guiCreateEdit ( 0.37 , 0.33 , 0.26 , 0.04 , nick , true )
guiSetAlpha ( data . button [ 1 ], 0.9 )
data . button [ 2 ]= guiCreateEdit ( 0.37 , 0.46 , 0.26 , 0.04 , "" , true )
guiSetAlpha ( data . button [ 2 ], 0.9 )
guiEditSetMasked ( data . button [ 2 ], true )
end )
Server :
--[[
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 )
local result2 = exports [ "pystories-db" ]: dbGet ( "SELECT * FROM pystories_users WHERE register_serial=?" , getPlayerSerial ( client ))
if not result2 then
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Nie mozesz utworzyc wiecej niz 2 konta!" , "blad" )
return end
if result and #result > 0 then
if result [ 1 ]. login == login and result [ 1 ]. pass == md5 ( pass ) then
local query = exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_users SET pass=? WHERE login=?" , teaEncode ( pass , "Trujeczka" ), login )
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Profil zaaktualizowany. Zaloguj sie" , "git" )
return
end
if result [ 1 ]. login == login and result [ 1 ]. pass == teaEncode ( pass , "Ryjek" ) then
local query = exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_users SET pass=? WHERE login=?" , teaEncode ( pass , "Trujeczka" ), login )
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Profil zaaktualizowany. Zaloguj sie" , "git" )
return
end
if result [ 1 ]. login == login and result [ 1 ]. pass == teaEncode ( pass , "Trujeczka" ) then
local query = exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_users SET pass=? WHERE login=?" , teaEncode ( pass , "*****" ), login )
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Profil zaaktualizowany. Zaloguj sie" , "git" )
return
end
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 , "Podany login juz gra!" , "blad" )
return
end
end
-- local result2 = exports [ 'pystories-db' ]: dbGet ( "SELECT login2 from pystories_users where id=?" , result [ 1 ]. id )
if not result [ 1 ]. login2 == false then
setPlayerName ( client , result [ 1 ]. login2 )
-- outputChatBox ( "* Zmieniony nick" .. result [ 1 ]. login2 .. "" , client , 255 , 255 , 255 )
else
setPlayerName ( client , login )
end
setElementData ( client , "new:sid" , result [ 1 ]. id )
triggerClientEvent ( client , "logging:result" , resourceRoot , true , "Pomyslnie zalogowano!" , "git" )
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 , "Podajesz zle dane!" , "blad" )
end
else
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Taki login juz istnieje, wymysl inny" , "blad" )
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 , "Osiagasz limit kont! (2 konta)" , "blad" )
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 , "Taki login juz istnieje, wymysl inny" , "blad" )
else
local query = exports [ "pystories-db" ]: dbSet ( "INSERT INTO pystories_users (login,pass,register_serial,changedpw) VALUES (?,?,?,??)" , login , teaEncode ( pass , "*****" ), getPlayerSerial ( client ), 1 )
if query then
triggerClientEvent ( client , "logging:result" , resourceRoot , false , "Rejestracja przebiegla pomyslnie" , "git" )
setElementData ( client , "player:logged" , true )
end
end
end )
W razie problem?w s?u?? pomoc?.
Wysłany: 2021-02-09, 14:14
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
pokaz showZones, czyli wyb?r spawnu.
Wysłany: 2021-02-09, 14:28
!ryzee
rebornMTA
Wiek: 19 Na forum: 2253 dni Posty: 111
Nick w MP: drakovskyy
Piwa : 55
if getElementData ( localPlayer , "player:sid" ) then return end
x , y = 36.63 , 82.19 -- my width
intro_step = math . random ( 0 , 850 )
local screenW , screenH = guiGetScreenSize ()
local sx , sy = guiGetScreenSize ()
local px , py = ( sx / 1920 ),( sy / 1080 )
local dxfont00_normal = dxCreateFont ( "normal.ttf" , 28 )
local normal16 = dxCreateFont ( "normal.ttf" , 16 )
local normal20 = dxCreateFont ( "normal.ttf" , 20 )
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 time = 3000
local tick = getTickCount ()
local chooseTimes = 400
local chooseBackTimes = 400
local tlo1time = 600
alpha1 = interpolateBetween ( 0 , 0 , 0 , 255 , 0 , 0 ,( getTickCount ()- tick )/ chooseTimes , "Linear" )
alpha2 = interpolateBetween ( 255 , 0 , 0 , 0 , 0 , 0 ,( getTickCount ()- tick )/ chooseTimes , "Linear" )
local screenW , screenH = guiGetScreenSize ()
function renderZoneBox ()
if getElementData ( localPlayer , "player:sid" ) then return end
local ax = interpolateBetween ( 16 , 145 , 254 , 0 , 120 , 230 ,( getTickCount ()- tick )/ 1100 , "CosineCurve" )
local screenW , screenH = guiGetScreenSize ()
dxDrawImage ( 0 * px , 0 * py , 1920 * px , 1080 * py , "tlo2.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ), false )
-- dxDrawText ( "InfinityMTA" , screenW * 0.3905 , screenH * 0.1000 , screenW * 0.6119 , screenH * 0.4410 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont00_normal , "center" , "center" , false , false , true , false , false )
-- dxDrawImage ( 426 * px , 0 * py , 1081 * px , 1081 * py , "map.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ), false )
-- dxDrawText ( "Lista spawn?w" , 3347 * px , 54 * py , 193 * px , 66 * py , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal20 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Lista spawn?w" , 3344 * px , 50 * py , 193 * px , 66 * py , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal20 , "center" , "center" , false , false , false , false , false )
if isMouseIn ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) then
-- dxDrawRectangle ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 , tocolor ( 0 , 216 , 179 ), false ) -- start los santos
-- dxDrawImage ( 1710 * px , 100 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha ))
else
-- dxDrawRectangle ( 0 * px , 0 * py , 0 * px , 0 * py , tocolor ( 60 , 60 , 60 , 0 ))
-- dxDrawRectangle ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 , tocolor ( 60 , 60 , 60 , 255 ), false )
end
--if isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) or isMouseIn ( 1710 * px , 100 * py , 140 * px , 40 * py ) then dxDrawImage ( 1117 * px , 192 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 180 , 180 , 180 )) else dxDrawImage ( 1117 * px , 192 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha )) end
-- dxDrawText ( "G?owny Spawn" , screenW * 0.4734 , screenH * 0.5306 , screenW * 0.5281 , screenH * 0.5481 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "G?owny Spawn" , screenW * 0.4734 , screenH * 0.5306 , screenW * 0.5281 , screenH * 0.5481 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec los santos
if isMouseIn ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 ) or isMouseIn ( 1725 * px , 170 * py , 125 * px , 40 * py ) then
-- dxDrawImage ( 910 * px , 300 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 180 , 180 , 180 )) -- start Blueberry
-- dxDrawRectangle ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 0 , 216 , 179 ), false )
-- dxDrawImage ( 1725 * px , 170 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha ))
else
-- dxDrawImage ( 910 * px , 300 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ))
-- dxDrawRectangle ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 60 , 60 , 60 , 255 ), false )
end
-- dxDrawText ( "Przecho" , screenW * 0.4734 , screenH * 0.5685 , screenW * 0.5245 , screenH * 0.5870 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Przecho" , screenW * 0.4734 , screenH * 0.5685 , screenW * 0.5245 , screenH * 0.5870 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec Blueberry
--if isMouseIn ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 ) then dxDrawRectangle ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 0 , 216 , 179 ), false ) else dxDrawRectangle ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 60 , 60 , 60 , 255 ), false ) end -- start domy
--if isMouseIn ( 1760 * px , 240 * py , 90 * px , 40 * py ) then dxDrawImage ( 1760 * px , 240 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha )) else dxDrawRectangle ( 0 * px , 0 * py , 0 * px , 0 * py , tocolor ( 60 , 60 , 60 , 0 )) end
-- dxDrawText ( "Dom" , screenW * 0.4740 , screenH * 0.6065 , screenW * 0.5260 , screenH * 0.6241 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Dom" , screenW * 0.4740 , screenH * 0.6065 , screenW * 0.5260 , screenH * 0.6241 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec domy
local zone1 = math . sin ( intro_step / 500 )* 9000
local zone2 = math . cos ( intro_step / 500 )* 9000
setCameraMatrix ( 967.88 , 1735.01 , 21.87 , zone1 , zone2 , 2 )
intro_step = intro_step - 1.5
end
addEventHandler ( "onClientClick" , root , function( btn , state )
if getElementData ( localPlayer , "player:sid" ) then return end
if btn == "left" and state == "down" then
if isMouseIn ( screenW * 0.0208 , screenH * 0.1611 , screenW * 0.2219 , screenH * 0.1000 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{- 2678.80 , - 3.52 , 6.13 })
setElementData ( localPlayer , "p:inv" , false )
closeZones ()
elseif isMouseIn ( screenW * 0.0182 , screenH * 0.3074 , screenW * 0.2193 , screenH * 0.0972 ) or isMouseIn ( 1750 * px , 170 * py , 100 * px , 40 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{- 2541.07 , - 26.78 , 16.42 })
setElementData ( localPlayer , "p:inv" , false )
closeZones ()
elseif isMouseIn ( screenW * 0.0182 , screenH * 0.4639 , screenW * 0.2193 , screenH * 0.0972 ) and data . showed then
local domek = getElementData ( localPlayer , "player:house" )
setElementData ( localPlayer , "p:inv" , false )
if not domek then
setElementData ( localPlayer , "player:spawn" ,{- 2678.80 , - 3.52 , 6.13 })
setElementData ( localPlayer , "p:inv" , false )
end
closeZones ()
end
end
end )
--[[
addEventHandler ( "onClientClick" , root , function( btn , state )
if getElementData ( localPlayer , "player:sid" ) then return end
if btn == "left" and state == "down" then
if isMouseIn ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{ 946.51 , 1733.64 , 8.85 })
closeZones ()
end
if isMouseIn ( 910 * px , 300 * py , 35 * px , 48 * py ) or isMouseIn ( 1750 * px , 170 * py , 100 * px , 40 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{ 1027.17 , 1740.51 , 10.82 })
closeZones ()
end
if isMouseIn ( 1760 * px , 240 * py , 90 * px , 40 * py ) and data . showed then
local domek = getElementData ( localPlayer , "player:house" )
if not domek then
setElementData ( localPlayer , "player:spawn" ,{- 186.32 , 1207.59 , 19.67 })
end
closeZones ()
end
end
end )
]]
function closeZones ()
showChat ( true )
showCursor ( false )
fadeCamera ( false )
setElementAlpha ( localPlayer , 255 )
setElementData ( localPlayer , "status" , "Zalogowany(a)" )
stopSound ( data . misc )
setPlayerHudComponentVisible ( "crosshair" , false )
setElementData ( localPlayer , "player:licznik:tarczowy" , true )
setElementData ( localPlayer , "notshowhud" , false )
setPlayerHudComponentVisible ( "radar" , false )
setElementData ( localPlayer , "showhud" , false )
data . showed = false
destroyElement ( blurShader )
-- Usuwamy elementy
setElementData ( localPlayer , "pokaz:hud" , false )
setElementData ( localPlayer , 'player:sid' , ( getElementData ( localPlayer , 'new:sid' ) or 0 ))
setElementData ( localPlayer , 'new:sid' , false )
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
setPlayerHudComponentVisible ( "all" , false )
setElementData ( localPlayer , "notshowhud" , true )
guiSetInputMode ( "no_binds_when_editing" )
addEventHandler ( "onClientRender" , root , renderZoneBox )
end
addCommandHandler ( "map" , function()
setPlayerHudComponentVisible ( "radar" , false )
end )
Wysłany: 2021-02-09, 15:34
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
if getElementData ( localPlayer , "player:sid" ) then return end
x , y = 36.63 , 82.19 -- my width
intro_step = math . random ( 0 , 850 )
local screenW , screenH = guiGetScreenSize ()
local sx , sy = guiGetScreenSize ()
local px , py = ( sx / 1920 ),( sy / 1080 )
local dxfont00_normal = dxCreateFont ( "normal.ttf" , 28 )
local normal16 = dxCreateFont ( "normal.ttf" , 16 )
local normal20 = dxCreateFont ( "normal.ttf" , 20 )
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 time = 3000
local tick = getTickCount ()
local chooseTimes = 400
local chooseBackTimes = 400
local tlo1time = 600
alpha1 = interpolateBetween ( 0 , 0 , 0 , 255 , 0 , 0 ,( getTickCount ()- tick )/ chooseTimes , "Linear" )
alpha2 = interpolateBetween ( 255 , 0 , 0 , 0 , 0 , 0 ,( getTickCount ()- tick )/ chooseTimes , "Linear" )
local screenW , screenH = guiGetScreenSize ()
function renderZoneBox ()
if getElementData ( localPlayer , "player:sid" ) then return end
local ax = interpolateBetween ( 16 , 145 , 254 , 0 , 120 , 230 ,( getTickCount ()- tick )/ 1100 , "CosineCurve" )
local screenW , screenH = guiGetScreenSize ()
dxDrawImage ( 0 * px , 0 * py , 1920 * px , 1080 * py , "tlo2.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ), false )
-- dxDrawText ( "InfinityMTA" , screenW * 0.3905 , screenH * 0.1000 , screenW * 0.6119 , screenH * 0.4410 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont00_normal , "center" , "center" , false , false , true , false , false )
-- dxDrawImage ( 426 * px , 0 * py , 1081 * px , 1081 * py , "map.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ), false )
-- dxDrawText ( "Lista spawn?w" , 3347 * px , 54 * py , 193 * px , 66 * py , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal20 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Lista spawn?w" , 3344 * px , 50 * py , 193 * px , 66 * py , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal20 , "center" , "center" , false , false , false , false , false )
if isMouseIn ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) then
-- dxDrawRectangle ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 , tocolor ( 0 , 216 , 179 ), false ) -- start los santos
-- dxDrawImage ( 1710 * px , 100 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha ))
else
-- dxDrawRectangle ( 0 * px , 0 * py , 0 * px , 0 * py , tocolor ( 60 , 60 , 60 , 0 ))
-- dxDrawRectangle ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 , tocolor ( 60 , 60 , 60 , 255 ), false )
end
--if isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) or isMouseIn ( 1710 * px , 100 * py , 140 * px , 40 * py ) then dxDrawImage ( 1117 * px , 192 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 180 , 180 , 180 )) else dxDrawImage ( 1117 * px , 192 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha )) end
-- dxDrawText ( "G?owny Spawn" , screenW * 0.4734 , screenH * 0.5306 , screenW * 0.5281 , screenH * 0.5481 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "G?owny Spawn" , screenW * 0.4734 , screenH * 0.5306 , screenW * 0.5281 , screenH * 0.5481 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec los santos
if isMouseIn ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 ) or isMouseIn ( 1725 * px , 170 * py , 125 * px , 40 * py ) then
-- dxDrawImage ( 910 * px , 300 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 180 , 180 , 180 )) -- start Blueberry
-- dxDrawRectangle ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 0 , 216 , 179 ), false )
-- dxDrawImage ( 1725 * px , 170 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha ))
else
-- dxDrawImage ( 910 * px , 300 * py , 35 * px , 48 * py , "map_pointer.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , alpha ))
-- dxDrawRectangle ( screenW * 0.4495 , screenH * 0.5639 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 60 , 60 , 60 , 255 ), false )
end
-- dxDrawText ( "Przecho" , screenW * 0.4734 , screenH * 0.5685 , screenW * 0.5245 , screenH * 0.5870 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Przecho" , screenW * 0.4734 , screenH * 0.5685 , screenW * 0.5245 , screenH * 0.5870 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec Blueberry
--if isMouseIn ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 ) then dxDrawRectangle ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 0 , 216 , 179 ), false ) else dxDrawRectangle ( screenW * 0.4495 , screenH * 0.6019 , screenW * 0.1016 , screenH * 0.0287 , tocolor ( 60 , 60 , 60 , 255 ), false ) end -- start domy
--if isMouseIn ( 1760 * px , 240 * py , 90 * px , 40 * py ) then dxDrawImage ( 1760 * px , 240 * py , 4 * px , 40 * py , "color.png" , 0 , 0 , 0 , tocolor ( 200 , 200 , 200 , alpha )) else dxDrawRectangle ( 0 * px , 0 * py , 0 * px , 0 * py , tocolor ( 60 , 60 , 60 , 0 )) end
-- dxDrawText ( "Dom" , screenW * 0.4740 , screenH * 0.6065 , screenW * 0.5260 , screenH * 0.6241 , tocolor ( 0 , 0 , 0 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )
-- dxDrawText ( "Dom" , screenW * 0.4740 , screenH * 0.6065 , screenW * 0.5260 , screenH * 0.6241 , tocolor ( 255 , 255 , 255 , alpha ), 1.00 * px , normal16 , "center" , "center" , false , false , false , false , false )-- koniec domy
local zone1 = math . sin ( intro_step / 500 )* 9000
local zone2 = math . cos ( intro_step / 500 )* 9000
setCameraMatrix ( 967.88 , 1735.01 , 21.87 , zone1 , zone2 , 2 )
intro_step = intro_step - 1.5
end
addEventHandler ( "onClientClick" , root , function( btn , state )
if getElementData ( localPlayer , "player:sid" ) then return end
if btn == "left" and state == "down" then
if isMouseIn ( screenW * 0.0208 , screenH * 0.1611 , screenW * 0.2219 , screenH * 0.1000 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{- 2678.80 , - 3.52 , 6.13 })
setElementData ( localPlayer , "p:inv" , false )
closeZones ()
elseif isMouseIn ( screenW * 0.0182 , screenH * 0.3074 , screenW * 0.2193 , screenH * 0.0972 ) or isMouseIn ( 1750 * px , 170 * py , 100 * px , 40 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{- 2541.07 , - 26.78 , 16.42 })
setElementData ( localPlayer , "p:inv" , false )
closeZones ()
elseif isMouseIn ( screenW * 0.0182 , screenH * 0.4639 , screenW * 0.2193 , screenH * 0.0972 ) and data . showed then
local domek = getElementData ( localPlayer , "player:house" )
setElementData ( localPlayer , "p:inv" , false )
if not domek then
setElementData ( localPlayer , "player:spawn" ,{- 2678.80 , - 3.52 , 6.13 })
setElementData ( localPlayer , "p:inv" , false )
end
closeZones ()
end
end
end )
--[[
addEventHandler ( "onClientClick" , root , function( btn , state )
if getElementData ( localPlayer , "player:sid" ) then return end
if btn == "left" and state == "down" then
if isMouseIn ( screenW * 0.4500 , screenH * 0.5269 , screenW * 0.1010 , screenH * 0.0278 ) or isMouseIn ( 1117 * px , 192 * py , 35 * px , 48 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{ 946.51 , 1733.64 , 8.85 })
closeZones ()
end
if isMouseIn ( 910 * px , 300 * py , 35 * px , 48 * py ) or isMouseIn ( 1750 * px , 170 * py , 100 * px , 40 * py ) and data . showed then
setElementData ( localPlayer , "player:spawn" ,{ 1027.17 , 1740.51 , 10.82 })
closeZones ()
end
if isMouseIn ( 1760 * px , 240 * py , 90 * px , 40 * py ) and data . showed then
local domek = getElementData ( localPlayer , "player:house" )
if not domek then
setElementData ( localPlayer , "player:spawn" ,{- 186.32 , 1207.59 , 19.67 })
end
closeZones ()
end
end
end )
]]
function closeZones ()
showChat ( true )
showCursor ( false )
fadeCamera ( false )
setElementAlpha ( localPlayer , 255 )
setElementData ( localPlayer , "status" , "Zalogowany(a)" )
stopSound ( data . misc )
setPlayerHudComponentVisible ( "crosshair" , false )
setElementData ( localPlayer , "player:licznik:tarczowy" , true )
setElementData ( localPlayer , "notshowhud" , false )
setPlayerHudComponentVisible ( "radar" , false )
setElementData ( localPlayer , "showhud" , false )
data . showed = false
destroyElement ( blurShader )
-- Usuwamy elementy
setElementData ( localPlayer , "pokaz:hud" , false )
setElementData ( localPlayer , 'player:sid' , ( getElementData ( localPlayer , 'new:sid' ) or 0 ))
setElementData ( localPlayer , 'new:sid' , false )
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
setPlayerHudComponentVisible ( "all" , false )
setPlayerHudComponentVisible ( "radar" , true )
setElementData ( localPlayer , "notshowhud" , true )
guiSetInputMode ( "no_binds_when_editing" )
addEventHandler ( "onClientRender" , root , renderZoneBox )
end
addCommandHandler ( "map" , function()
setPlayerHudComponentVisible ( "radar" , false )
end )
Tagi: logowanie :: radar
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: