First Person Camera
#1

Hello guys, I was wondering if it's possible to make a FP camera script, i was trying but and made it...somehow
Check this out:

Код:
#include a_samp
#include zcmd
newFirstPersonObject[MAX_PLAYERS];
CMD:fp(playerid)
{
	
        FirstPersonObject[playerid] = CreateObject(2052, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // creates the object
	AttachObjectToPlayer(FirstPersonObject[playerid], playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0); // attach the object to the player
	AttachCameraToObject(playerid, FirstPersonObject[playerid]); // attach the camera to the object
	return 1;
}
I made this code and it works but not in the way i want, if I drive a car the camera goes behind the player, and thats because of the velocity, also if I "duck" i can see the player, so my question is: Is there any way to attach the camera to the players HEAD so if i drive a car the camera stay where the players head is and so on.
Please help me!

See ya'!
Reply
#2

Don't attempt to do it because the player camera bugs when they try to aim. If you want to the first person camera experience, use a mod.
Reply
#3

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Don't attempt to do it because the player camera bugs when they try to aim. If you want to the first person camera experience, use a mod.
Can't you make it that if you hit the right mouse button the camera position changes? I'm not sure but there's a plugin that makes it possible to detect keys.
Reply
#4

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Don't attempt to do it because the player camera bugs when they try to aim. If you want to the first person camera experience, use a mod.
yeah, i've already experienced that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)