SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.8 KiB

5 years ago
  1. /* SA-MP Vehicle Functions
  2. *
  3. * (c) Copyright 2005-2012, SA-MP Team
  4. *
  5. */
  6. #if defined _vehicles_included
  7. #endinput
  8. #endif
  9. #define _vehicles_included
  10. #pragma library vehicles
  11. #define CARMODTYPE_SPOILER 0
  12. #define CARMODTYPE_HOOD 1
  13. #define CARMODTYPE_ROOF 2
  14. #define CARMODTYPE_SIDESKIRT 3
  15. #define CARMODTYPE_LAMPS 4
  16. #define CARMODTYPE_NITRO 5
  17. #define CARMODTYPE_EXHAUST 6
  18. #define CARMODTYPE_WHEELS 7
  19. #define CARMODTYPE_STEREO 8
  20. #define CARMODTYPE_HYDRAULICS 9
  21. #define CARMODTYPE_FRONT_BUMPER 10
  22. #define CARMODTYPE_REAR_BUMPER 11
  23. #define CARMODTYPE_VENT_RIGHT 12
  24. #define CARMODTYPE_VENT_LEFT 13
  25. #define VEHICLE_PARAMS_UNSET -1
  26. #define VEHICLE_PARAMS_OFF 0
  27. #define VEHICLE_PARAMS_ON 1
  28. // Vehicle
  29. native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0);
  30. native DestroyVehicle(vehicleid);
  31. native IsVehicleStreamedIn(vehicleid, forplayerid);
  32. native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
  33. native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
  34. native GetVehicleZAngle(vehicleid, &Float:z_angle);
  35. native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
  36. native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z);
  37. native SetVehicleZAngle(vehicleid, Float:z_angle);
  38. native SetVehicleParamsForPlayer(vehicleid,playerid,objective,doorslocked);
  39. native ManualVehicleEngineAndLights();
  40. native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  41. native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective);
  42. native GetVehicleParamsSirenState(vehicleid);
  43. native SetVehicleParamsCarDoors(vehicleid, driver, passenger, backleft, backright);
  44. native GetVehicleParamsCarDoors(vehicleid, &driver, &passenger, &backleft, &backright);
  45. native SetVehicleParamsCarWindows(vehicleid, driver, passenger, backleft, backright);
  46. native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &backleft, &backright);
  47. native SetVehicleToRespawn(vehicleid);
  48. native LinkVehicleToInterior(vehicleid, interiorid);
  49. native AddVehicleComponent(vehicleid, componentid);
  50. native RemoveVehicleComponent(vehicleid, componentid);
  51. native ChangeVehicleColor(vehicleid, color1, color2);
  52. native ChangeVehiclePaintjob(vehicleid, paintjobid);
  53. native SetVehicleHealth(vehicleid, Float:health);
  54. native GetVehicleHealth(vehicleid, &Float:health);
  55. native AttachTrailerToVehicle(trailerid, vehicleid);
  56. native DetachTrailerFromVehicle(vehicleid);
  57. native IsTrailerAttachedToVehicle(vehicleid);
  58. native GetVehicleTrailer(vehicleid);
  59. native SetVehicleNumberPlate(vehicleid, numberplate[]);
  60. native GetVehicleModel(vehicleid);
  61. native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_*
  62. native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id
  63. native RepairVehicle(vehicleid); // Repairs the damage model and resets the health
  64. native GetVehicleVelocity(vehicleid, &Float:X, &Float:Y, &Float:Z);
  65. native SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z);
  66. native SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z);
  67. native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
  68. native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  69. #define VEHICLE_MODEL_INFO_SIZE 1
  70. #define VEHICLE_MODEL_INFO_FRONTSEAT 2
  71. #define VEHICLE_MODEL_INFO_REARSEAT 3
  72. #define VEHICLE_MODEL_INFO_PETROLCAP 4
  73. #define VEHICLE_MODEL_INFO_WHEELSFRONT 5
  74. #define VEHICLE_MODEL_INFO_WHEELSREAR 6
  75. #define VEHICLE_MODEL_INFO_WHEELSMID 7
  76. #define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z 8
  77. #define VEHICLE_MODEL_INFO_REAR_BUMPER_Z 9
  78. native GetVehicleModelInfo(vehiclemodel, infotype, &Float:X, &Float:Y, &Float:Z);
  79. // Virtual Worlds
  80. native SetVehicleVirtualWorld(vehicleid, worldid);
  81. native GetVehicleVirtualWorld(vehicleid);