SA-MP Forums Archive
First Person Camera - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: First Person Camera (/showthread.php?tid=662501)



First Person Camera - Rubennatan - 03.01.2019

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'!


Re: First Person Camera - Logic_ - 03.01.2019

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.


Re: First Person Camera - Ramboi - 03.01.2019

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.


Re: First Person Camera - Rubennatan - 03.01.2019

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