[HELP] "Botname" has reach/goal - 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: [HELP] "Botname" has reach/goal (
/showthread.php?tid=317717)
[HELP] "Botname" has reach/goal -
Dr.Heinz - 12.02.2012
Everytime i put Float:distance 1.0 it spams 5x "Botname" has reach/goal.
i do not know where to put this code. if i put 0.1 float:distance the printf didn't appear.
here is the code. please help me ASAP
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, -304.9921,1504.3866,75.4736))
{
if(IsPlayerNPC(playerid))
{
printf("xDrifterZx has start his Drift Practice");
}
}
else return 1;
if(IsPlayerInRangeOfPoint(playerid, 1.0, -536.3560,1994.1652,60.3828))
{
if(IsPlayerNPC(playerid))
{
printf("xDrifterZx has goal his Drift Practice");
}
}
else return 1;
return 1;
}
Re: [HELP] "Botname" has reach/goal -
[ABK]Antonio - 12.02.2012
I would do something like this
pawn Код:
new bool:myBool = false; //this would be outside of everything
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, -304.9921,1504.3866,75.4736) && myBool == false)
{
if(IsPlayerNPC(playerid))
{
printf("xDrifterZx has start his Drift Practice");
myBool = true;
}
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, -536.3560,1994.1652,60.3828) && myBool == true)
{
if(IsPlayerNPC(playerid))
{
printf("xDrifterZx has goal his Drift Practice");
myBool = false;
}
}
return 1;
}
Re: [HELP] "Botname" has reach/goal -
Dr.Heinz - 12.02.2012
Код:
C:\DOCUME~1\Heinz\MYDOCU~1\HEINZGM\GAMEMO~1\DTHE.pwn(1751) : warning 204: symbol is assigned a value that is never used: "Goal"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
EDIT:
Nevermind. Fixed
Re: [HELP] "Botname" has reach/goal -
Dr.Heinz - 12.02.2012
Never mind. fixed it by myself.