03.02.2011, 02:05
Use IsPlayerInRangeOfPoint.
pawn Код:
if(strcmp(cmdtext, "/enter", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, building1x, building1y, building1z))
{
//Teleport to building 1
}
else if(IsPlayerInRangeOfPoint(playerid, 3, building2x, building2y, building2z))
{
//Teleport to building 2
}
return 1;
}