How do I move doors by pressing F? - 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 do I move doors by pressing F? (
/showthread.php?tid=549269)
How do I move doors by pressing F? -
davidstyle1125 - 05.12.2014
Hello, my LSPD doors didn't work, so we fixed it but now it works only with the command "/door".
How do I set the door so it will open by pressing "F".. possible?
Re: How do I move doors by pressing F? -
Beckett - 05.12.2014
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
pawn Код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
pawn Код:
if(PRESSED(KEY_SECONDARY_ATTACK))
{
//door code
}
KEY_SECONDARY_ATTACK is the F/RETURN/ENTER key.
Re: How do I move doors by pressing F? -
davve95 - 05.12.2014
MoveObject is needed too: wiki.sa-mp.com/wiki/MoveObject