[HELP] "Botname" has reach/goal
#1

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;
}
Reply
#2

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;
}
Reply
#3

Код:
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
Reply
#4

Never mind. fixed it by myself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)