How do I move doors by pressing F?
#1

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?
Reply
#2

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.
Reply
#3

MoveObject is needed too: wiki.sa-mp.com/wiki/MoveObject
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)