View Issue Details

IDProjectCategoryView StatusLast Update
0009500Multi Theft Auto : San AndreasScriptingpublic2016-12-21 05:43
ReporterAfterAll14 Assigned Toccw  
Status resolvedResolutionfixed 
PlatformMTA:SAOSwindowsOS Version7
Product Version1.5.3 
Target Version1.5.4Fixed in Version1.5.4 
Summary0009500: attachElements doesn't work for camera in non-zero dimensions

attachElements(getCamera(), someVehicle, x, y, z) returns "false" in any dimension except 0.

Steps To Reproduce

You can reproduce it using runcode:

    me=getPlayerFromName("your name")
    setElementDimension(me, 1)
    setElementDimension(vehicle, 1)
    success=attachElements(getCamera(), vehicle, 0, -10, 1) --> return false
Additional Information

attachElements is the only way to make properly-working custom cameras for vehicles. (setCameraMatrix and setElementMatrix will result in camera flickering).
I personally need this to make cameras for the new vehicle physics I'm working on atm (cause standart camera behavior is bugged when I replace car physics).
New physics:
Camera bug:

TagsNo tags attached.



2016-12-20 17:12

manager   ~~0025512

I tried it and it returned false, then I tried it in dimension 0 and it also returned false.

I then tried localPlayer instead of vehicle in attachElements and it works, is this actually a feature request to make camera attachable to a vehicle?


2016-12-20 23:13

updater   ~~0025520

Executing client-side command: test=getPedOccupiedVehicle(localPlayer)
Command executed!
Executing client-side command: attachElements(getCamera(),test,0,10,1)
Command results: true [boolean]

It works in dimension 0 as described by AfterAll14
If it works in dimension 0, it should work in every dimension :)


2016-12-21 01:19

viewer   ~~0025522

arranTuna, make sure you follow steps I described in "Steps to reproduce". You have to set dimensions server-side only, cause setting it client-side causes some bugs. I wasn't able to attach camera to localPlayer by doing it in correct order.
As for you question - I just want to be able attach camera to vehicle (and any other element) in non-zero dimensions. Idk if this missing feature or a bug.


2016-12-21 01:34

administrator   ~~0025523

Fixed in


2016-12-21 05:43

viewer   ~~0025524

Nice, thanks!

Issue History

Date Modified Username Field Change