27.05.2010, 01:24
PlayerToPoint its the same as IsPlayerInRangeOfPoint only the the new native function is faster
Here a macro for all PlayerToPoint lover
And the IsPlayerInArea function only checks for an area along the x and y axes
If you search for a function with any count of corners and any shape then search for IsPlayerInPerimeter (only one result
)
I think you only need IsPlayerInRangeOfPoint for it, so just create a timer (like Coole already told us)
(Only wrote that because your (Coole) code looks a bit glutted for me :S)
Here a macro for all PlayerToPoint lover

pawn Код:
#define PlayerToPoint(%0,%1, IsPlayerInRangeOfPoint(%1,%0,
If you search for a function with any count of corners and any shape then search for IsPlayerInPerimeter (only one result
)I think you only need IsPlayerInRangeOfPoint for it, so just create a timer (like Coole already told us)
pawn Код:
//mostly OnGameModeInit
SetTimer("Timer", 1000, true);
pawn Код:
forward Timer();
public Timer()
{
for(new i; i != MAX_PLAYERS; i++)
{ //loops through all players
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
{ //check if the player in in range of X, Y, Z
GameTextForPlayer(playerid, "Hello!", 5000, 4); //the gametext
}
}
}

