Polygon/Array Problem - 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)
+--- Thread: Polygon/Array Problem (
/showthread.php?tid=386520)
Polygon/Array Problem -
RedFusion - 20.10.2012
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);
}
Re: Polygon/Array Problem -
2KY - 20.10.2012
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}
};
Re: Polygon/Array Problem -
RedFusion - 20.10.2012
I have no clue.. lol
Re: Polygon/Array Problem -
HyDrAtIc - 20.10.2012
What's the problem?
Re: Polygon/Array Problem -
RedFusion - 20.10.2012
I'm supposed to get money when im in the area, but i don't.
And that part of code works for other areas
Re: Polygon/Array Problem -
RedFusion - 20.10.2012
i'm not getting anywhere with this.. Help?
Re: Polygon/Array Problem -
Youice - 20.10.2012
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 (:
Re: Polygon/Array Problem -
RedFusion - 20.10.2012
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]));