Help With 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help With OnPlayerKeyStateChange (
/showthread.php?tid=162635)
Help With OnPlayerKeyStateChange - Guest3598475934857938411 - 24.07.2010
Hey I recently made like when you press lmb it lifts the car in the air
I went to
https://sampwiki.blast.hk/wiki/GetPlayerKeys
But I didnt find the caps lock function! Anybody know what it is called?
Re: Help With OnPlayerKeyStateChange -
willsuckformoney - 24.07.2010
i tried that to it didnt work, even if u would copy and paste what it shows there it wouldnt work, i think the wiki is fucked....
Re: Help With OnPlayerKeyStateChange - Guest3598475934857938411 - 24.07.2010
No I just want what its called like KEY_FIRE but with the caps btw i got it working!
Re: Help With OnPlayerKeyStateChange - Guest3598475934857938411 - 24.07.2010
This might help you dude
http://pastebin.com/5UBQXRev
Re: Help With OnPlayerKeyStateChange - Guest3598475934857938411 - 24.07.2010
Any response!
Re: Help With OnPlayerKeyStateChange -
willsuckformoney - 24.07.2010
that helps but i wanted multi pressed keys
Re: Help With OnPlayerKeyStateChange -
ғαιιοцт - 24.07.2010
onplayerkeystatechange
new string[128];
format string newkeys);
sendclientmessage string
this way you can see what the number for every key is, and you can also see what keys work in vehicle and on foot.
when you press more then one key (example: key 512 and 128, you just need to add the numbers, so it'll be 640)
Re: Help With OnPlayerKeyStateChange - Guest3598475934857938411 - 24.07.2010
So fallout is 128 the caps lock key?
Re: Help With OnPlayerKeyStateChange -
ғαιιοцт - 26.07.2010
no,
https://sampwiki.blast.hk/wiki/GetPlayerKeys
here's a full list of all keys
Re: Help With OnPlayerKeyStateChange -
Shadow™ - 26.07.2010
At the top of your script:
Now, under
OnPlayerKeyStateChange:
pawn Код:
if(newkeys && KEY_HORN && oldkeys && 1024)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_WHITE,"You must be inside a vehicle to use this.");
return 1;
}
new Float:X,Float:Y,Float:Z;
GetVehicleVelocity(GetPlayerVehicleID(playerid),X,Y,Z);
SetVehicleVelocity(GetPlayerVehicleID(playerid),X,Y,Z+(Z / 4));
}