Advertisement
SonOfABeach

Untitled

May 19th, 2015
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. void Wheelchair()
  2. {
  3.     Vector3 MyCoords = GET_ENTITY_COORDS(PLAYER_PED_ID(), true);
  4.     Hash Caddy_Hash = GET_HASH_KEY("caddy2");
  5.     REQUEST_MODEL(Caddy_Hash);
  6.     if (HAS_MODEL_LOADED(Caddy_Hash))
  7.     {
  8.         int Vehicle = CREATE_VEHICLE(Caddy_Hash, MyCoords.x, MyCoords.y, MyCoords.z, GET_ENTITY_HEADING(Handle), 1, 0);
  9.         if (Vehicle != 0)
  10.         {
  11.             int Object = CREATE_OBJECT(GET_HASH_KEY("prop_wheelchair_01"), 0, 0, 0, true, true, false);
  12.             if (DOES_ENTITY_EXIST(Object))
  13.             {
  14.                 SET_PED_INTO_VEHICLE(PLAYER_PED_ID(), Vehicle, -1);
  15.                 if (IS_PED_IN_ANY_VEHICLE(Handle, 0))
  16.                 {
  17.                     SET_ENTITY_VISIBLE(Vehicle, false);
  18.                     ATTACH_ENTITY_TO_ENTITY(Object, Vehicle, 0, -0.27, -0.24, 0.13, 0, 0, 180, 0, 1, 0, 0, 2, 1);
  19.                     set_status_text("~g~Spawned: ~HUD_COLOUR_WHITE~Wheelchair!");
  20.                     SET_ENTITY_VISIBLE(Handle, true);
  21.                 }
  22.             }
  23.             SET_MODEL_AS_NO_LONGER_NEEDED(Caddy_Hash);
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement