29.12.2014, 23:01
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;
}


