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

Wysłany: 2012-12-31, 16:17


Drak







Wiek: 34
Na forum: 4903 dni
Posty: 71
Nick w MP: Drak

Piwa: 3

Respekt: 50

Witam, po d?u?szych poszukiwaniach problemu postanowi?em napisa? do was o pomoc.

M?j problem polega na tym, ?e w pliku .lua mam kod na bramy lecz nie potrafie zrobi? kilku bram w jednym pliku, poniewa? gdy s? one w jednym pliku to nie dzia?aj? tak jak powinny.

Kod skryptu:
Kod:

st = createObject ( 3458, 1142.3000488281, 1228.8994140625, 18.200000762939, 0, 0, 269.98901367188 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1142.3000488281, 1228.8994140625, 18.200000762939 )
outputChatBox ("Dach Zamkniety", thePlayer, 0, 255, 0, false )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1147.4000244141, 1228.9000244141, 18.200000762939 )
outputChatBox ("Dach otwarty", thePlayer, 255, 0, 0, false )
end
end



st = createObject ( 3458, 1137.2000732422, 1228.8988037109, 18.200000762939, 0, 0, 269.99450683594 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1137.2000732422, 1228.8988037109, 18.200000762939 )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1147.4000244141, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1132.1000976563, 1228.8981933594, 18.200000762939, 0, 0, 269.99450683594 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1132.1000976563, 1228.8981933594, 18.200000762939 )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1147.4000244141, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1127.0001220703, 1228.8975830078, 18.200000762939, 0, 0, 269.99450683594 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1127.0001220703, 1228.8975830078, 18.200000762939 )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1111.7001953125, 1228.9000244141, 18.200000762939 )
end
end




st = createObject ( 3458, 1121.9001464844, 1228.8975830078, 18.200000762939, 0, 0, 269.99450683594 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1121.9001464844, 1228.8975830078, 18.200000762939 )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1111.7001953125, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1116.8001708984, 1228.8975830078, 18.200000762939, 0, 0, 269.99450683594 )
function stOD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1116.8001708984, 1228.8975830078, 18.200000762939 )
end
end

function stCD (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1111.7001953125, 1228.9000244141, 18.200000762939 )
end
end
addCommandHandler("dachc", stOD1 )
addCommandHandler("dacho", stCD1 )



st = createObject ( 3268, 1129.5999755859, 1229.5999755859, 10.300000190735, 0, 0, 270 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1129.5999755859, 1229.5999755859, 10.300000190735 )
outputChatBox ("Chowanie hangaru", thePlayer, 0, 255, 0, false )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1129.5999755859, 1229.5999755859, 18.200000762939 )
outputChatBox ("Wysuwanie hangaru", thePlayer, 0, 255, 0, false )
end
end



st = createObject ( 3458, 1142.3000488281, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1142.3000488281, 1228.9000244141, 8.6999998092651 )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1142.3000488281, 1228.9000244141, 18.200000762939 )
end
end




st = createObject ( 3458, 1137.1999511719, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1137.1999511719, 1228.9000244141, 8.6999998092651 )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1137.1999511719, 1228.9000244141, 18.200000762939 )
end
end




st = createObject ( 3458, 1132.0999755859, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1132.0999755859, 1228.9000244141, 8.6999998092651 )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1132.0999755859, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1127, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1127, 1228.9000244141, 8.6999998092651 )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1127, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1121.9000244141, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1121.9000244141, 1228.9000244141, 8.6999998092651 )
end
end


function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1121.9000244141, 1228.9000244141, 18.200000762939 )
end
end



st = createObject ( 3458, 1116.8000488281, 1228.9000244141, 8.6999998092651, 0, 0, 269.98901367188 )
function stOH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1116.8000488281, 1228.9000244141, 8.6999998092651 )
end
end
addCommandHandler("hdol", stO12 )

function stCH (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
moveObject ( st, 10000, 1116.8000488281, 1228.9000244141, 18.200000762939 )
end
end
addCommandHandler("hgora", stCH )
addCommandHandler("hdol", stOH )


Oczywi?cie za pomoc leci :piwo:

PS: Sory za tak d?ug? wiadomos? lecz kod troche zajmuje :P

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-31, 16:37


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Nie wiem czy mam racje ale skrypt nie wie co ma pobiera?. Jest tam st st st st st st st kt?re ma r??ne warto?ci. Zamiast tego zr?b w jednej bramie st w nast?pnej st2 itp. I nie zapomnij tez zmienic np tego moveObject ( st, 10000, 1127, 1228.9000244141, 8.6999998092651 ) na moveObject ( st2, 10000, 1127, 1228.9000244141, 8.6999998092651 )

Nie wiem czy mam racje ale mysle ze pomog?em ;D

Uwarzam, ?e powiniene? zacz?? od czego? ?atwiejszego, bo wida?, ?e bardziej zaawansowany kod sprawia ci trudno?ci...

Pomog?em ci ? Daj piwo !

Ostatnio zmieniony przez Bilguun 2012-12-31, 16:42, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-31, 16:42


Drak







Wiek: 34
Na forum: 4903 dni
Posty: 71
Nick w MP: Drak

Piwa: 3

Respekt: 50

Bilguun, Nie pomog?o, ale :piwo: za pr?be masz:)

Edit:

Chcia?bym doda?, ?e na jedej bramie dzia?a. Jak dodam drug? to g?upieje ;/

Ostatnio zmieniony przez Drak 2012-12-31, 16:44, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-31, 16:43


Bilguun







Wiek: 26
Na forum: 5071 dni
Posty: 133
Nick w MP: Bilguun

Piwa: 4

Respekt: 50

Ostrzeżeń: 20%
Powinno pom?c ;D Przerobie ci ten kod i wysle na priv ;D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-12-31, 17:30


Drak







Wiek: 34
Na forum: 4903 dni
Posty: 71
Nick w MP: Drak

Piwa: 3

Respekt: 50

Bilguun, nie s?dzi?em, ?e kto? naprawi ten kod. By?em pewien, ?e tylko podadz? mi b??dy do naprawienia :) Wi?c wielkie dzi?ki za pomoc.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-01, 13:43


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Dobra to tak bramy z funkcj?
Kod:

if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("GS")) then
musz? by? odzienie.

[ Dodano: 2013-01-01, 13:45 ]
1 brama = 1 plik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-01, 15:39


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

luki123 wprowadzasz u?ytkownika w b??d. To jest bez r??nicy czy jeden plik czy kilka. Aby zmienne i sta?e si? nie powtarza?y i nazwy funkcji.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-01, 19:32


Drak







Wiek: 34
Na forum: 4903 dni
Posty: 71
Nick w MP: Drak

Piwa: 3

Respekt: 50

luki123luki123, Oski, wasze porady doprowadzi?y mnie do sukcesu. Piwka lec? i dzi?kuje za pomoc.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-01, 22:10


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

luki123luki123 og?lnie podaje b??dne pomys?y, wi?c si? nie dziwcie :D

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-02, 07:58


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

Hah, taki jest nasz ?ukaszek :D ...
A bramy na ACL to jest z?y pomys?..;) Wystarczy poszuka? lepszego rozwi?zania..Bo na bramy na ACL to ju? murzyni wpadli :P

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-02, 19:02


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Jak ?le m?wi? ja robi? map? ostatnio i te? to mia?em i zamiast na acl to zrobi?em na team i nie wywala a te moje rozwi?zanie te? dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-03, 15:40


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Odgrzeje temat. Ziomu? dlaczego m?wisz ?e bramy na ACL to z?y pomys? ?
Ja osobi?cie mam na ACL i nie narzekam, chyba ?e obci??aj? server.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-03, 19:00


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Oski, obci??aj?. Wszystko co na pliki obci??a bardziej serwer.

Tzn. bardziej przy wi?kszej ilo?ci bram zauwa?ysz, ?e serwer b?dzie si? d?u?ej pora? z problemem (ew. przy wi?kszej ilo?ci graczy).

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-03, 22:09


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

A lepiej pobiera? z pliku acl czy z bazy sql ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-03, 22:44


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

sql

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Tagi: kilka :: bram :: jednym :: pliku
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