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

Wysłany: 2012-08-31, 21:12


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

Mam ma?y problem z bram?, oto kod:

Kod:


szlabanpoli = createObject ( 968, -1572.1999511719, 658.79998779297, 6.9000000953674, 0, 90, 90 )

function openSzlabanPoli ( command, thePlayer )
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Policja" ) ) then
moveObject ( szlabanpoli, 968, -1572.19921875, 658.7998046875, 6.9000000953674, 0, -90, 0 )
end
end
addCommandHandler ( "otworzszlaban", openSzlabanPoli )

function closeSzlabanPoli ( command, thePlayer )
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Policja" ) ) then
moveObject ( szlabanpoli, 968, -1572.1999511719, 658.79998779297, 6.9000000953674, 0, 90, 0 )
end
end
addCommandHandler ( "zamknijszlaban", closeSzlabanPoli )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:13


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

vipSEBOvip, poka? mete.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:15


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

masz
Kod:


<meta>
<info type="script" name="Policja"></info>
<script src="bramypoli.lua"></script>
</meta>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:17


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Kod:

<meta>
<info type="script" name="Policja" />
<script src="bramypoli.lua" type="server" />
</meta>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:25


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

nie dzia?a, masz debuga:


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:27


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

szlabanpoli createObject 968, -1572.1999511719658.799987792976.900000095367409090 ) 

function openSzlabanPoli (thePlayercmd) 
if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup "Policja" ) ) then 
moveObject szlabanpoli968, -1572.19921875658.79980468756.90000009536740, -90end 
end 
addCommandHandler "otworzszlaban"openSzlabanPoli ) 

function closeSzlabanPoli (thePlayercmd) 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup "Policja" ) ) then 
moveObject szlabanpoli968, -1572.1999511719658.799987792976.9000000953674090end 
end 
addCommandHandler "zamknijszlaban"closeSzlabanPoli )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-31, 21:30


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

dzia?a, postawie ci piwko :D

[ Dodano: 2012-09-01, 10:10 ]
i tu pada kolejny problemik, jak masz binda(np. /bind 1 otworzszlaban i /bind 2 zamknijszlaban ) to brama nie zamyka si? tylko ustawia tak(doda?em otwieranie na markery):


czy jest na to jaka? funkcja blokuj?ca??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-01, 10:25


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

vipSEBOvip, daj kod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-01, 10:26


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

masz:

szlabanpoli createObject 968, -1572.1999511719658.799987792976.900000095367409090 )
wjazdszlabanpoli createMarker ( -1569.0999755859661.599975585946.1999998092651"cylinder"300255 )
wyjazdszlabanpoli createMarker ( -1574.5999755859661.799987792976.1999998092651"cylinder"300255 )

function szlabanPoli thePlayercmd )
    if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer) ), aclGetGroup "Policja" ) ) then
        moveObject szlabanpoli968, -1572.19921875658.79980468756.90000009536740, -90)
        setTimer ( 
            function( thePlayercmd )
                moveObject szlabanpoli968, -1572.1999511719658.799987792976.9000000953674090)
            end5000)
    else
        outputChatBox "Nie jeste? w Policji!!"source00255 )
    end
end
addEventHandler "onMarkerHit"wjazdszlabanpoliszlabanPoli )
addEventHandler "onMarkerHit"wyjazdszlabanpoliszlabanPoli )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-01, 11:50


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Wi?c tak:
Najpierw stw?rz do?? spory marker, kt?ry obejmuje ca?y szlaban.
Potem dodaj do tego taki kod:

szlabanpoli createObject 968, -1572.1999511719658.799987792976.900000095367409090 local marker = ...

function openSzlabanPoli (hitElementmatchingDimension) 
if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup "Policja" ) ) then 
moveObject szlabanpoli968, -1572.19921875658.79980468756.90000009536740, -90end 
end 
addEventHandler("onMarkerHit"markeropenSzlabanPoli)

function closeSzlabanPoli (hitElementmatchingDimension) 
if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup "Policja" ) ) then 
moveObject szlabanpoli968, -1572.1999511719658.799987792976.9000000953674090end 
end 
addEventHandler("onMarkerLeave"markercloseSzlabanPoli)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-01, 13:13


vipSEBOvip

A poor begginer






Wiek: 26
Na forum: 5178 dni
Posty: 597
Nick w MP: xSebaPL

Piwa: 77

Respekt: 140
Respekt: 140

nie mo?na podchodzi? w 2 osoby :(

Postaw piwo autorowi tego posta
 

 
Tagi: brama
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » BRAMA 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