Dzsozi (h03) Posted April 13, 2014 Share Posted April 13, 2014 Hi everyone! Today I tried to make a script, which is set the player and the vehicle to another interior and dimension when the event 'onClientMarkerHit' is activated. Everything works, except the camera. For some reason it shows everything black in the background, except the vehicle and the player. How can I fix this? setElementInterior ( vehicle, 24 ) setElementInterior ( localPlayer, 24 ) setElementDimension ( vehicle, 65000 + playerid ) setElementDimension ( localPlayer, 65000 + playerid ) setElementPosition ( vehicle, 612.9990234375, -2.9853515625, 1000.7930908203 ) setElementRotation ( vehicle, -0.48928847908974, 1.5928211723804e-005, 72.723457336426 ) setCameraInterior ( 24 ) setCameraMatrix ( 604.42749023438, -5.3609199523926, 1002.9470214844, 694.00811767578, 29.228715896606, 975.03881835938 ) This is only the part where I put the interior and dimension things, everything is defined, works fine, except the camera, as I mentioned. Link to comment
Weii. Posted April 13, 2014 Share Posted April 13, 2014 setElementInterior ( vehicle, 24 ) setElementInterior ( localPlayer, 24 ) setElementDimension ( vehicle, 65000 + playerid ) setElementDimension ( localPlayer, 65000 + playerid ) setElementPosition ( vehicle, 612.9990234375, -2.9853515625, 1000.7930908203 ) setElementRotation ( vehicle, -0.48928847908974, 1.5928211723804, 72.723457336426 ) setCameraInterior ( 24 ) setCameraMatrix ( 604.42749023438, -5.3609199523926, 1002.9470214844, 694.00811767578, 29.228715896606, 975.03881835938 ) try Link to comment
Dzsozi (h03) Posted April 13, 2014 Author Share Posted April 13, 2014 setElementInterior ( vehicle, 24 ) setElementInterior ( localPlayer, 24 ) setElementDimension ( vehicle, 65000 + playerid ) setElementDimension ( localPlayer, 65000 + playerid ) setElementPosition ( vehicle, 612.9990234375, -2.9853515625, 1000.7930908203 ) setElementRotation ( vehicle, -0.48928847908974, 1.5928211723804, 72.723457336426 ) setCameraInterior ( 24 ) setCameraMatrix ( 604.42749023438, -5.3609199523926, 1002.9470214844, 694.00811767578, 29.228715896606, 975.03881835938 ) try This is the same code that I posted. Link to comment
Weii. Posted April 13, 2014 Share Posted April 13, 2014 Maybe interior id isn't right Link to comment
Bonsai Posted April 13, 2014 Share Posted April 13, 2014 Maybe your setCameraMatrix is wrong, try without. Link to comment
Saml1er Posted April 13, 2014 Share Posted April 13, 2014 Maybe interior id isn't right Yes, just like weii said the interior id is incorrect. There are only 1-18 interiors. Link to comment
Castillo Posted April 13, 2014 Share Posted April 13, 2014 That's not what the wiki says: interior: The interior you want to set the element to. Valid values are 0 to 255. I also tried setting my interior to 20, then 255 and getElementInterior returns correctly. Link to comment
Weii. Posted April 13, 2014 Share Posted April 13, 2014 setElementInterior ( vehicle, 1 ) setElementInterior ( localPlayer, 1 ) setElementDimension ( vehicle, 65000 + playerid ) setElementDimension ( localPlayer, 65000 + playerid ) setElementPosition ( vehicle, 612.9990234375, -2.9853515625, 1000.7930908203 ) setElementRotation ( vehicle, -0.48928847908974, 1.5928211723804e-005, 72.723457336426 ) setCameraInterior ( 1 ) setCameraMatrix ( 604.42749023438, -5.3609199523926, 1002.9470214844, 694.00811767578, 29.228715896606, 975.03881835938 ) I think you want this Link to comment
Dzsozi (h03) Posted April 13, 2014 Author Share Posted April 13, 2014 Ohh, thank you very much guys!! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now