KEY_SECONDARY_ATTACK and /enter
#3

Quote:
Originally Posted by dominik523
Посмотреть сообщение
You would do something like this:
pawn Код:
for(new idx=1; idx<MAX_BIZ; idx++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ])) // these are the coordinates from your business enum
            {
                    // set player position to the interior of the business and the rest      
            }
        }
So this code searches for the nearest business that the player is from.
There is another trick, you don't need to re-code it :P

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if( newkeys & KEY_SECONDARY_ATTACK )
        return OnPlayerCommandText(playerid, "/enter");

    return true;
}
Reply


Messages In This Thread
KEY_SECONDARY_ATTACK and /enter - by mrxqware - 16.12.2013, 18:12
Re: KEY_SECONDARY_ATTACK and /enter - by dominik523 - 16.12.2013, 18:19
Re: KEY_SECONDARY_ATTACK and /enter - by Patrick - 16.12.2013, 18:37
Re: KEY_SECONDARY_ATTACK and /enter - by dominik523 - 16.12.2013, 18:48
Re: KEY_SECONDARY_ATTACK and /enter - by mrxqware - 17.12.2013, 10:16
Re: KEY_SECONDARY_ATTACK and /enter - by mrxqware - 17.12.2013, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)