Why? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Why? (
/showthread.php?tid=96685)
Why? -
_TeRmiNaToR_ - 10.09.2009
pawn Код:
#include <a_samp>
new tunnel;
new Float:degree=0.0;
new radius=50;
public OnFilterScriptInit()
{
new
Float:X = floatmul(floatcos(degree, degrees),radius),
Float:Temp = (radius * radius) - floatpower(X, 2),
Float:Y = floatsqroot(Temp),
Float:Px = floatadd(0, X),
Float:Py = floatadd(0, Y);
for(new Objects; Objects < 180; Objects++)
{
tunnel = CreateObject(13666, Px, Py, 3.000, 0, 0, 0, 500);
SetObjectRot(tunnel,0,0,degree);
if(degree < 360)
{
degree++;
}
}
return 1;
}
I would creating a tunnel as circle with trigonometri, but when I spawning in game, there give me crash.
Where are the error?
Re: Why? -
_TeRmiNaToR_ - 10.09.2009
Help pls.
Re: Why? -
_TeRmiNaToR_ - 10.09.2009
Help.
Re: Why? -
Kyosaur - 10.09.2009
Dont triple post, it's very annoying. You'll get help, just be patient
Edit: use a streamer maybe ?
Re: Why? -
Correlli - 10.09.2009
Stop double posting, and if i'm correct, you already asked this a few times already on this forum (so new topics aren't really needed).
Re: Why? -
_TeRmiNaToR_ - 10.09.2009
Quote:
Originally Posted by Kyosaur!!
Dont triple post, it's very annoying. You'll get help, just be patient
Edit: use a streamer maybe ?
|
Yes, but No change anything.
Re: Why? -
saiberfun - 10.09.2009
Float:degree=0.0; u dont need to set it to 0.0 becuz it is anywayz as float
and shouldnt radius be a float too?
Re: Why? -
_TeRmiNaToR_ - 11.09.2009
I repaired this error, but now are give this error: the objects created are Double and this:
Code is :
pawn Код:
#include <a_samp>
#include <xStreamer>
new radius = 200;
new Float:degree=0.0;
new Tunnel[750];
public OnFilterScriptInit()
{
new Float:X, Float:Temp, Float:Y, Float:Px, Float:Py;
for(new Objects; Objects < 750; Objects++)
{
if(degree < 360)
{
degree++;
}
else
{
degree=1.0;
}
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(13592, Px, Py, 10.000, 0, 0, degree);
printf("X: %.2f, Y: %.2f, Degree: %.3f", X, Y, degree);
}
return 1;
}
Help please.