tosfera Posted August 13, 2013 Share Posted August 13, 2013 Hey guys, I was wondering, how do you set the target of the camera to a ped Element? If thats even possible... I keep getting a false returned. Can it only be done with player elements?;o Link to comment
50p Posted August 13, 2013 Share Posted August 13, 2013 According to wiki, it supports player elements only. Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 According to wiki, it supports player elements only. Hmm, is there a way I could see the function's code? Maybe its able to rewrite etc. Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 setCameraTarget >? According to wiki, it supports player elements only. Link to comment
50p Posted August 13, 2013 Share Posted August 13, 2013 If you want the camera to follow then you need to rewrite it. If you also want to control the camera while following other elements you have to rewrite camera controls too. There is a lot to do to make it integrate with other scripts. Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 If you want the camera to follow then you need to rewrite it. If you also want to control the camera while following other elements you have to rewrite camera controls too. There is a lot to do to make it integrate with other scripts. I managed to get the camera looking at the ped, I just can't check if it follows cause I can't seem to get the bindings right for the movement of the ped. SetControlState only allows player elements, for god sake... Link to comment
50p Posted August 13, 2013 Share Posted August 13, 2013 If you want the camera to follow then you need to rewrite it. If you also want to control the camera while following other elements you have to rewrite camera controls too. There is a lot to do to make it integrate with other scripts. I managed to get the camera looking at the ped, I just can't check if it follows cause I can't seem to get the bindings right for the movement of the ped. SetControlState only allows player elements, for god sake... You can control Peds in a client-side script only. There is a function setPedControlState. Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 If you want the camera to follow then you need to rewrite it. If you also want to control the camera while following other elements you have to rewrite camera controls too. There is a lot to do to make it integrate with other scripts. I managed to get the camera looking at the ped, I just can't check if it follows cause I can't seem to get the bindings right for the movement of the ped. SetControlState only allows player elements, for god sake... You can control Peds in a client-side script only. There is a function setPedControlState. I LOVE YOU! Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 Ehmm, You got the bindKey which checks if you pressed a key. Is there a way to see if its pressed and holded? Like, the W for driving. it only drives when you hold it. Any way to check that? Link to comment
50p Posted August 13, 2013 Share Posted August 13, 2013 bindKey can be bound for both: when button is pressed down and released. You can also use onClientKey. Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 Awesome, maybe its usefull to create the function; setCameraDimension. You can do it with fadeCamera or setCameraTarget. But its not working in the way I want it. Where can I find the; setCameraTarget source code? :3 Link to comment
bandi94 Posted August 13, 2013 Share Posted August 13, 2013 Well i think there is no source code for it , Most possible all inbuild function's are in dll format (c++). On the end setCameraTarget is working with , OnClientPreRender and setCameraMatrix . Link to comment
tosfera Posted August 13, 2013 Author Share Posted August 13, 2013 Yeah I found that out already. Just having a problem with the dimension. For my goal of the script is it impossible to stay in dimension 0. Link to comment
50p Posted August 14, 2013 Share Posted August 14, 2013 The camera is in the same dimension as the player. So you need to change player's dimension first. There is no source code for setCameraTarget, it's built in GTA:SA. The way MTA works is it injects into game and calls its built-in function. Each function has specific OPCODE, MTA calls these by injecting instructions to GTA. http://www.gtamodding.com/index.php?tit ... of_opcodes 0157 - point camera at playerAs you can see, MTA devs could easily fix setCameraTarget by validating what element you want to target (player or vehicle, peds should work too) and then call corresponding OPCODE. Link to comment
tosfera Posted August 14, 2013 Author Share Posted August 14, 2013 The camera is in the same dimension as the player. So you need to change player's dimension first.There is no source code for setCameraTarget, it's built in GTA:SA. The way MTA works is it injects into game and calls its built-in function. Each function has specific OPCODE, MTA calls these by injecting instructions to GTA. http://www.gtamodding.com/index.php?tit ... of_opcodes 0157 - point camera at playerAs you can see, MTA devs could easily fix setCameraTarget by validating what element you want to target (player or vehicle, peds should work too) and then call corresponding OPCODE. Yeah the camera follows the player, the only thing is that I'm controlling a ped instead of a player. I will wait till the day that the MTA Dev's allows more elements in the setCameraTarget. Link to comment
bandi94 Posted August 14, 2013 Share Posted August 14, 2013 You wanna control a ped in another Dim like the player is. Link to comment
tosfera Posted August 14, 2013 Author Share Posted August 14, 2013 You wanna control a ped in another Dim like the player is. I'm already saying tomuch hahaha. Link to comment
bandi94 Posted August 14, 2013 Share Posted August 14, 2013 Ok, keep your secret safe Link to comment
tosfera Posted August 14, 2013 Author Share Posted August 14, 2013 Ok, keep your secret safe It's locked up in my brain. No one has access to it, thats why I got a blackout. Link to comment
ixjf Posted August 19, 2013 Share Posted August 19, 2013 Well i think there is no source code for it , Most possible all inbuild function's are in dll format (c++).On the end setCameraTarget is working with , OnClientPreRender and setCameraMatrix . https://code.google.com/p/mtasa-blue/so ... Camera.cpp Link to comment
bandi94 Posted August 19, 2013 Share Posted August 19, 2013 Well i think there is no source code for it , Most possible all inbuild function's are in dll format (c++).On the end setCameraTarget is working with , OnClientPreRender and setCameraMatrix . https://code.google.com/p/mtasa-blue/so ... Camera.cpp Hmmmm i need the .cpp for the downloading function (maps') let's hook them in memory 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