Enter&Exit biz - Help needed.
#1

Hi guys!
I need a little help with entering and exiting bizzes.
I've made a system, that teleports u to the right place'n'stuff, but the thing, that I can't figure out is how to get the ID of the closest biz. I need some kind of system to get the closest biz by the biz x, y and z params.

The teleport'n'stuff code:
pawn Код:
public EnterNExitBiz(playerid, bizid)
{
    if(PlayerInfo[playerid][InABiz] == 0) // OUT
    {
        new string[128];
        format(string, sizeof(string), "%s", BizInfo[bizid][fName]);
        if(BizInfo[firmaid][fClosed] == 1) return GameTextForPlayer(playerid, "~r~Da biz is closed!", 5000, 1);
        if(PlayerInfo[playerid][BizKey] == bizid)
        {
            SetPlayerInterior(playerid, BizInfo[bizid][fInterj88r]);
            PlayerInfo[playerid][Int] = BizInfo[bizid][fInterj88r];
            SetPlayerPos(playerid, BizInfo[bizid][fIntX], BizInfo[bizid][fIntY], BizInfo[bizid][fIntZ]);
            GameTextForPlayer(playerid, string, 5000, 1);
            if(bizid == 2) return PlayerInfo[playerid][Riidepoes] = 1; // IGNORE THIS
        }
    }
    return 1;
}
The thing, that I need, is the id of the closest biz.
It's suposed to be got by the next params:
pawn Код:
Float:fEntranceX,
    Float:fEntranceY,
    Float:fEntranceZ,

((Translated from Estonian ))
Reply


Messages In This Thread
Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 13:54
Re: Enter&Exit biz - Help needed. - by Mike_Peterson - 18.12.2012, 15:54
Re: Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 16:20
Re: Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 16:26
Re: Enter&Exit biz - Help needed. - by Mike_Peterson - 18.12.2012, 16:39
Re: Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 16:50
Re: Enter&Exit biz - Help needed. - by Mike_Peterson - 18.12.2012, 18:02
Re: Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 19:07
Re: Enter&Exit biz - Help needed. - by Mike_Peterson - 18.12.2012, 19:09
Re: Enter&Exit biz - Help needed. - by tsonn1 - 18.12.2012, 19:17

Forum Jump:


Users browsing this thread: 1 Guest(s)