public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_CROUCH) { //your code } return 1; }