- Dokumentacja
- Funkcje wspólne
- getVehicleComponents
Funkcja
getVehicleComponents
Zwraca części modelu pojazdu jako tabelę nazwa → czy widoczna. Na kliencie dla modelu z pliku (engineReplaceModel) to pełna lista ramek .dff (karoseria, drzwi, maska, zderzaki, koła wheel_*_dummy, warianty autora), dla aut z gry tylko części zmienione skryptem. Na serwerze tylko części zmienione skryptem.
Składnia
table getVehicleComponents(vehicle vehicle)Argumenty
vehiclevehicle- Pojazd.
Zwraca
Tabela { [nazwa] = bool }.
Przykład
addCommandHandler("czesci", function()
local vehicle = getPedOccupiedVehicle(localPlayer)
if not vehicle then return end
for name, visible in pairs(getVehicleComponents(vehicle)) do
outputChatBox(name .. (visible and "" or " (ukryta)"))
end
end)