SA-MP Forums Archive
How to make MMB /ar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make MMB /ar (/showthread.php?tid=522203)



How to make MMB /ar - killing - 26.06.2014

i want middle mouse button to be bind for /ar when cops press MMB ( middle mouse button ) with deagle by aiming on criminal the criminal got arrest


Re: How to make MMB /ar - Emmet_ - 28.06.2014

Try:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new targetid = INVALID_PLAYER_ID;

    if (newkeys & KEY_LOOK_BEHIND && (targetid = GetPlayerTargetPlayer(playerid)) != INVALID_PLAYER_ID && GetPlayerWeapon(playerid) >= 24)
    {
        new
            string[8];

        format(string, sizeof(string), "%d", targetid);
        cmd_ar(playerid, string);
    }
    return 1;
}



Re: How to make MMB /ar - killing - 28.06.2014

Ok i will check