09.08.2011, 08:11
Alright, I think I may have found out.
This variable holds a ID of a business key that the player has. If that value is not -1, then we know the player owns a business, by this check
Now at this point, we know they own the business with the index inside the BizInfo array of business (which is equal to PlayerInfo[playerid][pBizKey]). So, with this check
We see whether or not they are within the certain range of the business they own.
So, what really checks if they have a business is the value held by PlayerInfo[playerid][pBizKey]. If it is a value other than -1, they own a business, which you can access the BizInfo array directly from with that index.
pawn Код:
new business = PlayerInfo[playerid][pBizKey];
pawn Код:
if(PlayerInfo[playerid][pBizKey] == -1)
{
SendClientMessage(playerid, COLOR_GREY, " You do not own a business.");
return 1;
}
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,25.0,BizInfo[business][bInsideX],BizInfo[business][bInsideY],BizInfo[business][bInsideZ]))
So, what really checks if they have a business is the value held by PlayerInfo[playerid][pBizKey]. If it is a value other than -1, they own a business, which you can access the BizInfo array directly from with that index.