Methods of floats..
#3

like this?
Код:
forward CreateTrees( );
public CreateTrees( )
{
	for(new t=0;t<MAX_TREES;t++)
	{
		treeExists[t]=1;
		treeObj[t]=CreateObject(691,	treePos[t][0],	treePos[t][1],	treePos[t][2],3.14,0.00,0.16);
	}
	return 1;
}
did it in a hurry, but i hope it looks better. not tested.
oh, the array for the coordinates have to be defined somewhere else, like OnGame/FilterscriptInit:
Код:
treePos [ 0 ] [ 0 ] = 661.91, treePos [ 0 ] [ 1 ] = 1289.53, treePos [ 0 ] [ 2 ] = 10.71;
treePos [ 1 ] [ 0 ] = 640.08, treePos [ 1 ] [ 1 ] = 1289.37, treePos [ 1 ] [ 2 ] = 10.71;
treePos [ 2 ] [ 0 ] = 685.15, treePos [ 2 ] [ 1 ] = 1257.14, treePos [ 3 ] [ 2 ] = 10.71;
treePos [ 3 ] [ 0 ] = 695.25, treePos [ 3 ] [ 1 ] = 1231.59, treePos [ 3 ] [ 2 ] = 10.14;
treePos [ 4 ] [ 0 ] = 661.87, treePos [ 4 ] [ 1 ] = 1190.05, treePos [ 4 ] [ 2 ] = 10.71;
treePos [ 5 ] [ 0 ] = 639.62, treePos [ 5 ] [ 1 ] = 1190.14, treePos [ 5 ] [ 2 ] = 9.93;
treePos [ 6 ] [ 0 ] = 571.27, treePos [ 6 ] [ 1 ] = 1256.64, treePos [ 6 ] [ 2 ] = 10.71;
treePos [ 7 ] [ 0 ] = 554.25, treePos [ 7 ] [ 1 ] = 1242.15, treePos [ 7 ] [ 2 ] = 10.71;
done.
Reply


Messages In This Thread
Methods of floats.. - by 2KY - 22.10.2012, 13:35
Re: Methods of floats.. - by XRabbit - 22.10.2012, 13:45
Re: Methods of floats.. - by Babul - 22.10.2012, 15:07
Re: Methods of floats.. - by 2KY - 22.10.2012, 15:21
Re: Methods of floats.. - by Babul - 22.10.2012, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)