SA-MP Forums Archive
!Help me Please! - 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: !Help me Please! (/showthread.php?tid=223968)



!Help me Please! - arjunaryas - 10.02.2011

Can someone tell me that how can I use a button as a triggering element.
eg. I want to make a moving door/lift, which will be on/off by a button(pressing anykey) and with some
predefined object ids(keypads).

I know how to make moving door/lift by using /command function but don't know how to trigger them by
pressing any key,such as pressing "F" key.
Please! tell me how can i do this using key function.


Re: !Help me Please! - xRyder - 10.02.2011

Use OnPlayerKeyStateChange.
But you can't do it with ANY key, you can only use predefined keys.


Re: !Help me Please! - -Rebel Son- - 10.02.2011

What ryder said, and if it s for a Door or elevator, Use IsPlayerinarea, so it wont open anytime someone pressed the button.


Re: !Help me Please! - arjunaryas - 10.02.2011

Thanks for your help.