LostProphet

Untitled

Jun 10th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Code to Create a keyboard onscreen for you to type in you new license plate
  2. //Hope This Helps! (Not sure where i found this but credit to whoever made this code)
  3.  
  4. Ped playerPed = PLAYER::PLAYER_PED_ID();
  5.  
  6. // No point in displaying the keyboard if they aren't in a vehicle
  7. if (!PED::IS_PED_IN_ANY_VEHICLE(playerPed, false)) return;
  8.  
  9. // Invoke keyboard
  10. GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD(true, "", "", VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(PED::GET_VEHICLE_PED_IS_IN(playerPed, false)), "", "", "", 9);
  11.  
  12. // Wait for the user to edit
  13. while (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 0) WAIT(0);
  14.  
  15. // Make sure they didn't exit without confirming their change, and that they're still in a vehicle
  16. if (!GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT() || !PED::IS_PED_IN_ANY_VEHICLE(playerPed, false)) return;
  17.  
  18. // Update the licenseplate
  19. VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(PED::GET_VEHICLE_PED_IS_IN(playerPed, false), GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT());
Add Comment
Please, Sign In to add comment