Wysłany: 2018-11-18, 18:59
Ognisty_12877
Wiek: 24 Na forum: 2892 dni Posty: 52
Nick w MP: Delti
Piwa : 1
Witam mam problem gdy? nie mog? zrobi? funkcji na sprawdzenie, gdy gracz jest w cuboidzie i prosz? was o pomoc. Bo chce zrobi? funkcje kt?ra sprawdza, gdy gracz jest w cuboidzie to mo?e w??czy? panel. Za pomoc daje Piwerko
*Cuboid
local strefa_bazy = createColCuboid ( 2342.9052734375 , - 65.643363952637 , 26.3359375 , 21 , 35 , 10.25 )
*Wy?wietlanie panelu
render ()
active = false
function Panel3 ()
if active then return end
if isPedInVehicle ( localPlayer ) then return end
guiSetVisible ( Panelpod . window [ 1 ], not guiGetVisible ( Panelpod . window [ 1 ] ))
showCursor ( not isCursorShowing ())
end
bindKey ( "F1" , "down" , Panel3 )
Wysłany: 2018-11-18, 19:06
CjPomarancza
:-)
Wiek: 17 Na forum: 3183 dni Posty: 90
Piwa : 12
Podpis
Pomogłem? Doceń mnie i postaw
Więcej szczegółów
Wystawiono 1 piw(a):Ognisty_12877
Wysłany: 2018-11-19, 15:19
Ognisty_12877
Wiek: 24 Na forum: 2892 dni Posty: 52
Nick w MP: Delti
Piwa : 1
Ale jest problem gdy? otwieranie jest po stronie clienta a cuboid musi byc po stornie servera.
Wysłany: 2018-11-19, 15:23
CjPomarancza
:-)
Wiek: 17 Na forum: 3183 dni Posty: 90
Piwa : 12
"Ognisty_12877" napisał/a :Ale jest problem gdy? otwieranie jest po stronie clienta a cuboid musi byc po stornie servera.
Podpis
Pomogłem? Doceń mnie i postaw
Wysłany: 2018-11-19, 15:53
Ognisty_12877
Wiek: 24 Na forum: 2892 dni Posty: 52
Nick w MP: Delti
Piwa : 1
sprawdzilem czy wysyla event z servera do client, i nawet nie wysyla sie ta wiadomosc dwdadw.
*client
function wiad ()
outputChatBox ( "dwdadw" )
end
addEvent ( "wcuboidzie" , true )
addEventHandler ( "wcuboidzie" , localPlayer , wiad )
*server
function ColShapeHit ( thePlayer , matchingDimension )
local detection = isElementWithinColShape ( thePlayer , circlearea )
detection = detection and getElementDimension ( thePlayer ) == getElementDimension ( circlearea )
if detection then
outputChatBox ( getPlayerName ( thePlayer ).. "Jest w cuboid" )
triggerClientEvent ( "wcuboidzie" )
end
end
addEventHandler ( "onColShapeHit" , root , ColShapeHit )
addCommandHandler ( "sprc" , ColShapeHit )
Wysłany: 2018-11-19, 17:08
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Zapomnia?e? o argumencie sourceElement w
Spr?buj poni?szy kod:
server
function ColShapeHit ( thePlayer , matchingDimension )
local detection = isElementWithinColShape ( thePlayer , circlearea )
detection = detection and getElementDimension ( thePlayer ) == getElementDimension ( circlearea )
if detection then
outputChatBox ( getPlayerName ( thePlayer ).. "Jest w cuboid" )
triggerClientEvent ( thePlayer , "wcuboidzie" , thePlayer )
end
end
addEventHandler ( "onColShapeHit" , root , ColShapeHit )
addCommandHandler ( "sprc" , ColShapeHit )
client
addEvent ( "wcuboidzie" , true )
function wiad ()
outputChatBox ( "dwdadw" )
end
addEventHandler ( "wcuboidzie" , getRootElement (), wiad )
Więcej szczegółów
Wystawiono 1 piw(a):Ognisty_12877
Wysłany: 2018-11-20, 15:41
Ognisty_12877
Wiek: 24 Na forum: 2892 dni Posty: 52
Nick w MP: Delti
Piwa : 1
Dzi?ki wyszystkim za pomoc daje piwerko i respekt.
Tagi: dzialanie :: panelu :: tylko :: danym :: cuboid
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: