SA-MP Forums Archive
SetPlayerKeys? - 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: SetPlayerKeys? (/showthread.php?tid=145823)



SetPlayerKeys? - Underworld - 04.05.2010

Hello.
I want to get a keys and set keys in a player or a NPC.
But, i only have the function GetPlayerKeys(Playerid);

Some suggestion? Is that possible?
:S

[sorry for my english]

Thank's


Re: SetPlayerKeys? - Sergei - 04.05.2010

No, it's not.


Re: SetPlayerKeys? - Extremo - 04.05.2010

You can detect if a player is pressing a key etcetra. With a third party program you could also simulate keys, but without any of what I mentioned you will not have any possibility of simulating keys in the game itself. So unless you will create yourself a additional software to simulate these key presses, you have no chance.

PS: I know that the poster above me already mentioned it is not possible, I tried to point out that another program may simulate key presses.

So, you could make your "key simulation" press a few keys in a row and then you detect these in your script by counting up which ones the user pressed. Make them long so that the user is kind of impossible of typing the same.

Anyway, just a idea.

Regards,
Extremo.


Re: SetPlayerKeys? - Gamer_Z - 04.05.2010

but if u just want to make the player remote get in a vehicle when your script uses an passenger script then just do this:
pawn Код:
OnPlayerKeyStateChange(playerid, KEY_ACTION, 0);
or soemthing smillar to this.