SA-MP Forums Archive
Press a Key for Player? - 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: Press a Key for Player? (/showthread.php?tid=208822)



Press a Key for Player? - XoX - 09.01.2011

Hey Guys,

is there a function for "sending" a key to a player? For example CTRL?


Re: Press a Key for Player? - MadeMan - 09.01.2011

No.




The message you have entered is too short. Please lengthen your message to at least 4 characters.
- No I don't want to lengthen my message. 3 characters are just fine.


Re: Press a Key for Player? - XoX - 09.01.2011

Damn thanks anyway


Re: Press a Key for Player? - Infamous - 09.01.2011

What do you mean sending a key to a player?


Re: Press a Key for Player? - XoX - 09.01.2011

Ok here is my idea.

I've got an unlimited Nos script on my Server (By pressing CTRL you get Nos boost).
My idea was to make a lock command for CTRL so the players don't need to press CTRL while driving.


Re: Press a Key for Player? - Infamous - 09.01.2011

The only way I can think of doing that would be with the nitros partical and setting the vehicles velocity. May not be a very good comprimise though.
To make that work you would have to run a timer when the key is pressed and stop the process when the key is re-pressed.


Re: Press a Key for Player? - XoX - 09.01.2011

Ok. One other question. Is it possible to script the same thing for a bicycle? Get max speed without pressing the W Key consecutively?


Re: Press a Key for Player? - Infamous - 09.01.2011

I would be tempted to say no but there may be someone that knows a way round it. I would wait for someone else to reply mate.


Re: Press a Key for Player? - XoX - 09.01.2011

ok thanks alot for your help bro