Prevent pushing other people's vehiclesSuggestion

Hi again ;)

Could you prevent pushing other people's vehicles? Thanks a lot <3

At first I didn't find the hook for it due to improper (in my opinion) naming schemes for it. Its called 'OnVehiclePush' as opposed to 'CanPushVehicle' like it should be if its preventable. Can likely add it in this newest update coming today (I think).

oh, thanks for your work.. <3

Merged post

wow, you're just space, thank you :D <3

1.8.6



Merged post

Unfortunately, it doesn’t even allow you to push your own vehicle, could you fix it? it is impossible to capsize a boat in the sea :) thanks

Merged post

I don't know how correct this is, but I removed the comments in this code and everything works :)

        private object OnVehiclePush(BaseVehicle vehicle, BasePlayer player)
        {
            if (vehicle == null || player == null) return null;
            if (!vehiclesCache.TryGetValue(vehicle, out Vehicle foundVehicle)) return null;
            ulong userID = player.userID.Get();
            
            if (foundVehicle.PlayerId == userID || AreFriends(foundVehicle.PlayerId, player.userID)) return null;
            if (HasAdminPermission(player)) return null;
            
            Respond here
            SendCantPushMessage(player, foundVehicle);
            return true;
        }