I create a trigoometric tunnel, I want that will be 360° but create objects for 180°.
And the Objects are so tight, how can I make it dilute.
Код:
new radius=100;
new Float:degree=0.0;
new Tunnel[180]; // There must I changest with 360 :D
public OnFilterScriptInit()
{
new Float:X, Float:Temp, Float:Y, Float:Px, Float:Py;
for(new Objects; Objects < 360; Objects++)
{
if(degree < 360)
{
degree++;
}
X = floatmul(floatcos(degree, degrees),radius),
Temp = (radius * radius) - floatpower(X, 2),
Y = floatsqroot(Temp),
Px = floatadd(0, X),
Py = floatadd(0, Y);
Tunnel[Objects] = CreateStreamedObject(13666, Px, Py, 5.000, 0, 0, degree+90);
printf("X: %.2f, Y: %.2f, Degree: %.3f", X, Y, degree);
}
return 1;
}