OnPlayerKeyStateChange problem
#1

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP))
{
if (IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Message One");
}
}
return 1;
}
If i get in a car, And press Shift, it sends that message,
But it sends that message if i press "S" aswell,
Why?
Reply
#2

Change it to KEY_HANDBRAKE
Reply
#3

Now i have to press Space for the message,
I want it for shift
Reply
#4

Read carefully the text on this page.
Reply
#5

Quote:
Originally Posted by Don Correlli
Read carefully the text on this page.
I have
Reply
#6

Quote:
Originally Posted by JoeDaDude
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP))
{
if (IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "Message One");
}
}
return 1;
}
If i get in a car, And press Shift, it sends that message,
But it sends that message if i press "S" aswell,
Why?
Jump key is shift at yours as well as S so they both work, there isn't any possible option to asset a key on the keyboard but only an ingame assigned key so if you want that go to your options and change SHIFT S or jump in this case to SHIFT only but it'll mean that only you can do it that way, it doesn't change the otherss way.
Reply
#7

Im trying to copy rp engine system,
Like /engine or shift
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)