Invisible Car Fix (fix invisible cars)
Hello everyone! Have you encountered such a problem - you are in some interior (a stadium, for example) and spawned a car. But she is not! Or rather, it is, it just became invisible.
This fix fixes this problem and you can spawn "visible" cars in all interiors.
It can also be turned off by entering the cheat code "fixcars", which will make a characteristic sound.
For those who want to understand how it works...
Now in order. Car spawners do not take into account the fact that players can spawn cars (and not only) in interiors. Because of this, all cars are attached to interior 0(street),
but because we are not in interior 0, then the visible car will only be in interior 0 (that is, it is “invisible” for us). All this is solved by two lines of code after the car spawns.
Example:
:CarCreating //stream name
wait 0 // wait otherwise the game will freeze
if // if
0ADC: test_cheat "elegy" //cheat code written
jump @CarCreating2 //if the cheat code is written, jump to the "CarCreating2" stream
:CarCreating2 //stream name
wait 0 //wait, otherwise the game will freeze
model.load(#elegy) //load model "elegy"(car model)
038B: load_requested_models //register the model in the game (the model won't load without this opcode)
if //if
model.available(#elegy) //model loaded
jf @CarCreating2 //otherwise go to the beginning of the "CarCreating2" stream
Car.create(0@ #elegy 1@ 2@ 3@) //create a car
077E: get_active_interior_to $ACTIVE_INTERIOR //see which interior the player is in
0840: link_car 0@ to_interior $ACTIVE_INTERIOR // "attach" (make it visible to us) car
car.RemoveReferences(0@) //remove car info
jump @CarCreating //jump to the very beginning of the script
where 0@ is the auto itself; #elegy - car model; 1@ 2@ 3@ - variables (in this case - coordinates); $ACTIVE_INTERIOR - interior number variable.
Just these two lines:
077E: get_active_interior_to $ACTIVE_INTERIOR //see which interior the player is in
0840: link_car 0@ to_interior $ACTIVE_INTERIOR // "attach" (make it visible to us) car
where 0@ is the desired vehicle (vehicle); $ACTIVE_INTERIOR - interior number variable.
But if we change the interior, the car will become “invisible”
fast and easy
-
1605699120_invisiblecarsfix.zipDownload (0.01 MB)Password: libertycity