OnplayerRequestClass gang
#1

I wonder why each time I click the next/back arrow or "<",">" in onplayerrequestclass this InterpolateCameraPos and InterpolateCameraLookAt always being called. Is there anyway to pause this when choosing skin on the same team?

Let say Mexicans team has 3 skins to choose. When I choose different skin this InterpolateCameraPos and InterpolateCameraLookAt always called.


Код:
		case 0,1,2:
		{
			TextDrawShowForPlayer(playerid, Mexicans1);
			TextDrawHideForPlayer(playerid, Homeless1);
			TextDrawHideForPlayer(playerid, Mafia1);
			TextDrawHideForPlayer(playerid, Yakuza1);
			TextDrawHideForPlayer(playerid, Biker1);
			TextDrawHideForPlayer(playerid, Grove1);
			InterpolateCameraPos(playerid, -2586.111816, 365.485076, 60.749420, -2577.812500, 330.985961, 13.436348, 3000);
			InterpolateCameraLookAt(playerid, -2590.667480, 366.290374, 58.852813, -2573.454833, 329.463684, 11.514471, 3000);
			SetPlayerFacingAngle( playerid, 90);
			SetPlayerPos(playerid, -2571.8079,328.3809,10.5625);
			ApplyAnimation(playerid,"OTB","wtchrace_loop",4.1,1,1,1,0,-1);

		}
Reply
#2

Yes. Everytime you press the arrow OnPlayerRequestClass is called again. So you either put the camera code somewhere else or you use a variable to know if you have already started the interpolation
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)