Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-06-25, 18:09


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 18:23


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

dodajesz co? takiego :

otwieranie = false

podczas otwierania dodaj

otwieranie = true

i setTimer ( otwieranie, 3300, 1, false )

i warunek


if otwieranie == true then return end :)

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 18:49


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 18:50


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

warunek i otwieranie = true przed moveObject

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 19:00


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 19:02


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

podmie? setTimer tamto na te :


setTimer ( function()
otwieranie = false
end, 3300, 1 )

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Ostatnio zmieniony przez MeeShuffle 2014-06-25, 19:08, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 19:06


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 22:47


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poki?ka?e? kolejno??...

function otworz(thePlayer) 
if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then 
if otwieranie == true then return 
otwieranie true
moveObject szlaban3002495.1999511719,2773.3000488281,5.5999999046326,0,90,0setTimer ( function() 
otwieranie false
end3300end 
end 
addEventHandler ("onMarkerHit"Markerotworz


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Ostatnio zmieniony przez MeeShuffle 2014-06-26, 13:09, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 12:39


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 13:09


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Zaktualizowa?em kod wy?ej.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 13:52


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

http://scr.hu/0s68/75j8t teraz sprawdzie?m kod kt?ry da?em be? przer?bki i mia? kilka bl?d?w poprawilem je doda?em i szlaban si? nie pojawia a w db3 to: http://scr.hu/0s68/75j8t

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 13:55


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poka? kod.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 14:35


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 14:38


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Da?em Ci kod wy?ej to dalej starego u?ywasz..

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-26, 15:15


matik19977







Wiek: 28
Na forum: 4904 dni
Posty: 32
Nick w MP: nicollas



Respekt: 50

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)


Postaw piwo autorowi tego posta
 

 
Tagi: szlaban
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku