public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if (newkeys == KEY_SPRINT) { //Add your code here }}