Wysłany: 2020-04-07, 17:44
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Witam chcia?em zrobi? skrypt na salon, lecz mam ma?y problem. Ot?? gdy wchodz? do pojazdu GUI si? na milisekund? pojawia, lecz potem znika. Brak b??d?w w DB3
kod
c_side
local screenW , screenH = guiGetScreenSize ()
local dxfont0_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 20 )
local dxfont1_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 16 )
local dxfont2_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 10 )
addEvent ( "guis" , true )
addEventHandler ( "guis" , root , function()
dxDrawLine (( screenW * 0.3573 ) - 1 , ( screenH * 0.1306 ) - 1 , ( screenW * 0.3573 ) - 1 , screenH * 0.6426 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine ( screenW * 0.6005 , ( screenH * 0.1306 ) - 1 , ( screenW * 0.3573 ) - 1 , ( screenH * 0.1306 ) - 1 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine (( screenW * 0.3573 ) - 1 , screenH * 0.6426 , screenW * 0.6005 , screenH * 0.6426 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine ( screenW * 0.6005 , screenH * 0.6426 , screenW * 0.6005 , ( screenH * 0.1306 ) - 1 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawRectangle ( screenW * 0.3573 , screenH * 0.1306 , screenW * 0.2432 , screenH * 0.5120 , tocolor ( 0 , 0 , 0 , 175 ), false )
dxDrawText ( "Salon Pojazd?w" , screenW * 0.3573 , screenH * 0.1306 , screenW * 0.6005 , screenH * 0.1944 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , false , false , false )
dxDrawText ( "INFO\nMarka\nSilnik\nBak\nRok\n" , screenW * 0.3573 , screenH * 0.1981 , screenW * 0.6005 , screenH * 0.5639 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont1_normal , "center" , "center" , false , false , false , false , false )
dxDrawRectangle ( screenW * 0.3599 , screenH * 0.5815 , screenW * 0.0807 , screenH * 0.0463 , tocolor ( 255 , 160 , 0 , 254 ), false )
dxDrawRectangle ( screenW * 0.5089 , screenH * 0.5815 , screenW * 0.0807 , screenH * 0.0463 , tocolor ( 255 , 160 , 0 , 254 ), false )
dxDrawText ( "Zakup" , screenW * 0.3589 , screenH * 0.5815 , screenW * 0.4406 , screenH * 0.6278 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont2_normal , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij okno" , screenW * 0.5078 , screenH * 0.5815 , screenW * 0.5896 , screenH * 0.6278 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont2_normal , "center" , "center" , false , false , false , false , false )
end )
s_side
addEventHandler ( 'onVehicleEnter' , resourceRoot , function( plr , seat , jacked )
triggerClientEvent ( plr , "guis" , plr )
if seat ~= 0 then return end
--[[] if ( getElementData ( source , "vehicle.selling" ) ~= 1 ) then
outputChatBox ( "Pojazd nie jest na sprzeda?." , plr , 255 , 255 , 255 , true )
return
end
--]]
local data = source : getData ( 'vehsell:info' )
if not data then return end
plr : setData ( 'vehsell:info' , {
[ 'cost' ]= data . cost ,
[ 'model' ]= data . model ,
[ 'mileage' ]= data . mileage ,
[ 'silnik' ]= data . silnik ,
[ 'rok' ]= data . rok ,
[ 'bak' ]= data . bak ,
}, false )
end )
Wysłany: 2020-04-07, 18:03
Kuks*
Wiek: 15 Na forum: 3030 dni Posty: 246
Nick w MP: Kuks*
Piwa : 2208
local screenW , screenH = guiGetScreenSize ()
local dxfont0_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 20 )
local dxfont1_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 16 )
local dxfont2_normal = dxCreateFont ( ":buttony-MoveRPG/normal.ttf" , 10 )
function renderGUI ()
dxDrawLine (( screenW * 0.3573 ) - 1 , ( screenH * 0.1306 ) - 1 , ( screenW * 0.3573 ) - 1 , screenH * 0.6426 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine ( screenW * 0.6005 , ( screenH * 0.1306 ) - 1 , ( screenW * 0.3573 ) - 1 , ( screenH * 0.1306 ) - 1 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine (( screenW * 0.3573 ) - 1 , screenH * 0.6426 , screenW * 0.6005 , screenH * 0.6426 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawLine ( screenW * 0.6005 , screenH * 0.6426 , screenW * 0.6005 , ( screenH * 0.1306 ) - 1 , tocolor ( 255 , 160 , 0 , 254 ), 1 , false )
dxDrawRectangle ( screenW * 0.3573 , screenH * 0.1306 , screenW * 0.2432 , screenH * 0.5120 , tocolor ( 0 , 0 , 0 , 175 ), false )
dxDrawText ( "Salon Pojazd?w" , screenW * 0.3573 , screenH * 0.1306 , screenW * 0.6005 , screenH * 0.1944 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont0_normal , "center" , "center" , false , false , false , false , false )
dxDrawText ( "INFO\nMarka\nSilnik\nBak\nRok\n" , screenW * 0.3573 , screenH * 0.1981 , screenW * 0.6005 , screenH * 0.5639 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , dxfont1_normal , "center" , "center" , false , false , false , false , false )
dxDrawRectangle ( screenW * 0.3599 , screenH * 0.5815 , screenW * 0.0807 , screenH * 0.0463 , tocolor ( 255 , 160 , 0 , 254 ), false )
dxDrawRectangle ( screenW * 0.5089 , screenH * 0.5815 , screenW * 0.0807 , screenH * 0.0463 , tocolor ( 255 , 160 , 0 , 254 ), false )
dxDrawText ( "Zakup" , screenW * 0.3589 , screenH * 0.5815 , screenW * 0.4406 , screenH * 0.6278 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont2_normal , "center" , "center" , false , false , false , false , false )
dxDrawText ( "Zamknij okno" , screenW * 0.5078 , screenH * 0.5815 , screenW * 0.5896 , screenH * 0.6278 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , dxfont2_normal , "center" , "center" , false , false , false , false , false )
end
addEvent ( "guis" , true )
addEventHandler ( "guis" , root , function()
addEventHandler ( "onClientRender" , root , renderGUI )
end )
Więcej szczegółów
Wystawiono 1 piw(a):Pyrek24
Wysłany: 2020-04-07, 18:09
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Dzi?ki ! Temat do zamkni?cia Piwko i respekt !
Tagi: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: