Wysłany: 2020-03-25, 23:08
dakuVen
Wiek: 30 Na forum: 2859 dni Posty: 10
Nick w MP: dakuVen
Mam problem z bramami na paczce PSSM kt?r? pobralem z GTAO.
Gdy chce zrobi? otwierane i zamykane bramy to obiekt si? ustawia lecz nie chce si? otworzy? ani zamkn??.
Wszystkie kordy s? powpisywane.
Pomo?e kto? prosz?. Stawiam Zimne piwko za pomoc l.
Wysłany: 2020-03-26, 00:34
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
Wysłany: 2020-03-26, 07:10
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Zobacz tak?e na bledy DB3, mo?e wprowadzi?e? wsz?dzie te same koordynaty?
Wysłany: 2020-03-26, 10:00
dakuVen
Wiek: 30 Na forum: 2859 dni Posty: 10
Nick w MP: dakuVen
"mixLoLmix2" napisał/a :
Kod: function isPlayerInFraction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end
local result=exports['ogrpg-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;', "PSP", uid)
if result[1] then
return true
else
return false
end
end
local movingGates = {}
function addFractionGate(tbl1,tbl2,time,colsize)
local model, x, y, z, xr,yr,zr = unpack(tbl1)
local gate = createObject( model,x,y,z,0,0,zr or 0)
local tx, ty, tz,txr,tyr,tzr = unpack(tbl2)
local col = createColSphere( x, y, z, colsize )
setElementInterior(gate,tbl1[8] or 0)
addEventHandler("onColShapeHit",col,function (thePlayer)
if not movingGates[gate] then
if thePlayer and getElementType(thePlayer)=="player" then
if isPlayerInFraction(thePlayer) then
movingGates[gate] = true
if tzr then
moveObject( gate, time,tx,ty,tz,(txr-xr),(tyr-yr),(tzr-zr) or 0)
else
moveObject( gate, time,tx,ty,tz,0,0,0)
end
setTimer(function ()
if not tzr then
moveObject( gate, time,x,y,z,0,0,0)
else
moveObject( gate, time,x,y,z,-(txr-xr),-(tyr-yr),-(tzr-zr))
end
setTimer(function ()
movingGates[gate] = nil
end,time,1)
end,time+2500,1)
end
end
end
end,false)
end
bmDRZWI = createMarker(-2776.34, -336.35, 7.19-0.9, "cylinder", 1.75, 255, 255, 255, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
local drzwi = createObject (3089, -2776.34, -336.35, 7.19,0, 0, 0 ) -- podajesz koordy obiektu
--setObjectScale(drzwi,1.1)
function odrzwi ( thePlayer)
if isElementWithinMarker(thePlayer, bmDRZWI) then
if isPlayerInFraction(thePlayer) then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie Drzwi...")
moveObject ( drzwi,3089, -2776.34, -336.35, 7.19) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
end
end
end
function zdrzwi ( thePlayer)
if isElementWithinMarker(thePlayer, bmDRZWI) then
if isPlayerInFraction(thePlayer) then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie Drzwi...")
moveObject ( drzwi, 3089, -2776.34, -336.35, 7.19) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
end
end
end
addCommandHandler("o", odrzwi ) -- haslo otwartych drzwi
addCommandHandler("z", zdrzwi ) -- haslo zamknietych drzwi]]
bmDRZWI2 = createMarker(-1842.46, -9.77, 15.37-0.9, "cylinder", 1.75, 255, 255, 255, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
local drzwi2 = createObject (3089, -1842.4 ,-11.5,15.4,0, 0, 90 ) -- podajesz koordy obiektu
--setObjectScale(drzwi,1.1)
function odrzwi2 ( thePlayer)
if isElementWithinMarker(thePlayer, bmDRZWI2) then
if isPlayerInFraction(thePlayer) then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie Drzwi...")
moveObject ( drzwi2,3089, -1842.4 ,-13.5,15.4) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
end
end
end
function zdrzwi2 ( thePlayer)
if isElementWithinMarker(thePlayer, bmDRZWI2) then
if isPlayerInFraction(thePlayer) then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie Drzwi...")
moveObject ( drzwi2, 3089, -1842.4 ,-11.5,15.4 ) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
end
end
end
addCommandHandler("o", odrzwi2 ) -- haslo otwartych drzwi
addCommandHandler("z", zdrzwi2 ) -- haslo zamknietych drzwi
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
local d = createObject (11313, -1832.2, 22.30, 16, -0.00, 0.00, 180 ) -- podajesz koordy obiektu
local d2 = createObject (11313, -1832.2, 22.30+17.1, 16, -0.00, 0.00, 180 ) -- podajesz koordy obiektu
local d3 = createObject (11313, -1832.2, 22.30+34.2, 16, -0.00, 0.00, 180 ) -- podajesz koordy obiektu
local d4= createObject (11313, -1832.2, 22.30+51.4, 16, -0.00, 0.00, 180 ) -- podajesz koordy obiektu
local d5 = createObject (11313, -1832.2, 22.30+68.6, 16, -0.00, 0.00, 180 ) -- podajesz koordy obiektu
local d6 = createObject (11313, -1861.7, 108.84, 16, -0.00, 0.00, 270 ) -- podajesz koordy obiektu
local colshape = createColCuboid ( -1865.75, -26.43, 14.12, 48.0, 200.0, 7.0 )
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 1...")
moveObject ( d,11313,-1832.2, 22.30, 16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 1...")
moveObject ( d, 11313,-1832.2, 22.30, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob1", od ) -- haslo otwartych drzwi
addCommandHandler("zb1", zd ) -- haslo zamknietych drzwi
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 2...")
moveObject ( d2,11313,-1832.2, 22.30+17.1,16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 2...")
moveObject ( d2, 11313,-1832.2, 22.30+17.1, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob2", od ) -- haslo otwartych drzwi
addCommandHandler("zb2", zd ) -- haslo zamknietych drzwi
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 3...")
moveObject ( d3,11313,-1832.2, 22.30+34.2,16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 3...")
moveObject ( d3, 11313,-1832.2, 22.30+34.2, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob3", od ) -- haslo otwartych drzwi
addCommandHandler("zb3", zd ) -- haslo zamknietych drzwi
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 4...")
moveObject ( d4,11313,-1832.2, 22.30+51.4,16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 4...")
moveObject ( d4, 11313,-1832.2, 22.30+51.4, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob4", od ) -- haslo otwartych drzwi
addCommandHandler("zb4", zd ) -- haslo zamknietych drzwi
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 5...")
moveObject ( d5,11313,-1832.2, 22.30+68.6,16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 5...")
moveObject ( d5, 11313,-1832.2, 22.30+68.6, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob5", od ) -- haslo otwartych drzwi
addCommandHandler("zb5", zd ) -- haslo zamknietych drzwi
function od ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy nr 6...")
moveObject ( d6,11313,-1861.7, 108.84, 16-4.5,0,0,0) -- Koordy otwartych drzwi
end
end
end
function zd ( thePlayer)
if isElementWithinColShape(thePlayer, colshape) then
if getElementData(thePlayer,"player:duty") == "PSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy nr 6...")
moveObject ( d6, 11313,-1861.7, 108.84, 16,0,0,0 ) -- koordy zamknietych drzwi
end
end
end
addCommandHandler("ob6", od ) -- haslo otwartych drzwi
addCommandHandler("zb6", zd ) -- haslo zamknietych drzwi
--[[
------------------ 2 -----------
bm2 = createMarker(-40.21,1188.46,19.43-0.9, "cylinder", 1.1, 255, 255, 255, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
local d2 = createObject (5856, -37.37,1188.48-0.1,19.36+1.8,0, 0, 90 ) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function od2 ( thePlayer)
if isElementWithinMarker(thePlayer, bm2) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy OSP...")
moveObject ( d2,5856,-37.37,1188.48-0.1,19.36+6.5,0, 0, 0) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
function zd2 ( thePlayer)
if isElementWithinMarker(thePlayer, bm2) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy OSP...")
moveObject ( d2, 5856, -37.37,1188.48-0.1,19.36+1.8,0, 0, 0 ) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
addCommandHandler("o", od2 ) -- haslo otwartych drzwi
addCommandHandler("z", zd2 ) -- haslo zamknietych drzwi
bm3 = createMarker(-31.81,1188.46,19.43-0.9, "cylinder", 1.1, 255, 255, 255, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
local d3 = createObject (5856, -28.88,1188.48-0.1,19.43+1.8,0, 0, 90 ) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function od3 ( thePlayer)
if isElementWithinMarker(thePlayer, bm3) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy OSP...")
moveObject ( d3,5856,-28.88,1188.48-0.1,19.43+6.5,0, 0, 0) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
function zd3 ( thePlayer)
if isElementWithinMarker(thePlayer, bm3) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy OSP...")
moveObject ( d3, 5856, -28.88,1188.48-0.1,19.43+1.8,0, 0, 0 ) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
addCommandHandler("o", od3 ) -- haslo otwartych drzwi
addCommandHandler("z", zd3 ) -- haslo zamknietych drzwi
bm4 = createMarker(-23.55,1188.46,19.43-0.9, "cylinder", 1.1, 255, 255, 255, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
local d4 = createObject (5856, -20.69,1188.48-0.1,19.35+1.8,0, 0, 90 ) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function od4 ( thePlayer)
if isElementWithinMarker(thePlayer, bm4) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Otwieranie bramy OSP...")
moveObject ( d4,5856,-20.69,1188.48-0.1,19.35+6.5,0, 0, 0) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
function zd4 ( thePlayer)
if isElementWithinMarker(thePlayer, bm4) then
if getElementData(thePlayer,"player:duty") == "OSP" then
exports.rpg_noti:createNotification(thePlayer, "warn", "Zamykanie bramy OSP...")
moveObject ( d4, 5856, -20.69,1188.48-0.1,19.35+1.8,0, 0, 0 ) -- koordy zamknietych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end
addCommandHandler("o", od4 ) -- haslo otwartych drzwi
addCommandHandler("z", zd4 ) -- haslo zamknietych drzwi]][code][/code]
Wysłany: 2020-03-26, 11:21
ADISEQ
Uczeń Lua
Wiek: 21 Na forum: 2811 dni Posty: 130
Nick w MP: ADISEQ
Piwa : 18
Dzia?a ci wszystko inne we frakcji? Mo?e skrypt nie uznaje, ?e jeste? w PSP
[ Dodano : 2020-03-26, 11:21 ]
A jakie? b??dy w DB3?
Wysłany: 2020-03-26, 11:34
dakuVen
Wiek: 30 Na forum: 2859 dni Posty: 10
Nick w MP: dakuVen
"ADISEQ" napisał/a :Dzia?a ci wszystko inne we frakcji? Mo?e skrypt nie uznaje, ?e jeste? w PSP
[ Dodano : 2020-03-26, 11:21 ]
A jakie? b??dy w DB3?
Zmiana skin?w dzia?a. Wsiada? do pojazd?w mog?.
Wysłany: 2020-03-26, 23:04
ADISEQ
Uczeń Lua
Wiek: 21 Na forum: 2811 dni Posty: 130
Nick w MP: ADISEQ
Piwa : 18
Wpisz w konsoli debugscript 3 i powiedz czy cos sie ci wyslalo gdy probowales otworzyc brwme
Wysłany: 2020-03-27, 22:33
mixLoLmix2
Programista
Wiek: 35 Na forum: 4113 dni Posty: 454
Nick w MP: TomeQmix
Piwa : 1915
Wsz?dzie wprowadzi?e? te same kordy, I ona sie otwiera i zamyka lecz musisz zmieni? kordynaty.
Np.
function odrzwi ( thePlayer )
if isElementWithinMarker ( thePlayer , bmDRZWI ) then
if isPlayerInFraction ( thePlayer ) then
exports . rpg_noti : createNotification ( thePlayer , "warn" , "Otwieranie Drzwi..." )
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 7.19 ) -- Koordy otwartych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
end
end
end
function zdrzwi ( thePlayer )
if isElementWithinMarker ( thePlayer , bmDRZWI ) then
if isPlayerInFraction ( thePlayer ) then
exports . rpg_noti : createNotification ( thePlayer , "warn" , "Zamykanie Drzwi..." )
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 7.19 ) -- koordy zamknietych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
end
end
end
Zmieniaj?? na
function odrzwi ( thePlayer )
if isElementWithinMarker ( thePlayer , bmDRZWI ) then
if isPlayerInFraction ( thePlayer ) then
exports . rpg_noti : createNotification ( thePlayer , "warn" , "Otwieranie Drzwi..." )
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 3.19 ) -- Koordy otwartych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
end
end
end
function zdrzwi ( thePlayer )
if isElementWithinMarker ( thePlayer , bmDRZWI ) then
if isPlayerInFraction ( thePlayer ) then
exports . rpg_noti : createNotification ( thePlayer , "warn" , "Zamykanie Drzwi..." )
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 7.19 ) -- koordy zamknietych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
end
end
end
Otworz? sie animacj? w d??.
sp?jrz na:
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 7.19 ) -- Koordy otwartych drzwi
Otwarte:
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 3.19 ) -- Koordy otwartych drzwi
Zamkniete:
moveObject ( drzwi , 3089 , - 2776.34 , - 336.35 , 7.19 ) -- Koordy otwartych drzwi
Więcej szczegółów
Wystawiono 1 piw(a):dakuVen
Tagi: bramy :: paczka :: pssm
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: