19.06.2012, 09:56
I am trying to use the camera look at function to show the players point. So, there was many camera sites and I wanted em randomly. I made a 2D variable -
The one on the right sides are the lookat co-ordinates.
Somewhere in my script.
Problem is it doesn't show the right point. Co-Ordinates are perfect. But it doesn't work when I try it in 2D variable.
If just try with 2D variable it works.
Help is much appreciated.
pawn Код:
new Float:Cams[4][6] =
{ //Cam Co-Ordinates //Spawn Co-Ordinates
{xxx,xxx,xxx , xxxx,xxxx,xxxx},
{xxx,xxx,xxx , xxxx,xxxx,xxxx},
{xxx,xxx,xxx , xxxx,xxxx,xxxx},
{xxx,xxx,xxx , xxxx,xxxx,xxxx},
pawn Код:
new CamPoints = random(sizeof(Cams));
SetPlayerCameraPos(playerid, Cams[CamPoints][0], Cams[CamPoints][1], Cams[CamPoints][2]);
SetPlayerCameraLookAt(playerid, Cams[CamPoints][3], Cams[CamPoints][4], Cams[CamPoints][5]);
Problem is it doesn't show the right point. Co-Ordinates are perfect. But it doesn't work when I try it in 2D variable.
If just try with 2D variable it works.
Help is much appreciated.