Wysłany: 2018-07-18, 12:18
Jakub123313
LUA / Mapper <3
Wiek: 31 Na forum: 4086 dni Posty: 62
Nick w MP: DjBoreK
Piwa : 8
Witam gdy przenios?em przechowywalnie z San Fierro do Los Santos normalnie wyci?gam auto i je?dz? jednak gdy chce schowa? auto do przecho auto nie chowa sie oczywi?cie po wje?dzie w blip
--[[
addEventHandler ( "onResourceStart" , resourceRoot ,
function ()
CuboidNumber_0 = createColCuboid (- 1951.8657226563 , 613.52954101563 , 33.78190612793 , 14.4 , 7.3 , 6.2 )
end
)
--]]
--[[
addEventHandler ( "onResourceStart" , resourceRoot ,
function ()
CuboidNumber_0 = createColCuboid (- 1966.6160888672 , 613.84454345703 , 33.78190612793 , 14.4 , 7.3 , 6.2 )
end
)
--]]
local marker = createMarker ( 1368.86 ,- 1893.29 , 13.51 - 1 , "cylinder" , 5.2 , 255 , 255 , 255 , 20 )
createBlip ( 1368.86 ,- 1893.29 , 13.51 , 35 , 2 , 0 , 0 , 0 , 0 , 0 , 250 )
local mdestroy = createColCuboid ( 1368.86 ,- 1893.29 , 13.51 , 14.4 , 7.3 , 6.2 )
local t = createElement ( "text" )
setElementData ( t , "scale" , 1.5 )
setElementData ( t , "name" , "Pozostawianie pojazd?w" )
setElementPosition ( t , 1368.86 ,- 1893.29 , 13.51 )
addEvent ( "onParkingGetRekords" , true )
addEventHandler ( "onParkingGetRekords" , root , function()
local sid = getElementData ( source , "player:sid" )
if not sid then return end
local org = getElementData ( source , "player:organization" )
local result = exports [ "pystories-db" ]: dbGet ( "SELECT * FROM pystories_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1" , sid , org or "Brak" )
if #result > 0 then
triggerClientEvent ( source , "onParkingGetVehicles" , source , result )
end
end )
addEventHandler ( "onColShapeHit" , mdestroy , function( el , md )
if getElementType ( el ) == "player" then
local veh = getPedOccupiedVehicle ( el )
if not veh then return end
if getVehicleController ( veh ) ~= el then return end
local id = getElementData ( veh , "vehicle:id" )
if not id then return end
if isTimer ( timeroddania ) then return end
setElementFrozen ( veh , true )
outputChatBox ( "* Trwa zapisywanie pojazdu..." , el )
toggleControl ( el , "enter_exit" , false )
timeroddania = setTimer (function()
setElementFrozen ( veh , false )
local id = getElementData ( veh , "vehicle:id" )
if not id then return end
exports [ "pystories-vehicles" ]: onSaveVehicle ( veh )
destroyElement ( veh )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET parking=1 WHERE id=?" , id )
toggleControl ( el , "enter_exit" , true )
outputChatBox ( "* Pomy?lnie zapisano pojazd." , el )
end , 3000 , 1 )
elseif getElementType ( el ) == "vehicle" then
local peds = getVehicleOccupants ( el )
if #peds > 0 then return end
local id = getElementData ( el , "vehicle:id" )
if not id then return end
if isTimer ( timeroddania ) then return end
timeroddania = setTimer (function()
setElementFrozen ( el , false )
local id = getElementData ( el , "vehicle:id" )
if not id then return end
exports [ "pystories-vehicles" ]: onSaveVehicle ( el )
destroyElement ( el )
exports [ "pystories-db" ]: dbSet ( "UPDATE pystories_vehicles SET parking=1 WHERE id=?" , id )
outputChatBox ( "* Pomy?lnie zapisano pojazd." , el , 255 , 255 , 255 , true )
end , 3000 , 1 )
setElementFrozen ( el , true )
setVehicleLocked ( el , true )
end
end )
addEvent ( "onParkingVehicleSpawn" , true )
addEventHandler ( "onParkingVehicleSpawn" , root , function( id )
if not id then return end
local spawn = exports [ "pystories-vehicles" ]: onRespawnVehicles ( _ , id ,{ 1376.33 ,- 1890.75 , 13.48 , 0 , 0 , 90 })
if spawn then
-- addEventHandler ( "onClientRender" , root , render1 )
outputChatBox ( "* Pomy?lnie wyci?gni?to pojazd z przechowalni." , el )
end
end )
Za pomoc daje oraz
[ Dodano : 2018-07-18, 12:19 ]
Oczywiscie na g?rze kodu nic nie zmienia?em samoch?d po wje?dzie w blip nie przenosi si? do przechowywalni
w kodzie createColCuboid nic nie zmienia?em bo nie mam poj?cia co xD
Podpis
Ymmm...
" Życie jest tylko jedno, więc trzeba korzystać "
Wysłany: 2018-07-18, 12:29
Rumper
Majster od pysa
Wiek: 15 Na forum: 3316 dni Posty: 231
Nick w MP: Rumper
Piwa : 592
Muszisz przenie?? cuboida,za pomoc? skrypt coleditor,kt?ry mo?esz pobra? z commuinty MTA.
Wtedy wchodzisz na serwer w??czasz runcode i wpisujesz showcol 1,potem wpisujesz editcol
i wtedy ten kwadrat przenoszisz w te miejsce w kt?re ma by? cuboid i klikasz enter i masz kordy.
Więcej szczegółów
Wystawiono 1 piw(a):Jakub123313
Wysłany: 2018-07-18, 12:53
Mezo.
Mod-Team
Wiek: 24 Na forum: 3211 dni Posty: 548
Nick w MP: Mezo
Piwa : 6070
W pystories_vehicles gdzie? by?o chowanie pojazd?w
Podpis
- Na forum pomagam na miarę swoich możliwości, oraz bezpłatnie.
- Jeżeli potrzebujesz pomocy, pisz do mnie w prywatnej wiadomości, pomoc uzyskasz szybciej.
Współpraca -
[email protected]
Użytkownik - 19.08.2017
GTAO MEMBER - 29.03.2019
Support-Team - 03.02.2019 - 07.05.2019
Moderator - 07.05.2019 - 02.08.2020
Mod-Team - 02.08.2020 - 25.03.2022
Tagi: przechowywalnia :: pys :: 3..0
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: