One Button - 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: One Button (
/showthread.php?tid=382482)
One Button -
Er@x3r - 03.10.2012
How to make commands like in CrazyBob's server with MMB you can give ticket or arrest peoples?
please help me
Re: One Button -
CmZxC - 03.10.2012
Define you are looking for is KEY_LOOK_BEHIND.
The callback you are looking for is OnPlayerKeyStateChange.
The code you are looking for is below.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_LOOK_BEHIND)
{
// what happens if player pressed MMB / Numpad 1 ?
}
}
Re: One Button -
Er@x3r - 03.10.2012
thanks man