Wysłany: 2018-05-12, 18:00
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
CLIENT
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Dzwonki" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Dzwonki" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , getRootElement (), function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_sc" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEvent ( "playSyrena_cc" , true )
addEventHandler ( "playSyrena_cc" , getRootElement (), function()
local syrena = playSound3D ( "pik.wav" ,- 2305 , - 174 , 42.5 , true )
setSoundMaxDistance ( syrena , 150 )
setTimer ( stopSound , 25 * 1000 , 1 , syrena )
end )
SERVER
addEventHandler ( "onMarkerLeave" , muker , function( el , md )
if getElementType ( el ) ~= "player" then return end
triggerClientEvent ( el , "hideGUI" , el )
end )
Więcej szczegółów
Wystawiono 1 piw(a):adisonboss
Wysłany: 2018-05-15, 06:48
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
Sorry ?e tak p??no ale dzi?ki dzia?a. Umiesz rozwi?za? problem z na?o?onym na siebie GUI tak jak na screenie https://imgur.com/a/wahiNl2
Wysłany: 2018-05-15, 14:51
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
A to nie jest czasem od 3d texta(napis nad markerem) ?
Wysłany: 2018-05-15, 15:16
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
?adnego napisu nad markerem nie ma. Tylko s? dwa markery i w obydwu wy?wietla si? to samo
Wysłany: 2018-05-15, 15:39
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
Poka? ca?y kod z strony clienta
Wysłany: 2018-05-15, 16:04
adisonboss
Wiek: 23 Na forum: 3332 dni Posty: 237
Piwa : 6
1. Skrypt
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Syrene" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Syrena OSP Fort Carson" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , getRootElement (), function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_s" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEventHandler ( "onClientClick" , getRootElement (), Closegui )
addEvent ( "playSyrena_c" , true )
addEventHandler ( "playSyrena_c" , getRootElement (), function()
local syrena = playSound3D ( "syrena.wav" ,- 146.90988 , 1039.63464 , 27.25537 , true )
setSoundMaxDistance ( syrena , 1800 )
setTimer ( stopSound , 103 * 1000 , 2.5 , syrena )
end )
2.Skrypt
x , y = guiGetScreenSize ()
button = guiCreateButton ( 627 / 1440 * x , 510 / 900 * y , 209 / 1440 * x , 123 / 900 * y , "Uruchom Dzwonki" , false )
guiSetProperty ( button , "NormalTextColour" , "FFAAAAAA" )
guiSetVisible ( button , false )
function drawSyrena ()
dxDrawRectangle ( 600 / 1440 * x , 278 / 900 * y , 261 / 1440 * x , 372 / 900 * y , tocolor ( 0 , 0 , 33 , 184 ), false )
dxDrawRectangle ( 590 / 1440 * x , 265 / 900 * y , 289 / 1440 * x , 16 / 900 * y , tocolor ( 187 , 0 , 0 , 255 ), false )
dxDrawText ( "Dzwonki" , 616 / 1440 * x , 346 / 900 * y , 851 / 1440 * x , 445 / 900 * y , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "default" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "showGUI" , true )
addEventHandler ( "showGUI" , getRootElement (), function()
guiSetVisible ( button , true )
addEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( true , false )
end )
addEvent ( "hideGUI" , true )
addEventHandler ( "hideGUI" , getRootElement (), function()
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
panel = false
end )
addEventHandler ( "onClientGUIClick" , button , function()
triggerServerEvent ( "playSyrena_sc" , getLocalPlayer ())
guiSetVisible ( button , false )
removeEventHandler ( "onClientRender" , getRootElement (), drawSyrena )
showCursor ( false )
end , false )
addEvent ( "playSyrena_cc" , true )
addEventHandler ( "playSyrena_cc" , getRootElement (), function()
local syrena = playSound3D ( "pik.wav" ,- 2305 , - 174 , 42.5 , true )
setSoundMaxDistance ( syrena , 150 )
setTimer ( stopSound , 25 * 1000 , 1 , syrena )
end )
Tagi: przycisk :: quotanulujquot :: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: