Wysłany: 2014-06-25, 18:09
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
siema chcia?bym zrobi? szlaban na marker i gdy nie zamknie si? jeszcze szlaban i wejd? poraz kolejny to si? buguje jak zrobi? ?eby si? nie bugowa?o i szlaban chodzi? w zakresie 90 stopni ? Kod:
--Tworzymy szlaban
szlaban = createObject ( 968, 1754.1999511719, -1907.3000488281, 13.60000038147, 0, 0, 0 )
--Tworze Marker
Marker = createMarker ( 1754.1999511719, -1907.3000488281, 13.60000038147,0,0,0, "cylinder", 8 0, 255, 0, 100 )
function otworz (player)
if isElementWithinMarker(player, bramaMarker) then --sprawdza czy gracz jest w markerze
moveObject ( szlaban, 3200, 1754.1999511719, -1907.3000488281, 8.5 )
end
end
addEventHandler ("onMarkerHit", Marker, otworz)
function zamknij (leaveElement, matchingDimension)
if getElementType( leaveElement ) == "player" then -- sprawdza czy gracz opuscil marker
moveObject (szlaban, 3200, 1754.1999511719, -1907.3000488281, 13.60000038147,0,0,-90 )
end
end
addEventHandler ("onMarkerLeave", Marker, zamknij)
Wysłany: 2014-06-25, 18:23
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
dodajesz co? takiego :
otwieranie = false
podczas otwierania dodaj
otwieranie = true
i setTimer ( otwieranie, 3300, 1, false )
i warunek
if otwieranie == true then return end
Wysłany: 2014-06-25, 18:49
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
Zrobi?em tak i nie dzia?a Kod: --Tworzymy szlaban
szlaban = createObject ( 968, 2105.67578125, 1864.5966796875, 11.081231117249, 0, 90,0 )
--Tworze Marker
Marker = createMarker ( 2105.67578125, 1864.5966796875, 11.081231117249,0,0,0, "cylinder", 8 0, 255, 0, 100 )
otwieranie = false
function otworz(thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( szlaban, 300, 2495.1999511719,2773.3000488281,5.5999999046326,0,90,0)
otwieranie = true
setTimer ( otwieranie, 3300, 1, false )
if otwieranie == true then return
end
end
end
addEventHandler ("onMarkerHit", Marker, otworz)
function zamknij (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( szlaban, 300,2105.67578125, 1864.5966796875, 11.081231117249,0,-90,0)
end
end
addEventHandler ("onMarkerLeave", Marker, zamknij)
Wysłany: 2014-06-25, 18:50
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
warunek i otwieranie = true przed moveObject
Wysłany: 2014-06-25, 19:00
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
Wysłany: 2014-06-25, 19:02
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
podmie? setTimer tamto na te :
setTimer ( function()
otwieranie = false
end, 3300, 1 )
Ostatnio zmieniony przez MeeShuffle 2014-06-25, 19:08, w całości zmieniany 1 raz
Wysłany: 2014-06-25, 19:06
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
zrobi?em tak i nadal to samo w db3 Kod: --Tworzymy szlaban
szlaban = createObject ( 968, 2105.67578125, 1864.5966796875, 11.081231117249, 0, 90,0 )
--Tworze Marker
Marker = createMarker ( 2105.67578125, 1864.5966796875, 11.081231117249,0,0,0, "cylinder", 8, 255, 0, 100 )
otwieranie = false
function otworz(thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
setTimer ( function()
otwieranie = false )
end, 3300, 1 )
if otwieranie == true then return
moveObject ( szlaban, 300, 2495.1999511719,2773.3000488281,5.5999999046326,0,90,0)
end
end
addEventHandler ("onMarkerHit", Marker, otworz)
function zamknij (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( szlaban, 300,2105.67578125, 1864.5966796875, 11.081231117249,0,-90,0)
end
end
addEventHandler ("onMarkerLeave", Marker, zamknij)
Wysłany: 2014-06-25, 22:47
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Poki?ka?e? kolejno??...
function otworz ( thePlayer )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( thePlayer )), aclGetGroup ( "Admin" )) then
if otwieranie == true then return
otwieranie = true
moveObject ( szlaban , 300 , 2495.1999511719 , 2773.3000488281 , 5.5999999046326 , 0 , 90 , 0 )
setTimer ( function()
otwieranie = false
end , 3300 , 1 )
end
end
addEventHandler ( "onMarkerHit" , Marker , otworz )
Ostatnio zmieniony przez MeeShuffle 2014-06-26, 13:09, w całości zmieniany 1 raz
Wysłany: 2014-06-26, 12:39
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
Wysłany: 2014-06-26, 13:09
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Zaktualizowa?em kod wy?ej.
Wysłany: 2014-06-26, 13:52
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
Wysłany: 2014-06-26, 13:55
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Wysłany: 2014-06-26, 14:35
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
Kod: st = createObject ( 968, 2107.189453125, 1863.623046875, 10, 0, 0, 180 )
marker1 = createMarker(2107.189453125, 1863.623046875, 9.9, "cylinder", 8, 255, 0, 0,110 )
function otworz(thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
if otwieranie == true then return
otwieranie = true
moveObject ( st, 1000, 2107.189453125, 1863.623046875, 10,0,90,0)0)
setTimer ( function()
otwieranie = false )
end, 3300, 1 )
end
addEventHandler("onMarkerHit", marker1,stO)
function stC ( thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( st, 1000, 2107.189453125, 1863.623046875, 10,0,-90,0)
end
addEventHandler ("onMarkerLeave", marker1,stC)
Wysłany: 2014-06-26, 14:38
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Da?em Ci kod wy?ej to dalej starego u?ywasz..
Wysłany: 2014-06-26, 15:15
matik19977
Wiek: 28 Na forum: 4904 dni Posty: 32
Nick w MP: nicollas
tu jest dzia?aj?cy ale buguj?cuy si?. nie wiem co mam zmieni? Kod: st = createObject ( 968, 2107.189453125, 1863.623046875, 10, 0, 0, 180 )
marker1 = createMarker(2107.189453125, 1863.623046875, 9.9, "cylinder", 8, 255, 0, 0,110 )
function otworz(thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( st, 1000, 2107.189453125, 1863.623046875, 10,0,90,0)
end
end
addEventHandler ("onMarkerHit", marker1, otworz)
function stC ( thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then
moveObject ( st, 1000, 2107.189453125, 1863.623046875, 10,0,-90,0)
end
end
addEventHandler ("onMarkerLeave", marker1,stC)
Tagi: szlaban
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: