[help]camera points at player
#1

Hey guys
how do i make it so when you are choosing your player you see the player because at the moment the camera faces away from the player...
Please help?
i need the camera to face the player when choosing the player
Reply
#2

Bump

i really need this like NOW. Thanks
Reply
#3

Under OnPlayerRequestClass
pawn Код:
SetPlayerCameraLookAt(playerid,float:x,float:y,float:z);
Reply
#4

Quote:
Originally Posted by moadi
Посмотреть сообщение
Under OnPlayerRequestClass
pawn Код:
SetPlayerCameraLookAt(playerid,float:x,float:y,float:z);
what should i put in x y and z?
Reply
#5

Anyone?
Reply
#6

SetPlayerFacingAngle(playerid,Float:ang); you should put your r pos in SetPlayerFacingAngle
Reply
#7

Quote:
Originally Posted by juraska
Посмотреть сообщение
SetPlayerFacingAngle(playerid,Float:ang); you should put your r pos in SetPlayerFacingAngle
what is r? sorry i have only just started coding samp
Reply
#8

pawn Код:
// OnPlayerRequestClass
SetPlayerCameraPos(playerid, X, Y, Z); // The place where the camera will be
SetPlayerCameraLookAt(playerid, X, Y, Z); // The point the camera will be looking at
SetPlayerFacingAngle(playerid, Angle); // The direction the player will be looking at
How to get coordinates:

1. You have to go to an any server or the debug (the place where you installed GTA SA).
2. You go to the place you want that the player would be standing, type in: /save "your comment".
3. Go to your Documents/GTA San Andreas User Files/SAMP/savedpositions.txt .

When you get the coordinates:

pawn Код:
AddPlayerClass(          0,  293.0157,     -106.2280  ,1001.5156    ,1.6469,0,0,0,0,0,0); // Pistoletas
                                 ^             ^          ^
                                 |             |          |
                                 |             |          |
                                 |             |          |
SetPlayerCameraPos(playerid,     X      ,      Y    ,     Z    );
pawn Код:
AddPlayerClass(0,293.0157,-106.2280,1001.5156,   1.6469   ,0,0,0,0,0,0); // Pistoletas
                                                    ^
                                                    |
                                                    |
                                                    |
                                                    |
SetPlayerCameraPos(playerid,                     Angle            );
Reply
#9

/save lol then goto documents > gtaa user files > SAMP > savedpositions, after the fourth comma copy the code and paste it on SetPlayerFacingAngle(playerid,Float:ang);
Reply
#10

You need to set the coordinates in SetPlayerCameeLookAt to those of the players position.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)