Wysłany: 2015-08-12, 20:22
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
Witam zrobi?em createColCuboid dla id bramy z?by si? otwiera?a ale chce z?by da? te otwieranie przez nick ( np: m?j nick ) i ?aden inny gracz nie m?g? otworzy?.
Za pomoc stawiam
GARAGE_ID = 25
addEventHandler ( "onResourceStart" , getResourceRootElement (),
function ( resource )
local garage25 = createColCuboid (- 2108.50 , 889.60 , 76.70 - 1.5 , 6.6 , 13.8 , 4 )
addEventHandler ( "onColShapeHit" , garage25 , onGarageCubeHit )
addEventHandler ( "onColShapeLeave" , garage25 , onGarageCubeLeave )
end )
function onGarageCubeHit ( hitElement , matchingDimension )
if ( getElementType ( hitElement ) == "player" ) then
if ( not isGarageOpen ( GARAGE_ID )) then
setGarageOpen ( GARAGE_ID , true )
end
end
end
function onGarageCubeLeave ( leaveElement , matchingDimension )
if ( getElementType ( leaveElement ) == "player" ) then
if ( isGarageOpen ( GARAGE_ID )) then
setGarageOpen ( GARAGE_ID , false )
end
end
end
Podpis
Modeler Corporation Sp. Z.O.O
Wysłany: 2015-08-12, 20:24
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
pobierasz nick gracza:
To w instrukcji warunkowej
if ta pobrana nazwa == "twoj nick" then
I oczywi?cie jeden end wiecej
Wysłany: 2015-08-12, 20:28
THEGizmo
Modeler/Uczeń Lua
Wiek: 27 Na forum: 4141 dni Posty: 255
Nick w MP: THEGizmo
Piwa : 3072
DestroY , Dzi?ki do zamkni?cia
Podpis
Modeler Corporation Sp. Z.O.O
Tagi: otwieranie :: garażu :: przez :: nick
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: