Wysłany: 2021-04-28, 12:08
Nieznany2105
Wiek: 42 Na forum: 1863 dni Posty: 2
Witam, ma kto? skrypta czy kod na zmiane handlingu w aucie? Nie chodzi mi o Handling edior pod b tylko ?e jak gracz kupi sobie auto to ?eby ju? ten handling dzia?a?. I ?ebym m?g? go sobie w kodzie zmienia?. Wiem ?e jest funkcja ale nie wiem jak jej dobrze u?y? bo mi nie dzia?a?a. Z g?ry Dzi?kuje, za pomoc dam Zimne
Wysłany: 2021-04-28, 12:38
TheSebaPL
Mod-team
Wiek: 21 Na forum: 3098 dni Posty: 964
Piwa : 3102
Wysłany: 2021-04-28, 12:45
xyzzz^
A nic
Wiek: 18 Na forum: 1993 dni Posty: 319
Nick w MP: Aspyk21
Piwa : 308
w kodzie gdzie respia sie pojazdy dodaj setVehicleHandling domyslnie w ogrpg to ogrpg-vehicles
Wysłany: 2021-04-28, 12:50
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
TheSebaPL , napisa?, ?e zna funkcj? ale mu nie dzia?a wi?c :
podaje PRZYK?AD, nie gotowiec :
Kod: addCommandHandler("zmiana",function(plr)
local veh=getPedOccupiedVehicle(plr)
local hand=getVehicleHandling(veh)
setVehicleHandling(veh,"mass",hand["mass"]+100)
end)
Wysłany: 2021-04-28, 14:10
Nieznany2105
Wiek: 42 Na forum: 1863 dni Posty: 2
I mam to tak o poprostu dopisac funkcje setVehicleHandling i b?dzie dzia?a?o? I czy musze na ka?de auto tak skopiowac? tu mam kod ja to ?eby sie pojazd zrespi?, jak to nie to todajcie znac to ca?y kod wy?le. Kod: 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,{-1959.97, 617.08, 35.37, 1.1, 0.0, 179.1})
if spawn then
--addEventHandler("onClientRender",root,render1)
outputChatBox("* Pomy?lnie wyci?gni?to pojazd z przechowalni.",el)
end
end)
[ Dodano : 2021-04-28, 14:10 ]
m?g?by kto? dla przyk?adu dopisa??
Wysłany: 2021-04-28, 15:02
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Prawdopodobnie twoim elementem pojazdu jest "spawn", podepnij kod kt?ry ci dalem i masz, my tu pomagamy - musisz si? sam wysili?.
Wysłany: 2021-09-03, 14:36
_jvneczek
Wiek: 22 Na forum: 4325 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Czy problem zosta? rozwi?zany?
Tagi: handling :: jak :: ustawic
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: