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