tosfera Posted August 13, 2013 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 If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
50p Posted August 13, 2013 Posted August 13, 2013 According to wiki, it supports player elements only. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
tosfera Posted August 13, 2013 Author 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
golanu21 Posted August 13, 2013 Posted August 13, 2013 setCameraTarget >? [Dev]BloWnRPG - We BloW the World [1%]
tosfera Posted August 13, 2013 Author Posted August 13, 2013 setCameraTarget >? According to wiki, it supports player elements only. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
50p Posted August 13, 2013 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
tosfera Posted August 13, 2013 Author 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... If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
50p Posted August 13, 2013 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
tosfera Posted August 13, 2013 Author 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! If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
tosfera Posted August 13, 2013 Author 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? If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
50p Posted August 13, 2013 Posted August 13, 2013 bindKey can be bound for both: when button is pressed down and released. You can also use onClientKey. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
tosfera Posted August 13, 2013 Author 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 If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
bandi94 Posted August 13, 2013 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 . Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
tosfera Posted August 13, 2013 Author 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
50p Posted August 14, 2013 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
tosfera Posted August 14, 2013 Author 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
bandi94 Posted August 14, 2013 Posted August 14, 2013 You wanna control a ped in another Dim like the player is. Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
tosfera Posted August 14, 2013 Author Posted August 14, 2013 You wanna control a ped in another Dim like the player is. I'm already saying tomuch hahaha. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
bandi94 Posted August 14, 2013 Posted August 14, 2013 Ok, keep your secret safe Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
tosfera Posted August 14, 2013 Author 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. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
ixjf Posted August 19, 2013 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 I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
bandi94 Posted August 19, 2013 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 Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
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