GetPlayerCameraPos returns X:0.00 Y:0.00 Z:0.00
#1

Hi.

Why when i using GetPlayerCameraPos at OnPlayerRequestClass the function, returns me:
Код:
X: 0.00 Y: 0.00 Z: 0.00
I don't know, but why it doesn't return normal camera pos?
Код:
case 0, 1, 2:
		{
		    new Float:X, Float:Y, Float:Z;
			
            SetPlayerPos( playerid, -2685.925292, -2395.514160, 3.264465 );
			SetPlayerFacingAngle( playerid, 77.605529 );
			
			
			GetPlayerCameraPos( playerid, X, Y, Z );
			printf( "Camera pos: X:%.2f | Y:%.2f | Z:%.2f", X, Y, Z );
			
			if ( X != -2699.76 /*&& camera[ 1 ] != -2393.5374 && camera[ 2 ] != 8.2042*/ )
			{
			    SetPlayerCameraPos( playerid, -2735.2820, -2361.4514, 24.9300 );
				SetPlayerCameraLookAt( playerid, -2734.4592, -2362.0229, 24.5299 );
			
				InterpolateCameraPos( playerid, -2735.2820, -2361.4514, 24.9300, -2699.7625, -2393.5374, 8.2042, 2500, CAMERA_MOVE );
				InterpolateCameraLookAt( playerid, -2734.4592, -2362.0229, 24.5299, -2698.7788, -2393.7117, 8.0342, 2500, CAMERA_MOVE );

				Streamer_UpdateEx( playerid, -2685.92, -2395.51, 3.26, 11 );
			}
		}
Reply
#2

Perhaps it doesn't work straight after SetPlayerPos. Make a test command.
Reply
#3

What?
pawn Код:
%.2f
Reply
#4

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
What?
pawn Код:
%.2f
Examples:
%.2f with 43.45235523: 43.45
%.3f with the same number: 43.452
etc.

GetPlayerPos also returns 0 in OnPlayerRequestClass. Player is like invisible in OnPlayerRequestClass, nobody can see him, you also can't get his coords.
Reply
#5

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
Examples:
%.2f with 43.45235523: 43.45
%.3f with the same number: 43.452
etc.

GetPlayerPos also returns 0 in OnPlayerRequestClass. Player is like invisible in OnPlayerRequestClass, nobody can see him, you also can't get his coords.
Pfff ... this sucks ... thanks, btw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)