PL/getVehiclePaintjob

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Ta funkcja pobiera aktualne malowanie danego pojazdu.

Składnia

int getVehiclePaintjob ( vehicle theVehicle )

Składnia OOP Pomocy, nie rozumiem!

Metoda: vehicle:getPaintjob(...)
Wartość: .paintjob
Odpowiednik: setVehiclePaintjob

Wymagane argumenty

  • theVehicle: pojazd którego malowanie chcesz pobrać

Zwracane wartości

Zwraca liczbę całkowitą reprezentującą numer malowania pojazdu.

  • 0: Pierwsze malowanie
  • 1: Drugie malowanie
  • 2: Trzecie malowanie
  • 3: Domyślne malowanie (brak malowania)
[[{{{image}}}|link=|]] Notatka: Zawsze zwraca 3 jeśli dany pojazd nie obsługuje malowań

Przykład

Ten przykład ustawi malowanie nowego pojazdu Sultan na '2', po czym sprawdzi czy ten został ustawiony.

newvehicle = createVehicle ( 560, 100, 100, 40 )   -- tworzymy sultana
setVehiclePaintjob ( newvehicle, 2 )               -- zmieniamy malowanie
paintjob = getVehiclePaintjob ( newvehicle )
if ( paintjob == 2 ) then
    outputChatBox ( "Malowanie zostało ustawione poprawnie!" )
end

Zobacz także