+REP to the helper ! easy question .. :]
#1

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 !!!!!!!!!!!!
Reply
#2

https://sampwiki.blast.hk/wiki/InterpolateCameraPos

You can make camera movements with this function.
Reply
#3

Quote:
Originally Posted by Thogy
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/InterpolateCameraPos

You can make camera movements with this function.
man can you give me examle to this function with my X Y Z ?
Reply
#4

Код:
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
Reply
#5

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 ..
Reply
#6

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
Reply
#7

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;
}
Reply
#8

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 ..
Reply
#9

i want to make the camera some movements befor the spawn ..
its doesnt work ..
my code :
http://prntscr.com/4gaec0
Reply
#10

You're using the same position...
It should be:
FromX, FromY, FromZ, ToX, ToY, ToZ
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)