Phnx Posted January 5, 2009 Share Posted January 5, 2009 Is it possibe to center the camera behind Niko and in the car center the camera behind the car, not Niko, using a lua-script?! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/ Share on other sites More sharing options...
Phnx Posted January 8, 2009 Author Share Posted January 8, 2009 Noone knows the variables for the camera??? Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058859136 Share on other sites More sharing options...
GAK Posted January 9, 2009 Share Posted January 9, 2009 Hello, To get the game's camera ID use this : PushVarPtr()CallNative("GET_GAME_CAM_CHILD")IDCam = GetIntParam(0) then use "SET_CAM_ROT" like that : PushInt(IDCam)PushFloat(AngleX)PushFloat(AngleY)PushFloat(AngleZ)CallNative("SET_CAM_ROT") Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058863307 Share on other sites More sharing options...
Phnx Posted January 10, 2009 Author Share Posted January 10, 2009 Hello,To get the game's camera ID use this : PushVarPtr()CallNative("GET_GAME_CAM_CHILD")IDCam = GetIntParam(0) then use "SET_CAM_ROT" like that : PushInt(IDCam)PushFloat(AngleX)PushFloat(AngleY)PushFloat(AngleZ)CallNative("SET_CAM_ROT") Thank you very much! You couldn't write a script for me that centers the camera, could you?! I have no idea of lua. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058866912 Share on other sites More sharing options...
Attilas Posted January 10, 2009 Share Posted January 10, 2009 oh yes it could be very nice Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058867152 Share on other sites More sharing options...
Phnx Posted January 13, 2009 Author Share Posted January 13, 2009 Hello,To get the game's camera ID use this : PushVarPtr()CallNative("GET_GAME_CAM_CHILD")IDCam = GetIntParam(0) then use "SET_CAM_ROT" like that : PushInt(IDCam)PushFloat(AngleX)PushFloat(AngleY)PushFloat(AngleZ)CallNative("SET_CAM_ROT") Please, could someone help with this? Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058874891 Share on other sites More sharing options...
Phnx Posted January 16, 2009 Author Share Posted January 16, 2009 Hello,To get the game's camera ID use this : PushVarPtr()CallNative("GET_GAME_CAM_CHILD")IDCam = GetIntParam(0) then use "SET_CAM_ROT" like that : PushInt(IDCam)PushFloat(AngleX)PushFloat(AngleY)PushFloat(AngleZ)CallNative("SET_CAM_ROT") Hey, I still need help here, please! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058883535 Share on other sites More sharing options...
SEKoner Posted January 16, 2009 Share Posted January 16, 2009 (edited) To became the players view point (like in first person schooters), i think this will give you the correct viewpoint. but lua is not my used script lang and im on work. function not testest !! function GetNewCamCoords() PushInt(PLAYER_CHAR) PushFloat(0.0) PushFloat(0.2) PushFloat(0.0) PushVarPtr() PushVarPtr() PushVarPtr() CallNative("GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS") X = GetFloatParam(4) Y = GetFloatParam(5) Z = GetFloatParam(6) end Became actual cam id like postet before: function GetActualCamID PushVarPtr() CallNative("GET_GAME_CAM_CHILD") IDCam = GetIntParam(0) end Set the new coordinates to cam SetCamCoords(IDCam) GetNewCamCoords() PushInt(IDCam) PushFloat(AngleX) PushFloat(AngleY) PushFloat(AngleZ) CallNative("SET_CAM_ROT") end To start functions GetActualCamID() SetCamCoords(IDCam) I think that this is all what you need to set actual cam in first person mode. Like i told before ... this are only the functions and THEY ARE NOT TESTET. I use other script languages for myself. Edited January 16, 2009 by SEKoner Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058883559 Share on other sites More sharing options...
Intosia Posted January 16, 2009 Share Posted January 16, 2009 Nice info thanks Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058883656 Share on other sites More sharing options...
SEKoner Posted January 16, 2009 Share Posted January 16, 2009 I've a bit time between my work and made this script to test if it works like i think : -- First-Person Cam Test-Script by SEKoner --globale variablenPLAYER_ID, PLAYER_INDEX, PLAYER_CHAR, TIMER = 0function InitScript()-- Wake up neo ... wake up ....;)Wait(10000)endfunction WaitForPlayerPoolCreation() while (IsPlayerPoolCreated() == 0) do Wait(2000) endendfunction WaitForValidPlayer() PLAYER_CHAR = 0 repeat CallNative("GET_PLAYER_ID")PLAYER_ID = GetIntResult()if (PLAYER_ID >= 0) then PushInt(PLAYER_ID) CallNative("CONVERT_INT_TO_PLAYERINDEX") PLAYER_INDEX = GetIntResult() PushInt(PLAYER_INDEX) PushVarPtr() CallNative("GET_PLAYER_CHAR") PLAYER_CHAR = GetIntParam(1) if (PLAYER_CHAR <= 0) then Wait(1000) end end until (PLAYER_CHAR > 0) endfunction getNewCam() PushInt(PLAYER_CHAR) PushFloat(0.1) PushFloat(0.2) PushFloat(0.1) PushVarPtr() PushVarPtr() PushVarPtr() CallNative("GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS") X = GetFloatParam(4) Y = GetFloatParam(5) Z = GetFloatParam(6)endfunction getActualCamId() PushVarPtr() CallNative("GET_GAME_CAM_CHILD") IDCam = GetIntParam(0) SetCamCoords(IDCam) wait(100)endSetCamCoords(ID) getNewCam() PushInt(ID) PushFloat(X) PushFloat(Y) PushFloat(Z) CallNative("SET_CAM_ROT")endfunction Test() getActualCamId() wait(300)endfunction main()InitScript()while true do WaitForPlayerPoolCreation() WaitForValidPlayer() if (IsKeyPressed(112) == 1) then Test() end Wait(1700)endendmain(); Can someone test it ?? Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058883890 Share on other sites More sharing options...
Phnx Posted January 16, 2009 Author Share Posted January 16, 2009 Nope, no camera change. Everything as default. Tested with Alice beta 0.1. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058884135 Share on other sites More sharing options...
HippieCommunist Posted January 16, 2009 Share Posted January 16, 2009 i dont think its that simple... in most vanilla scripts there are commands like CREATE_CAM and START_scripted_cams and a few i dont remember... 1st person might be refreshing Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058884258 Share on other sites More sharing options...
Phnx Posted January 16, 2009 Author Share Posted January 16, 2009 i dont think its that simple... in most vanilla scripts there are commands like CREATE_CAM and START_scripted_cams and a few i dont remember...1st person might be refreshing Well, I didn't actually want "firstperson". I just wanted the camera centered behind Niko, on foot and in cars (currently off-set). Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058884683 Share on other sites More sharing options...
HippieCommunist Posted January 16, 2009 Share Posted January 16, 2009 you get the camera rolling ill get the first person, DEAL?? Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058884690 Share on other sites More sharing options...
Phnx Posted January 16, 2009 Author Share Posted January 16, 2009 you get the camera rolling ill get the first person, DEAL?? Yeah, there's only one problem: I know almost nothing about scripting. I know there are "if" and "else" and "end". And I know just a bit about how to use that, but I know nothing about "lua". Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058884869 Share on other sites More sharing options...
Phnx Posted January 23, 2009 Author Share Posted January 23, 2009 Sorry for the bump! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058903545 Share on other sites More sharing options...
diveplane Posted January 28, 2009 Share Posted January 28, 2009 really hope one of you guys get this working. we need a camera editor if possible. i hate the default cams in the game my only gripe with it. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058921761 Share on other sites More sharing options...
Borocay Posted February 9, 2009 Share Posted February 9, 2009 Bump, I hope someone will fix this. I love the game except for the camera angles. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1058953695 Share on other sites More sharing options...
Phnx Posted March 16, 2009 Author Share Posted March 16, 2009 Please help! I have waited for months now for someone to help, but no one seems to be interested. Pleeeeease, someone, be so kind and share your wisdom and knowledge with us! Please! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059064195 Share on other sites More sharing options...
Little Psycho Posted March 16, 2009 Share Posted March 16, 2009 Download this http://www.gtaforums.com/index.php?showtopic=398667 Press M when in car done. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059064335 Share on other sites More sharing options...
Phnx Posted March 16, 2009 Author Share Posted March 16, 2009 Download this http://www.gtaforums.com/index.php?showtopic=398667Press M when in car done. Thank you for the link! I think I must quote myself: Is it possibe to center the camera behind Niko and in the car center the camera behind the car, not Niko, using a lua-script?! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059064651 Share on other sites More sharing options...
Hergonan Posted March 16, 2009 Share Posted March 16, 2009 It's best to create your own camera then activate it. Don't change the game's camera. The first person camera attaches an object to niko's head then sets the camera on that object, for example. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059064803 Share on other sites More sharing options...
Phnx Posted March 16, 2009 Author Share Posted March 16, 2009 It's best to create your own camera then activate it.Don't change the game's camera. The first person camera attaches an object to niko's head then sets the camera on that object, for example. Ok, thanks. If I knew how to do that I would have done it by now. Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059065213 Share on other sites More sharing options...
skyfujin Posted December 14, 2009 Share Posted December 14, 2009 How do you install the mod that fixes the camera behind the vehicle? This is my first time playing GTA on PC. I don't know where to put the files and there is no mention of this in the README! Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1059684697 Share on other sites More sharing options...
Shahid_fss Posted November 7, 2010 Share Posted November 7, 2010 Is it possibe to center the camera behind Niko and in the car center the camera behind the car, not Niko, using a lua-script?! I_DONT_CHEAT (A camera hack + other cheats) Is this what you want? Link to comment https://gtaforums.com/topic/390404-q-change-camera-via-lua-script/#findComment-1060194570 Share on other sites More sharing options...
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