export default function freeze() {
    mp.events.add("CLIENT:FreezePlayer", (player) =>
    {
        player.freezePosition(true);
    });
    mp.events.add("CLIENT:UnFreezePlayer", (player) => {
        player.freezePosition(false);
    });
    mp.events.add("CLIENT:FreezeVehicle", (veh) => {
        if (mp.players.local.isInVehicle) {
            veh.freezePosition(true);
        }
    });
    mp.events.add("CLIENT:UnFreezeVehicle", (veh) => {
        if (mp.players.local.isInVehicle) {
            veh.freezePosition(false);
        }
    });
    mp.events.add("CLIENT:Freeze", (player) => {
        if (player.isInVehicle) {
            player.vehicle.freezePosition(true);
        }
        else {
            player.freezePosition(true);
        }
    });
    mp.events.add("CLIENT:Freeze", (player) => {
        player.vehicle.freezePosition(false);
        player.freezePosition(false);
    });
}

