Update 07.12.2022
This commit is contained in:
@@ -5,10 +5,6 @@ using CitizenFX.Core.Native;
|
||||
|
||||
namespace TaxiJob.Client.Extensions {
|
||||
public static class EntityExtensions {
|
||||
|
||||
|
||||
public static void SetDoorLockStatus(this Vehicle vehicle, LockStatus status) => API.SetVehicleDoorsLocked(vehicle.Handle, (int)status);
|
||||
public static void SetNumberPlateText(this Vehicle vehicle, string plate) => API.SetVehicleNumberPlateText(vehicle.Handle, plate);
|
||||
|
||||
public static void Freeze(this Entity entity, bool toggle) => API.FreezeEntityPosition(entity.Handle, toggle);
|
||||
public static void AsMissionEntry(this Entity entity) => API.SetEntityAsMissionEntity(entity.Handle, true, false);
|
||||
@@ -29,6 +25,7 @@ namespace TaxiJob.Client.Extensions {
|
||||
}
|
||||
|
||||
public static async Task Load(this Model model) {
|
||||
if (model.IsLoaded) return;
|
||||
API.RequestModel((uint)model.Hash);
|
||||
while (!API.HasModelLoaded((uint)model.Hash)) {
|
||||
await BaseScript.Delay(50);
|
||||
@@ -36,15 +33,4 @@ namespace TaxiJob.Client.Extensions {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum LockStatus {
|
||||
None,
|
||||
Unlocked,
|
||||
Locked,
|
||||
LockForPlayers,
|
||||
LockForInVehicle,
|
||||
LockedInitially,
|
||||
ForceShutDoors,
|
||||
LockedButCanBeDamaged
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user