PDA

View Full Version : Interior entarance?


roleplay501
14/10/2011, 05:13 PM
How to make the camera be like in single-player while the player entering house?

(the camera going above the head and the screen becoming black..,
here you can see what im meaning. http://youtu.be/IslQH2xB71o?t=8m29s ..

So please help me with ideas or make code for this :)

Xyrex
14/10/2011, 05:20 PM
Try to use: SetCameraBehindPlayer, TogglePlayerControllable and create a black Textdraw.

roleplay501
14/10/2011, 05:23 PM
what about the camera angle? i should use sin-cos to get the correct Position?

Xyrex
14/10/2011, 05:28 PM
SetCameraBehindPlayer set the correct angle.

roleplay501
14/10/2011, 06:05 PM
http://img695.imageshack.us/img695/3101/60910803.jpg (http://imageshack.us/photo/my-images/695/60910803.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

Here is what im meaning, using SetCameraBehindPlayer won't help me..

Getting player facing angle is possible
and X,Y defined already (distance between points)
so possible to find the camera XY, but i dont know how to use

floatsin and floatcos or tan... w/e.

this will work?

#define Distance 1.5
#define deg (180.0 + 20.0)
CameraCoords(playerid, &Float:x, &Float:y)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (Distance * floatsin(-a + deg, degrees));
y += (Distance * floatcos(-a + deg, degrees));
}

OKStyle
14/10/2011, 06:48 PM
http://forum.sa-mp.com/showthread.php?p=1460626 ;)

roleplay501
14/10/2011, 07:00 PM
Thank you, but its not completly 1 by 1 as Single cuz the Camera angles when entering to house.
Im trying to make camera like in single ;)

grand.Theft.Otto
14/10/2011, 08:08 PM
The default and easy way is to remove DisableInteriorEnterExits(); from under OnGameModeInit, if you have it.

This way all houses will have the yellow arrow at the door and do the camera thing you want it to do.

roleplay501
14/10/2011, 08:20 PM
Yes but i want to use this enterance also for bussiness or houses that i've added.

roleplay501
15/10/2011, 10:14 AM
Up.. somebody may help me?

roleplay501
15/10/2011, 10:37 PM
O RLY? Up...

roleplay501
16/10/2011, 12:50 PM
Srsly...

roleplay501
16/10/2011, 06:45 PM
GODAMIT.. Please help me.

roleplay501
17/10/2011, 01:39 PM
....

roleplay501
18/10/2011, 10:33 AM
....

Pharrel
18/10/2011, 10:57 AM
like this?
http://www.youtube.com/watch?v=gnKXu5913pk

roleplay501
19/10/2011, 10:44 AM
like this?
http://www.youtube.com/watch?v=gnKXu5913pk

No, i want it with walking animation and camera angles like in single-player.
Buts its also not bad, but its not the best.