Wysłany: 2012-12-31, 16:17
Drak
Wiek: 34 Na forum: 4903 dni Posty: 71
Nick w MP: Drak
Piwa : 3
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
PS: Sory za tak d?ug? wiadomos? lecz kod troche zajmuje
Wysłany: 2012-12-31, 16:37
Bilguun
Wiek: 26 Na forum: 5071 dni Posty: 133
Nick w MP: Bilguun
Piwa : 4
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
Wysłany: 2012-12-31, 16:42
Drak
Wiek: 34 Na forum: 4903 dni Posty: 71
Nick w MP: Drak
Piwa : 3
Bilguun , Nie pomog?o, ale 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
Wysłany: 2012-12-31, 16:43
Bilguun
Wiek: 26 Na forum: 5071 dni Posty: 133
Nick w MP: Bilguun
Piwa : 4
Powinno pom?c ;D Przerobie ci ten kod i wysle na priv ;D
Wysłany: 2012-12-31, 17:30
Drak
Wiek: 34 Na forum: 4903 dni Posty: 71
Nick w MP: Drak
Piwa : 3
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.
Wysłany: 2013-01-01, 13:43
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
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
Wysłany: 2013-01-01, 15:39
Oski
LUA Scripter
Wiek: 30 Na forum: 5246 dni Posty: 428
Nick w MP: Oski
Piwa : 56
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.
Wysłany: 2013-01-01, 19:32
Drak
Wiek: 34 Na forum: 4903 dni Posty: 71
Nick w MP: Drak
Piwa : 3
luki123luki123 , Oski , wasze porady doprowadzi?y mnie do sukcesu. Piwka lec? i dzi?kuje za pomoc.
Wysłany: 2013-01-01, 22:10
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
luki123luki123 og?lnie podaje b??dne pomys?y, wi?c si? nie dziwcie
Wysłany: 2013-01-02, 07:58
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Hah, taki jest nasz ?ukaszek ...
A bramy na ACL to jest z?y pomys?..;) Wystarczy poszuka? lepszego rozwi?zania..Bo na bramy na ACL to ju? murzyni wpadli
Wysłany: 2013-01-02, 19:02
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
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
Wysłany: 2013-01-03, 15:40
Oski
LUA Scripter
Wiek: 30 Na forum: 5246 dni Posty: 428
Nick w MP: Oski
Piwa : 56
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.
Wysłany: 2013-01-03, 19:00
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
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).
Wysłany: 2013-01-03, 22:09
Oski
LUA Scripter
Wiek: 30 Na forum: 5246 dni Posty: 428
Nick w MP: Oski
Piwa : 56
A lepiej pobiera? z pliku acl czy z bazy sql ?
Wysłany: 2013-01-03, 22:44
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
Tagi: kilka :: bram :: jednym :: pliku
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: