OnPlayerKeyStateChange
#2

Copy this function to the end of your script:

Код:
IsKeyPressed(newkeys, oldkeys, key)
{
if(newkeys & key && !(oldkeys & key)) return 1;
return 0;
}
Depending on which keys should be pressed (List Of Keys) use it this way:

In OnPlayerKeyStateChange:

Код:
if(IsKeyPressed(newkeys, oldkeys, KEY_JUMP) && IsKeyPressed(newkeys, oldkeys, KEY_SPRINT))
{
//This code will be executed if both JUMP and SPRINT are pressed!
}
Reply


Messages In This Thread
OnPlayerKeyStateChange - by Matnix - 01.09.2013, 22:42
AW: OnPlayerKeyStateChange - by NaS - 01.09.2013, 22:54
Re: OnPlayerKeyStateChange - by Borg - 01.09.2013, 22:57
Re : OnPlayerKeyStateChange - by Matnix - 01.09.2013, 23:14
Re : OnPlayerKeyStateChange - by Matnix - 02.09.2013, 03:05
Re: OnPlayerKeyStateChange - by Borg - 02.09.2013, 03:26
Re : OnPlayerKeyStateChange - by Matnix - 02.09.2013, 04:22
Re: OnPlayerKeyStateChange - by Borg - 02.09.2013, 04:34
AW: OnPlayerKeyStateChange - by NaS - 02.09.2013, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)