01.09.2013, 22:54
Copy this function to the end of your script:
Depending on which keys should be pressed (List Of Keys) use it this way:
In OnPlayerKeyStateChange:
Код:
IsKeyPressed(newkeys, oldkeys, key) { if(newkeys & key && !(oldkeys & key)) return 1; return 0; }
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! }