/lockb always returning else
#1

The command I have written always returns the else clause of IsPlayerInRangeOfPoint. Even if I am right inside the pickup, it will still display that I'm not near my business. The coords are correct, as /enter /exit commands teleport move the player to these coords when they leave the interior. Am I missing something?

Код:
command(lockb, playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 5.0, Business[playerid][BusinessExteriorX], Business[playerid][BusinessExteriorY], Business[playerid][BusinessExteriorZ]))
	{
		if(strmatch(Business[playerid][BusinessOwner], pName(playerid)))
		{
    		new string[256];
    		format(string, sizeof(string), "You have locked: %s. No one can enter this business now. Type /lockb again to unlock property.", Business[playerid][BusinessName]);
    		SendClientMessage(playerid, WHITE, string);
    		Business[playerid][BusinessLocked] = 1;
		}
		else return SendClientMessage(playerid, WHITE, "You are not the owner of this business.");
	}
	else return SendClientMessage(playerid, WHITE, "You are not near the business you want to lock.");
	return 1;
}
Reply


Messages In This Thread
/lockb always returning else - by HighFlyer - 29.12.2014, 23:01
Re: /lockb always returning else - by Schneider - 29.12.2014, 23:18
Re: /lockb always returning else - by HighFlyer - 29.12.2014, 23:41
Re: /lockb always returning else - by sammp - 30.12.2014, 01:12
Re: /lockb always returning else - by HighFlyer - 30.12.2014, 13:16
Re: /lockb always returning else - by HighFlyer - 30.12.2014, 14:15
Re: /lockb always returning else - by Schneider - 30.12.2014, 15:52
Re: /lockb always returning else - by HighFlyer - 30.12.2014, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)