PlayerToPoint Help - 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: PlayerToPoint Help (
/showthread.php?tid=141177)
PlayerToPoint Help -
NiiRV4N4 - 12.04.2010
pawn Код:
if (PlayerToPoint(5.0,playerid,PoliceDutyPosition[X],PoliceDutyPosition[Y],PoliceDutyPosition[Z]) || PlayerToPoint(5.0,playerid,959.30,1940.24,9.00))
I want someone to be able to go on police duty in two different locations. One is a dynamic location, and the other, I added, is the normal XYZ. It doesn't work. Please fix.
Re: PlayerToPoint Help -
NiiRV4N4 - 12.04.2010
bump
Re: PlayerToPoint Help -
NiiRV4N4 - 12.04.2010
bump
Re: PlayerToPoint Help -
.(Infinite Imagination). - 12.04.2010
which is in the variable value, you might have forgotten to put Float: prefix
BAD:
Код:
enum Info
{
x,
y,
z
};
new PoliceDutyPosition[Info];
GOOD:
Код:
enum Info
{
Float:x,
Float:y,
Float:z
};
new PoliceDutyPosition[Info];
Re: PlayerToPoint Help -
NiiRV4N4 - 12.04.2010
Quote:
Originally Posted by © ŦĥЗ ǺĽẽẌṖŎịŚỘń
which is in the variable value, you might have forgotten to put Float: prefix
|
No, the dynamic part is NOT bugged. The other part is. Scroll over.
Re: PlayerToPoint Help -
.(Infinite Imagination). - 12.04.2010
What is the value stored in PoliceDutyPosition?
Re: PlayerToPoint Help -
Calgon - 12.04.2010
There's now a SA:MP native in 0.3 for this, why don't you use it (IsPlayerInRangeOfPoint)?
pawn Код:
if( IsPlayerInRangeOfPoint( playerid, 5.0, PoliceDutyPosition[X], PoliceDutyPosition[Y], PoliceDutyPosition[Z] ) || IsPlayerInRangeOfPoint(playerid, 5.0, 959.30, 1940.24, 9.00) )
{
//do
}
Re: PlayerToPoint Help -
NiiRV4N4 - 12.04.2010
Quote:
Originally Posted by © ŦĥЗ ǺĽẽẌṖŎịŚỘń
What is the value stored in PoliceDutyPosition?
|
That is unnecessary. And, again, that is not what's bugged. The bug starts at "||" in the code.
Quote:
Originally Posted by FreddoX [BINMAN
]
There's now a SA:MP native in 0.3 for this, why don't you use it (IsPlayerInRangeOfPoint)?
pawn Код:
if( IsPlayerInRangeOfPoint( playerid, 5.0, PoliceDutyPosition[X], PoliceDutyPosition[Y], PoliceDutyPosition[Z] ) || IsPlayerInRangeOfPoint(playerid, 5.0, 959.30, 1940.24, 9.00) ) { //do }
|
Did you fix the bug?
Re: PlayerToPoint Help -
Calgon - 12.04.2010
Quote:
Originally Posted by NiiRV4N4
Quote:
Originally Posted by © ŦĥЗ ǺĽẽẌṖŎịŚỘń
What is the value stored in PoliceDutyPosition?
|
That is unnecessary. And, again, that is not what's bugged. The bug starts at "||" in the code.
Quote:
Originally Posted by FreddoX [BINMAN
]
There's now a SA:MP native in 0.3 for this, why don't you use it (IsPlayerInRangeOfPoint)?
pawn Код:
if( IsPlayerInRangeOfPoint( playerid, 5.0, PoliceDutyPosition[X], PoliceDutyPosition[Y], PoliceDutyPosition[Z] ) || IsPlayerInRangeOfPoint(playerid, 5.0, 959.30, 1940.24, 9.00) ) { //do }
|
Did you fix the bug?
|
Try it and see. If it doesn't work, the coordinates you specified don't work.