Пример #1
0
            public static void PostVehicleLock(uint instanceID, CSteamID owner, CSteamID group, bool locked)
            {
                var vehicle = VehicleManager.findVehicleByNetInstanceID(instanceID);

                if (vehicle == null)
                {
                    return;
                }

                var nativePlayer = PlayerTool.getPlayer(owner);

                if (nativePlayer == null)
                {
                    return;
                }

                OnVehicleLockUpdated?.Invoke(vehicle, nativePlayer, group, locked);
            }
Пример #2
0
            private static void PostVehicleLock(VehicleManager __instance, uint instanceID, CSteamID owner, CSteamID group, bool locked)
            {
                InteractableVehicle vehicle = VehicleManager.findVehicleByNetInstanceID(instanceID);

                if (vehicle is null)
                {
                    return;
                }

                Player nativePlayer = PlayerTool.getPlayer(owner);

                if (nativePlayer is null)
                {
                    return;
                }

                if (locked)
                {
                    OnVehicleLockUpdated?.Invoke(vehicle, nativePlayer, group, locked);
                }
            }