SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje serwera
  3. setVehicleComponentRotation

Funkcja

setVehicleComponentRotation

Zapisuje obrót nazwanej części modelu pojazdu w stopniach (x, y, z).

Składnia

bool setVehicleComponentRotation(vehicle vehicle, string component, float x [, float y = 0, float z = 0])

Argumenty

vehiclevehicle
Pojazd.
componentstring
Nazwa części.
xfloat
Obrót wokół osi X w stopniach (albo wektor).
yfloat, opcjonalny = 0
Obrót wokół osi Y.
zfloat, opcjonalny = 0
Obrót wokół osi Z.

Różnice względem MTA:SA

  • Tych argumentów z MTA:SA tu nie ma: string base = "parent"

W MTA:SA

setVehicleComponentRotation(vehicle theVehicle, string theComponent, float rotX, float rotY, float rotZ, string base = "parent")

Zwraca

true przy powodzeniu.

Przykład

local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleComponentRotation(vehicle, "bonnet_dummy", 45, 0, 0)

Uwagi

Stan dla skryptów. Model się nie zmienia (patrz setVehicleComponentPosition).

Zobacz też