IsPlayerInRangeOfPoint
#1

i tried checking if the player is in range of point then the value set to the id of business and if not in range of point then it set to 0 and i set the timer for this public repeat each second. but when i get in game and go to the area. it doesnt work. but when i deleted the detect if i am not in the area. the command work. but ofcourse when i get out of the area i can still use the command because the value is not 0 anymore. i just wonder how to detect if i am not in the area correctly
Код:
public InBusinessCheck(playerid)
{
    for(new i = 0; i < sizeof(Businesses); i++)
	if(IsPlayerInRangeOfPoint(playerid, 3, Businesses[i][bInteriorX], Businesses[i][bInteriorY], Businesses[i][bInteriorZ]))
	{
		Player[playerid][InBusiness] = i;
	}
	for(new i = 0; i < sizeof(Businesses); i++)
	if(!IsPlayerInRangeOfPoint(playerid, 3, Businesses[i][bInteriorX], Businesses[i][bInteriorY], Businesses[i][bInteriorZ]))
	{
	    Player[playerid][InBusiness] = 0;
	}
	return 1;
}
Reply


Messages In This Thread
IsPlayerInRangeOfPoint - by EaglesBill - 21.05.2015, 14:06
Re: IsPlayerInRangeOfPoint - by Konstantinos - 21.05.2015, 14:10
Re: IsPlayerInRangeOfPoint - by EaglesBill - 21.05.2015, 14:35
Re: IsPlayerInRangeOfPoint - by Konstantinos - 21.05.2015, 14:58
Re: IsPlayerInRangeOfPoint - by EaglesBill - 21.05.2015, 15:33

Forum Jump:


Users browsing this thread: 1 Guest(s)