Polygon/Array Problem
#1

What's wrong with this?
pawn Код:
new Float:fPolyPoints[] =
{
    1995.8484,1545.3135,
    1958.4135,1528.4357,
    1959.7385,1525.1604,
    1995.8484,1541.0330,
    1995.8484,1545.3135
};

public OnGameModeInit()
{
    Bridge =    CreateDynamicPolygon((fPolyPoints[0],fPolyPoints[1],fPolyPoints[2],fPolyPoints[3],fPolyPoints[4],fPolyPoints[5],fPolyPoints[6],fPolyPoints[7],fPolyPoints[8],fPolyPoints[9]), 13.1859, 21.1337);
}
Reply
#2

Not sure, but shouldn't it be like this if it's an array:

pawn Код:
new Float:fPolyPoints[] =
{
    {1995.8484,1545.3135},
    {1958.4135,1528.4357},
    {1959.7385,1525.1604},
    {1995.8484,1541.0330},
    {1995.8484,1545.3135}
};
Reply
#3

I have no clue.. lol
Reply
#4

What's the problem?
Reply
#5

I'm supposed to get money when im in the area, but i don't.
And that part of code works for other areas
Reply
#6

i'm not getting anywhere with this.. Help?
Reply
#7

try this

PHP код:
new Float:fPolyPoints[5][2] =
{
    {
1995.8484,1545.3135},
    {
1958.4135,1528.4357},
    {
1959.7385,1525.1604},
    {
1995.8484,1541.0330},
    {
1995.8484,1545.3135}
}; 
Edit: always scripters mix in this arrays, read this , it may help you (:
Reply
#8

What's wrong?
pawn Код:
new Float:fPolyPoints[4][2]=
{
    {1995.8484,1545.3135},
    {1958.4135,1528.4357},
    {1959.7385,1525.1604},
    {1995.8484,1541.0330}
};


    Bridge =    CreateDynamicPolygon((fPolyPoints[0],fPolyPoints[1],fPolyPoints[2],fPolyPoints[3],fPolyPoints[0]));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)