Jump to content

setCameraTarget - ped


tosfera

Recommended Posts

Posted

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

Posted

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.

Posted
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... xD

Posted
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... xD

You can control Peds in a client-side script only. There is a function setPedControlState.

Posted
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... xD

You can control Peds in a client-side script only. There is a function setPedControlState.

I LOVE YOU!

Posted

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?:D

Posted

bindKey can be bound for both: when button is pressed down and released. You can also use onClientKey.

Posted

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. xD Where can I find the; setCameraTarget source code? :3

Posted

Well i think there is no source code for it :D , Most possible all inbuild function's are in dll format (c++).

On the end setCameraTarget is working with , OnClientPreRender and setCameraMatrix .

Posted

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.

Posted

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 player

As 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.

Posted
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 player

As 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. :D

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...