Add vehicle seat constants to shared
This commit is contained in:
@@ -19,14 +19,6 @@ const AGRP_VEHOWNER_BIZ = 6; // Owned by a business (also i
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
// Vehicle Seats
|
|
||||||
const AGRP_VEHSEAT_DRIVER = 0;
|
|
||||||
const AGRP_VEHSEAT_FRONTPASSENGER = 1;
|
|
||||||
const AGRP_VEHSEAT_REARLEFTPASSENGER = 2;
|
|
||||||
const AGRP_VEHSEAT_REARRIGHTPASSENGER = 3;
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Representing a vehicle's data. Loaded and saved in the database
|
* @class Representing a vehicle's data. Loaded and saved in the database
|
||||||
* @property {Array.<Number>} trunkItemCache
|
* @property {Array.<Number>} trunkItemCache
|
||||||
@@ -165,6 +157,14 @@ class VehicleData {
|
|||||||
this.licensePlate = toInteger(dbAssoc["veh_license_plate"]);
|
this.licensePlate = toInteger(dbAssoc["veh_license_plate"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveToDatabase() {
|
||||||
|
saveVehicleToDatabase(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
respawn() {
|
||||||
|
respawnVehicle(this.vehicle);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -327,8 +327,8 @@ function spawnAllVehicles() {
|
|||||||
let vehicle = spawnVehicle(getServerData().vehicles[i]);
|
let vehicle = spawnVehicle(getServerData().vehicles[i]);
|
||||||
getServerData().vehicles[i].vehicle = vehicle;
|
getServerData().vehicles[i].vehicle = vehicle;
|
||||||
setEntityData(vehicle, "agrp.dataSlot", i, false);
|
setEntityData(vehicle, "agrp.dataSlot", i, false);
|
||||||
setAllVehicleIndexes();
|
|
||||||
}
|
}
|
||||||
|
setAllVehicleIndexes();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -1703,7 +1703,6 @@ function createPermanentVehicle(modelIndex, position, heading, interior = 0, dim
|
|||||||
setEntityData(vehicle, "agrp.dataSlot", slot - 1, false);
|
setEntityData(vehicle, "agrp.dataSlot", slot - 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return vehicle;
|
return vehicle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,3 +138,9 @@ const AGRP_NPC_ACTION_SPRINTTO = 4;
|
|||||||
const AGRP_NPC_ACTION_FOLLOW = 5;
|
const AGRP_NPC_ACTION_FOLLOW = 5;
|
||||||
const AGRP_NPC_ACTION_DEFEND = 6;
|
const AGRP_NPC_ACTION_DEFEND = 6;
|
||||||
const AGRP_NPC_ACTION_GUARD_AREA = 7;
|
const AGRP_NPC_ACTION_GUARD_AREA = 7;
|
||||||
|
|
||||||
|
// Vehicle Seats
|
||||||
|
const AGRP_VEHSEAT_DRIVER = 0;
|
||||||
|
const AGRP_VEHSEAT_FRONTPASSENGER = 1;
|
||||||
|
const AGRP_VEHSEAT_REARLEFTPASSENGER = 2;
|
||||||
|
const AGRP_VEHSEAT_REARRIGHTPASSENGER = 3;
|
||||||
Reference in New Issue
Block a user