View Issue Details

IDProjectCategoryView StatusLast Update
0008188New issuesScriptingpublic2017-05-26 16:25
ReporterGrafuAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
PlatformOSWindowsOS Version8.1 64-bit
Summary0008188: setVehicleDoorState, getVehicleDoorState don't correctly work with states 1 and 3
Description

Setting door states to 1 and 3 gives only the half of the effect. For example, wiki says state 1 makes the door ajar (swinging), intact, but when setting the state to 1, it makes the door only intact, but not ajar. To make it ajar you have to combine state 1 with state 3. Almost the same situation with state 3. The only difference between 1 and 3 is the working effect half. Setting state to 3 makes the door ajar, but not damaged, while wiki says it will get ajar, damaged. This can be workarounded by calling setVehicleDoorState in state combinations:

setVehicleDoorState(vehicle, door, 0)
setVehicleDoorState(vehicle, door, 3) will give the full effect of state 1

setVehicleDoorState(vehicle, door, 2)
setVehicleDoorState(vehicle, door, 3) will give the full effect of state 3

Since this happens, after called any combinations of the above will set the door state to 3 while setting a different effect, what makes it barely possible to return the real door effect state (damaged or intact).

Steps To Reproduce
  1. setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 1) --will return the effect of state 0

  2. setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 3) --will return the effect of ajar door, + the damage effect of previous door state (if previous was 0 or 1, it will return intact, if 2, then damaged, if 3, then the door won't be returned back to the vehicle at all)

  3. setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 0)
    setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 3)
    getVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2) -- returns state 3, the door actually has the state 1 (visible)

  4. setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 2)
    setVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2, 3)
    getVehicleDoorState(getPedOccupiedVehicle(getPlayerFromName("playername")), 2) -- returns state 3, the door actually has the state 3 (visible)

The 3 and 4 step indicates that state 3 is actually a mix of 2 states and makes it impossible to know the real state of the vehicle, if setting door states manually.

TagsNo tags attached.

Relationships

duplicate of 0004185 closedlopezloo Multi Theft Auto : San Andreas Door States 1 and 3 need a “love tap” or should make the door unclosable 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change