Create a keybind to execute (/enter /exit and /car engine) commands - 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: Create a keybind to execute (/enter /exit and /car engine) commands (
/showthread.php?tid=367363)
Create a keybind to execute (/enter /exit and /car engine) commands -
Zach7 - 09.08.2012
What Do I add to those commands to make it a keybind.
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
Mauzen - 09.08.2012
OnPlayerKeyStateChange is the trick.
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Detect when a certain key was pressed, and execute the command you like.
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
Dawnz - 09.08.2012
deleted.
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
Zach7 - 09.08.2012
Quote:
Originally Posted by Mauzen
|
Oh man that will be hard and the instructions are not straightforward
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
Zach7 - 10.08.2012
I dont know how to do it after i read that woever the fuck did that sucks at explaing
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
carz0159 - 10.08.2012
dont double post theres an edit botton, use it
Re: Create a keybind to execute (/enter /exit and /car engine) commands -
[MM]RoXoR[FS] - 10.08.2012
pawn Код:
//At to top
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
//OnPlayerKeyStateChange
//if they pressed Fire and Crouch key.
if (PRESSED( KEY_FIRE | KEY_CROUCH ))