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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

Posted
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. :)

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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!

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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 .

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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.

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

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

logo-small.png?v=3 tiny-sapdfr.png

 

If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]

Posted

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 :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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 .

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 8)

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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