User:Jbeta/vehicleparams

From Multi Theft Auto: Wiki
Revision as of 23:06, 7 January 2007 by Jbeta (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Allows for configurability of initial vehicle colors, paintjob, lock, upgrades and gastank/engine/door/wheel/light states through the map file. These settings are reapplied when a vehicle respawns.

Example

<vehicle name="perenn" posX="7.5" posY="-10" posZ="3" rotX="0" rotY="0" rotZ="0" model="404" color="13,3" doorstates="3,4,2,1,2" lightstates="0,1" wheelstates="0,1,2,1" health="70" locked="yes" engine="on" gastank="enabled"/>
<vehicle name="sultan" posX="7.5" posY="15" posZ="3" rotX="0" rotY="0" rotZ="0" model="560" lights="on" color="70,2,80,3" upgrades="1008,1010" plate="GR8JSTIC"/>
<vehicle name="police" posX="2" posY="15" posZ="3" rotX="0" rotY="0" rotZ="0" model="596" blown="yes"/>
  • lights, locked, engine, gastank toggle these settings on or off for a vehicle.
Setting blown to true creates a blown vehicle that never respawns, to be used as decoration.
(Valid and interchangeable boolean values are "yes"/"no", "on"/"off", "true"/"false" and "enabled"/"disabled")
  • colors, upgrades, doorstates, wheelstates, lightstates are lists of IDs separated by commas, see each function for valid values.
(If you specify less than four colors, undefined colors will be set equal than the last defined value, while doors/wheels/lights without a defined state remain unchanged)
  • health, plate are managed by MTA itself, but only when the vehicle spawns for the first time.

TODO

  • Find out maximum number of lights for a vehicle