Wysłany: 2017-10-30, 14:23
RodzyneQ
Wiek: 25 Na forum: 3594 dni Posty: 87
Nick w MP: RodzyneQ
Piwa : 196
Cze??, mam taki problem, bo po wej?ciu w marker pojawia si? u wszystkich os?b GUI, teraz pytanie: Co zrobi?, ?eby pojawia?o si? tylko u mnie?
Za pomoc stawiam i dam
Wysłany: 2017-10-30, 14:26
X0neX
Wiek: 25 Na forum: 3309 dni Posty: 142
Nick w MP: Xavir
Piwa : 77
Brak kodu - brak rozwi?zania.
Wysłany: 2017-10-30, 14:46
neku^
Wiek: 24 Na forum: 3521 dni Posty: 461
Nick w MP: neku^
Piwa : 1186
je?li robisz triggerem to jako pierwszy argument (element) wysylasz gracza ktoremu chcesz pojawic gui a jak robisz to po stronie clienta to nie powinno sie wszystkim pojawia?
Wysłany: 2017-10-30, 14:52
RodzyneQ
Wiek: 25 Na forum: 3594 dni Posty: 87
Nick w MP: RodzyneQ
Piwa : 196
dbn69 , wystarczy, ze zmienie w mecie na client?
Wysłany: 2017-10-30, 15:06
neku^
Wiek: 24 Na forum: 3521 dni Posty: 461
Nick w MP: neku^
Piwa : 1186
Yyyyyyyyyy? GUI robisz po stronie serwera? Tak sie nie da o ile wiem, najlepiej pokaz caly kod
Wysłany: 2017-10-30, 15:40
RodzyneQ
Wiek: 25 Na forum: 3594 dni Posty: 87
Nick w MP: RodzyneQ
Piwa : 196
dbn69 , niby pod klienta, ale u ka?dego sie pojawia. To jest ten skrypt na komputer osp udost?pniony na gtao.
marker = createMarker (- 2332.94 , - 149.42 , 40.90 - 1 , "cylinder" , 1 , 0 , 100 , 255 )
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
GUIEditor = {
button = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
monitor = guiCreateStaticImage ( 112 * width , 68 * height , 426 * width , 339 * height , "images/monitor.png" , false )
guiSetVisible ( monitor , false )
zamknij = guiCreateButton ( 283 * width , 278 * height , 119 * width , 29 * height , "Zamknij system" , false , monitor )
syrenaPSP = guiCreateButton ( 24 * width , 63 * height , 119 * width , 29 * height , "Alarm PSP" , false , monitor )
monitoring = guiCreateLabel ( 21 * width , 25 * height , 203 * width , 33 * height , "PSP:" , false , monitor )
guiSetFont ( monitoring , "sa-header" )
guiLabelSetColor ( monitoring , 0 , 0 , 0 )
guiLabelSetHorizontalAlign ( monitoring , "left" , true )
--[[ kamera2 = guiCreateButton ( 24 * width , 102 * height , 119 * width , 29 * height , "Gara? 2" , false , monitor )
kamera3 = guiCreateButton ( 24 * width , 141 * height , 119 * width , 29 * height , "Gara? 3" , false , monitor )
kamera4 = guiCreateButton ( 24 * width , 180 * height , 119 * width , 29 * height , "Gara? 4" , false , monitor )
kamera5 = guiCreateButton ( 24 * width , 219 * height , 119 * width , 29 * height , "Przed budynkiem" , false , monitor )
kamera6 = guiCreateButton ( 24 * width , 258 * height , 119 * width , 29 * height , "W ?rodku jednostki" , false , monitor )]]
alarm = guiCreateButton ( 254 * width , 102 * height , 119 * width , 29 * height , "Syrena OSP" , false , monitor )
wezwanie = guiCreateButton ( 254 * width , 141 * height , 119 * width , 29 * height , "Wezwij OSP" , false , monitor )
napisAlarm = guiCreateLabel ( 231 * width , 26 * height , 166 * width , 32 * height , "OSP:" , false , monitor )
guiSetFont ( napisAlarm , "sa-header" )
guiLabelSetColor ( napisAlarm , 0 , 0 , 0 )
guiLabelSetHorizontalAlign ( napisAlarm , "left" , true )
wylacz = guiCreateButton ( 418 * width , 403 * height , 212 * width , 44 * height , "Wy??cz podgl?d z kamery" , false )
guiSetVisible ( wylacz , false )
wezwij = guiCreateWindow ( 92 * width , 163 * height , 470 * width , 155 * height , "Komputer PSP" , false )
guiWindowSetSizable ( wezwij , false )
guiSetAlpha ( wezwij , 1.00 )
guiSetVisible ( wezwij , false )
wyslij = guiCreateButton ( 10 * width , 98 * height , 185 * width , 47 * height , "Wyslij" , false , wezwij )
anuluj = guiCreateButton ( 275 * width , 98 * height , 185 * width , 47 * height , "Anuluj" , false , wezwij )
tekst = guiCreateEdit ( 10 * width , 26 * height , 450 * width , 51 * height , "" , false , wezwij )
end
)
function otworz ()
guiSetVisible ( monitor , true )
showCursor ( true )
outputChatBox ( "Zalogowa?e? si? do komputeru PSP" )
end
addEventHandler ( "onClientMarkerHit" , marker , otworz )
function zamknij ()
if source == zamknij then
guiSetVisible ( monitor , false )
showCursor ( false )
outputChatBox ( "Wylogowa?e? si? z systemu." )
end
end
addEventHandler ( "onClientGUIClick" , root , zamknij )
-- kamery + off kamer
--[[function kameraJeden ()
if source == kamera1 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 114.7031 , 1016.1692 , 23.8511 , - 119.90000152588 , 1021 , 21 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 1." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraJeden )
function kameraDwa ()
if source == kamera2 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 114.8578 , 1007.6431 , 23.9889 , - 122.59999847412 , 1013.0999755859 , 20.39999961853 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 2." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraDwa )
function kameraTrzy ()
if source == kamera3 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 114.6912 , 998.3926 , 23.9341 , - 123.40000152588 , 1004.4000244141 , 20.39999961853 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 3." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraTrzy )
function kameraCztery ()
if source == kamera4 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 115.7143 , 989.5533 , 23.6280 , - 124.90000152588 , 995.09997558594 , 20.39999961853 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 4." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraCztery )
function kameraPiec ()
if source == kamera5 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 114.0060 , 989.8550 , 23.8644 , - 103.59999847412 , 1004.299987793 , 19.799999237061 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 5." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraPiec )
function kameraSzesc ()
if source == kamera6 then
guiSetVisible ( monitor , false )
setCameraMatrix (- 129.8901 , 1023.9247 , 27.9543 , - 122.40000152588 , 1018.299987793 , 26 )
guiSetVisible ( wylacz , true )
showCursor ( true )
outputChatBox ( "**Podgl?d z kamery nr 6." )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraSzesc )
function kameraOff ( thePlayer )
if source == wylacz then
guiSetVisible ( wylacz , false )
guiSetVisible ( monitor , true )
setCameraTarget ( localPlayer )
end
end
addEventHandler ( "onClientGUIClick" , root , kameraOff )]]
-- syrena alarmowa OSP
function syrenaOSP ()
if source == alarm then
local syrena = playSound3D ( "syrena.mp3" , - 321.01 , 1202.86 , 24.66 , false )
setSoundVolume ( syrena , 300 )
setSoundMaxDistance ( syrena , 350 )
outputChatBox ( "Uruchomi?e? syren? alarmow? OSP." )
end
end
addEventHandler ( "onClientGUIClick" , root , syrenaOSP )
function syrenaPSP ()
if source == alarm then
local syrena = playSound3D ( "syrena.mp3" , - 2295.58 , - 159.47 , 40.90 , false )
setSoundVolume ( syrenaPSP , 300 )
setSoundMaxDistance ( syrenaPSP , 350 )
outputChatBox ( "Uruchomi?e? alarm PSP." )
end
end
addEventHandler ( "onClientGUIClick" , root , syrenaPSP )
-- panel alarmowy OSP
function wezwanie ()
if source == wezwanie then
guiSetVisible ( monitor , false )
guiSetVisible ( wezwij , true )
showChat ( false )
end
end
addEventHandler ( "onClientGUIClick" , root , wezwanie )
function anulujWezwanie ()
if source == anuluj then
guiSetVisible ( monitor , true )
guiSetVisible ( wezwij , false )
showChat ( true )
end
end
addEventHandler ( "onClientGUIClick" , root , anulujWezwanie )
function ST ()
if source == wyslij then
local text = guiGetText ( tekst )
triggerServerEvent ( "NAOT" , getLocalPlayer (), text )
showChat ( true )
guiSetVisible ( monitor , true )
guiSetVisible ( wezwij , false )
end
end
addEventHandler ( "onClientGUIClick" , root , ST )
Wysłany: 2017-10-30, 16:25
neku^
Wiek: 24 Na forum: 3521 dni Posty: 461
Nick w MP: neku^
Piwa : 1186
function otworz ( el )
if el ~= localPlayer then return end
guiSetVisible ( monitor , true )
showCursor ( true )
outputChatBox ( "Zalogowa?e? si? do komputeru PSP" )
end
addEventHandler ( "onClientMarkerHit" , marker , otworz )
Podmien sobie i sprawdz czy dziala
Więcej szczegółów
Wystawiono 1 piw(a):RodzyneQ
Wysłany: 2017-10-30, 18:23
RodzyneQ
Wiek: 25 Na forum: 3594 dni Posty: 87
Nick w MP: RodzyneQ
Piwa : 196
Dzia?a, jak obieca?em - i
[ Dodano : 2017-10-30, 18:24 ]
- do zamkniecia -
Tagi: gui :: pojawiające :: się :: wszystkich
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: