hotkey as command?
#6

Any callback MUST be outside of any other.

You already have OnPlayerKeyStateChange callback to your script. Just goto that callback (Ctrl + F and type: OnPlayerKeyStateChange) and add inside it:
pawn Код:
// ...
    if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
    {
        if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
        {
            new Float:shax, Float:shay, Float:shaz;
            new Float:shbx, Float:shby, Float:shbz;
            new Float:shcx, Float:shcy, Float:shcz;
            GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
            GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
            GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
            for(new i = 0; i < sizeof(HouseInfo); i++)
            {
                // rest of the code of the /enter command
            }
        }
    }
Reply


Messages In This Thread
hotkey as command? - by whando - 13.11.2013, 17:51
Re: hotkey as command? - by Konstantinos - 13.11.2013, 17:55
Re: hotkey as command? - by whando - 13.11.2013, 18:05
Re: hotkey as command? - by Konstantinos - 13.11.2013, 18:13
Re: hotkey as command? - by whando - 13.11.2013, 18:24
Re: hotkey as command? - by Konstantinos - 13.11.2013, 18:27
Re: hotkey as command? - by whando - 13.11.2013, 18:40
Re: hotkey as command? - by Konstantinos - 13.11.2013, 18:41
Re: hotkey as command? - by whando - 13.11.2013, 18:51
Re: hotkey as command? - by Konstantinos - 13.11.2013, 18:57

Forum Jump:


Users browsing this thread: 4 Guest(s)