Advertisement
Tustin

gta 5 give vehicle test

Jul 19th, 2016
1,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | None | 0 0
  1. void give_ownership()
  2. {
  3.     if (DOES_ENTITY_EXIST(GET_PLAYER_PED(SelectedClient)))
  4.     {
  5.         if (IS_PED_IN_ANY_VEHICLE(GET_PLAYER_PED(SelectedClient), 1))
  6.         {
  7.             Vehicle veh = GET_VEHICLE_PED_IS_IN(GET_PLAYER_PED(SelectedClient), 1);
  8.             int hash = _0xF8D7AF3B(SelectedClient);
  9.             if (RequestLoop(veh))
  10.             {
  11.                 SET_ENTITY_AS_MISSION_ENTITY(veh, 0, 1);
  12.                 DECOR_REMOVE(veh, "Player_Vehicle"); //0xE0E2640B = DECOR_REMOVE
  13.                 //0xDB718B21 = DECOR_SET_INT
  14.                 DECOR_SET_INT(veh, "Player_Vehicle", hash);
  15.                 DECOR_SET_INT(veh, "Veh_Modded_By_Player", hash);
  16.                 DECOR_SET_INT(veh, "PV_Slot", 2);
  17.                 DECOR_SET_INT(veh, "Previous_Owner", hash);
  18.  
  19.                 PrintMessage("Work in progress\nYou can drive this vehicle into your garage now");
  20.             }
  21.         }
  22.         else
  23.             PrintMessage(Format("%s is not in a vehicle", players[SelectedClient].name));
  24.     }
  25.     else
  26.         PrintMessage("Player no longer in game");
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement