SA-MP Forums Archive
Activate Function Using A Key - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Activate Function Using A Key (/showthread.php?tid=149430)



Activate Function Using A Key - MummyKillerSLO - 22.05.2010

Hi!

How can I do, that I activate my function 'HideMessage(playerid)' when I click MMB (KEY_LOOK_BEHIND)?
The wiki is not helping me because I don't understand it. Please help.


Re: Activate Function Using A Key - woot - 22.05.2010

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_LOOK_BEHIND)
    {
        HideMessage(playerid);
    }
}
Duh?