public OnPlayerUpdate(playerid){ if(IsKeyDown(VK_K)) { // code to open inventory here } if(IsKeyDown(VK_G)) { // code to do whatever you want here }}