+REP to the helper ! easy question .. :] -
noamch1997 - 25.08.2014
i want to make some camera movments when player connect and 'request class' ..
my code:
http://prntscr.com/4g949k
how can i make some camera movement ? can you give me example please ?
SetPlayerCameraPos(playerid, X,Y,Z);
SetPlayerCameraLookAt(playerid, X,Y,Z);
some X,Y,Z :
#1 814.2063,-2034.3439,23.9168
#2 824.2063,-2034.3439,23.9168
#3 834.2063,-2034.3439,23.9168
i try to do it buy when i connect to my server its show me only #1 camera pos ..
tnx !!!!!!!!!!!!
Re: +REP to the helper ! easy question .. :] -
Thogy - 25.08.2014
https://sampwiki.blast.hk/wiki/InterpolateCameraPos
You can make camera movements with this function.
Re: +REP to the helper ! easy question .. :] -
noamch1997 - 25.08.2014
Quote:
Originally Posted by Thogy
|
man can you give me examle to this function with my X Y Z ?
Re: +REP to the helper ! easy question .. :] -
Sawalha - 25.08.2014
Код:
InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)
Код:
playerid - player to move his camera
FromX - From the X position
FromY - From The Y position
FromZ - From The Z position
ToX - To the X Position
ToY - To the Y Position
ToZ - To the Z Position
time - moving camera time
type( CAMERA_MOVE for moving(normal moving), CAMERA_CUT for a cut one(directly camera teleport)
Speed is depending on time, If the time is much like 60000 ( six minutes ) it will move slowly, if the time is less (10000) 10 seconds will move fastly
Re: +REP to the helper ! easy question .. :] -
noamch1997 - 25.08.2014
Quote:
Originally Posted by Sawalha
Код:
InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)
Код:
playerid - player to move his camera
FromX - From the X position
FromY - From The Y position
FromZ - From The Z position
ToX - To the X Position
ToY - To the Y Position
ToZ - To the Z Position
time - moving camera time
type( CAMERA_MOVE for moving(normal moving), CAMERA_CUT for a cut one(directly camera teleport)
Speed is depending on time, If the time is much like 60000 ( six minutes ) it will move slowly, if the time is less (10000) 10 seconds will move fastly
|
i know but i have more than 2 cords ..
Re: +REP to the helper ! easy question .. :] -
F1aw1ess - 25.08.2014
Then you use the function the first time with coords #1, then a second time with coords #2 and a final time with coords #3.
Wiki Link
Re: +REP to the helper ! easy question .. :] -
Thogy - 25.08.2014
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, X,Y,Z);
if(classid == 0)
{
InterpolateCameraPos(playerid, X, Y, Z, X1, Y1, Z1, 4000, CAMERA_CUT);
}
else if(classid == 1)
{
InterpolateCameraPos(playerid, X1, Y1, Z1, X2, Y2, Z2, 4000, CAMERA_CUT);
}
else if(classid == 2)
{
InterpolateCameraPos(playerid, X2, Y2, Z2, X3, Y3, Z3, 4000, CAMERA_CUT);
}
return 1;
}
Re: +REP to the helper ! easy question .. :] -
noamch1997 - 25.08.2014
Quote:
Originally Posted by F1aw1ess
Then you use the function the first time with coords #1, then a second time with coords #2 and a final time with coords #3.
Wiki Link
|
its doesnt work
Quote:
Originally Posted by Thogy
pawn Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerCameraPos(playerid, X,Y,Z); if(classid == 0) { InterpolateCameraPos(playerid, X, Y, Z, X1, Y1, Z1, 4000, CAMERA_CUT); } else if(classid == 1) { InterpolateCameraPos(playerid, X1, Y1, Z1, X2, Y2, Z2, 4000, CAMERA_CUT); } else if(classid == 2) { InterpolateCameraPos(playerid, X2, Y2, Z2, X3, Y3, Z3, 4000, CAMERA_CUT); } return 1; }
|
i dont need it .. i want to make the camera some movements befor the spawn ..
Re: +REP to the helper ! easy question .. :] -
noamch1997 - 25.08.2014
i want to make the camera some movements befor the spawn ..
its doesnt work ..
my code :
http://prntscr.com/4gaec0
Re: +REP to the helper ! easy question .. :] -
Stinged - 25.08.2014
You're using the same position...
It should be:
FromX, FromY, FromZ, ToX, ToY, ToZ