Advertisement
Tyler_

Untitled

Apr 20th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. CMD:trailer(playerid, params[])
  2. {
  3. new veh[2], Float:Pos[4]; new Float:vhealth;
  4. GetPlayerPos(playerid, Float:Pos[0], Float:Pos[1], Float:Pos[2]); GetPlayerFacingAngle(playerid, Float:Pos[3]);
  5. HouseTrailer = CreateObject(3171, 0.00724, -1.84854, -0.96500, 0.00000, 0.00000, 180.00000);
  6. veh[0] = CreateVehicle(479, Float:Pos[0], Float:Pos[1], Float:Pos[2], Float:Pos[3], -1, -1, 50000); veh[1] = CreateVehicle(606, Float:Pos[0], Float:Pos[1], Float:Pos[2], Float:Pos[3], -1, -1, 50000);
  7. AttachObjectToVehicle(HouseTrailer, veh[1], 0.00724, -1.84854, -0.96500, 0.00000, 0.00000, 180.00000);
  8. PutPlayerInVehicle(playerid, veh[0], 0);
  9. AttachTrailerToVehicle(veh[1], veh[0]);
  10. for(new i = 0; i < MAX_PLAYERS; i++)
  11. {
  12. GetVehicleHealth(veh[1], vhealth);
  13. if(vhealth < 50) {
  14. DestroyObject(HouseTrailer); DestroyVehicle(veh[1]); }
  15. }
  16. return 1;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement