SA-MP Forums Archive
Help on Onplayerkeystatechange - 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: Help on Onplayerkeystatechange (/showthread.php?tid=433653)



Help on Onplayerkeystatechange - edgargreat - 28.04.2013

Is there any tutorials, how to put a keys on entering building? Like, if you enter is KEY_YES** then if you exit KEY_NO**


Re: Help on Onplayerkeystatechange - Tamer - 28.04.2013

You need to create a pickup for it.

https://sampwiki.blast.hk/wiki/CreatePickup

So people will know where to click "Y" or "N"

You need to check if the players are in the rangeofpoint (which is the pickup)

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

Then you must set the player's position to the place you want to move them to.

https://sampwiki.blast.hk/wiki/SetPlayerPos


Re: Help on Onplayerkeystatechange - edgargreat - 28.04.2013

I mean all the buildings, not just one.


Re: Help on Onplayerkeystatechange - Lordzy - 28.04.2013

Then you must create the pickup on all buildings.