#1

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?
Reply
#2

Help pls.
Reply
#3

Help.
Reply
#4

Dont triple post, it's very annoying. You'll get help, just be patient


Edit: use a streamer maybe ?
Reply
#5

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).
Reply
#6

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.
Reply
#7

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?
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)