Trying to make it so it sees the player.... (CameraLookAt,CameraPosition)
#1

So what I was doing basically, I was making the playerid sit in the chair, and then I have another position facing the person that is sitting.....

pawn Код:
AddPlayerClass(35,2.9429,28.6322,1199.5938,0.5921,0,0,0,0,0,0); // spot
AddPlayerClass(35,1.6159,30.1600,1199.5938,213.4925,0,0,0,0,0,0); // CameraPos
pawn Код:
SetPlayerCameraPos(playerid, 1.6159,30.1600,1199.5938);
                SetPlayerCameraLookAt(playerid, 1.6159,30.1600,1199.5938);
                SetPlayerPos(playerid, 2.9429,28.6322,1199.5938);
                SetPlayerInterior(playerid, 1);
                ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
Not working out too well... It's just facing the plane
Reply
#2

pawn Код:
SetPlayerPos(playerid, 1.808619,32.384357,1199.593750);
    SetPlayerInterior(playerid, 1);
    SetPlayerVirtualWorld(playerid, 1);
ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
you dont need these player classes or what every they are.
Reply
#3

I don't think you are understanding what I said.
Reply
#4

So; when someone types a command, lets say "/sit". It will teleport them to that position and set the players camera looking at themselves sitting down? Is that correct?

Try this:
pawn Код:
SetPlayerPos(playerid, 2.9429,28.6322,1199.5938);
                SetPlayerInterior(playerid, 1);
                ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
                SetPlayerCameraPos(playerid, 1.6159,30.1600,1199.5938);
                SetPlayerCameraLookAt(playerid, 2.9429,28.6322,1199.5938,2);
Reply
#5

No, this is for when the player registers.
Reply
#6

Ooh, I see. Did you try the code I posted? What happened?
Reply
#7

IT worked but the dude isn't sitting in the seat, probably a faulty on my end.
Reply
#8

I think it's just sometimes ApplyAnimation needs to be applied twice.

Maybe try that
Reply
#9

No it's not that... The player is sitting, but not in the seat, he is 25% off to the side. xD
Reply
#10

Ooh xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)