Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: brama
1. Brama
Witam, mam problem z poprawnym zamknięciem bramy po wcześniejszym wyjściu z cuboida. Na początku brama otwiera się poprawnie, lecz gdy wjadę wyjadę i znowu wjadę przed zakończeniem wcześniejszej animacji brama nie wraca do podstawowej pozycji. Kod


function onColShapeHit (hitPlayer)
    if 
settingsGate.openG then return end
        
if isPlayerInPoliceFaction(hitPlayer) then
            moveObject 
( settingsGate.gate, 635, 1544.69, -1630.80, 13.334, 0, -90, 0)
            
setTimer(function()
                
settingsGate.openG = true
            end
, 500, 1)
        
end
    end
    
    
function onColShapeLeave ()
    if 
not settingsGate.openG then return end
        moveObject 
( settingsGate.gate, 635,  1544.69, -1630.80, 13.334, 0, 90, 0)
        
setTimer(function()
            
settingsGate.openG = false
        end
, 500, 1)
    
end
    
    addEventHandler 
( "onColShapeLeave", settingsGate.cuboid, onColShapeLeave )
    
addEventHandler ( "onColShapeHit", settingsGate.cuboid, onColShapeHit )

Z góry dziękuje za pomoc. ;)
2. nie działa automatyczna brama
Napisa?em skrypt na automatyczna brame i mi nie dzia?a, prosze o pomoc:(((

Kod:

b = createObject (980, 1804.585, -1721.8, 13.540, 0, 180, 0)

marker1 = createMarker ( 1801.954, -1727.100, 12.850, "corona", 10, 0, 0, 0 )


function ob1Poli (hitElement, matchingDimension)

moveObject (b, 1700, -1721.8, 13.540)

end

addEventHandler("onMarkerHit", marker1, ob1Poli)
3. Brama
Hej mam taki kod i nie wiem czemu gdy wchodz? w marker to gui wyswietla sie dla wszystkich graczy czy moglby ktos napisac aby wyswietlalo sie tylko dla gracza, ktory wszedl w marker?

[code]
local screenW, screenH = guiGetScreenSize()
local sx, sy = guiGetScreenSize()
local w, h = (sx/1280),(sy/720)


texts={
{text="OTW?RZ"},
{text="ZAMKNIJ",},
{text="W?a?ciciel: Manie?usz",},
{text="Zakupiony u: Tadeusza",},
{text="Kiedy: 13.09.2021",},
}

local pozycje = {
["brama"] = {980, -2706, 425, 5, 0, 0, 180}, --ID BRAMY | X, Y, Z, RX, RY, RZ
["marker"] = {-2706, 427, 4, 8, 255, 0, 0, 0},
["otwarcie"] = {-2720, 425, 5},
["zamkniecie"] = {-2706, 425, 5},
}

local window = {
["okno"] = {418*w, 342*h, 455*w, 274*h},
["TAK"] = {433*w, 438*h, 162*w, 64*h},
["NIE"] = {701*w, 438*h, 162*w, 64*h},
["NTAK"] = {431*w, 438*h, 595*w, 502*h},
["NNIE"] = {699*w, 439*h, 858*w, 498*h},
["infopng"] = {632*w, 456*h, 30*w, 26*h},
["oknoinfo"] = {418*w, 342*h, 455*w, 274*h},
["opisinfo1"] = {556, 410, 788, 451},
["opisinfo2"] = {556, 441, 788, 482},
["opisinfo3"] = {556, 475, 788, 513},
["zamknijinfo"] = {842*w, 352*h, 21*w, 26*h},
["ownerpng"] = {522, 406, 24, 25},
[&qu...
4. Brama na organizacje
Cze??, zrobi?em skrypt na bram? do organizacji i nie dzia?a. Ni?ej podam skrypt i meta
Prosze o odpowie? co mam doda? albo usun??.

___________________________________________________________________________________


Brama 
= createObject (980, 1498.6999511719, -700.20001220703, 96.5, 0, 0, 0)
function 
OtworzBrame ()
        if 
getElementData(localPlayer, "player:organization") ~= "Marabunda then return end 
                moveObject ( Brama, 1000, 1498.6999511719, -700.20001220703, 90.199996948242 )
end
addCommandHandler("
ob", OtworzBrame )

function ZamknijBrame ()
        if getElementData(localPlayer, "
player:organization") ~= "Marabunda then return end 
                moveObject 
( Brama, 1000, 1498.6999511719, -700.20001220703, 96.5 )
end
addCommandHandler
("zb", ZamknijBrame )



___________________________________________________________________________________

<meta>
    <
info type="script" name="Brama-marabunda" author="Kr3q" version="1.2.0" description="Brama" />
    <
script src="brama.lua" type="brama" />
</
meta>
5. Brama
Cze??, zrobi?em skrypt na bram? i nie dzia?a. Ni?ej podam skrypt i meta bo nie robi? skrypt?w na co dzie? i nie wiem czy jest dobrze, ale nie wiem czy musz? mie? plik MAP, ?eby usun?? poprzedni? map?. Prosz? o pomoc.


Skrypt:
brama = createObject(971, 2504.6999511719, -1691, 12.579999923706, 0, 0, 0)

function bramaopen ()
moveObject (brama, 1000, 2504.6999511719, -1691, 5)
end
addComandHandler("bo", bramaopen)

function bramaclose ()
moveObject (brama, 1000, 2504.6999511719, -1691, 12.579999923706)
end
addComandHandler("bc", bramaclose)


Meta:
<meta>
<script src="script.lua" type="server"/>
</meta>

Dodano: 2022-04-23, 12:59
Poprawi?em plik meta i wyglada teraz tak
[code]<meta>
<oop>true</oop>
<info type="map" version="1.0.0"></info>
<map src="bramaa.map" dimension="0"></map>
<settings>
<setting name="#maxplayers" value="[ 128 ]"></setting>
<setting name="#useLODs" value="[ false ]"></setting>
<setting name="#gamespeed" value="[ 1 ]"></setting>
<setting name="#minplayers" value="[ 0 ]"></setting>
<setting name="#gravity" value="[ 0.0080000004 ]"></setting>
<setting n...
6. brama pod cuboid
Witam, chcia?bym, ?eby nadana data po wjechaniu w cuboid otwiera?a si? brama a po wyjechaniu zamkn??a.

brama 
= createObject (971, -1520.9347167969, 2661, 53.910816192627, 0, 0, 0) -- kordy bramy (ID,x,y,z,rotX,rotY,rotZ)
local bramacuboid = createColCuboid(-1524.87, 2657.68, 49.85, 8.00, 4.79, 6.89)


function 
onColShapeHit ( vehicle 
        
if  getElementData( veh:prawko)
        
outputChatBox( "Zapraszamy na miasto! Szybciutko wyje?d?aj !" )  
        
moveObject ( Brama, 971, -1520.9347167969, 2661, 53.910816192627, 0, 0, 0 )
   
end
end
)
 
addEventHandler("onColShapeHit",bramacuboid , brama)

function 
onColShapeLeave ( vehicle 
        
if  getElementData( veh:prawko )
        
moveObject ( Brama, 971, -1520.9347167969, 2661, 57.910816192627, 0, 0, 0 )
    
end
end
)

addEventHandler ( "onColShapeLeave", bramacuboid, brama )
7. brama na kod
witam mam pewien problem
zrobi?em brame na kod i dzia?a na serwerze lokalnym lecz jak wgram na prawdziwy serwer to nie pokazuje jej


Brama = createObject (975, -2435.5, -650.79, 135.69, 0, 0, rotacja)
function OtworzBrame ()
moveObject (Brama, 2500, -2435.5, -650.79, 132.10,-6)
end
addCommandHandler("bramao", OtworzBrame)

function ZamknijBrame ()
moveObject (Brama, 2500, -2435.5, -650.79, 135.69)
end
addCommandHandler("bramaz", ZamknijBrame)
8. brama sie nie otwiera
Brama sie nie otwiera,
server:
[lua]function CDomki()
local object = {}

-- domki do kupna
removeWorldModel(13817, 1000, 1353.23, -625.68, 109.13) --lod
local garazeDayZ = {
jakis = createObject(3095, 1353.66, -626.34, 109.13, -0.0, 0.0, 193.3)
}
object.domki =
{ -- [id] = {x, y, z, preset interioru, cena, wlasciciel(nie zmieniamy z nil), garazID, czas(nie zmieniamy z 0) }

[1] = {2495.23, -1690.42, 13.5, 1, 4000, nil, 9, 0}, -- dom johnsona. grove
[2] = {2523.38, -1658, 14.4, 2, 2350, nil, false, 0}, -- dom po lewej od koszykowki grove
[3] = {2486.5, -1645.8, 13, 3, 3100, nil, false, 0}, -- dom 2-pietrowy grove
[4] = {315.17, -1771, 3.6, 3, 3250, nil, 13, 0}, -- dom na plazy 2-pietrowy garaz
[5] = {1298.69, -800.46, 83, 4, 10000, nil, false, 0}, -- willa madd doga
[6] = {2468.79, -1295.53, 28.9, 2, 2200, nil, false, 0}, -- dom jednorodzinny kolo strip clubu
[7] = {2068.12, -1731.63, 12.8, 6, 2000, nil, false, 0}, -- kolo pizzerii
[8] = {2069, -1717, 12.5, 6, 2000, nil, false, 0}, -- kolo domku wyzej
[9] = {1981.72, -1682.74, 16, 3, 3300, nil, false, 0}, -- domek 2 pi?trowy ko?o domk?w wy?ej
[10] = {1981.47, -1718.94, 16, 3, 3250, nil, false, 0}, -- domek 2 pi?trowy kolejny obok tego wy?ej
[11] = {1331.41, -631.56, 108.13, 5, 4000, nil, garazeDayZ.jakis, 0}, -- domek mulholland
[12] = {1686, -2100, 12.8, 7, 3000, nil, 5, 0}, -- domek el corona
[13] = {2382.98, -1366.29, 23.4, 6, 2100, nil, false, 0}, -- syfia...
9. Brama na item
Mam pytanie, jak zrobi? co? w dzia?aniu jak brama na item, czyli np

Tworzy sie brame ( createObject ), je?li gracz kliknie przycisk w CGUI to ona sie obni?y za pomoc? moveObject i item zostanie zabrany, item ma elementdate

setElementData(argument1, "Winter Card" tutaj jest np +1 lub -1)
10. Brama frakcja
Witam jak zrobic tak by gracz mogl otworzyc brame bedac w frakcji a nie beda na duty chodzi mi tu o element date (w serverze)
11. [PROBLEM] Brama pod ACL
Witam, napisa?em kod na bram?, dzia?a?a lecz chcia?em da? j? na acl ale mi si? dziwnie formatowa?o i nie dzia?a?o. m?j kod:

local ubrama={
brama=createObject(980, -1908.0999755859, 238.60000610352, 36.799999237061, 0, 0, 0),
marker=createMarker(-1908.0999755859, 238.60000610352, 34, "cylinder", 8, 0, 0, 0, 0),
}

function 
moveGate()
    
moveObject(ubrama.brama, 5000, -1908.0999755859, 238.60000610352, 30, 0, 0, 0, "InOutQuad")
    
end
addEventHandler
("onMarkerHit", ubrama.marker, moveGate)

function 
moveBack()
    
moveObject(ubrama.brama, 5000, -1908.0999755859, 238.60000610352, 36.799999237061, 0, 0, 0, "InOutQuad")
end
addEventHandler
("onMarkerLeave", ubrama.marker, moveBack)


Z g?ry dzi?ki :D
12. Brama el.data
Czesc od dluzszego czasu probuje zrobic brame z db
 Brama = createObject (9625, -2439.39, 758.7, 36, 0, 0, 90)
function 
OtworzBrame ()
if 
getElementData(thePlayer, "player:duty") == PSP then
moveObject 
( Brama, 1000, -2439.39, 758.7, 30 )
end
end
addCommandHandler
("od", OtworzBrame )

function 
ZamknijBrame ()
if 
getElementData(thePlayer, "player:duty") == PSP then
moveObject 
( Brama, 1000, -2439.39, 758.7, 36 )
end
end
addCommandHandler
("zd", ZamknijBrame ) 
i co dodac jakie linijki gdzie jak zdefinowac thePlayer?
13. brama
Witam.
nie dawno by?em tutaj zeby brama by?a pod element date PSP na swoim serwerze na kt?rym skryptuje.
Dosta?em taki kod
 Brama = createObject (9625, -2439.39, 758.7, 36, 0, 0, 90)
function 
OtworzBrame ()
if 
getElementData(thePlayer, "player:duty") == PSP then
moveObject 
( Brama, 1000, -2439.39, 758.7, 30 )
end
end
addCommandHandler
("od", OtworzBrame )

function 
ZamknijBrame ()
if 
getElementData(thePlayer, "player:duty") == PSP then
moveObject 
( Brama, 1000, -2439.39, 758.7, 36 )
end
end
addCommandHandler
("zd", ZamknijBrame ) 

i mi nie dzia?a poniewa? chcia?em ?eby ta brama by?a dla gracza o frakcji PSP tylko ?e frakcja to jest duty

[ Dodano: 2020-01-21, 10:47 ]
debugscript 3 https://imgur.com/a/dCc1INl
14. Brama
Czesc
na swoim serwerze do skryptowania tak o zrobilem skrypt na brame
 Brama = createObject (9625, -2439.39, 758.7, 36, 0, 0, 90)
function 
OtworzBrame ()
moveObject ( Brama, 1000, -2439.39, 758.7, 30 )
end
addCommandHandler
("od", OtworzBrame )

function 
ZamknijBrame ()
moveObject ( Brama, 1000, -2439.39, 758.7, 36 )
end
addCommandHandler
("zd", ZamknijBrame )



i chce zeby to bylo dla PSP duty
dlatego stworzylem element dat?
         if getElementData(thePlayer,"player:duty") == "PSP" then 
gdzie to wklejic?
15. Brama publiczna
potrzebuje aby kto? zmodyfikowa? moj? brame tak aby dzia?a?a dla wszystkich odo skrypt:
local Sciana = createObject( 980, -1754.1999511719, -116.30000305176, 0.89999997615814, 0, 0, 90)
local Marker = createMarker(-1754.1999511719, -116.30000305176, 3, "cylinder", 9.0, 1 , 1 , 1 , 155)

function otworzbrame(plr)
if isElement( plr ) and getElementType( plr ) == "player" then
moveObject (Sciana, 2000, -1754.1999511719, -116.30000305176, 0.89999997615814)
return end
end
addEventHandler("onMarkerHit", Marker, otworzbrame)

function zamknijbrame(plr)
if isElement( argunent ) and getElementType( argument ) == "player" then
moveObject (Sciana, 2000, -1754.1999511719, -116.30000305176, 0.89999997615814)
return end
end
addEventHandler( "onMarkerLeave", Marker, zamknijbrame)
16. Brama w budynku - jak usunąć?
Cze??, wiecie mo?e jak usun?? bram? kt?ra jest pokazana na SS, nie da si? jej usun?? - "usuwatorem obiekt?w", na innym serwerze widzia?em ?e owej bramy nie ma... Wie kto? co na to poradzi??


https://imgur.com/a/n8Srhfr

Czeka :piwo:
:)
17. brama w LS SAPD
Witam mam skrypt na brame do sapd z timerem i on mi nie dzia?a

local x,y,z = 1544.6999511719, -1626.9000244141, 14.1


 lsbazasapd 
= createObject ( 2933, x,y,z, 0, 0, 270.25)

function 
movelsbaza()
    
moveobject (lsbazasapd , 250, x, y+7, z)
    
setTimer ( function ()
    
moveobject (lsbazasapd , 500, x,y,z)
        
end, 20000, 1 )
   
end 
   addCommandHandler
('baza', movelsbaza )


db3:
Kod:


Error: [LS_project]/test15brama.lua:35 attempt to call global 'moveobject' (a nil value)
18. Brama
Witam,Mam pytanko gdzie moge wrzuci? to

Kod:

if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( playera ) ), aclGetGroup( 'Pa?stwowa' ) ) then


by brama otwiera?a si? na komende

Kod:

Brama = createObject (11313, -1494.69, 735, 8.19, 0, 0, 270.75)
function OtworzBrame ()
moveObject ( Brama, 6000, -1494.69, 735, 12.19 )
end
addCommandHandler("pspo1", OtworzBrame )

function ZamknijBrame ()
moveObject ( Brama, 6000, -1494.69, 735, 8.19 )
end
addCommandHandler("pspz1", ZamknijBrame )



Pomo?e kto? ?

chcia?bym aby brama si? otwiera?a tylko dla Frakcji : Pa?stwowa

ale nie wiem gdzie to wklej?
19. brama
Czesc zrobilem sobie brame na klawisz i nie dziala ona tak jak powinna, otoz po wcisnieciu klawisza otwiera sie ale juz nie moge jej zamknac i nic z ni? zrobic, wie kto? jak to naprawi??

[code]
new bool:gateopened = true;





{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2771.178222, -1615.043090, 10.121890))
{
if(gateopened == false)
{
MoveDynamicObject(podnosnik[0], 2769.567382, -1612.641113, 12.981890, 0.2);
MoveDynamicObject(podnosnik[1], 2769.567382, -1617.121459, 12.981890, 0.2);
MoveDynamicObject(podnosnik[2], 2772.830566, -1612.641113, 12.981890, 0.2);
MoveDynamicObject(podnosnik[3], 2772.830566, -1617.121459, 12.981890, 0.2);
MoveDynamicObject(podnosnik[4], 2769.495605, -1614.002441, 12.181894, 0.2);
MoveDynamicObject(podnosnik[5], 2769.495605, -1615.962890, 12.181894, 0.2);
MoveDynamicObject(podnosnik[6], 2769.622558, -1615.983520, 12.181894, 0.2);
MoveDynamicObject(podnosnik[7], 2772.885742, -1614.023071, 12.181894, 0.2);
MoveDynamicObject(podnosnik[8], 2772.758789, -1614.002441, 12.181894, 0.2);
MoveDynamicObject(podnosnik[9], 2772.758789, -1615.962890, 12.181894, 0.2);
MoveDynamicObject(podnosnik[10], 2772.885742, -1615.983520, 12.181894, 0.2);
MoveDynamicObject(podnosnik[11], 2769.622558, -1614.023071, 12.181894, 0.2);
MoveDynamicObject(podnosnik[12], 2772.817138, -1614.948852, 12.211894, 0.2);
MoveDynamicObject(podnosnik[13], 2769.544677, -1614.948852,...
20. brama nie dziala
na moim serwerze nie dziala brama
ta pierwsza dziala ale ta druga juz nie(ta druga z dopiskiem 1 nie dziala)
[lua]
local gate={
-- var
object=createObject(969, 1544.70,-1630.85,12.51,0,0,90),
marker=createMarker(1544.29,-1626.99,13.38-1, "cylinder", 9, 0, 0, 0, 0),
close=true,
animation=false,
}

gate.open=function()
if gate.animation or not gate.close then return end

gate.animation=true
moveObject(gate.object, 5000, 1544.70,-1630.85,9.01,0,0,0, "OutQuad")

setTimer(function()
gate.animation=false; gate.close=false
end, 6000, 1)
end

gate.close=function()
if gate.animation or gate.close then return end

gate.animation=true
moveObject(gate.object, 2000, 1544.70,-1630.85,12.51,0,0,0, "OutQuad")

setTimer(function()
gate.animation=false; gate.close=true
end, 6000, 1)
end
--------------------------------------------------------------------------------------------

local gate1={
-- var
object=createObject(969, 1584.75,-1637.87,12.54),
marker1=createMarker(1589.04,-1637.47,13.44-1, "cylinder", 9, 0, 0, 0, 0)
close1=true,
animation1=false,
}

gate1.open=function()
if gate.animation1 or not gate.close1 then return end

gate.animation1=true
moveObject(gate.object, 5000, 1584.75,-1637.87,8.54, "OutQuad")
setTimer(function()
gate.animation1=false; gate.close1=false
end, 6000, 1)
end

gate1.close=function()
if gate.animation1 or gate.close1 then retu...
21. Nie działająca brama
cze?c,Mam problem Poniewa? zrobi?em brame na acl do frakcji sapd ale okaza?o sie ?e frakcja sapd jest pod mysql jak zreszt? ca?a paczka mo?e kto? mi pom?c zrobi? brame pod mysql???
22. Nie działa brama dla frakcji
Siema taj jak w temacie za pomoc stawiam :piwo:

[lua]local door1 = createObject(3089, -50.099609375,30.900390625,980.90002441406,0,0,0)
local door2 = createObject(3089, -60.669921875,13.5,980.90002441406,0,0,0)
setElementInterior(door1, 2)
setElementInterior(door2, 2)
local marker1 = createMarker(-49.44,30.95,980.61-1, "cylinder", 1.8, 255, 255, 255, 0)
setElementInterior(marker1, 2)
local marker2 = createMarker(-59.94,13.53,980.61-1, "cylinder", 1.8, 255, 255, 255, 0)
setElementInterior(marker2, 2)

function isPlayerInPoliceFaction(plr)
local sid=getElementData(plr,'player:uid')
if not sid then return end

local result=exports['ogrpg-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND sud=? LIMIT 1;', "SAPD", uid)
if result[1] then
return true
else
return false
end
end

addEventHandler("onMarkerHit", marker1, function(el)
if not isPlayerInPoliceFaction(el) then return end
local px, py, pz = getElementPosition(door1)
moveObject(door1, 2000, px+2, py, pz)
end)

addEventHandler("onMarkerLeave", marker1, function(el)
if not isPlayerInPoliceFaction(el) then return end
moveObject(door1, 2000, -50.099609375, 30.900390625, 980.90002441406)
end)

addEventHandler("onMarkerHit", marker2, function(el)
if not isPlayerInPoliceFaction(el) then return end
local px, py, pz = getElementPosition(door2)
moveObject(door2, 2000, px+2, py, pz)
end)

addEventHandler("o...
23. Brama
local brama1 = createObject(980,281.87, 1460.66, 1341.77, 0, 0 ,90)
function 
otworz(plr)
if 
getElementData(plr, "frakcja") then
moveObject
(brama1,5000,281.87, 1460.66, 1330.77)
outputChatBox("* Trwa otwieranie celi nr 1...",plr,0,255,0)
end
end
function zamknij(plr)
if 
getElementData(plr, "frakcja") then
moveObject
(brama1,5000,281.87, 1460.66, 1341.77)
outputChatBox("* Trwa zamykanie celi nr 1...",plr,255,0,0)
end
end
addCommandHandler
('o',otworz)
addCommandHandler('z',zamknij) 


Blad w DB3:
 bad argument @ 'getElementData' [Expected element at argument 1, got string 'z'  
24. Brama acl
Witam mam bardzo prosty problem ale tak dawno tego nie robi?em ?e si? zapomnia?o.
Ot?? brama na ACL nie dzia?a w og?le si? nawet nie pojawia


Brama 
= createObject (2933, -1571.8, 661.70, 7.90, 0, 0, 90)
function 
OtworzBrame ()
if 
not getPlayerAccount(plr) then return end
local accName 
= getAccountName(getPlayerAccount(plr))
if 
isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja") ) then 
moveObject 
( Brama, 10000, -1571.8, 671, 7.90 )
addCommandHandler("otworzpoli2", OtworzBrame )
end

function ZamknijBrame ()
if 
not getPlayerAccount(plr) then return end
local accName 
= getAccountName(getPlayerAccount(plr))
if 
isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja") ) then 
moveObject 
( Brama, 10000, -1571.8, 661.70, 7.90 )
addCommandHandler("zamknijpoli2", ZamknijBrame )
end
25. Brama nie działa
Siema zrobi?em wszystko dobrze i powinno dzia?a ale c?? co? musia?o si? sta? i nie wiem co jest ?le.
Za pomoc postawie piwo

Serwer:
function isPlayerInFaction1(plr)
 
local sid=getElementData(plr,'player:sid')
 if 
not sid then return end

 local result
=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;', "SARA", sid)
 if 
result[1] then
  
return true
 
else
  return 
false
 end
end

local bramaSARA 
= createObject(971, -489.29,-562.46,25.52, 0, 0, 180)
local bramaSARAm = createMarker(-488.72,-561.89,25.52, "cylinder", 8, 255, 255, 255, 0)

addEventHandler("onMarkerHit", bramaSAPD, function(el)
    if 
not isPlayerInFaction1(el) then return end
    local px
, py, pz = getElementPosition(bramaSARA)
    
moveObject(bramaSARA, 4000, px, py, pz-15)
end)

addEventHandler("onMarkerLeave", bramaSAPDm, function(el)
    if 
not isPlayerInFaction1(el) then return end
    moveObject
(bramaSARA, 4000, -488.72,-561.89,25.52)
end)
26. brama
brama nie dziala chce zeby otwierala sie na cmd a zamyka?a po opuszczeniu markera ;/

marker1 
= createMarker( 2487.80640,-1669.21960,13.3359, 'cylinder',12, 0, 0, 255, 0) 
brama1 = createObject ( 980,2487.80640,-1669.21960,13.3359, 0, 0, 0 ) 
setElementDimension(brama1, 0)
setElementDimension(marker1, 0)
function 
MarkerHit1 (hitPlayer, matchingDimension) 
if 
getElementType( hitPlayer ) == "player" then 

 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Everyone")) or 
            
isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Moderator")) or 
                
isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("SuperModerator")) then 
moveObject 
( brama1, 2500, 2487.80640,-1669.21960,13.3359-7) 
addCommandHandler("o", MarkerHit1 )
end 
end 
end 






function MarkerLeave1 (thePlayer) 
moveObject ( brama1, 2500, 2487.80640,-1669.21960,13.3359) 
end 

addEventHandler 
( "onMarkerLeave", marker1, MarkerLeave1 ) 
addEventHandler ( "onMarkerHit", marker1, MarkerHit1 )

27. Brama na marker
Niestety mam problem ze skryptem ot?? po prostu nie dzia?a w db3 nic kod
[lua]

--]] Autor skryptu: Patrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

bm = createMarker(-2305.70557, -157.99330, 34.26875, "cylinder", 1.0, 0, 0, 0, 255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d = createObject (5856, -2306.5, -155.39, 36.40, 0, 0, 0) -- podajesz koordy obiektu

local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"

function od ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 10000, -2306.5, -155.39, 32.20 ) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end

function zd ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 10000,-2306.5, -155.39, 36.40) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji...
28. brama na przycisk
[lua]Brama = createObject (980, 1588.06738, -1637.92737, 14.42048, 0, 0)

function Otwieranie(thePlayer)
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Policja")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("LiderPolicja")) then
if getPlayerTeam(player) == getTeamFromName("Policja") then
moveObject(Brama, 980, 1588.06738, -1637.92737, 9.42048)
end
end
end

addEventHandler("onResourceStart", root, function()
for k,v in ipairs(getElementsByType("player")) do
bindKey(v, "e", "down", Otwieranie)
end
end)



function Zamykanie(thePlayer)
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Policja")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("LiderPolicja")) then
if getPlayerTeam(player) == getTeamFromName("Policja") then
moveObject(Brama, 980, 1588.06738, -1637.92737, 14.42048)
end
end
end


addEventHandler("onResourceStart", root, function(
for k,v in ipairs(getElementsByType("player")) do
bindKey(v, "r", "down", Zamykanie)
end
end[/lua]

wyskakuje w debugscript 3: [code]ERROR: Loading script failed: brama_sapdbrama.lua:29: <name> or '..." expected near 'for'[/c...
29. Brama dla Grupy ACL
Witam chcia? bym kod na brame dla grupy w ACL. Chodzi mi o takie cos ze gracz z danej grupy wpisuje /open to sie otwiera a jak gracz kt?ry nie jest w grupie to sie nie otwiera z g?ry dzieki
30. Brama
Witam nie dzia?a mi brama. Ot?? pojawia si? marker ale nie dzia?a w nim scrolowanie

ZA POMOC R* I :piwo:

KOD
[lua]
--]] Autor skryptu: Patrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

bm = createMarker(-2305.39233, -152.57820, 34.46875, "cylinder", 1.0, 0, 0, 0, 255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d = createObject (5422,-2306.60, -149.80, 36.40, 0, 0, 0) -- podajesz koordy obiektu

local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"

function od ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 10000, -2306.60, -149.80, 31.89 ) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end

function zd ( thePlayer)
if isElementWithinMarker(thePlayer, bm) then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d, 10000,-2306.60, -149.80, 36.40) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
...
31. Brama ACL
Witam nie wiem jak zrobic brame na kom?d? ale ?eby otwiera?a si? tylko wtedy gdy jestem w danej grupie w ACL z g?ry dzieki
32. Brama frakcji.
Witam,
Moglby ktos powiedziec jaka linijke dopisac zeby brama otwierala sie tylko jak dany gracz jest w frakcji?
Frakcje mam na MySQL.

Kod:

brama = createObject ( 980, -258.84, 873.91, 12.02, 0, 0, 90)
bramaMarker = createMarker (-258.68627929688, 873.84497070313, 12.091595649719, "cylinder", 8.5, 0, 255, 0, 100 )

function otworz(el, thePlayer)
if isElementWithinMarker(player, bramaMarker) then
return
end
moveObject (brama, 1000, -258.84, 873.91, 5.4, 0, 0, 0)
moveObject (brama2, 1000, 2105.18, 1863.44, 5.1, 0, 0, 0)
end
addEventHandler ("onMarkerHit", bramaMarker, otworz)

function zamknij(el, thePlayer)
if getElementType( leaveElement ) == "player" then
return
end
moveObject (brama, 4000, -258.84, 873.91, 12.02, 0, 0, 0)
moveObject (brama2, 4000, 2105.18, 1863.44, 12.5, 0, 0, 0)
end
addEventHandler ("onMarkerLeave", bramaMarker, zamknij)

33. Brama
[lua]
local marker1 = createMarker(-2430.12, -653.64 , 135.05-1, "cylinder", 1.5, 0, 0, 255, 255) --marker1
local marker2 = createMarker(-2443.58, -648.14, 135.02-1, "cylinder", 1.5, 0, 0, 255, 255) --marker2
local brama = createObject(10149, -2437.21, -650.03, 135.05, 0, 0, 0) --pozycja zamknietych drzwi

openclose = true

function OtwieranieZamykanie(el, md)
if openclose == true then
openclose = false
moveObject(drzwi, 2000,-2422.31,-649.55, 135.05) --otwieranie drzwi
else
openclose = true
moveObject(drzwi, 2000,-2430.12, -653.64 , 135.05) --zamykanie drzwi
end
end

addEventHandler("onPlayerJoin", root, function()
for k,v in ipairs(getElementsByType("player")) do --to tworzy bind gdy wchodzimy w marker i mozemy otworzyc drzwi
function Creation(el, md)
bindKey(v, "e", "down", OtwieranieZamykanie)
end
addEventHandler("onMarkerHit", marker1, Creation)
addEventHandler("onMarkerHit", marker2, Creation)

function Delete(el, md)
unbindKey(v, "e", "down", OtwieranieZamykanie) --unbindKey gdy wyjdziemy z markeru zeby nie bylo ze 15 km otwierasz drzwi czy tym podobne
end
addEventHandler("onMarkerLeave", marker1, Delete)
addEventHandler("onMarkerLeave", marker2, Delete)
end
end)
[/lua]



mam problem poniewa? chcialmyb zrobic taka brame ,, i ter...
34. Brama - nie zamyka sie, co jest w tym zle?
Witam,
posiadam pewien skrypt na brame, otwiera sie normalnie, ale jak ma wrocic na swoje miejsce, to nic sie nie dzieje.
Licze na pomoc.
Brama = createObject (971, 1447.4, 663.1, 9.4, 0, 0, 0)
function 
bramaot ()
moveObject ( Brama, 1000, 1447.4, 663.1, 6-10)
end
addCommandHandler
("otworz", bramaot) 

function 
bamaza ()
moveObject (Brama, 3000, 1447.4, 663.1, 9.4+10)
end
addCommandHandler
("zamknij", bramaza )
35. Brama pod Tunera
Witam!
Mog?aby mi jaka? osoba pom?c przy bramach? Ot?? chcia?bym zrobi? bram?, kt?r? m?g?by tylko otwiera?, Pracownik tuner-sf Pr?bowa?em to zrobi? lecz nie potrafi?. Stawiam zimne :piwo: oraz R* za pomoc! Prosz? o jak najszybsz? pomoc!
36. Brama v2
Siemka
Ot?? mia?em problem z bram? i Ciastu? mi pom?g? i my?la?em ?e ju? jest dobrze
Lecz dzisiaj gdy moj kumpel pojecha? pod t? brame to te? sie otworzy?a a tylko moje uid by?o podane
Link do tamtego tematu: http://www.gtao.pl/brama-vt119208.htm
37. Brama
Siemka mam skrypt na bramy kt?re otwieraj? si? graczowi z danym UID.
Lecz gdy chce aby brama si? dla mnie otworzy?a to niestety nie dzia?a to. A w DB3 te? czystko a tak?e UID te? dobre poda?em.
Daje kod:

local gate
={
    -- var
    
object=createObject(5020, 1811.74, -1889.56, 13.41, 0, 0, 90),
    
marker=createMarker(1811.74, -1889.56, 13.41, "cylinder", 6, 0, 0, 0, 0),
    
closed=true,
    
animation=false,
}

gate.open=function()
    if 
gate.animation or not gate.closed then return end

    gate
.animation=true
    moveObject
(gate.object, 5000, 1811.74, -1889.56, 10.41, 0, 0, 0, "OutQuad")
        
    
setTimer(function()
        
gate.animation=false; gate.closed=false
    end
, 6000, 1)
end

gate
.close=function()
    if 
gate.closed then return end

    gate
.animation=true
    moveObject
(gate.object, 5000, 1811.74, -1889.56, 13.41, 0, 0, 0, "OutQuad")
        
    
setTimer(function()
        
gate.animation=false; gate.closed=true
    end
, 6000, 1)
end

gate
.toggle=function(el)
    if 
not el then return end

    
if getElementData(el,"player_uid") == 2 then
        
if gate.animation then
            
return
        
end

        
if gate.closed then
            gate
.open()
            
setTimer(function()
                
gate.close()
            
end, 8000, 1)

        
end
    
else
        
outputChatBox("* Brak uprawnien.", el, 255, 0, 0)
    
end
end

addEventHandler
("onMarkerHit", gate.marker, function(el,md)
    
gate.toggle(el)
end) 
38. brama
Witam posiadam bardzo dziwny problem a mianowicie. Gdy otwieram bram? podchodz?c ona si? otwiera lecz si? nie zamyka. Jak podejd? i szybko odejd? do bramy znowu to ona si? zamknie lecz po chwili si? otworzy

[lua]
local gate={
-- var
object=createObject(2990, 2237, -2218.1999511719, 16.5, 0, 0, 313.74981689453),
marker=createMarker(2235.72, -2219.71, 13.55, "cylinder", 9, 0, 255, 0, 0),
closed=true,
animation=false,
}

gate.open=function()
if gate.animation or not gate.closed then return end

gate.animation=true
moveObject(gate.object, 5000, 2237, -2218.1999511719, 16.5, 0, 0, 0, "OutQuad")

setTimer(function()
gate.animation=false; gate.closed=false
end, 6000, 1)
end

gate.close=function()
if gate.animation or gate.closed then return end

gate.animation=true
moveObject(gate.object, 5000, 2237, -2218.1999511719, 7.5, 0, 0, 0, "OutQuad")

setTimer(function()
gate.animation=false; gate.closed=true
end, 6000, 1)
end

gate.toggle=function(el)
if not el then return end

if getElementData(el, 'player:duty')=='LSSD' then
if gate.animation then
outputChatBox('* Odczekaj chwile...', el, 255, 0, 0)
return
end

if gate.closed then
gate.open()

setTimer(function()
gate.close()
end, 3000, 1)
end
else
...
39. Brama na ID skina
Siemka, da rade zrobi? co? takiego ?e brama otwiera?aby si? osobom tylko z podanym w skrypcie skinem? Za Pomoc daje :piwo: :piwo: :piwo:
40. Automatyczna brama
Witam zrobi?em sobie brame otwieraj?c? si? na cmd ale chcia?bym aby po np 4 sekundach sama sie zamyka?a niestety nie mam pomys?u jak to wykona? timerem czy jak.