SA-MP Forums Archive
Interior entarance? - 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: Interior entarance? (/showthread.php?tid=290167)



Interior entarance? - roleplay501 - 14.10.2011

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://*********/IslQH2xB71o?t=8m29s ..

So please help me with ideas or make code for this


Re: Interior entarance? - Xyrex - 14.10.2011

Try to use: SetCameraBehindPlayer, TogglePlayerControllable and create a black Textdraw.


Re: Interior entarance? - roleplay501 - 14.10.2011

what about the camera angle? i should use sin-cos to get the correct Position?


Re: Interior entarance? - Xyrex - 14.10.2011

SetCameraBehindPlayer set the correct angle.


Re: Interior entarance? - roleplay501 - 14.10.2011



Uploaded with 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, &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));
}


Re: Interior entarance? - OKStyle - 14.10.2011

https://sampforum.blast.hk/showthread.php?pid=1460626#pid1460626


Re: Interior entarance? - roleplay501 - 14.10.2011

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


Re: Interior entarance? - grand.Theft.Otto - 14.10.2011

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.


Re: Interior entarance? - roleplay501 - 14.10.2011

Yes but i want to use this enterance also for bussiness or houses that i've added.


Re: Interior entarance? - roleplay501 - 15.10.2011

Up.. somebody may help me?