SA-MP Forums Archive
how to enter the building or door by pressing the enter key - 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 to enter the building or door by pressing the enter key (/showthread.php?tid=505369)



how to enter the building or door by pressing the enter key - kurniarocki - 08.04.2014

how to enter the building or door by pressing the enter key


Re: how to enter the building or door by pressing the enter key - Ari - 08.04.2014

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

no spoon feeding (:


Re: how to enter the building or door by pressing the enter key - iBanner - 08.04.2014

Also use IsPlayerInCheckpoint to detect if player is inside the checkpoint near the door (you can make a checkpoint streamer by incognito). Then make a textdraw or gametextforplayer showing like "Press Enter to access the house" when player step on the checkpoint.


Re: how to enter the building or door by pressing the enter key - Ari - 08.04.2014

Quote:
Originally Posted by iBanner
View Post
Also use IsPlayerInCheckpoint to detect if player is inside the checkpoint near the door. Then make a textdraw or gametextforplayer showing like "Press Enter to access the house"
Or be more efficient and just cross reference door pos and player pos.

Whack a dynamic version in there, placing down and just reference the SQL


Re: how to enter the building or door by pressing the enter key - kurniarocki - 08.04.2014

what key of enter??


Re: how to enter the building or door by pressing the enter key - iBanner - 08.04.2014

Quote:
Originally Posted by kurniarocki
View Post
what key of enter??
Im not sure if this

Quote:

~k~~VEHICLE_ENTER_EXIT~

try ari first post you can find the key their.

EDIT: Omg fail. It should be
Quote:

KEY_SECONDARY_ATTACK




Re: how to enter the building or door by pressing the enter key - Ari - 08.04.2014

Quote:
Originally Posted by kurniarocki
View Post
what key of enter??
https://sampwiki.blast.hk/wiki/Keys

pawn Code:
KEY_SECONDARY_ATTACK