- Dokumentacja
- Funkcje wspólne
- getVehicleUpgradeOnSlot
Funkcja
getVehicleUpgradeOnSlot
Zwraca ID części zamontowanej w danym slocie tuningu albo 0, gdy slot jest pusty. Numery slotów 0-16 opisuje getVehicleUpgradeSlotName.
Składnia
int getVehicleUpgradeOnSlot(vehicle vehicle, int slot)Argumenty
vehiclevehicle- Pojazd.
slotint- Numer slotu 0-16 (np. 2 spoiler, 8 nitro, 12 koła, 13 wydech).
Zwraca
ID części albo 0.
Przykład
addCommandHandler("manitro", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle and getVehicleUpgradeOnSlot(vehicle, 8) ~= 0 then
outputChatBox("To auto ma nitro.", player)
end
end)
Zobacz też
getVehicleUpgradesZwraca listę ID wszystkich części tuningu zamontowanych w pojeździe. Działa po obu stronach.getVehicleUpgradeSlotNameZwraca angielską nazwę slotu tuningu, podając numer slotu albo ID części. Sloty: 0 Hood, 1 Vent, 2 Spoiler, 3 Sideskirt, 4 Front Bullbars, 5 Rear Bullbars, 6 Headlights, 7 Roof, 8 Nitro, 9 Hydraulics, 10 Stereo, 11 Unknown, 12 Wheels, 13 Exhaust, 14 Front Bumper, 15 Rear Bumper, 16 Misc.